xref: /freebsd/crypto/libecc/include/libecc/curves/known/ec_params_bign512v1.h (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1*f0865ec9SKyle Evans #include <libecc/lib_ecc_config.h>
2*f0865ec9SKyle Evans #ifdef WITH_CURVE_BIGN512V1
3*f0865ec9SKyle Evans 
4*f0865ec9SKyle Evans #ifndef __EC_PARAMS_BIGN512V1_H__
5*f0865ec9SKyle Evans #define __EC_PARAMS_BIGN512V1_H__
6*f0865ec9SKyle Evans #include <libecc/curves/known/ec_params_external.h>
7*f0865ec9SKyle Evans static const u8 bign512v1_p[] = {
8*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
9*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
10*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
11*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
12*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
13*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
14*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
15*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xc7,
16*f0865ec9SKyle Evans };
17*f0865ec9SKyle Evans 
18*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p);
19*f0865ec9SKyle Evans 
20*f0865ec9SKyle Evans #define CURVE_BIGN512V1_P_BITLEN 512
21*f0865ec9SKyle Evans static const u8 bign512v1_p_bitlen[] = {
22*f0865ec9SKyle Evans 	0x02, 0x00,
23*f0865ec9SKyle Evans };
24*f0865ec9SKyle Evans 
25*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_bitlen);
26*f0865ec9SKyle Evans 
27*f0865ec9SKyle Evans #if (WORD_BYTES == 8)     /* 64-bit words */
28*f0865ec9SKyle Evans static const u8 bign512v1_r[] = {
29*f0865ec9SKyle Evans 	0x02, 0x39,
30*f0865ec9SKyle Evans };
31*f0865ec9SKyle Evans 
32*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_r);
33*f0865ec9SKyle Evans 
34*f0865ec9SKyle Evans static const u8 bign512v1_r_square[] = {
35*f0865ec9SKyle Evans 	0x04, 0xf0, 0xb1,
36*f0865ec9SKyle Evans };
37*f0865ec9SKyle Evans 
38*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_r_square);
39*f0865ec9SKyle Evans 
40*f0865ec9SKyle Evans static const u8 bign512v1_mpinv[] = {
41*f0865ec9SKyle Evans 	0x58, 0xa1, 0xf7, 0xe6, 0xce, 0x0f, 0x4c, 0x09,
42*f0865ec9SKyle Evans };
43*f0865ec9SKyle Evans 
44*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_mpinv);
45*f0865ec9SKyle Evans 
46*f0865ec9SKyle Evans static const u8 bign512v1_p_shift[] = {
47*f0865ec9SKyle Evans 	0x00,
48*f0865ec9SKyle Evans };
49*f0865ec9SKyle Evans 
50*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_shift);
51*f0865ec9SKyle Evans 
52*f0865ec9SKyle Evans static const u8 bign512v1_p_normalized[] = {
53*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
54*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
55*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
56*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
57*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
58*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
59*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
60*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xc7,
61*f0865ec9SKyle Evans };
62*f0865ec9SKyle Evans 
63*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_normalized);
64*f0865ec9SKyle Evans 
65*f0865ec9SKyle Evans static const u8 bign512v1_p_reciprocal[] = {
66*f0865ec9SKyle Evans 	0x00,
67*f0865ec9SKyle Evans };
68*f0865ec9SKyle Evans 
69*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_reciprocal);
70*f0865ec9SKyle Evans 
71*f0865ec9SKyle Evans #elif (WORD_BYTES == 4)   /* 32-bit words */
72*f0865ec9SKyle Evans static const u8 bign512v1_r[] = {
73*f0865ec9SKyle Evans 	0x02, 0x39,
74*f0865ec9SKyle Evans };
75*f0865ec9SKyle Evans 
76*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_r);
77*f0865ec9SKyle Evans 
78*f0865ec9SKyle Evans static const u8 bign512v1_r_square[] = {
79*f0865ec9SKyle Evans 	0x04, 0xf0, 0xb1,
80*f0865ec9SKyle Evans };
81*f0865ec9SKyle Evans 
82*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_r_square);
83*f0865ec9SKyle Evans 
84*f0865ec9SKyle Evans static const u8 bign512v1_mpinv[] = {
85*f0865ec9SKyle Evans 	0xce, 0x0f, 0x4c, 0x09,
86*f0865ec9SKyle Evans };
87*f0865ec9SKyle Evans 
88*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_mpinv);
89*f0865ec9SKyle Evans 
90*f0865ec9SKyle Evans static const u8 bign512v1_p_shift[] = {
91*f0865ec9SKyle Evans 	0x00,
92*f0865ec9SKyle Evans };
93*f0865ec9SKyle Evans 
94*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_shift);
95*f0865ec9SKyle Evans 
96*f0865ec9SKyle Evans static const u8 bign512v1_p_normalized[] = {
97*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
98*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
99*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
100*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
101*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
102*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
103*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
104*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xc7,
105*f0865ec9SKyle Evans };
106*f0865ec9SKyle Evans 
107*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_normalized);
108*f0865ec9SKyle Evans 
109*f0865ec9SKyle Evans static const u8 bign512v1_p_reciprocal[] = {
110*f0865ec9SKyle Evans 	0x00,
111*f0865ec9SKyle Evans };
112*f0865ec9SKyle Evans 
113*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_reciprocal);
114*f0865ec9SKyle Evans 
115*f0865ec9SKyle Evans #elif (WORD_BYTES == 2)   /* 16-bit words */
116*f0865ec9SKyle Evans static const u8 bign512v1_r[] = {
117*f0865ec9SKyle Evans 	0x02, 0x39,
118*f0865ec9SKyle Evans };
119*f0865ec9SKyle Evans 
120*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_r);
121*f0865ec9SKyle Evans 
122*f0865ec9SKyle Evans static const u8 bign512v1_r_square[] = {
123*f0865ec9SKyle Evans 	0x04, 0xf0, 0xb1,
124*f0865ec9SKyle Evans };
125*f0865ec9SKyle Evans 
126*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_r_square);
127*f0865ec9SKyle Evans 
128*f0865ec9SKyle Evans static const u8 bign512v1_mpinv[] = {
129*f0865ec9SKyle Evans 	0x4c, 0x09,
130*f0865ec9SKyle Evans };
131*f0865ec9SKyle Evans 
132*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_mpinv);
133*f0865ec9SKyle Evans 
134*f0865ec9SKyle Evans static const u8 bign512v1_p_shift[] = {
135*f0865ec9SKyle Evans 	0x00,
136*f0865ec9SKyle Evans };
137*f0865ec9SKyle Evans 
138*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_shift);
139*f0865ec9SKyle Evans 
140*f0865ec9SKyle Evans static const u8 bign512v1_p_normalized[] = {
141*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
142*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
143*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
144*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
145*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
146*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
147*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
148*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xc7,
149*f0865ec9SKyle Evans };
150*f0865ec9SKyle Evans 
151*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_normalized);
152*f0865ec9SKyle Evans 
153*f0865ec9SKyle Evans static const u8 bign512v1_p_reciprocal[] = {
154*f0865ec9SKyle Evans 	0x00,
155*f0865ec9SKyle Evans };
156*f0865ec9SKyle Evans 
157*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_p_reciprocal);
158*f0865ec9SKyle Evans 
159*f0865ec9SKyle Evans #else                     /* unknown word size */
160*f0865ec9SKyle Evans #error "Unsupported word size"
161*f0865ec9SKyle Evans #endif
162*f0865ec9SKyle Evans 
163*f0865ec9SKyle Evans static const u8 bign512v1_a[] = {
164*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
165*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
166*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
167*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
168*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
169*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
170*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
171*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xc4,
172*f0865ec9SKyle Evans };
173*f0865ec9SKyle Evans 
174*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_a);
175*f0865ec9SKyle Evans 
176*f0865ec9SKyle Evans static const u8 bign512v1_b[] = {
177*f0865ec9SKyle Evans 	0x6c, 0xb4, 0x59, 0x44, 0x93, 0x3b, 0x8c, 0x43,
178*f0865ec9SKyle Evans 	0xd8, 0x8c, 0x5d, 0x6a, 0x60, 0xfd, 0x58, 0x89,
179*f0865ec9SKyle Evans 	0x5b, 0xc6, 0xa9, 0xee, 0xdd, 0x5d, 0x25, 0x51,
180*f0865ec9SKyle Evans 	0x17, 0xce, 0x13, 0xe3, 0xda, 0xad, 0xb0, 0x88,
181*f0865ec9SKyle Evans 	0x27, 0x11, 0xdc, 0xb5, 0xc4, 0x24, 0x5e, 0x95,
182*f0865ec9SKyle Evans 	0x29, 0x33, 0x00, 0x8c, 0x87, 0xac, 0xa2, 0x43,
183*f0865ec9SKyle Evans 	0xea, 0x86, 0x22, 0x27, 0x3a, 0x49, 0xa2, 0x7a,
184*f0865ec9SKyle Evans 	0x09, 0x34, 0x69, 0x98, 0xd6, 0x13, 0x9c, 0x90,
185*f0865ec9SKyle Evans };
186*f0865ec9SKyle Evans 
187*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_b);
188*f0865ec9SKyle Evans 
189*f0865ec9SKyle Evans #define CURVE_BIGN512V1_CURVE_ORDER_BITLEN 512
190*f0865ec9SKyle Evans static const u8 bign512v1_curve_order[] = {
191*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
192*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
193*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
194*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
195*f0865ec9SKyle Evans 	0xb2, 0xc0, 0x09, 0x2c, 0x01, 0x98, 0x00, 0x4e,
196*f0865ec9SKyle Evans 	0xf2, 0x6b, 0xeb, 0xb0, 0x2e, 0x21, 0x13, 0xf4,
197*f0865ec9SKyle Evans 	0x36, 0x1b, 0xca, 0xe5, 0x95, 0x56, 0xdf, 0x32,
198*f0865ec9SKyle Evans 	0xdc, 0xff, 0xad, 0x49, 0x0d, 0x06, 0x8e, 0xf1,
199*f0865ec9SKyle Evans };
200*f0865ec9SKyle Evans 
201*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_curve_order);
202*f0865ec9SKyle Evans 
203*f0865ec9SKyle Evans static const u8 bign512v1_gx[] = {
204*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
205*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
206*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
207*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
208*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
209*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
210*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
211*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
212*f0865ec9SKyle Evans };
213*f0865ec9SKyle Evans 
214*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_gx);
215*f0865ec9SKyle Evans 
216*f0865ec9SKyle Evans static const u8 bign512v1_gy[] = {
217*f0865ec9SKyle Evans 	0xa8, 0x26, 0xff, 0x7a, 0xe4, 0x03, 0x76, 0x81,
218*f0865ec9SKyle Evans 	0xb1, 0x82, 0xe6, 0xf7, 0xa0, 0xd1, 0x8f, 0xab,
219*f0865ec9SKyle Evans 	0xb0, 0xab, 0x41, 0xb3, 0xb3, 0x61, 0xbc, 0xe2,
220*f0865ec9SKyle Evans 	0xd2, 0xed, 0xf8, 0x1b, 0x00, 0xcc, 0xca, 0xda,
221*f0865ec9SKyle Evans 	0x69, 0x73, 0xdd, 0xe2, 0x0e, 0xfa, 0x6f, 0xd2,
222*f0865ec9SKyle Evans 	0xff, 0x77, 0x73, 0x95, 0xee, 0xe8, 0x22, 0x61,
223*f0865ec9SKyle Evans 	0x67, 0xaa, 0x83, 0xb9, 0xc9, 0x4c, 0x0d, 0x04,
224*f0865ec9SKyle Evans 	0xb7, 0x92, 0xae, 0x6f, 0xce, 0xef, 0xed, 0xbd,
225*f0865ec9SKyle Evans };
226*f0865ec9SKyle Evans 
227*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_gy);
228*f0865ec9SKyle Evans 
229*f0865ec9SKyle Evans static const u8 bign512v1_gz[] = {
230*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
231*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
232*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
233*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
234*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
235*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
236*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
237*f0865ec9SKyle Evans 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
238*f0865ec9SKyle Evans };
239*f0865ec9SKyle Evans 
240*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_gz);
241*f0865ec9SKyle Evans 
242*f0865ec9SKyle Evans static const u8 bign512v1_gen_order[] = {
243*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
244*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
245*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
246*f0865ec9SKyle Evans 	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
247*f0865ec9SKyle Evans 	0xb2, 0xc0, 0x09, 0x2c, 0x01, 0x98, 0x00, 0x4e,
248*f0865ec9SKyle Evans 	0xf2, 0x6b, 0xeb, 0xb0, 0x2e, 0x21, 0x13, 0xf4,
249*f0865ec9SKyle Evans 	0x36, 0x1b, 0xca, 0xe5, 0x95, 0x56, 0xdf, 0x32,
250*f0865ec9SKyle Evans 	0xdc, 0xff, 0xad, 0x49, 0x0d, 0x06, 0x8e, 0xf1,
251*f0865ec9SKyle Evans };
252*f0865ec9SKyle Evans 
253*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_gen_order);
254*f0865ec9SKyle Evans 
255*f0865ec9SKyle Evans #define CURVE_BIGN512V1_Q_BITLEN 512
256*f0865ec9SKyle Evans static const u8 bign512v1_gen_order_bitlen[] = {
257*f0865ec9SKyle Evans 	0x02, 0x00,
258*f0865ec9SKyle Evans };
259*f0865ec9SKyle Evans 
260*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_gen_order_bitlen);
261*f0865ec9SKyle Evans 
262*f0865ec9SKyle Evans static const u8 bign512v1_cofactor[] = {
263*f0865ec9SKyle Evans 	0x01,
264*f0865ec9SKyle Evans };
265*f0865ec9SKyle Evans 
266*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_cofactor);
267*f0865ec9SKyle Evans 
268*f0865ec9SKyle Evans static const u8 bign512v1_alpha_montgomery[] = {
269*f0865ec9SKyle Evans 	0x00,
270*f0865ec9SKyle Evans };
271*f0865ec9SKyle Evans TO_EC_STR_PARAM_FIXED_SIZE(bign512v1_alpha_montgomery, 0);
272*f0865ec9SKyle Evans 
273*f0865ec9SKyle Evans static const u8 bign512v1_gamma_montgomery[] = {
274*f0865ec9SKyle Evans 	0x00,
275*f0865ec9SKyle Evans };
276*f0865ec9SKyle Evans TO_EC_STR_PARAM_FIXED_SIZE(bign512v1_gamma_montgomery, 0);
277*f0865ec9SKyle Evans 
278*f0865ec9SKyle Evans static const u8 bign512v1_alpha_edwards[] = {
279*f0865ec9SKyle Evans 	0x00,
280*f0865ec9SKyle Evans };
281*f0865ec9SKyle Evans TO_EC_STR_PARAM_FIXED_SIZE(bign512v1_alpha_edwards, 0);
282*f0865ec9SKyle Evans 
283*f0865ec9SKyle Evans static const u8 bign512v1_name[] = "BIGN512V1";
284*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_name);
285*f0865ec9SKyle Evans 
286*f0865ec9SKyle Evans static const u8 bign512v1_oid[] = "1.2.112.0.2.0.34.101.45.3.3";
287*f0865ec9SKyle Evans TO_EC_STR_PARAM(bign512v1_oid);
288*f0865ec9SKyle Evans 
289*f0865ec9SKyle Evans static const ec_str_params bign512v1_str_params = {
290*f0865ec9SKyle Evans 	.p = &bign512v1_p_str_param,
291*f0865ec9SKyle Evans 	.p_bitlen = &bign512v1_p_bitlen_str_param,
292*f0865ec9SKyle Evans 	.r = &bign512v1_r_str_param,
293*f0865ec9SKyle Evans 	.r_square = &bign512v1_r_square_str_param,
294*f0865ec9SKyle Evans 	.mpinv = &bign512v1_mpinv_str_param,
295*f0865ec9SKyle Evans 	.p_shift = &bign512v1_p_shift_str_param,
296*f0865ec9SKyle Evans 	.p_normalized = &bign512v1_p_normalized_str_param,
297*f0865ec9SKyle Evans 	.p_reciprocal = &bign512v1_p_reciprocal_str_param,
298*f0865ec9SKyle Evans 	.a = &bign512v1_a_str_param,
299*f0865ec9SKyle Evans 	.b = &bign512v1_b_str_param,
300*f0865ec9SKyle Evans 	.curve_order = &bign512v1_curve_order_str_param,
301*f0865ec9SKyle Evans 	.gx = &bign512v1_gx_str_param,
302*f0865ec9SKyle Evans 	.gy = &bign512v1_gy_str_param,
303*f0865ec9SKyle Evans 	.gz = &bign512v1_gz_str_param,
304*f0865ec9SKyle Evans 	.gen_order = &bign512v1_gen_order_str_param,
305*f0865ec9SKyle Evans 	.gen_order_bitlen = &bign512v1_gen_order_bitlen_str_param,
306*f0865ec9SKyle Evans 	.cofactor = &bign512v1_cofactor_str_param,
307*f0865ec9SKyle Evans 	.alpha_montgomery = &bign512v1_alpha_montgomery_str_param,
308*f0865ec9SKyle Evans 	.gamma_montgomery = &bign512v1_gamma_montgomery_str_param,
309*f0865ec9SKyle Evans 	.alpha_edwards = &bign512v1_alpha_edwards_str_param,
310*f0865ec9SKyle Evans 	.oid = &bign512v1_oid_str_param,
311*f0865ec9SKyle Evans 	.name = &bign512v1_name_str_param,
312*f0865ec9SKyle Evans };
313*f0865ec9SKyle Evans 
314*f0865ec9SKyle Evans /*
315*f0865ec9SKyle Evans  * Compute max bit length of all curves for p and q
316*f0865ec9SKyle Evans  */
317*f0865ec9SKyle Evans #ifndef CURVES_MAX_P_BIT_LEN
318*f0865ec9SKyle Evans #define CURVES_MAX_P_BIT_LEN    0
319*f0865ec9SKyle Evans #endif
320*f0865ec9SKyle Evans #if (CURVES_MAX_P_BIT_LEN < CURVE_BIGN512V1_P_BITLEN)
321*f0865ec9SKyle Evans #undef CURVES_MAX_P_BIT_LEN
322*f0865ec9SKyle Evans #define CURVES_MAX_P_BIT_LEN CURVE_BIGN512V1_P_BITLEN
323*f0865ec9SKyle Evans #endif
324*f0865ec9SKyle Evans #ifndef CURVES_MAX_Q_BIT_LEN
325*f0865ec9SKyle Evans #define CURVES_MAX_Q_BIT_LEN    0
326*f0865ec9SKyle Evans #endif
327*f0865ec9SKyle Evans #if (CURVES_MAX_Q_BIT_LEN < CURVE_BIGN512V1_Q_BITLEN)
328*f0865ec9SKyle Evans #undef CURVES_MAX_Q_BIT_LEN
329*f0865ec9SKyle Evans #define CURVES_MAX_Q_BIT_LEN CURVE_BIGN512V1_Q_BITLEN
330*f0865ec9SKyle Evans #endif
331*f0865ec9SKyle Evans #ifndef CURVES_MAX_CURVE_ORDER_BIT_LEN
332*f0865ec9SKyle Evans #define CURVES_MAX_CURVE_ORDER_BIT_LEN    0
333*f0865ec9SKyle Evans #endif
334*f0865ec9SKyle Evans #if (CURVES_MAX_CURVE_ORDER_BIT_LEN < CURVE_BIGN512V1_CURVE_ORDER_BITLEN)
335*f0865ec9SKyle Evans #undef CURVES_MAX_CURVE_ORDER_BIT_LEN
336*f0865ec9SKyle Evans #define CURVES_MAX_CURVE_ORDER_BIT_LEN CURVE_BIGN512V1_CURVE_ORDER_BITLEN
337*f0865ec9SKyle Evans #endif
338*f0865ec9SKyle Evans 
339*f0865ec9SKyle Evans /*
340*f0865ec9SKyle Evans  * Compute and adapt max name and oid length
341*f0865ec9SKyle Evans  */
342*f0865ec9SKyle Evans #ifndef MAX_CURVE_OID_LEN
343*f0865ec9SKyle Evans #define MAX_CURVE_OID_LEN 0
344*f0865ec9SKyle Evans #endif
345*f0865ec9SKyle Evans #ifndef MAX_CURVE_NAME_LEN
346*f0865ec9SKyle Evans #define MAX_CURVE_NAME_LEN 0
347*f0865ec9SKyle Evans #endif
348*f0865ec9SKyle Evans #if (MAX_CURVE_OID_LEN < 1)
349*f0865ec9SKyle Evans #undef MAX_CURVE_OID_LEN
350*f0865ec9SKyle Evans #define MAX_CURVE_OID_LEN 1
351*f0865ec9SKyle Evans #endif
352*f0865ec9SKyle Evans #if (MAX_CURVE_NAME_LEN < 23)
353*f0865ec9SKyle Evans #undef MAX_CURVE_NAME_LEN
354*f0865ec9SKyle Evans #define MAX_CURVE_NAME_LEN 23
355*f0865ec9SKyle Evans #endif
356*f0865ec9SKyle Evans 
357*f0865ec9SKyle Evans #endif /* __EC_PARAMS_BIGN512V1_H__ */
358*f0865ec9SKyle Evans 
359*f0865ec9SKyle Evans #endif /* WITH_CURVE_BIGN512V1 */
360