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.
feat!: add blake3 opcode to brillig (AztecProtocol#3913)
- Loading branch information
1 parent
0fca2c4
commit 34fad0a
Showing
9 changed files
with
197 additions
and
9 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
7 changes: 7 additions & 0 deletions
7
noir/test_programs/execution_success/brillig_blake3/Nargo.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "brillig_blake3" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.22.0" | ||
|
||
[dependencies] |
37 changes: 37 additions & 0 deletions
37
noir/test_programs/execution_success/brillig_blake3/Prover.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# hello as bytes | ||
# https://connor4312.github.io/blake3/index.html | ||
x = [104, 101, 108, 108, 111] | ||
result = [ | ||
0xea, | ||
0x8f, | ||
0x16, | ||
0x3d, | ||
0xb3, | ||
0x86, | ||
0x82, | ||
0x92, | ||
0x5e, | ||
0x44, | ||
0x91, | ||
0xc5, | ||
0xe5, | ||
0x8d, | ||
0x4b, | ||
0xb3, | ||
0x50, | ||
0x6e, | ||
0xf8, | ||
0xc1, | ||
0x4e, | ||
0xb7, | ||
0x8a, | ||
0x86, | ||
0xe9, | ||
0x08, | ||
0xc5, | ||
0x62, | ||
0x4a, | ||
0x67, | ||
0x20, | ||
0x0f, | ||
] |
6 changes: 6 additions & 0 deletions
6
noir/test_programs/execution_success/brillig_blake3/src/main.nr
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use dep::std; | ||
|
||
unconstrained fn main(x: [u8; 5], result: [u8; 32]) { | ||
let digest = std::hash::blake3(x); | ||
assert(digest == result); | ||
} |