forked from visoftsolutions/noir_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: uses sha256compression opcode in Noir and implements acvm solv…
…er for it (AztecProtocol#4511) This PR should be merged **after** PR AztecProtocol#4503 , because it uses the opcode implemented by the latter. In this PR, I add the implementation of the ACVM solver for sha256compression opcode, and use it in Noir implementation of sha256. This gives us 3 ways of doing sha256. You can see below the resulting circuit size for hashing 1 byte with each of them: - The full Noir implementation : 17161 ACIR Opcodes, Circuit size is 65065 - The full BB implementation: 75 ACIR Opcodes, Circuit size is 38799 - Mixed Noir+sha256compression opcode: 351 ACIR Occodes, Circuit size is 15495 The sha256compression opcode is a clear winner, and this is because it uses UltraPlonk lookup-gates. As a result, I have removed the 2 other methods in the stdlib. The stdlib sha256 is now calling the Noir implementation which is using the sha256compression opcodes. The old opcode should be removed in a future PR. --------- Co-authored-by: kevaundray <kevtheappdev@gmail.com>
- Loading branch information
1 parent
04ae0d2
commit 9dc05bc
Showing
6 changed files
with
103 additions
and
107 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