Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
circuit_types.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 __ZETH_CIRCUITS_CIRCUIT_TYPES_HPP__
6 #define __ZETH_CIRCUITS_CIRCUIT_TYPES_HPP__
7 
12 
13 #include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
14 #include <libff/algebra/curves/bls12_377/bls12_377_pp.hpp>
15 
16 // Types that must be common across all executable, defined once here. Outside
17 // of tests, these should not be set anywhere else in the code. Do not include
18 // this file in code that is intended to be parameterized by hash type.
19 
20 namespace libzeth
21 {
22 
23 // Hash used for the commitments and PRFs
24 template<typename FieldT> using HashT = BLAKE2s_256<FieldT>;
25 
26 // Hash function to be used in the Merkle Tree
27 template<typename FieldT>
29 
30 template<typename ppT, typename snarkT>
34  ppT,
35  snarkT,
36  libzeth::ZETH_NUM_JS_INPUTS,
37  libzeth::ZETH_NUM_JS_OUTPUTS,
38  libzeth::ZETH_MERKLE_TREE_DEPTH>;
39 
40 } // namespace libzeth
41 
42 #endif // __ZETH_CIRCUITS_CIRCUIT_TYPES_HPP__
libzeth::circuit_wrapper
Definition: circuit_wrapper.hpp:27
libzeth::HashTreeT
mimc_compression_function_gadget< FieldT > HashTreeT
Definition: circuit_types.hpp:28
libzeth
Definition: binary_operation.hpp:15
libzeth::BLAKE2s_256
Definition: blake2s.hpp:24
blake2s.hpp
circuit_wrapper.hpp
mimc_selector.hpp
libzeth::mimc_compression_function_gadget
typename mimc_compression_function_selector< FieldT >::compression_function_gadget mimc_compression_function_gadget
Definition: mimc_selector.hpp:73
include_libsnark.hpp