Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Sketch Hmac state machine #836

Merged
merged 6 commits into from
Jun 22, 2021
Merged

Conversation

samuelgruetter
Copy link
Contributor

This PR models the subset of the functionality of the Hmac module that is needed by the sha256 hmac code in silicon_creator.
I inferred this specification from the doc and from hmac.c.

I wanted to use word as the register type for StateMachineSemantics instead of a separate Inductive Register, to avoid converting back and forth between them. This required some changes to StateMachineSemantics, StateMachineMMIO, and AesSemantics, so that the Hmac code can still benefit from the state-machine-agnostic compiler correctness proof in StateMachineMMIO.

by is_reg_addr and read/write_step_is_reg_addr, respectively, so
that we can use word as the register type even though not all
words are registers.

Also generalize initial_state to is_initial_state.
after the done bit is detected, it is cleared by writing
again 1 to it because it's rw1c, need to model this
@samuelgruetter samuelgruetter merged commit 96f9886 into project-oak:main Jun 22, 2021
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