-
Notifications
You must be signed in to change notification settings - Fork 799
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
[hmac] Wipe secret assertions and spec update #25674
Conversation
martin-velay
commented
Dec 17, 2024
- related to issue [hmac,dv] Various assertions #23563
- update spec to be aligned with the RTL
- add assertions to check the effect of wipe secret operation
- fix doc to be aligned with the RTL as the FSMs are not affected by the wipe secret triggering. But this is not a security issue. Signed-off-by: Martin Velay <[email protected]>
@andreaskurth, as discussed the doc update should fall into the |
818af47
to
a78ce87
Compare
hw/ip/prim/rtl/prim_sha2.sv
Outdated
@@ -264,6 +276,19 @@ module prim_sha2 import prim_sha2_pkg::*; | |||
assign digest_o[i][31:0] = digest256_q[i]; | |||
assign digest_o[i][63:32] = 32'b0; | |||
end | |||
|
|||
`ifndef SYNTHESIS |
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 don't think we need this ifndef?
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.
Sorry: that wasn't very explicit. I think that prim_assert.sv
will include dummy versions of all the assertion macros if SYNTHESIS
is defined.
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 have removed it, but can you explain me the internal guidance around this ifdef?
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.
The ifndef SYNTHESIS
is required only if you generate additional signals required to formulate the assertions. In some cases, we need to even generate a bunch of flops just to formulate the assertions, of course we don't want to synthesize these flops :-)
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 understand better now. Thanks !
Thanks @martin-velay, I think this PR should fully be cherry-picked to |
- add multiple assertions to ensure that the specified internal variables are cleared when a wipe secret operation is triggered. Signed-off-by: Martin Velay <[email protected]>
a78ce87
to
905b3d1
Compare
Thanks for your review @rswarbrick ! |
CHANGE AUTHORIZED: hw/ip/hmac/data/hmac.hjson |
CHANGE AUTHORIZED: hw/ip/hmac/data/hmac.hjson |
Successfully created backport PR for |