-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented gadgets for SHA-384 and SHA-512 #85
base: main
Are you sure you want to change the base?
Conversation
src/crh/sha512/r1cs_utils.rs
Outdated
use ark_relations::r1cs::SynthesisError; | ||
use core::iter; | ||
|
||
/// Extra traits not automatically implemented by UInt64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this in two different locations, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Pending
section inCHANGELOG.md
Files changed
in the Github PR explorer