Implemented gadgets for SHA-384 and SHA-512#85
Open
tgodden wants to merge 11 commits intoarkworks-rs:mainfrom
Open
Implemented gadgets for SHA-384 and SHA-512#85tgodden wants to merge 11 commits intoarkworks-rs:mainfrom
tgodden wants to merge 11 commits intoarkworks-rs:mainfrom
Conversation
Pratyush
reviewed
Jan 19, 2023
Pratyush
reviewed
Jun 30, 2023
Pratyush
reviewed
Jun 30, 2023
Pratyush
reviewed
Jun 30, 2023
Pratyush
reviewed
Jun 30, 2023
src/crh/sha512/r1cs_utils.rs
Outdated
| use ark_relations::r1cs::SynthesisError; | ||
| use core::iter; | ||
|
|
||
| /// Extra traits not automatically implemented by UInt64 |
Member
There was a problem hiding this comment.
We don't need this in two different locations, right?
Author
There was a problem hiding this comment.
We don't. I wasn't sure how you would like to resolve it, so I went with code duplication and a note in the pull request :)
I think we could create e.g. a subdirectory for SHA and use a macro to generate these traits for both 512-byte and 256-byte algorithms.
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.
Description
This is an implementation of gadgets for SHA-384 and SHA-512 based on the implementation of the SHA-256 gadget.
The commits are based on the release-0.4 branch which is not yet merged into main.
The code relies on the fix for add_many proposed in the following pull request: arkworks-rs/r1cs-std#113.
There is some code duplication between the different SHA modules. This can likely be resolved with a bit of restructuring or by using macros to generate certain parts of the code.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pendingsection inCHANGELOG.mdFiles changedin the Github PR explorer