-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 key revocation for SICR keys #19710
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: e4eb37445c63cf4bbf3785eff13179fc6b7c8a42 more detailssdk-nrf:
Github labels
List of changed files detected by CI (3)
Outputs:ToolchainVersion: 342151af73 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
4fdb848
to
caca435
Compare
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/platform_keys/platform_keys.c
Outdated
Show resolved
Hide resolved
caca435
to
4ed1318
Compare
This refactors how SICR keys are writen into MRAM. This refactors the code but it should not change any funcionality. The purpose of this is to make the MRAM writing part reusable so it can be used by the revocation functionality later. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
4ed1318
to
8008df6
Compare
8008df6
to
14c4ee8
Compare
Adds support of key revocation using the psa_destroy_key API. The value 0xfa50 is used in the key type in order to mark an revoked key. The return code PSA_ERROR_NOT_PERMITTED is returned for revoked keys for all the functions in the PSA crypto driver wrapper. This error code seems OK since it mentions platform specific policies for not permitted an operation. Ref: NCSDK-30076 Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
14c4ee8
to
dcd079a
Compare
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/platform_keys/platform_keys.c
Show resolved
Hide resolved
if (type == INVALID || type == REVOKED) { | ||
return 0; |
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.
Just wondering, wouldn't we want to return a more clear error than a 0 size?
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 wanted to avoid doing that in this same PR to make it more clear to follow.
But I have this PR which updates this function and returns psa_status_t:
#19731
Since likely the 19731 will probably get merged first I will just rebase the current PR. So no need to do something now here I think.
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.
Ah right, I even approved it, but didn't quite remember it. IMO it would have been plenty fine to have a single PR as long as the commits are separate.
write_sicr_key_to_mram(key, sicr_attr, encrypted_key, key_buffer_size); | ||
write_sicr_key_to_mram(&key, sicr_attr, encrypted_key, key_buffer_size); | ||
} else { | ||
write_sicr_key_to_mram(key, sicr_attr, key_buffer, key_buffer_size); | ||
write_sicr_key_to_mram(&key, sicr_attr, key_buffer, key_buffer_size); |
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.
better squash that into the first commit
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.
Good catch, thanks! It seems that I messed up my fixup commit. Will update
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/platform_keys/platform_keys.c
Outdated
Show resolved
Hide resolved
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/platform_keys/platform_keys.c
Outdated
Show resolved
Hide resolved
…keys/platform_keys.c Co-authored-by: Tomi Fontanilles <tomi.f@tutanota.com>
…keys/platform_keys.c Co-authored-by: Tomi Fontanilles <tomi.f@tutanota.com>
Adds key revocation for the platform keys stored in SICR for nRF54H20.