-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement ark-sponge for a new RescueSponge struct * Replace all usages of Permutation::sponge with new struct * Update primitives/src/rescue/sponge.rs Co-authored-by: Alex Xiong <[email protected]> * Add missing license information to sponge.rs * use PhantomData from ark_std * remove unused code * Remove `_expected_size` param since impl accepts non-multiples of chunk * Unify naming of const to CHUNK_SIZE * Replace the hardcoded integers with appropriate constants for sponge * enforce correct usage of CRHF and PRF * Rename RescueSpongeCRHF -> RescueCRH, RescueSpongePRF -> RescuePRF * Change `RescueCRH` and `PRF` from Rust types to newtype structs * Panic with `unimplemented` on methods we don't use and don't test * use internal `CHUNK_SIZE` instead of `RATE` * Add a `permutation: Permutation<F>` field to the `RescueSponge` struct * Remove unnecessary constructor, since `RescueCRH` methods are stateless * Fill and unify `unimplemented` messages * Rename CRH -> CRHF as per github discussion consensus * Finally remove `sponge...` methods from the `Permutation` struct * Rename `CHUNK_SIZE` to `RATE` * Update public docs and code comments for sponge * fixup! Finally remove `sponge...` methods from the `Permutation` struct * Update CHANGELOG * Be very explicit about supported trait functions for CryptographicSponge + add warning comments * Unify native & non-native traits: native done * sync non-native traits to match native (sponge vs permutation gadgtets) * Use fully qualified calls for the RescueGadget * Implement RescueGadget for non native * Extract `PermutationGadget` to mod.rs and implement for native & non * Add docs to `RescueStateVarGen` struct * Rename RescueStateVarGen -> SpongeStateVar as per PR review suggestion * Add CHANGELOG entry * Add type wrappers for native and non-native rescue gadgets * Replace usages of RescueGadget<SpongeStateVar, F, F> with type aliases * fix local formatting after nightly update Co-authored-by: Alex Xiong <[email protected]>
- Loading branch information
Showing
9 changed files
with
488 additions
and
492 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.