Skip to content
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

[keymgr_dpe] Port keymgr_dpe_key_derivation test from integrated_dev #26350

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jwnrt
Copy link
Contributor

@jwnrt jwnrt commented Feb 18, 2025

I have not yet ported to device tables, this is more or less a straight cherry pick with only superficial fixes to paths etc.

I have had to squash the four commits that added this test (and testutils) into one because individually they do not compile.

This PR also includes a partial fix to allow dif_otp_ctrl to be used on Darjeeling. The real fix may involve generating parts of this DIF instead.

edit: now includes the DT changes

@jwnrt jwnrt requested a review from a team as a code owner February 18, 2025 16:31
@jwnrt jwnrt requested review from HU90m and removed request for a team February 18, 2025 16:31
@jwnrt jwnrt requested review from andreaskurth and nbdd0121 and removed request for HU90m February 18, 2025 16:39
@jwnrt jwnrt force-pushed the keymgr-dpe-key-derivation branch from d77fef9 to 7214899 Compare February 20, 2025 15:47
@jwnrt jwnrt requested review from nbdd0121 and pamaury February 20, 2025 15:48
Copy link
Contributor

@pamaury pamaury left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jwnrt jwnrt force-pushed the keymgr-dpe-key-derivation branch from 7214899 to 12a5e28 Compare February 20, 2025 22:07
@jwnrt
Copy link
Contributor Author

jwnrt commented Feb 20, 2025

Rebased

@jwnrt jwnrt force-pushed the keymgr-dpe-key-derivation branch from 12a5e28 to 9505277 Compare February 21, 2025 14:09
Copy link
Contributor

@nbdd0121 nbdd0121 left a comment

Choose a reason for hiding this comment

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

It seems that the otp_ctrl is missing some secret3 stuff which is present on integrated_dev.

AlexJones0 and others added 5 commits February 24, 2025 17:12
Ports the otp_ctrl DIF to support Darjeeling as well as Earlgrey by
pulling in all the changes from the `integrated_dev` branch related to
Darjeeling's new partitions, wrapping them in conditional compilation
based on the current top being built for.

In particular almost all of the code ported over from the
`integrated_dev` branch can be traced back to commit bb4e9b0.

Co-authored-by: Guillermo Maturana <[email protected]>
Signed-off-by: Alex Jones <[email protected]>
This commit adds a top-level key derivation test, loosely derived from
`chip_sw_keymgr_key_derivation` for the non-DPE `keymgr`. In a nutshell,
the test goes through multiple key derivations from boot stage 0 to 3
and checks that `keymgr_dpe` correctly takes the various inputs from
hardware (e.g., `otp_ctrl`, `rom_ctrl`) and software into account when
deriving its internal keys as well as when generating versioned keys for
SW or sideloading to HW (AES, OTBN, and KMAC).

This commit is a squash of the following four commits which do not make
sense individually on this branch:

(cherry picked from commit 51622c5)
(cherry picked from commit eafb436)
(cherry picked from commit edef349)
(cherry picked from commit 14bdf72)

Co-authored-by: James Wainwright <[email protected]>
Signed-off-by: Miguel Osorio <[email protected]>
Signed-off-by: Andreas Kurth <[email protected]>
Signed-off-by: Ravi Sahita <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
@jwnrt jwnrt force-pushed the keymgr-dpe-key-derivation branch from 9505277 to 5db622f Compare February 24, 2025 17:12
@jwnrt
Copy link
Contributor Author

jwnrt commented Feb 24, 2025

@nbdd0121 I have swapped my OTP dif patch for @AlexJones0's which is much more comprehensive. The SECRET3 support should now be working.

@jwnrt jwnrt requested a review from nbdd0121 February 24, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants