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

[kmac,rtl] Adds masking support for the sideload AppIntf in KMAC#242

Closed
apinise wants to merge 6 commits into
masterfrom
eapinis/kmac-msg-masking
Closed

[kmac,rtl] Adds masking support for the sideload AppIntf in KMAC#242
apinise wants to merge 6 commits into
masterfrom
eapinis/kmac-msg-masking

Conversation

@apinise

@apinise apinise commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This PR extends the masking in AppIntf masking through the entirety of KMAC.

  • The struct app_req_t in kmac_pkg.sv now contains data_share0 and data_share1.
  • kmac_app.sv now processes two shares in masking mode for the ACC connection through its AppCfgDynamic mode. Other connections, including ROM, LC, and KeyMgr still use unmasked data path and the second share is driven to '0 in the respective block levels.
  • kmac_msg.sv has a second msgfifo in masked mode to hold the second share before forwarding it to the sha3 module. The FIFO status are tied together for error handling and fault detection.
  • kmac_app_host_seq.sv now drives two shares to the ACC app interface when in masked mode, other interfaces remain '0.
  • kmac_scoreboard.sv will unmask the input message to send to the DPI-C model.

@apinise apinise force-pushed the eapinis/kmac-msg-masking branch 7 times, most recently from c52bfb7 to 57ec4a1 Compare April 13, 2026 16:33
@apinise apinise changed the title [kmac,rtl] Adds masking support for the sideload AppIntf [kmac,rtl] Adds masking support for the sideload AppIntf in KMAC Apr 13, 2026
@apinise apinise force-pushed the eapinis/kmac-msg-masking branch 2 times, most recently from 7b7377a to 92d5394 Compare April 13, 2026 20:14
@apinise apinise requested a review from LouisTheLuis May 12, 2026 13:13

@LouisTheLuis LouisTheLuis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

apinise added 2 commits May 18, 2026 10:29
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
@apinise apinise force-pushed the eapinis/kmac-msg-masking branch from 92d5394 to f624683 Compare May 18, 2026 14:29
apinise added 4 commits May 18, 2026 17:11
This commit expands the masking of KMAC to extend through
the entire AppIntf into the SHA3 core. The interface now
contains two message shares instead of plaintext and a
second msgfifo was created to pass data into the SHA3 core.
Using software config registers you can disable the internal
masking and rely on the input message to be masked.
Alternatively, sending the plaintext in share 0 will still
work when KMAC is configured to mask internally.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Scoreboard will now unmask the two input shares to compute the digest.
Updated coverage interface to only read from the first
msgfifo during sw commands to mirror normal operations.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Created a coverage exclusion file for masked parameter due to
digest share bits [383:256] for ACC app modes being tied to 0.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
Reverted naming for byte_data_q to keep compatibility with
keymgr, lc, and rom. Also made small changes to ACC DV so
that block level tests can be run without full masking support.

Signed-off-by: Evan Apinis <eapinis@zerorisc.com>
@apinise apinise force-pushed the eapinis/kmac-msg-masking branch from f624683 to 8d7e45a Compare May 18, 2026 19:06
@apinise apinise closed this May 27, 2026
@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.

2 participants