#include <mimc_permutation.hpp>
|
| MiMC_permutation_gadget (libsnark::protoboard< FieldT > &pb, const libsnark::pb_linear_combination< FieldT > &msg, const libsnark::pb_linear_combination< FieldT > &key, const libsnark::pb_variable< FieldT > &result, const std::string &annotation_prefix="MiMC_permutation_gadget") |
|
| MiMC_permutation_gadget (libsnark::protoboard< FieldT > &pb, const libsnark::pb_linear_combination< FieldT > &msg, const libsnark::pb_linear_combination< FieldT > &key, const libsnark::pb_variable< FieldT > &result, const libsnark::pb_linear_combination< FieldT > &add_to_result, const std::string &annotation_prefix="MiMC_permutation_gadget") |
|
void | generate_r1cs_constraints () |
|
void | generate_r1cs_witness () const |
|
void | setup_sha3_constants () |
|
template<typename FieldT, size_t Exponent, size_t NumRounds>
class libzeth::MiMC_permutation_gadget< FieldT, Exponent, NumRounds >
MiMC_permutation_gadget enforces correct computation of the MiMC permutation, denoted MiMC_r(k, m) in the Zeth specifications (https://github.com/clearmatics/zeth-specifications), by performing NumRounds MiMC rounds with the given Exponent. An optional add_to_result
value can be passed in to be added to the result of the regular MiMC permutation (without requiring extra constraints).
Definition at line 20 of file mimc_permutation.hpp.
◆ MiMC_permutation_gadget() [1/2]
template<typename FieldT , size_t Exponent, size_t NumRounds>
libzeth::MiMC_permutation_gadget< FieldT, Exponent, NumRounds >::MiMC_permutation_gadget |
( |
libsnark::protoboard< FieldT > & |
pb, |
|
|
const libsnark::pb_linear_combination< FieldT > & |
msg, |
|
|
const libsnark::pb_linear_combination< FieldT > & |
key, |
|
|
const libsnark::pb_variable< FieldT > & |
result, |
|
|
const std::string & |
annotation_prefix = "MiMC_permutation_gadget< FieldT, Exponent, NumRounds >" |
|
) |
| |
◆ MiMC_permutation_gadget() [2/2]
template<typename FieldT , size_t Exponent, size_t NumRounds>
libzeth::MiMC_permutation_gadget< FieldT, Exponent, NumRounds >::MiMC_permutation_gadget |
( |
libsnark::protoboard< FieldT > & |
pb, |
|
|
const libsnark::pb_linear_combination< FieldT > & |
msg, |
|
|
const libsnark::pb_linear_combination< FieldT > & |
key, |
|
|
const libsnark::pb_variable< FieldT > & |
result, |
|
|
const libsnark::pb_linear_combination< FieldT > & |
add_to_result, |
|
|
const std::string & |
annotation_prefix = "MiMC_permutation_gadget< FieldT, Exponent, NumRounds >" |
|
) |
| |
◆ generate_r1cs_constraints()
template<typename FieldT , size_t Exponent, size_t NumRounds>
◆ generate_r1cs_witness()
template<typename FieldT , size_t Exponent, size_t NumRounds>
◆ setup_sha3_constants()
template<typename FieldT , size_t Exponent, size_t NumRounds>
The documentation for this class was generated from the following file: