fp6_2over3.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_FP6_2OVER3_EXTENSION_HPP
27 #define CRYPTO3_ALGEBRA_FIELDS_FP6_2OVER3_EXTENSION_HPP
28 
31 //#include <nil/crypto3/algebra/fields/detail/extension_params/frp_v1.hpp>
32 //#include <nil/crypto3/algebra/fields/detail/extension_params/gost_A.hpp>
34 /*#include <nil/crypto3/algebra/fields/detail/extension_params/secp.hpp>
35 #include <nil/crypto3/algebra/fields/detail/extension_params/sm2p_v1.hpp>
36 #include <nil/crypto3/algebra/fields/detail/extension_params/x962_p.hpp>*/
37 
39 
40 namespace nil {
41  namespace crypto3 {
42  namespace algebra {
43  namespace fields {
44 
49  template<typename BaseField>
50  struct fp6_2over3 {
51  typedef BaseField base_field_type;
54  typedef typename extension_policy::underlying_field_type underlying_field_type;
55 
56  constexpr static const std::size_t modulus_bits = policy_type::modulus_bits;
57  typedef typename policy_type::integral_type integral_type;
58 
59  constexpr static const std::size_t number_bits = policy_type::number_bits;
60  typedef typename policy_type::modular_type modular_type;
61  typedef typename policy_type::modular_backend modular_backend;
62 
63  constexpr static const integral_type modulus = policy_type::modulus;
64 
66 
67  constexpr static const std::size_t arity = 6;
68  constexpr static const std::size_t value_bits = arity * modulus_bits;
69  };
70 
71  template<typename BaseField>
73 
74  template<typename BaseField>
75  constexpr typename std::size_t const fp6_2over3<BaseField>::arity;
76 
77  } // namespace fields
78  } // namespace algebra
79  } // namespace crypto3
80 } // namespace nil
81 
82 #endif // CRYPTO3_ALGEBRA_FIELDS_FP6_2OVER3_EXTENSION_HPP
Definition: detail/element/fp6_2over3.hpp:41
Definition: pair.hpp:31
Definition: detail/extension_params/edwards/fp6_2over3.hpp:42
Definition: fp6_2over3.hpp:50
policy_type::modular_backend modular_backend
Definition: fp6_2over3.hpp:61
constexpr static const std::size_t modulus_bits
Definition: fp6_2over3.hpp:56
detail::element_fp6_2over3< extension_policy > value_type
Definition: fp6_2over3.hpp:65
extension_policy::underlying_field_type underlying_field_type
Definition: fp6_2over3.hpp:54
constexpr static const std::size_t value_bits
Definition: fp6_2over3.hpp:68
base_field_type policy_type
Definition: fp6_2over3.hpp:52
BaseField base_field_type
Definition: fp6_2over3.hpp:51
constexpr static const std::size_t number_bits
Definition: fp6_2over3.hpp:59
policy_type::integral_type integral_type
Definition: fp6_2over3.hpp:57
policy_type::modular_type modular_type
Definition: fp6_2over3.hpp:60
constexpr static const integral_type modulus
Definition: fp6_2over3.hpp:63
constexpr static const std::size_t arity
Definition: fp6_2over3.hpp:67
detail::fp6_2over3_extension_params< policy_type > extension_policy
Definition: fp6_2over3.hpp:53