-
Notifications
You must be signed in to change notification settings - Fork 759
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
[sival, keymgr] State-agnostic chip_sw_key_derivation_test #24755
[sival, keymgr] State-agnostic chip_sw_key_derivation_test #24755
Conversation
68a488a
to
7033770
Compare
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.
Thanks @andrea-caforio for working on this! The PR looks good, except that I would factor out the removal of unneeded includes into a separate commit. The reason is that even if the test code changes would need reverting in the future, we would want to keep the unneeded includes removed.
But you don't need to do this right now, I think this can be included with potential feedback from the software team. It would be great to also get this approved by e.g. @engdoreis (OoO today) or maybe @jwnrt . I'll ask him.
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.
This looks great, thanks @andrea-caforio
Most includes in sw/device/tests/keymgr_key_derivation_test.c are superfluous. This commit removes them and updates the corresponding Bazel build directive. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test was marked as broken in lowRISC#21706. This commit fixes this and addresses lowRISC#21500. The source of the bug is due to the nature of the ROM_EXT that runs through a CDI attestation flow advancing the key manager state to "OwnerRootKey" in the process. This was not accounted for in the test, which assumed an active "CreatorRootKey" state (this works for sim_dv tests but not with ROM_EXT). The solution to this issue lies in rendering the test state-agnostic, meaning it will execute its verifications independently of the current key manager state. This approach thus mimics the keymgr_sideload_{aes,kmac,otbn} tests which follow a similar strategy. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
7033770
to
aa4031d
Compare
Thanks, I'll merge once CI has finished |
keymgr_key_derivation_test_fpga_cw310_sival_rom_ext test
was marked as broken in #21706. This commit fixes this and addresses #21500.The source of the bug is due to the nature of the ROM_EXT that runs through a CDI attestation flow advancing the key manager state to "OwnerRootKey" in the process. This was not accounted for in the test, which assumed an active "CreatorRootKey" state (this works for sim_dv tests but not with ROM_EXT). The solution to this issue lies in rendering the test state-agnostic, meaning it will execute its verifications independently of the current key manager state. This approach thus mimics the
keymgr_sideload_{aes,kmac,otbn}
tests which follow a similar strategy.