Skip to content
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

Update KMAC register interfaces #92

Open
wants to merge 1 commit into
base: dev/ot-earlgrey-1.0.0-updates
Choose a base branch
from

Conversation

AlexJones0
Copy link

@AlexJones0 AlexJones0 commented Dec 17, 2024

This PR updates the KMAC's register interface to match the latest changes to Earlgrey's KMAC. These changes include:

  • Removal of ERR_PROCESSED from the CFG_SHADOWED register.
  • Addition of the ERR_PROCESSED command. Most of the functionality is related to the entropy FSM which is still a TODO, but this does also clear the relevant alert as in the RTL.
  • Replaced ENTROPY_SEED_{0,4} with just one ENTROPY_SEED register, which shifts the mappings of subsequent registers.

This change has been tested against previously passing test kmac_smoketest, which still passes. It also makes the following tests (which were previously failing) pass: kmac_functest, kmac_functest_hardcoded, kmac_mode_cshake_test and kmac_mode_kmac_test. All tests were built from master on OpenTitan.

hw/opentitan/ot_kmac.c Outdated Show resolved Hide resolved
This commit updates the KMAC's register interface to match the latest
changes to Earlgrey's KMAC. These changes include:
  - Removal of `ERR_PROCESSED` from the `CFG_SHADOWED` register.
  - Addition of the `ERR_PROCESSED` command. Most of the functionality
  is related to the entropy FSM which is still a TODO, but this does
  also clear the relevant alert as in the RTL.
  - Replaced `ENTROPY_SEED_{0,4}` with just one `ENTROPY_SEED` register,
    which shifts the mappings of subsequent registers.
  - Increase the MMIO State and MSG FIFO sizes.
Copy link

@rivos-eblot rivos-eblot left a comment

Choose a reason for hiding this comment

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

LGTM. However, Loïc wrote the original KMAC implementation, maybe he has more feedback details that I can think of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants