Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
#include <pghr13_snark.hpp>
Public Types | |
using | proving_key = libsnark::r1cs_ppzksnark_proving_key< ppT > |
using | verification_key = libsnark::r1cs_ppzksnark_verification_key< ppT > |
using | keypair = libsnark::r1cs_ppzksnark_keypair< ppT > |
using | proof = libsnark::r1cs_ppzksnark_proof< ppT > |
Static Public Member Functions | |
static keypair | generate_setup (const libsnark::protoboard< libff::Fr< ppT >> &pb) |
Run the trusted setup and return the keypair for the circuit. More... | |
static proof | generate_proof (const proving_key &proving_key, const libsnark::protoboard< libff::Fr< ppT >> &pb) |
Generate the proof (from the values set to the protoboard) More... | |
static proof | generate_proof (const proving_key &proving_key, const libsnark::r1cs_primary_input< libff::Fr< ppT >> &primary_input, const libsnark::r1cs_auxiliary_input< libff::Fr< ppT >> auxiliary_input) |
Generate the proof (from given primary and auxiliary values) More... | |
static bool | verify (const libsnark::r1cs_primary_input< libff::Fr< ppT >> &primary_inputs, const proof &proof, const verification_key &verification_key) |
Verify proof. More... | |
static void | verification_key_write_json (const verification_key &, std::ostream &) |
Write verification as json. More... | |
static void | verification_key_write_bytes (const verification_key &, std::ostream &) |
Write verification key as bytes. More... | |
static void | verification_key_read_bytes (verification_key &, std::istream &) |
Read a verification key as bytes. More... | |
static void | proving_key_write_bytes (const proving_key &, std::ostream &) |
Write proving key as bytes. More... | |
static void | proving_key_read_bytes (proving_key &, std::istream &) |
Read proving key as bytes. More... | |
static void | proof_write_json (const proof &, std::ostream &) |
Write proof as json. More... | |
static void | proof_write_bytes (const proof &, std::ostream &) |
Write proof as bytes. More... | |
static void | proof_read_bytes (proof &, std::istream &) |
Read proof as bytes. More... | |
static void | keypair_write_bytes (const keypair &, std::ostream &) |
Write a keypair as bytes. More... | |
static void | keypair_read_bytes (keypair &, std::istream &) |
Read a keypair from a stream. More... | |
Static Public Attributes | |
static const std::string | name |
Definition at line 15 of file pghr13_snark.hpp.
using libzeth::pghr13_snark< ppT >::keypair = libsnark::r1cs_ppzksnark_keypair<ppT> |
Definition at line 20 of file pghr13_snark.hpp.
using libzeth::pghr13_snark< ppT >::proof = libsnark::r1cs_ppzksnark_proof<ppT> |
Definition at line 21 of file pghr13_snark.hpp.
using libzeth::pghr13_snark< ppT >::proving_key = libsnark::r1cs_ppzksnark_proving_key<ppT> |
Definition at line 18 of file pghr13_snark.hpp.
using libzeth::pghr13_snark< ppT >::verification_key = libsnark::r1cs_ppzksnark_verification_key<ppT> |
Definition at line 19 of file pghr13_snark.hpp.
|
static |
Generate the proof (from the values set to the protoboard)
|
static |
Generate the proof (from given primary and auxiliary values)
|
static |
Run the trusted setup and return the keypair for the circuit.
|
static |
Read a keypair from a stream.
|
static |
Write a keypair as bytes.
|
static |
Read proof as bytes.
|
static |
Write proof as bytes.
|
static |
Write proof as json.
|
static |
Read proving key as bytes.
|
static |
Write proving key as bytes.
|
static |
Read a verification key as bytes.
|
static |
Write verification key as bytes.
|
static |
Write verification as json.
|
static |
Verify proof.
|
static |
String name of this snark, corresponding to <SNARK> in the ZETH_SNARK_<SNARK> configuration variable.
Definition at line 25 of file pghr13_snark.hpp.