fp12_2over3over2.hpp
Go to the documentation of this file.
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2020-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_ALGEBRA_FIELDS_FP12_2OVER3OVER2_EXTENSION_HPP
27 #define CRYPTO3_ALGEBRA_FIELDS_FP12_2OVER3OVER2_EXTENSION_HPP
28 
33 /*#include <nil/crypto3/algebra/fields/detail/extension_params/frp_v1.hpp>
34 #include <nil/crypto3/algebra/fields/detail/extension_params/gost_A.hpp>*/
35 /*#include <nil/crypto3/algebra/fields/detail/extension_params/secp.hpp>
36 #include <nil/crypto3/algebra/fields/detail/extension_params/sm2p_v1.hpp>
37 #include <nil/crypto3/algebra/fields/detail/extension_params/x962_p.hpp>*/
38 
40 
41 namespace nil {
42  namespace crypto3 {
43  namespace algebra {
44  namespace fields {
45 
50  template<typename BaseField>
52  typedef BaseField base_field_type;
55  typedef typename extension_policy::underlying_field_type underlying_field_type;
56 
57  constexpr static const std::size_t modulus_bits = policy_type::modulus_bits;
58  typedef typename policy_type::integral_type integral_type;
59 
60  typedef typename policy_type::extended_integral_type extended_integral_type;
61 
62  constexpr static const std::size_t number_bits = policy_type::number_bits;
63  typedef typename policy_type::modular_type modular_type;
64  typedef typename policy_type::modular_backend modular_backend;
65 
66  constexpr static const integral_type modulus = policy_type::modulus;
67 
69 
70  constexpr static const std::size_t arity = 12;
71  constexpr static const std::size_t value_bits = arity * modulus_bits;
72  };
73 
74  template<typename BaseField>
75  constexpr
77 
78  template<typename BaseField>
79  constexpr typename std::size_t const fp12_2over3over2<BaseField>::arity;
80 
81  } // namespace fields
82  } // namespace algebra
83  } // namespace crypto3
84 } // namespace nil
85 
86 #endif // CRYPTO3_ALGEBRA_FIELDS_FP12_2OVER3OVER2_EXTENSION_HPP
Definition: detail/element/fp12_2over3over2.hpp:42
Definition: pair.hpp:31
Definition: detail/extension_params/alt_bn128/fp12_2over3over2.hpp:43
Definition: fp12_2over3over2.hpp:51
detail::element_fp12_2over3over2< extension_policy > value_type
Definition: fp12_2over3over2.hpp:68
constexpr static const integral_type modulus
Definition: fp12_2over3over2.hpp:66
constexpr static const std::size_t arity
Definition: fp12_2over3over2.hpp:70
policy_type::extended_integral_type extended_integral_type
Definition: fp12_2over3over2.hpp:60
policy_type::integral_type integral_type
Definition: fp12_2over3over2.hpp:58
base_field_type policy_type
Definition: fp12_2over3over2.hpp:53
constexpr static const std::size_t number_bits
Definition: fp12_2over3over2.hpp:62
policy_type::modular_backend modular_backend
Definition: fp12_2over3over2.hpp:64
BaseField base_field_type
Definition: fp12_2over3over2.hpp:52
constexpr static const std::size_t modulus_bits
Definition: fp12_2over3over2.hpp:57
extension_policy::underlying_field_type underlying_field_type
Definition: fp12_2over3over2.hpp:55
policy_type::modular_type modular_type
Definition: fp12_2over3over2.hpp:63
constexpr static const std::size_t value_bits
Definition: fp12_2over3over2.hpp:71
detail::fp12_2over3over2_extension_params< policy_type > extension_policy
Definition: fp12_2over3over2.hpp:54