-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathEC_MNT6_Modulus.hpp
40 lines (29 loc) · 1.02 KB
/
EC_MNT6_Modulus.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _SNARKLIB_EC_MNT6_MODULUS_HPP_
#define _SNARKLIB_EC_MNT6_MODULUS_HPP_
#include <gmp.h>
#include <snarklib/BigInt.hpp>
namespace snarklib {
////////////////////////////////////////////////////////////////////////////////
// MNT6
//
class MNT6_Modulus
{
public:
// modulus R and modulus Q
static const mp_size_t r_bitcount = 298;
static const mp_size_t q_bitcount = 298;
static const mp_size_t r_limbs = (r_bitcount + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
static const mp_size_t q_limbs = (q_bitcount + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
static const BigInt<r_limbs>& modulus_r() {
static const BigInt<r_limbs> a(
"475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081");
return a;
}
static const BigInt<q_limbs>& modulus_q() {
static const BigInt<q_limbs> a(
"475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137");
return a;
}
};
} // namespace snarklib
#endif