Skip to content

SHA-3 Verification#147

Closed
abentkamp wants to merge 2 commits into
mainfrom
alex/verification-review
Closed

SHA-3 Verification#147
abentkamp wants to merge 2 commits into
mainfrom
alex/verification-review

Conversation

@abentkamp

@abentkamp abentkamp commented May 27, 2026

Copy link
Copy Markdown
Contributor

This PR provides a hacspec-style implementation of SHA-3, closely following the FIPS202 standard, and a Lean equivalence proof connecting it to the libcrux-iot implementation. The implementations are proved equivalent up to the top-level SHA-3 and SHAKE functions (sha256_ema, etc.). In addition, the PR provides some Rust tests to quickly check that the two implementations are equivalent, plus some additional sanity checks.

Most of the code has been generated by Claude.

We had to make some changes to the libcrux-iot implementation to be able to extract it:

  • The huge pi_rho_chi functions in keccak.rs have been split up into smaller pieces.
  • In state.rs, some variables had to be renamed (lane to l and state to s) because they lead to name clashes in Lean.

The Readme at libcrux-iot/sha3/proofs/aeneas-lean/LibcruxIotSha3/README.md contains more information about the Lean verification.

One issue that I don't have a good solution for yet: The extraction works only with a branch of hax-evit, which must be reviewed by Evit before we are allowed to publish it.

@abentkamp abentkamp force-pushed the alex/verification-review branch 5 times, most recently from 171ed6e to 1caa575 Compare May 27, 2026 13:06
@abentkamp abentkamp force-pushed the alex/verification-review branch from 1caa575 to d259907 Compare May 28, 2026 11:20
@abentkamp

Copy link
Copy Markdown
Contributor Author

Closed in favor of #159, #160, and #161.

@abentkamp abentkamp closed this Jun 3, 2026
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