detail/extension_params/mnt6/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_MNT6_FP6_2OVER3_EXTENSION_PARAMS_HPP
27 #define CRYPTO3_ALGEBRA_FIELDS_MNT6_FP6_2OVER3_EXTENSION_PARAMS_HPP
28 
32 
34 
35 namespace nil {
36  namespace crypto3 {
37  namespace algebra {
38  namespace fields {
39  namespace detail {
40 
41  template<typename BaseField>
42  struct fp6_2over3_extension_params;
43 
44  /************************* MNT6 ***********************************/
45 
46  template<std::size_t Version>
48  : public params<fields::mnt6_base_field<Version>> {
49 
52 
53  public:
55 
56  constexpr static const integral_type modulus = policy_type::modulus;
57 
59  typedef typename non_residue_field_type::value_type non_residue_type;
62 
63  /*constexpr static const std::array<non_residue_type, 6> Frobenius_coeffs_c1 =
64  {non_residue_type(0x01),
65  non_residue_type(0x3B48E50A1662E26F0E834E15FAF68204A9845655F46B277A6D05B75068AD3F6801655344BED_cppui298),
66  non_residue_type(0x3B48E50A1662E26F0E834E15FAF68204A9845655F46B277A6D05B75068AD3F6801655344BEC_cppui298),
67  non_residue_type(0x3BCF7BCD473A266249DA7B0548ECAEEC9635CF44194FB494C07925D6AD3BB4334A400000000_cppui298),
68  non_residue_type(0x8696C330D743F33B572CEF4DF62CE7ECB178EE24E48D1A53736E86448E74CB48DAACBB414_cppui292),
69  non_residue_type(0x8696C330D743F33B572CEF4DF62CE7ECB178EE24E48D1A53736E86448E74CB48DAACBB414_cppui293)};*/
70 
71  constexpr static const std::array<integral_type, 6> Frobenius_coeffs_c1 = {
72  0x01,
73  0x3B48E50A1662E26F0E834E15FAF68204A9845655F46B277A6D05B75068AD3F6801655344BED_cppui298,
74  0x3B48E50A1662E26F0E834E15FAF68204A9845655F46B277A6D05B75068AD3F6801655344BEC_cppui298,
75  0x3BCF7BCD473A266249DA7B0548ECAEEC9635CF44194FB494C07925D6AD3BB4334A400000000_cppui298,
76  0x8696C330D743F33B572CEF4DF62CE7ECB178EE24E48D1A53736E86448E74CB48DAACBB414_cppui292,
77  0x8696C330D743F33B572CEF4DF62CE7ECB178EE24E48D1A53736E86448E74CB48DAACBB414_cppui293};
78 
79  constexpr static const non_residue_type non_residue = non_residue_type(0x05);
80  };
81 
82  template<std::size_t Version>
83  constexpr typename fp6_2over3_extension_params<mnt6_base_field<Version>>::non_residue_type const
85 
86  template<std::size_t Version>
87  constexpr typename fp6_2over3_extension_params<mnt6_base_field<Version>>::integral_type const
89 
90  template<std::size_t Version>
91  constexpr std::array<typename fp6_2over3_extension_params<mnt6_base_field<Version>>::integral_type,
92  6> const
94  } // namespace detail
95  } // namespace fields
96  } // namespace algebra
97  } // namespace crypto3
98 } // namespace nil
99 
100 #endif // CRYPTO3_ALGEBRA_FIELDS_MNT6_FP6_2OVER3_EXTENSION_PARAMS_HPP
Definition: detail/element/fp3.hpp:39
fields::fp3< base_field_type > underlying_field_type
Definition: detail/extension_params/mnt6/fp6_2over3.hpp:60
base_field_type non_residue_field_type
Definition: detail/extension_params/mnt6/fp6_2over3.hpp:58
policy_type::integral_type integral_type
Definition: detail/extension_params/mnt6/fp6_2over3.hpp:54
underlying_field_type::value_type underlying_type
Definition: detail/extension_params/mnt6/fp6_2over3.hpp:61
non_residue_field_type::value_type non_residue_type
Definition: detail/extension_params/mnt6/fp6_2over3.hpp:59
Definition: pair.hpp:31
Definition: detail/extension_params/edwards/fp6_2over3.hpp:42
IETF IPsec groups.
Definition: mnt6/base_field.hpp:46
Definition: fields/params.hpp:35
field_type::integral_type integral_type
Definition: fields/params.hpp:42