summaryrefslogtreecommitdiffstats
path: root/third_party/heimdal/lib/hcrypto/x25519/fe_51/constants.h
blob: 24e5cb5ebbe1780ad75a6041f8e51670ef9bdd37 (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
41
/* 37095705934669439343138083508754565189542113879843219016388785533085940283555 */
static const fe25519 d = {
    929955233495203, 466365720129213, 1662059464998953, 2033849074728123, 1442794654840575
};

/* 2 * d =
 * 16295367250680780974490674513165176452449235426866156013048779062215315747161
 */
static const fe25519 d2 = {
    1859910466990425, 932731440258426, 1072319116312658, 1815898335770999, 633789495995903
};

/* sqrt(-1) */
static const fe25519 sqrtm1 = {
    1718705420411056, 234908883556509, 2233514472574048, 2117202627021982, 765476049583133
};

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

/* sqrt(ad - 1) with a = -1 (mod p) */
static const fe25519 sqrtadm1 = {
    2241493124984347, 425987919032274, 2207028919301688, 1220490630685848, 974799131293748
};

/* 1 / sqrt(a - d) */
static const fe25519 invsqrtamd = {
    278908739862762, 821645201101625, 8113234426968, 1777959178193151, 2118520810568447
};

/* 1 - d ^ 2 */
static const fe25519 onemsqd = {
    1136626929484150, 1998550399581263, 496427632559748, 118527312129759, 45110755273534
};

/* (d - 1) ^ 2 */
static const fe25519 sqdmone = {
    1507062230895904, 1572317787530805, 683053064812840, 317374165784489, 1572899562415810
};