summaryrefslogtreecommitdiffstats
path: root/third_party/heimdal/lib/hcrypto/x25519/fe_25_5/constants.h
blob: dd6da1b87403a34d849495c1b150d0a12b26cb56 (plain)
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
/* 37095705934669439343138083508754565189542113879843219016388785533085940283555 */
static const fe25519 d = {
    -10913610, 13857413, -15372611, 6949391,   114729, -8787816, -6275908, -3247719, -18696448, -12055116
};

/* 2 * d =
 * 16295367250680780974490674513165176452449235426866156013048779062215315747161
 */
static const fe25519 d2 = {
    -21827239, -5839606,  -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199 };

/* sqrt(-1) */
static const fe25519 sqrtm1 = {
    -32595792, -7943725,  9377950,  3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482
};

/* A = 486662 */
static const fe25519 curve25519_A = {
    486662, 0, 0, 0, 0, 0, 0, 0, 0, 0
};

/* sqrt(ad - 1) with a = -1 (mod p) */
static const fe25519 sqrtadm1 = {
    24849947, -153582, -23613485, 6347715, -21072328, -667138, -25271143, -15367704, -870347, 14525639
};

/* 1 / sqrt(a - d) */
static const fe25519 invsqrtamd = {
    6111485, 4156064, -27798727, 12243468, -25904040, 120897, 20826367, -7060776, 6093568, -1986012
};

/* 1 - d ^ 2 */
static const fe25519 onemsqd = {
    6275446, -16617371, -22938544, -3773710, 11667077, 7397348, -27922721, 1766195, -24433858, 672203
};

/* (d - 1) ^ 2 */
static const fe25519 sqdmone = {
    15551795, -11097455, -13425098, -10125071, -11896535, 10178284, -26634327, 4729244, -5282110, -10116402
};