diff --git a/include/nil/crypto3/algebra/fields/curve25519/base_field.hpp b/include/nil/crypto3/algebra/fields/curve25519/base_field.hpp index 6bdadd2f..7a2928f1 100644 --- a/include/nil/crypto3/algebra/fields/curve25519/base_field.hpp +++ b/include/nil/crypto3/algebra/fields/curve25519/base_field.hpp @@ -59,6 +59,8 @@ namespace nil { #else constexpr static const integral_type modulus = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed_cppui255; + constexpr static const integral_type group_order_minus_one_half = + 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed_cppui255; typedef typename policy_type::modular_backend modular_backend; constexpr static const modular_params_type modulus_params = modulus; diff --git a/include/nil/crypto3/algebra/fields/curve25519/scalar_field.hpp b/include/nil/crypto3/algebra/fields/curve25519/scalar_field.hpp index 988975f2..08f7a176 100644 --- a/include/nil/crypto3/algebra/fields/curve25519/scalar_field.hpp +++ b/include/nil/crypto3/algebra/fields/curve25519/scalar_field.hpp @@ -60,6 +60,8 @@ namespace nil { constexpr static const integral_type modulus = 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed_cppui253; + constexpr static const integral_type group_order_minus_one_half = + 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed_cppui253; typedef typename policy_type::modular_backend modular_backend; constexpr static const modular_params_type modulus_params = modulus; diff --git a/include/nil/crypto3/algebra/fields/pallas/base_field.hpp b/include/nil/crypto3/algebra/fields/pallas/base_field.hpp index 422a0ec7..82ed0e89 100644 --- a/include/nil/crypto3/algebra/fields/pallas/base_field.hpp +++ b/include/nil/crypto3/algebra/fields/pallas/base_field.hpp @@ -57,6 +57,9 @@ namespace nil { constexpr static const integral_type modulus = 0x40000000000000000000000000000000224698fc094cf91b992d30ed00000001_cppui255; + constexpr static const integral_type group_order_minus_one_half = + + 0x40000000000000000000000000000000224698fc094cf91b992d30ed00000001_cppui255; typedef typename policy_type::modular_backend modular_backend; constexpr static const modular_params_type modulus_params = modulus; diff --git a/include/nil/crypto3/algebra/fields/vesta/base_field.hpp b/include/nil/crypto3/algebra/fields/vesta/base_field.hpp index 97f4a6de..e53ece28 100755 --- a/include/nil/crypto3/algebra/fields/vesta/base_field.hpp +++ b/include/nil/crypto3/algebra/fields/vesta/base_field.hpp @@ -57,6 +57,8 @@ namespace nil { constexpr static const integral_type modulus = 0x40000000000000000000000000000000224698fc0994a8dd8c46eb2100000001_cppui255; + constexpr static const integral_type group_order_minus_one_half = + 0x40000000000000000000000000000000224698fc0994a8dd8c46eb2100000001_cppui255; typedef typename policy_type::modular_backend modular_backend; constexpr static const modular_params_type modulus_params = modulus;