Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains  0.5
Reference implementation of the Zecale protocol by Clearmatics
null_hash_gadget.hpp
Go to the documentation of this file.
1 // Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2 //
3 // SPDX-License-Identifier: LGPL-3.0+
4 
5 #ifndef __ZECALE_CIRCUIT_NULL_HASH_GADGET_HPP__
6 #define __ZECALE_CIRCUIT_NULL_HASH_GADGET_HPP__
7 
8 namespace libzecale
9 {
10 
14 template<typename FieldT> class null_hash_gadget
15 {
16 public:
18  libsnark::protoboard<FieldT> &pb,
19  const libsnark::block_variable<FieldT> &input,
20  const libsnark::digest_variable<FieldT> &output,
21  const std::string &annotation_prefix);
22 
23  void generate_r1cs_constraints(const bool ensure_output_bitness = true);
24  void generate_r1cs_witness();
25 
26  static size_t get_digest_len();
27 };
28 
29 } // namespace libzecale
30 
32 
33 #endif // __ZECALE_CIRCUIT_NULL_HASH_GADGET_HPP__
libzecale::null_hash_gadget::null_hash_gadget
null_hash_gadget(libsnark::protoboard< FieldT > &pb, const libsnark::block_variable< FieldT > &input, const libsnark::digest_variable< FieldT > &output, const std::string &annotation_prefix)
libzecale
Definition: aggregator_circuit.hpp:15
libzecale::null_hash_gadget::generate_r1cs_witness
void generate_r1cs_witness()
libzecale::null_hash_gadget
Definition: null_hash_gadget.hpp:14
libzecale::null_hash_gadget::get_digest_len
static size_t get_digest_len()
libzecale::null_hash_gadget::generate_r1cs_constraints
void generate_r1cs_constraints(const bool ensure_output_bitness=true)
null_hash_gadget.tcc