-
Notifications
You must be signed in to change notification settings - Fork 791
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] Don't update and reseed PRNG in Disabled/Invalid state forever #23101
Conversation
Previously, keymgr would keep updating and reseeding the PRNG forever once entering the StCtrlDisabled or StCtrlInvalid state. This is not ideal from an entropy and power consumption viewpoint. This commit changes the design to - once one of the two states is entered - to keep updating the PRNG (which also triggers the reseed operation) until two more PRNG reseed operation have happened. This also includes the keymgr_DPE specific changes of lowRISC#23071. This is related to lowRISC#22997. Signed-off-by: Pirmin Vogel <[email protected]>
CHANGE AUTHORIZED: hw/ip/keymgr_dpe/rtl/keymgr_dpe.sv |
I ran a full regression and it looks to be okay. I got the following:
|
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.
LGTM.
Note for the future keymgr_dpe changes: the (old) keymgr runs/seeds LFSR because it wants to keep feeding random data during Disabled/Invalid. In keymgr_dpe RTL we have partially moved away from this "obfuscating" design decision, but since most components are borrowed directly from the (old) keymgr, we see the same pattern for LFSR as well.
Just dropping this comment here to provide a historical context.
LGTM. @andreaskurth Can you merge this one? |
CHANGE AUTHORIZED: hw/ip/keymgr_dpe/rtl/keymgr_dpe.sv |
Previously, keymgr would keep updating and reseeding the PRNG forever once entering the StCtrlDisabled or StCtrlInvalid state. This is not ideal from an entropy and power consumption viewpoint.
This commit changes the design to - once one of the two states is entered - to keep updating the PRNG (which also triggers the reseed operation) until two more PRNG reseed operation have happened.
This also includes the keymgr_DPE specific changes of #23071.
This is related to #22997.