2

I read this article: https://media.consensys.net/introduction-to-zksnarks-with-examples-3283b554fc3b

However, it's not clear to me a function such as zksnarkverify has been already implemented in Ethereum Solidity? Or we need to implement it by our self?

Is there an API or library to use zk-SNARK algorithms ? such as:

public keys generator G(program C, secret lambda) -> (prover public key, verifier public key),

or

prover algorithm P(prover public key, public x, secret w) -> proof

or

verifier algorithm V(verifier public key, public x, proof) -> true ?

where program C is C(public x, secret w).

2

The only thing that is in solidity are precompiled contracts for Ellyptic curve operations.

For implementations check out Is there a decentralized zk-SNARK (zero-knowledge Succinct Non-Interactive ARgument of Knowledge)?

  • Thanks but we need to implement verifier algorithm on-chain by Solidity. How to do it by ZoKrates ? According to its Github link : "It helps you create offchain programs and link them to the Ethereum blockchain" – Questioner Aug 29 '18 at 12:22
  • Creating a ZK Snark generates a solidity contract to deploy on chain. – Nico Vergauwen Aug 29 '18 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.