lowRISC / opentitan

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

[hmac,dv] Save and Restore improvements #23562

Open martin-velay opened 5 months ago

martin-velay commented 5 months ago

Description

This issue follows that one https://github.com/lowRISC/opentitan/issues/21708 where the main parts of the feature has been tested via this PR https://github.com/lowRISC/opentitan/pull/23116. Nevertheless, this PR also indicates that there are still some missing things to be added:

FYI @gdessouky @andreaskurth @ballifatih : and if you feel that anything else as to be tested, please rise it here.

vogelpi commented 5 months ago

Thanks for creating the issue @martin-velay .

Verify context B with multi-streamed (= different context switching)

Right now, only context A is verified meaning we just check that context A can be saved and restored which is fine I believe.

Verify intermediate digest when switching

This would allow detecting when exactly things get out of sync in case of issues. It would ease debugging but I think as long as the design passes verification, it's not a very high priority to allow more fine grained debugging.

So for me, both these items are not too important but rather nice to have. It's fine to defer this to M5 in my view.

gdessouky commented 5 months ago

[ ] Verify context B with multi-streamed (= different context switching)

And for sufficient assurance for M4, we cover this in the driver-based TLT for now.

andreaskurth commented 5 months ago

I think we would do this as part of HMAC V3 work (M7) -- @martin-velay WDYT?

martin-velay commented 5 months ago

@andreaskurth: OK

martin-velay commented 3 months ago

This is covered at top level but it would be better to also cover this at block level as part of M7