knowledge_commitment.hpp
Go to the documentation of this file.
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2018-2021 Mikhail Komarov <nemo@nil.foundation>
3 // Copyright (c) 2020-2021 Nikita Kaskov <nbering@nil.foundation>
4 //
5 // MIT License
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining a copy
8 // of this software and associated documentation files (the "Software"), to deal
9 // in the Software without restriction, including without limitation the rights
10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 // copies of the Software, and to permit persons to whom the Software is
12 // furnished to do so, subject to the following conditions:
13 //
14 // The above copyright notice and this permission notice shall be included in all
15 // copies or substantial portions of the Software.
16 //
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 // SOFTWARE.
24 //---------------------------------------------------------------------------//
25 
26 #ifndef CRYPTO3_ZK_KNOWLEDGE_COMMITMENT_HPP
27 #define CRYPTO3_ZK_KNOWLEDGE_COMMITMENT_HPP
28 
31 
32 namespace nil {
33  namespace crypto3 {
34  namespace zk {
35  namespace snark {
36 
37  /********************** Knowledge commitment *********************************/
38 
48  template<typename Type1, typename Type2>
50  typedef Type1 type1;
51  typedef Type2 type2;
53 
54  constexpr static const std::size_t value_bits = Type1::value_bits + Type2::value_bits;
55  };
56 
57  /******************** Knowledge commitment vector ****************************/
58 
62  template<typename Type1, typename Type2>
64 
65  } // namespace snark
66  } // namespace zk
67  } // namespace crypto3
68 } // namespace nil
69 
70 #endif // KNOWLEDGE_COMMITMENT_HPP
Definition: pair.hpp:31
Definition: element_knowledge_commitment.hpp:54
Definition: knowledge_commitment.hpp:49
detail::element_kc< Type1, Type2 > value_type
Definition: knowledge_commitment.hpp:52
Type2 type2
Definition: knowledge_commitment.hpp:51
Type1 type1
Definition: knowledge_commitment.hpp:50
constexpr static const std::size_t value_bits
Definition: knowledge_commitment.hpp:54
Definition: sparse_vector.hpp:48