Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

[acc,rtl] Masked the AppIntf for KMAC connection#241

Closed
apinise wants to merge 12 commits into
masterfrom
acc-masked-app
Closed

[acc,rtl] Masked the AppIntf for KMAC connection#241
apinise wants to merge 12 commits into
masterfrom
acc-masked-app

Conversation

@apinise

@apinise apinise commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Adds masking support to the ACC side of the KMAC AppIntf, which was masked in #242.

  • Added a 1-bit field to the kmac_cfg CSR to enable/disable masking for the next KMAC transaction.
  • The existing kmac_msg and kmac_digest WSR registers are now used for Share 0 or the unmasked value if masking is not enabled.
  • Created an additional kmac_msg1 and kmac_digest1 WSR with independent datapaths for Share 1.
  • Updated the accsim ISS and kmac.py to implement masked KMAC transactions.
  • Updated the existing app_req.py RIG and created a new bad_app_req.py to generate first-order masked transactions for random binary testing.
  • Reworked the existing error handling for the KMAC interface in ACC.
    • Made internal errors fatal/non-fatal depending on the risk of deadlock, or response to potential FI attack.
    • Updated existing crypto tests to explicitly set the partial word length for the final message write instead of implying the remaining length to add additional hardening.
  • Updated the existing coverage exclusions with the new interface port names.
  • Added a new testcase to the test plan for the bad_app_req.py generated snippets.

@apinise apinise marked this pull request as ready for review April 12, 2026 13:38
@apinise apinise force-pushed the acc-masked-app branch 17 times, most recently from b9096bd to 3767ea0 Compare April 14, 2026 19:31
@apinise apinise force-pushed the acc-masked-app branch 2 times, most recently from ba9f64a to 7a47e10 Compare May 6, 2026 12:56
@apinise apinise requested a review from LouisTheLuis May 12, 2026 18:10
apinise added 6 commits May 18, 2026 10:23
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Renamed existing digest WSR to digest0 and created a new
digest1 register for the second share.
Made a state machine to stall the eager KMAC refresh until
both WSR have been read.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Changed rig to generate a clean base KMAC transaction and
extend it to inject errors. Added fatal and recoverable
error flags for the AppIntf to the ISS and RTL. Created
a new test sequence to verify transactions.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
apinise and others added 4 commits May 18, 2026 11:30
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
Added masked message support to the verilator test and
updated the expected final register values. A fixed mask
has been used on the KMAC output to synchronize it with
the ISS value.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants