Skip to content

Conversation

@joerchan
Copy link
Contributor

No description provided.

@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. manifest labels Nov 29, 2023
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 29, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-fw-nrfconnect-nrf_crypto X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we skipping here CONFIG_PSA_CRYPTO_DRIVER_OBERON

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's copy-paste from the HKDF sample.

It's skipped because TF-M makes sure of this, TF-M depend on key derivation from oberon.

Comment on lines 31 to 32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are actions of the sample, as the lead-in sentence says, can these be active instead of passive?

Imports the input key into the PSA crypto keystore.
Derives the output key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes the input and output keys from the PSA crypto keystore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by the logic of these last two steps: it imports/derives the keys, then removes them? What's the end result?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated to say input password, instead of input key, since we are deriving from a password in this sample.

Also, the sample is using output_bytes, instead of output_key, so there is no output key after the key derivation.
I'm removing any mention of output key in the key store.

The end results is the derived key, in the application, instead of the key store.
Usually you would want to keep the derived key in the key_store and only use it by reference, but in this case we are outputting the key to the application

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Add sample to demonstrate PBKDF2 use-case.

Signed-off-by: Joakim Andersson <[email protected]>
@@ -0,0 +1,5 @@
# Enable both oberon driver and hardware crypto accelerator
# Key derivation is only supported in software driver but is using chained
# driver to accelerate sub-operations.
Copy link
Contributor

@frkv frkv Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# driver to accelerate sub-operations.
# driver which will use hardware accelerated crypto for low-level operations, if enabled.

@@ -0,0 +1,5 @@
# Enable both oberon driver and hardware crypto accelerator
# Key derivation is only supported in software driver but is using chained
# driver to accelerate sub-operations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# driver to accelerate sub-operations.
# driver which will use hardware accelerated crypto for low-level operations, if enabled.

@rlubos rlubos merged commit 332b401 into nrfconnect:main Dec 13, 2023
@joerchan joerchan deleted the psa-pbkdf2 branch December 13, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants