arithmetic_params/dsa_jce.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_DSA_JCE_ARITHMETIC_PARAMS_HPP
27 #define CRYPTO3_ALGEBRA_FIELDS_DSA_JCE_ARITHMETIC_PARAMS_HPP
28 
30 
31 #include <nil/crypto3/algebra/fields/dsa_jce/base_field.hpp>
32 #include <nil/crypto3/algebra/fields/dsa_jce/scalar_field.hpp>
33 
35 
36 namespace nil {
37  namespace crypto3 {
38  namespace algebra {
39  namespace fields {
40 
41  template<std::size_t Version>
42  struct arithmetic_params<dsa_jce_base_field<Version>> : public params<dsa_jce_base_field<Version>> {
43  private:
45 
46  public:
50 
51  constexpr static const integral_type mul_generator =
52  0x469603512E30278CD3947595DB22EEC9826A6322ADC97344F41D740C325724C8F9EFBAA7D4D803FF8C609DCD100EBC5BDFCFAD7C6A425FAEA786EA2050EBE98351EA1FDA1FDF24D6947AA6B9AA23766953802F4D7D4A8ECBA06D19768A2491FFB16D0EF9C43A99B5F71672FF6F0A24B444D0736D04D38A1A1322DAF6CDD88C9D_cppui1024;
53 
54  constexpr static const integral_type modulus = policy_type::modulus;
55  constexpr static const integral_type group_order =
56  0x9760508F15230BCCB292B982A2EB840BF0581CF5_cppui160;
57  };
58 
59  template<std::size_t Version>
60  constexpr typename arithmetic_params<dsa_jce_base_field<Version>>::integral_type const
62 
63  template<std::size_t Version>
64  constexpr typename arithmetic_params<dsa_jce_base_field<Version>>::integral_type const
66 
67  } // namespace fields
68  } // namespace algebra
69  } // namespace crypto3
70 } // namespace nil
71 
72 #endif // CRYPTO3_ALGEBRA_FIELDS_DSA_JCE_ARITHMETIC_PARAMS_HPP
Definition: pair.hpp:31
policy_type::integral_type integral_type
Definition: arithmetic_params/dsa_jce.hpp:49
policy_type::modular_type modular_type
Definition: arithmetic_params/dsa_jce.hpp:47
policy_type::modular_backend modular_backend
Definition: arithmetic_params/dsa_jce.hpp:48
Definition: fields/params.hpp:58
Definition: fields/params.hpp:35
field_type::modular_backend modular_backend
Definition: fields/params.hpp:38
field_type::integral_type integral_type
Definition: fields/params.hpp:42
field_type::modular_type modular_type
Definition: fields/params.hpp:37