fields/arithmetic_params/vesta.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_VESTA_ARITHMETIC_PARAMS_HPP
27 #define CRYPTO3_ALGEBRA_FIELDS_VESTA_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<vesta_scalar_field<255>> : public params<vesta_scalar_field<255>> {
43  private:
45 
46  public:
49 
50  constexpr static const std::size_t s = 0x20;
51  constexpr static const integral_type root_of_unity =
52  0x39579430a0535caa2072a2239079f02b4c5b0caa29bfe9396f80d8a28434208f_cppui255;
53  };
54 
55  // constexpr std::size_t const arithmetic_params<vesta_base_field<255>>::s;
56  constexpr std::size_t const arithmetic_params<vesta_scalar_field<255>>::s;
57 
58  // constexpr typename arithmetic_params<vesta_base_field<255>>::integral_type const
59  // arithmetic_params<vesta_base_field<255>>::root_of_unity;
60  constexpr typename arithmetic_params<vesta_scalar_field<255>>::integral_type const
62 
63 
64  } // namespace fields
65  } // namespace algebra
66  } // namespace crypto3
67 } // namespace nil
68 
69 #endif // CRYPTO3_ALGEBRA_FIELDS_VESTA_ARITHMETIC_PARAMS_HPP
Definition: pair.hpp:31
policy_type::integral_type integral_type
Definition: fields/arithmetic_params/vesta.hpp:48
policy_type::modular_type modular_type
Definition: fields/arithmetic_params/vesta.hpp:47
Definition: fields/params.hpp:58
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
A struct representing a vesta curve.
Definition: vesta/scalar_field.hpp:43