-
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: Refactor Cracen IKG keys #18796
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: f92ecb427a23aa57baf3050b8224d43401f6a54b more detailssdk-nrf:
Github labels
List of changed files detected by CI (5)
Outputs:ToolchainVersion: b77d8c1312 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
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/platform_keys/platform_keys.c
Show resolved
Hide resolved
subsys/nrf_security/src/drivers/cracen/cracenpsa/src/platform_keys/platform_keys.c
Outdated
Show resolved
Hide resolved
This pull request has been marked as stale because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 7 days. Note, that you can always re-open a closed pull request at any time. |
9e37e74
to
50361eb
Compare
50361eb
to
4ba3abc
Compare
This refactors how we handle the IKG key IDs for Cracen. Before this change we used the internal Cracen IKG key identifiers inside the builtin key driver. This had an issue because both the KMU keys and the IKG internal key IDs share the IDs 0-2. To avoid this collision the IKG handling is refactored to use the reserved Cracen PSA key identifiers in the driver level and only use the internal key intentifiers deeper in the implementation in order to avoid the conflicts. This also removes unused structs related to the IKG keys and unused code as well. Signed-off-by: Georgios Vasilakis <[email protected]>
4ba3abc
to
f92ecb4
Compare
static bool cracen_is_ikg_key(const psa_key_attributes_t *attributes) | ||
{ | ||
#if CONFIG_PSA_NEED_CRACEN_PLATFORM_KEYS | ||
return cracen_platform_keys_is_ikg_key(attributes) ? true : false; |
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.
return cracen_platform_keys_is_ikg_key(attributes) ? true : false; | |
return cracen_platform_keys_is_ikg_key(attributes); |
{ | ||
if (PSA_KEY_LIFETIME_GET_LOCATION(psa_get_key_lifetime(attributes)) == | ||
PSA_KEY_LOCATION_CRACEN) { | ||
return cracen_get_ikg_opaque_size(attributes); |
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.
Seems like you forgot to update this reference?
This fixes an issue where the KMU keys 0-2 on the nRF54L15 cannot be used to store keys.
This refactors how we handle the IKG key IDs for
Cracen. Before this change we used the internal
Cracen IKG key identifiers inside the builtin key
driver. This had an issue because both the KMU keys and the IKG internal key IDs share the IDs 0-2.
To avoid this collision the IKG handling is refactored to use the reserved Cracen PSA key identifiers in the driver level and only use the internal key intentifiers deeper in the implementation in order to avoid the conflicts.
This also removes unused structs related to the IKG keys and unused code as well.