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 rom_ctrl scrambling logic #90

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

Conversation

AlexJones0
Copy link

This PR updates the ROM Control to match Earlgrey's latest functionality. See the commit messages for more details.

This PR also contains a commit to update pyot.py, to allow for the use of aliases in test-specific configuration values. Please let me know if there's already a way to do this - it didn't seem to be working for me, and I've found it a useful feature for e.g. using a specific ROM for a specific test.

This has been tested against the test kmac_app_rom_test_fpga_cw310_rom_with_fake_keys, using the built mask_rom_fpga_cw310.39.scr.vmem produced by the test, which was failing previously, but now passes. The test and mask ROM were built from master on OpenTitan.

For Earlgrey, the number of PRINCE cipher half rounds was increased from
2 to 3 (5 effective rounds to 7 effective rounds, including the
substitution perm rounds). This was added for improved security, and
requires a simple constant change.
In Earlgrey, the S&P layer has been removed from the data scrambling
logic, which affects the scrambling of the generated ROM. The
functionality is removed entirely from the ROM Control to improve error
detection guarantees, interactions with ECC, and timing.

This commit removes the now-redundant logic related to the S&P layer,
instead directly unscrambling words by XORing the keystream and the
`scr`/`in` data.
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.

2 participants