Closed xhliu closed 3 years ago
Line 2380
_2352 = ((((((1 _121) + (2 _120)) + ((4 _119) + (8 _118))) + (((16 _117) + (32 _116)) + ((64 _115) + (128 _114)))) + ((((256 _113) + (512 _112)) + ((1024 _111) + (2048 _110))) + (((4096 _109) + (8192 _108)) + ((16384 _107) + (32768 _106))))) + (((((65536 _105) + (131072 _104)) + ((262144 _103) + (524288 _102))) + (((1048576 _101) + (2097152 _100)) + ((4194304 _99) + (8388608 _98)))) + ((((16777216 _97) + (33554432 _128)) + ((67108864 _127) + (134217728 _126))) + (((268435456 _125) + (536870912 _124)) + ((1073741824 _123) + (2147483648 _122))))))
Line 155071
_141685 = ((((((1 _141042) + (2 _141041)) + ((4 _141040) + (8 _141039))) + (((16 _141038) + (32 _141037)) + ((64 _141036) + (128 _141035)))) + ((((256 _141034) + (512 _141033)) + ((1024 _141032) + (2048 _141031))) + (((4096 _141030) + (8192 _141029)) + ((16384 _141028) + (32768 _141027))))) + (((((65536 _141026) + (131072 _141025)) + ((262144 _141024) + (524288 _141023))) + (((1048576 _141022) + (2097152 _141053)) + ((4194304 _141052) + (8388608 _141051)))) + ((((16777216 _141050) + (33554432 _141049)) + ((67108864 _141048) + (134217728 _141047))) + (((268435456 _141046) + (536870912 _141045)) + ((1073741824 _141044) + (2147483648 _141043))))))
test.zok
import "hashes/sha256/512bitPacked" as sha256packed
def main(private field a, private field b, private field c, private field d):
field[2] h = sha256packed([a, b, c, d])
assert(h[0] == 263561599766550617289250058199814760685)
assert(h[1] == 65303172752238645975888084098459749904)
return
Inputs
zokrates compute-witness -a 0 0 0 5
not flattened, meaning not all constraints r add/mul.
To reproduce, use this zok code.
and modify src
Then run
cargo r -- compile -i sha256.zok > sha256.txt
In
sha256.txt
, u can find, e.g.,