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

Key proof statement #20

Closed xhliu closed 2 years ago

xhliu commented 3 years ago
import "hashes/sha256/sha256" as sha256

def main(private field a, private field b, field h0, field h1):
    field[2] h = sha256([a, b])
    assert(h[0] == h0);
    assert(h[1] == h1);
    return