arkworks-rs / crypto-primitives

Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them
https://www.arkworks.rs
Apache License 2.0
165 stars 79 forks source link

Implemented gadgets for SHA-384 and SHA-512 #85

Open tgodden opened 1 year ago

tgodden commented 1 year ago

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: https://github.com/arkworks-rs/r1cs-std/pull/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.