fields/arithmetic_params/pallas.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_PALLAS_ARITHMETIC_PARAMS_HPP
27 #define CRYPTO3_ALGEBRA_FIELDS_PALLAS_ARITHMETIC_PARAMS_HPP
28 
30 
33 
35 
36 namespace nil {
37  namespace crypto3 {
38  namespace algebra {
39  namespace fields {
40 
41  // template<>
42  // struct arithmetic_params<pallas_base_field<255>> : public params<pallas_base_field<254>> {
43  // private:
44  // typedef params<pallas_base_field<255>> policy_type;
45 
46  // public:
47  // typedef typename policy_type::modular_type modular_type;
48  // typedef typename policy_type::integral_type integral_type;
49 
50  // constexpr static const std::size_t s = 0x20;
51  // constexpr static const integral_type root_of_unity =
52  // 0x1ea14637cbe1870c65d520c6cd47d259883000713dc3c2a1adf8b071592f247a_cppui255;
53  // };
54 
55  template<>
56  struct arithmetic_params<pallas_scalar_field<255>> : public params<pallas_scalar_field<255>> {
57  private:
59 
60  public:
63 
64  constexpr static const std::size_t s = 0x20;
65  constexpr static const integral_type root_of_unity =
66  0x1ea14637cbe1870c65d520c6cd47d259883000713dc3c2a1adf8b071592f247a_cppui255;
67  };
68 
69  // constexpr std::size_t const arithmetic_params<pallas_base_field<255>>::s;
70  constexpr std::size_t const arithmetic_params<pallas_scalar_field<255>>::s;
71 
72  // constexpr typename arithmetic_params<pallas_base_field<255>>::integral_type const
73  // arithmetic_params<pallas_base_field<255>>::root_of_unity;
74  constexpr typename arithmetic_params<pallas_scalar_field<255>>::integral_type const
76 
77  } // namespace fields
78  } // namespace algebra
79  } // namespace crypto3
80 } // namespace nil
81 
82 #endif // CRYPTO3_ALGEBRA_FIELDS_PALLAS_ARITHMETIC_PARAMS_HPP
Definition: pair.hpp:31
policy_type::integral_type integral_type
Definition: fields/arithmetic_params/pallas.hpp:62
policy_type::modular_type modular_type
Definition: fields/arithmetic_params/pallas.hpp:61
Definition: fields/params.hpp:58
A struct representing a pallas curve.
Definition: pallas/scalar_field.hpp:43
Definition: fields/params.hpp:35
field_type::integral_type integral_type
Definition: fields/params.hpp:42
field_type::modular_type modular_type
Definition: fields/params.hpp:37