sCrypt-Inc / zokrates

A zero-knowledge proof toolbox on Bitcoin. A fork of zokrates (https://github.com/Zokrates/ZoKrates).
GNU Lesser General Public License v3.0
14 stars 1 forks source link

sha256 fail #15

Closed zhfnjust closed 3 years ago

zhfnjust commented 3 years ago

program:


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

witness

_13021 1 _13022 21888242871839275222246405745257275088548364400416034343698204186575808495616 _13023 0

Circuit

_13023 = _13021 + _13022 image

zhfnjust commented 3 years ago

witness.txt

zhfnjust commented 3 years ago

branch sha256_tmp