Implement SHA3-256, SHA3-512, SHAKE128 and SHAKE256#173
Open
ctz wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jbp-cpp-and-s2n-bignum #173 +/- ##
==========================================================
- Coverage 99.77% 99.76% -0.01%
==========================================================
Files 184 187 +3
Lines 51360 52435 +1075
==========================================================
+ Hits 51242 52311 +1069
- Misses 118 124 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds SHA-3 family hashing support to Graviola by introducing mid-level SHA3-256/SHA3-512 contexts and SHAKE128/SHAKE256 XOFs backed by Keccak-f1600 implementations in the low-level arch modules.
Changes:
- Introduce
mid::sha3with SHA3-256/SHA3-512 incremental hashing and SHAKE128/SHAKE256 incremental output APIs. - Add Keccak-f1600 permutation implementations for
x86_64andaarch64, and wire them intolow. - Extend the asm parsing tooling and update README/module exports to surface SHA3 support.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| graviola/src/mid/sha3.rs | New SHA3/SHAKE sponge implementation + tests. |
| graviola/src/mid/mod.rs | Expose sha3 module in mid layer. |
| graviola/src/low/x86_64/sha3_keccak_f1600.rs | New generated Keccak-f1600 x86_64 asm wrapper. |
| graviola/src/low/x86_64/mod.rs | Register x86_64 Keccak-f1600 module. |
| graviola/src/low/mod.rs | Re-export sha3_keccak_f1600 for supported arches. |
| graviola/src/low/generic/blockwise.rs | Add Blockwise::add helper used by SHA3 padding. |
| graviola/src/low/aarch64/sha3_keccak_f1600.rs | New generated Keccak-f1600 aarch64 asm wrapper. |
| graviola/src/low/aarch64/mod.rs | Register aarch64 Keccak-f1600 module. |
| graviola/src/lib.rs | Re-export mid::sha3 under hashing. |
| admin/parse-asm/parse.py | Add new CFI macro expansions used by SHA3 asm parsing. |
| admin/parse-asm/driver.sha3.py | New driver to generate Rust asm wrappers for Keccak-f1600. |
| README.md | Mark SHA3/SHAKE as implemented. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.