This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
forked from barryWhiteHat/semaphore
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from HarryR/reduce-build-times
Reduce build times + C++ style improvements
- Loading branch information
Showing
25 changed files
with
316 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef ETHSNARKS_HPP_ | ||
#define ETHSNARKS_HPP_ | ||
|
||
#include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp> | ||
#include <libsnark/gadgetlib1/protoboard.hpp> | ||
#include "r1cs_gg_ppzksnark_zok/r1cs_gg_ppzksnark_zok.hpp" | ||
|
||
|
||
namespace ethsnarks { | ||
|
||
typedef libff::bigint<libff::alt_bn128_r_limbs> LimbT; | ||
typedef libff::alt_bn128_G1 G1T; | ||
typedef libff::alt_bn128_G2 G2T; | ||
typedef libff::alt_bn128_pp ppT; | ||
typedef libff::Fr<ppT> FieldT; | ||
typedef libsnark::protoboard<FieldT> ProtoboardT; | ||
|
||
typedef libsnark::r1cs_gg_ppzksnark_zok_proof<ppT> ProofT; | ||
typedef libsnark::r1cs_gg_ppzksnark_zok_proving_key<ppT> ProvingKeyT; | ||
typedef libsnark::r1cs_gg_ppzksnark_zok_verification_key<ppT> VerificationKeyT; | ||
typedef libsnark::r1cs_gg_ppzksnark_zok_primary_input<ppT> PrimaryInputT; | ||
typedef libsnark::r1cs_gg_ppzksnark_zok_auxiliary_input<ppT> AuxiliaryInputT; | ||
|
||
//using ProverF = libsnark::r1cs_gg_ppzksnark_zok_prover<ppT>; | ||
//typedef libsnark::r1cs_gg_ppzksnark_zok_verifier_strong_IC<ppT> VerifierF; | ||
//typedef libsnark::r1cs_gg_ppzksnark_zok_generator<ppT> GeneratorF; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef ETHSNARKS_EXPORT_HPP_ | ||
#define ETHSNARKS_EXPORT_HPP_ | ||
|
||
#include "ethsnarks.hpp" | ||
|
||
namespace ethsnarks { | ||
|
||
std::string HexStringFromBigint( LimbT _x); | ||
|
||
std::string outputPointG1AffineAsHex( G1T _p ); | ||
|
||
std::string outputPointG2AffineAsHex( G2T _p ); | ||
|
||
std::string proof_to_json( ProofT &proof, PrimaryInputT &input ); | ||
|
||
std::string vk2json( VerificationKeyT &vk ); | ||
|
||
void vk2json_file( VerificationKeyT &vk, const std::string &path ); | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.