lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.52k stars 751 forks source link

[hmac] D2(S) Signoff #20996

Closed msfschaffner closed 6 months ago

msfschaffner commented 8 months ago

Description

Ensure D2 signoff criteria are fulfilled after focus area changes have landed.

andreaskurth commented 6 months ago

Commits since Earlgrey-ES tapeout

git rev-parse HEAD

d7483116b80bf56ce2b8e665c679872de3f3794d

git log Earlgrey-M2.5.2-RC0..HEAD --oneline hw/ip/hmac

Common to all changes:

Issues closed since the Earlgrey-ES tapeout

https://github.com/lowRISC/opentitan/issues?q=is%3Aissue+is%3Aclosed+closed%3A%3E2023-06-27+hmac

Currently open issues

https://github.com/lowRISC/opentitan/issues?q=is%3Aissue+is%3Aopen+hmac

Summary

Re RTL changes, there were three main sets of changes:

Re closed design issues since Earlgrey-ES tapeout, all D2-relevant changes are captured in the RTL changes above.

Re open design issues, there is only one: #21710 tracked for D3 & M4.

In conclusion, I think this analysis supports signing off hmac version 2.0.0 at D2 (version 1.0.0, which we forked from after Earlgrey-ES TO, was at D3) once the three opens above are done. Since hmac only features the BUS.INTEGRITY countermeasure, I think we can directly sign off at D2S.

andreaskurth commented 6 months ago

@vogelpi: May I ask you for feedback on my analysis and D2S signoff approval -- conditional on the completion of the three opens above -- if you agree?

gdessouky commented 6 months ago

Thanks @andreaskurth, I filed another issue now for an open design issue to track for D3 & M4 https://github.com/lowRISC/opentitan/issues/22312

vogelpi commented 6 months ago

Thanks for preparing this @andreaskurth ! I've reviewed the big RTL PRs as well as the material you've put together and I agree to sign this of at D2S. It's unfortunate that there are still a couple of opens regarding the wider digests and configurable key length feature, including items relevant for D2 (documentation, block diagram). However, this particular change is well motivated and approved by key stakeholders prior to the implementation. So, I believe this is acceptable.

As for the timing checks, the new features are enabled by default and thus also synthesized for FPGA. Timing is still met and the runtime did not horribly increase. So it can be argued that this item of the checklist is met as well.

@gdessouky , I can see that in the PR adding support for wider digests there are about 6 unticked checkboxes (see https://github.com/lowRISC/opentitan/pull/21604#issue-2147283075). @andreaskurth noted that issues should be created to track those items. So far, I'v only found the following issues:

The other 3 items which include DIFs etc. seem to be untracked which is not ideal. This might get forgotten. Can you please create issues for these items and link them in the original PR message in #21604? Then it's obvious that all relevant follow-up items are tracked. Thanks!

gdessouky commented 6 months ago

Thanks @vogelpi and @andreaskurth!

PR https://github.com/lowRISC/opentitan/pull/22247, once merged, would close one of the open issues relevant for D2. It fails CI in ROM tests that don't have to do with HMAC. I've force pushed after Rupert's review, and once you approve it can get merged.

I also put up now PR https://github.com/lowRISC/opentitan/pull/22331 to update the documentation ~modulo the block diagrams (trying right now to find an efficient way to make minor edits to the svg diagrams)~ as well as the block diagrams. I could elaborate more on the SHA-2 engine and its 32-bit wrapper in the block diagram in a follow-up minor fix. This would close issue https://github.com/lowRISC/opentitan/issues/21711.

Regarding the open checkboxes in the PR, the last 3 are covered by issue #22102 (ticked out 1 and consolidated last 2 into 1). I've created another dedicated issue to track the DIFs updates (checkbox 2); I assumed they'd need to be inherently changed anyway for the DV work to proceed at top-level, thanks for catching! I'll link the issues into the PR message.

andreaskurth commented 6 months ago

It's unfortunate that there are still a couple of opens regarding the wider digests and configurable key length feature, including items relevant for D2 (documentation, block diagram). However, this particular change is well motivated and approved by key stakeholders prior to the implementation. So, I believe this is acceptable.

These have now been addressed, and I updated the signoff analysis.

@gdessouky , I can see that in the PR adding support for wider digests there are about 6 unticked checkboxes (see #21604 (comment)). @andreaskurth noted that issues should be created to track those items. So far, I'v only found the following issues: [...] The other 3 items which include DIFs etc. seem to be untracked which is not ideal. This might get forgotten. Can you please create issues for these items and link them in the original PR message in #21604? Then it's obvious that all relevant follow-up items are tracked. Thanks!

As mentioned by @gdessouky, two previously untracked items are now complete and the extension of the DIF is tracked in https://github.com/lowRISC/opentitan/issues/22332.

With that, I think we're ready to sign HMAC off at D2S. I'll create a PR. Thanks for your review and work on this, @vogelpi and @gdessouky! :+1:

vogelpi commented 6 months ago

This sounds good to me, thanks for the feedback @gdessouky and @andreaskurth , great work!