-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
samples: Add sample for PSA PBKDF2 #13285
Conversation
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y | ||
|
||
# Using hardware crypto accelerator | ||
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
samples/crypto/pbkdf2/README.rst
Outdated
a. The input key is imported into the PSA crypto keystore. | ||
#. The output key is derived. |
There was a problem hiding this comment.
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.
samples/crypto/pbkdf2/README.rst
Outdated
|
||
#. Cleanup: | ||
|
||
a. The input and the output keys are removed from the PSA crypto keystore. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# driver to accelerate sub-operations. | |
# driver which will use hardware accelerated crypto for low-level operations, if enabled. |
No description provided.