make opam_pininstalls EasyCrypt and Jasmin (versions specified inMakefile).make update_downloadsfetches dependendencies from Github repositories (versions specified in theMakefile).- BigNum library of Jasmin;
- Zero-Knowledge library of EasyCrypt;
- Jasmin's
eclibfor EasyCrypt.
make check_allruns the EasyCrypt proof-checker on the entire development (requires CVC4, Alt-Ergo, and Z3 SMT solvers).make compile_and_runcompiles and runs Schnorr protocol (Jasmin protocol implementation insrc/schnorr_protocol.jazz; linked together by C-wrappersrc/example/example.c).
schnorr_protocol.jazzimplementation of Schnorr protocol in Jasmin.constants.pyPython script which given primespandqgenerates parameters for Jasminconstants.jazzand proofs in EasyCryptproof/schnorr_protocol/Constants.ec.bn_generic.jazzbasic operations on big-nums.dbn_generic.jazzSame asbn_generic.jazz, but for words of2*nlimbssize.bn_generic_extra.jazzmore advanced ops on big-numsbn_addmmodular addition;bn_breduceBarrett's modular reduction;bn_mulmmodular multiplication;bn_expmMontgomery ladder based modular exponentiation;bn_rsamplerejection sampling algorithm for uniform distributions.random_bitimplements{0,1}distribution.
schnorr_protocol.hC-interface of external calls for the Schnorr protocol entry points.constants.pyPython script which takes primespandqand produces Jasmin encoding insrc/constants.jazzand their validation inproof/Constants.ec.
example.cC-wrapper which links the Schnorr protocol procedures and handles dispatching of messages.syscalls/(random and pseudo-random) implementation of Jasmin's#randombytessystem-call.
-
auxiliary_lemmas/AuxLemmas.ecauxiliary lemmas.SurjFromInj.ecderives surjectivity from injectivity of functions of finite set of same cardinality.ArrayFiniteness.ecderives finiteness ofArrayNandWArrayNtypes.
-
big_num_ops/:BigNum_proofs.ecproof of correctness for (simple) Jasmin procedures on big-nums.BigNum_spec.ecparameters and (abstract + semi-abstract) specification of operations on big-nums.BigNum_instances.ecinstantiation of big-nums for a particular nlimbs.W64xN_Finite.ecproofs thatW64xN.R.ttype is finite.leakage_freeness/proofs of CT of operations on big-nums.
-
montgomery_ladder/:MontgomeryLadder_Abstract.ecacorrectness of abstract Montgomery ladder parameterized by a monoid.MontgomeryLadder_Concrete.ecainstance of Montgomery ladder for Jasmin'sbn_expmfunction.leakage_freeness/proofs of CT ofbn_expm.
-
modular_multiplication/BarrettRedInt.ecderivation of correctness of Barrett reduction for reals and then integers.BarrettReduction_Abstract.ecequivalence proof of abstract and (semi-abstract) specifications of Barrett reduction algorithms.BarrettReduction_Concrete.eccorrectness proof of Jasmin'sbn_breduceimplementation of Barrett reduction.ModularMultiplication_Concrete.eccorrectness for implementation of modular multiplicationbn_mulm.leakage_freeness/proofs of CT ofbn_breduceandbn_mulm.
-
rejection_sampling/RejectionSamplingModule.ecaabstract rejection sampling algorithm in EasyCrypt.RejectionSamplingProperties.ecamain properties of abstract EasyCrypt's rejection sampling algorithm.UniformSampling_Concrete.ecproof that Jasmin's functionbn_rsampleimplements rejection sampling is correctly.leakage_freeness/proofs of LF ofbn_rsample.
-
jasmin_extracts/folder which contains EasyCrypt code automatically extracted by Jasmin compiler. -
eclib/Jasmin's library for EasyCrypt. -
definition_analysis/analysis of constant-time and leakage-freeness definitions (see the paper). -
schnorr_protocol/Abstract_SchnorrProtocol.ecformalization of Schnorr protocol at the "high-level" of abstraction (elements are group elements, exponents are fintie field elements).Zp_SchnorrProtocol.ecaformalization of Schnorr protocol at the "middle-level" of abstraction (elements are finite field elements, exponents are integers).Zp_Abstract_SchnorrCorrespondance.ecaproofs of equivalences between Schnorr procedures at "high-level" and "middle-level".Zp_SchnorrCompleteness.ecacompleteness for "middle-level" Schnorr.Zp_SchnorrExtractability.ecaextractability for "middle-level" Schnorr.Zp_SchnorrZK.ecazero-knowledge for "middle-level" Schnorr.W64_SchnorrProtocol.ecbasic definitions associated with "low-level" (Jasmin extract) implementation of Schnorr protocol.W64_Zp_SchnorrCorrespondance.ecaproofs of equivalences between Schnorr procedures at "middle-level" and "low-level".W64_SchnorrCompleteness.ecacompleteness for "low-level" Schnorr.W64_SchnorrExtractability.ecaextractability for "low-level" Schnorr.W64_SchnorrZK.ecazero-knowledge for "low-level" Schnorr.W64_SchnorrInstance.ecinstantiation of Schnorr protocol and all its properties for particular choice of constants fromConstants.ec.Constants.ecautomatically generated file bysrc/constants.pyfile which contains Schnorr protocol parametersp(group order),q(exponent order),bp(Barrett factor forp),bq(Barrett factor forq), andg(generator of subgroup of prime orderq). Also contains automatically generated proofs that Jasmin functionsbn_set_p,bn_set_q, etc. correctly encode the respective values.ConstantsValidation.ecproofs (based on tacticals) that parameters inConstants.ecare valid (e.g.,gis a generator of subgoup of orderq,bpis a Barrett parameter forp, etc.).W64_SchnorrInstance.ecinstance of the Schnorr protocol cloned with parameters fromConstants.ec.leakage_freeness/proofs that Jasmin implementation ofverify,challengeandresponseare constant time;challengeis leakage-free.ZModPStar.ecaabstract definition of Zp* throughSubtypetheory.
-
easycrypt-zk-code/contains formalization of zero-knowledge proofs from "D. Firsov, D. Unruh. Zero-Knowledge in EasyCrypt".