HarryR / ethsnarks

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop
GNU Lesser General Public License v3.0
241 stars 57 forks source link

merkle tee with sha256?! #120

Open cryptonian-base opened 5 years ago

cryptonian-base commented 5 years ago

I've been trying to make zkSNARK for merkle tree with sha256.

Merkle tree with mimc is given as an example in this repo but replacing mimc with sha256_full or sha256_many has been found not that easy task.

Anyone has tried the same thing? Any advice will be welcome :)

HarryR commented 5 years ago

For merkle-tree with SHA256, see an example at:

https://github.com/barryWhiteHat/miximus/blob/master/src/main.cpp#L84

This uses the two gadgets from libsnark:

These can be used in-conjunction with the SHA256 gadgets from Ethsnarks to make hashes which are compatible with Ethereum.

An Ethereum-compatible solidity library for doing merkle tree with SHA256 is: