-
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
nrf_security: Add Cracen key derivation for SPAKE2P keys #19744
base: main
Are you sure you want to change the base?
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 1ef07256aea087a7f665d8c13074309d8b8c408e more detailssdk-nrf:
Github labels
List of changed files detected by CI (5)
Outputs:ToolchainVersion: 4cff34261a Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/key_management.c
Outdated
Show resolved
Hide resolved
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/key_management.c
Outdated
Show resolved
Hide resolved
I tested this change and tried to generate Spake2+ verifier for the following parameters:
The outcome should be:
I get this result on nRF52 + Oberon, but on nRF54L with this PR I get:
EDIT: Ah, I forgot to check the return value from |
Thanks for the feedback! We have another task for the export_public_key function but it might make sense to just do it here for completeness. Did you check if the derive_key function gives you the correct result from this function? |
e925800
to
99fcf77
Compare
Adds support for key derivation of SPAKE2P keys with Cracen. It currently supports only SECP256R1 keys. Ref: NCSDK-30368 Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
99fcf77
to
78004d0
Compare
@@ -471,6 +471,59 @@ static psa_status_t import_spake2p_key(const psa_key_attributes_t *attributes, c | |||
return PSA_SUCCESS; | |||
} | |||
|
|||
static psa_status_t cracen_derive_spake2p_key(const psa_key_attributes_t *attributes, const uint8_t *input, |
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.
compliance
8e48b11
to
addc07a
Compare
@Damian-Nordic We have added support for |
Hmm. Somehow it's not working but I'll debug it. What's strange is that I get no error despite of returning no output because of this
This doesn't look right, no? :) |
Add support for export of SPAKE2P keys to Cracen. It currently only supports SECP256R1 keys. Signed-off-by: Dag Erik Gjørvad <dag.erik.gjorvad@nordicsemi.no>
Ahaha, no, that has been in there for quite a while it seems. Updated it. Found the issue that caused it to be supposed to throw an error to begin with. Please try it again when you have the chance |
addc07a
to
1ef0725
Compare
I checked that the Spake2+ private key derivation works correctly but public key needs a bit more work. You used generic But I can approve the PR if you would prefer to first merge the private key part :) |
Adds support for key derivation of SPAKE2P keys with Cracen. It currently supports only SECP256R1 keys.
Ref: NCSDK-30368