xref: /freebsd/crypto/libecc/include/libecc/curves/known/ec_params_brainpoolp512t1.h (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1 #include <libecc/lib_ecc_config.h>
2 #ifdef WITH_CURVE_BRAINPOOLP512T1
3 
4 #ifndef __EC_PARAMS_BRAINPOOLP512T1_H__
5 #define __EC_PARAMS_BRAINPOOLP512T1_H__
6 #include <libecc/curves/known/ec_params_external.h>
7 static const u8 brainpoolp512t1_p[] = {
8 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
9 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
10 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
11 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x71,
12 	0x7d, 0x4d, 0x9b, 0x00, 0x9b, 0xc6, 0x68, 0x42,
13 	0xae, 0xcd, 0xa1, 0x2a, 0xe6, 0xa3, 0x80, 0xe6,
14 	0x28, 0x81, 0xff, 0x2f, 0x2d, 0x82, 0xc6, 0x85,
15 	0x28, 0xaa, 0x60, 0x56, 0x58, 0x3a, 0x48, 0xf3,
16 };
17 
18 TO_EC_STR_PARAM(brainpoolp512t1_p);
19 
20 #define CURVE_BRAINPOOLP512T1_P_BITLEN 512
21 static const u8 brainpoolp512t1_p_bitlen[] = {
22 	0x02, 0x00,
23 };
24 
25 TO_EC_STR_PARAM(brainpoolp512t1_p_bitlen);
26 
27 #if (WORD_BYTES == 8)     /* 64-bit words */
28 static const u8 brainpoolp512t1_r[] = {
29 	0x55, 0x22, 0x62, 0x47, 0x24, 0x16, 0x3b, 0x74,
30 	0xc0, 0x2b, 0x19, 0x51, 0xcc, 0x36, 0x03, 0xf8,
31 	0x34, 0xcf, 0x72, 0x4c, 0x4c, 0x36, 0x2d, 0xf1,
32 	0x29, 0x9c, 0x63, 0x35, 0x8f, 0xcc, 0xf7, 0x8e,
33 	0x82, 0xb2, 0x64, 0xff, 0x64, 0x39, 0x97, 0xbd,
34 	0x51, 0x32, 0x5e, 0xd5, 0x19, 0x5c, 0x7f, 0x19,
35 	0xd7, 0x7e, 0x00, 0xd0, 0xd2, 0x7d, 0x39, 0x7a,
36 	0xd7, 0x55, 0x9f, 0xa9, 0xa7, 0xc5, 0xb7, 0x0d,
37 };
38 
39 TO_EC_STR_PARAM(brainpoolp512t1_r);
40 
41 static const u8 brainpoolp512t1_r_square[] = {
42 	0x3c, 0x4c, 0x9d, 0x05, 0xa9, 0xff, 0x64, 0x50,
43 	0x20, 0x2e, 0x19, 0x40, 0x20, 0x56, 0xee, 0xcc,
44 	0xa1, 0x6d, 0xaa, 0x5f, 0xd4, 0x2b, 0xff, 0x83,
45 	0x19, 0x48, 0x6f, 0xd8, 0xd5, 0x89, 0x80, 0x57,
46 	0xe0, 0xc1, 0x9a, 0x77, 0x83, 0x51, 0x4a, 0x25,
47 	0x53, 0xb7, 0xf9, 0xbc, 0x90, 0x5a, 0xff, 0xd3,
48 	0x79, 0x3f, 0xb1, 0x30, 0x27, 0x15, 0x79, 0x05,
49 	0x49, 0xad, 0x14, 0x4a, 0x61, 0x58, 0xf2, 0x05,
50 };
51 
52 TO_EC_STR_PARAM(brainpoolp512t1_r_square);
53 
54 static const u8 brainpoolp512t1_mpinv[] = {
55 	0x83, 0x9b, 0x32, 0x20, 0x7d, 0x89, 0xef, 0xc5,
56 };
57 
58 TO_EC_STR_PARAM(brainpoolp512t1_mpinv);
59 
60 static const u8 brainpoolp512t1_p_shift[] = {
61 	0x00,
62 };
63 
64 TO_EC_STR_PARAM(brainpoolp512t1_p_shift);
65 
66 static const u8 brainpoolp512t1_p_normalized[] = {
67 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
68 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
69 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
70 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x71,
71 	0x7d, 0x4d, 0x9b, 0x00, 0x9b, 0xc6, 0x68, 0x42,
72 	0xae, 0xcd, 0xa1, 0x2a, 0xe6, 0xa3, 0x80, 0xe6,
73 	0x28, 0x81, 0xff, 0x2f, 0x2d, 0x82, 0xc6, 0x85,
74 	0x28, 0xaa, 0x60, 0x56, 0x58, 0x3a, 0x48, 0xf3,
75 };
76 
77 TO_EC_STR_PARAM(brainpoolp512t1_p_normalized);
78 
79 static const u8 brainpoolp512t1_p_reciprocal[] = {
80 	0x7f, 0x8d, 0x7f, 0x4e, 0xd6, 0xda, 0xeb, 0x8a,
81 };
82 
83 TO_EC_STR_PARAM(brainpoolp512t1_p_reciprocal);
84 
85 #elif (WORD_BYTES == 4)   /* 32-bit words */
86 static const u8 brainpoolp512t1_r[] = {
87 	0x55, 0x22, 0x62, 0x47, 0x24, 0x16, 0x3b, 0x74,
88 	0xc0, 0x2b, 0x19, 0x51, 0xcc, 0x36, 0x03, 0xf8,
89 	0x34, 0xcf, 0x72, 0x4c, 0x4c, 0x36, 0x2d, 0xf1,
90 	0x29, 0x9c, 0x63, 0x35, 0x8f, 0xcc, 0xf7, 0x8e,
91 	0x82, 0xb2, 0x64, 0xff, 0x64, 0x39, 0x97, 0xbd,
92 	0x51, 0x32, 0x5e, 0xd5, 0x19, 0x5c, 0x7f, 0x19,
93 	0xd7, 0x7e, 0x00, 0xd0, 0xd2, 0x7d, 0x39, 0x7a,
94 	0xd7, 0x55, 0x9f, 0xa9, 0xa7, 0xc5, 0xb7, 0x0d,
95 };
96 
97 TO_EC_STR_PARAM(brainpoolp512t1_r);
98 
99 static const u8 brainpoolp512t1_r_square[] = {
100 	0x3c, 0x4c, 0x9d, 0x05, 0xa9, 0xff, 0x64, 0x50,
101 	0x20, 0x2e, 0x19, 0x40, 0x20, 0x56, 0xee, 0xcc,
102 	0xa1, 0x6d, 0xaa, 0x5f, 0xd4, 0x2b, 0xff, 0x83,
103 	0x19, 0x48, 0x6f, 0xd8, 0xd5, 0x89, 0x80, 0x57,
104 	0xe0, 0xc1, 0x9a, 0x77, 0x83, 0x51, 0x4a, 0x25,
105 	0x53, 0xb7, 0xf9, 0xbc, 0x90, 0x5a, 0xff, 0xd3,
106 	0x79, 0x3f, 0xb1, 0x30, 0x27, 0x15, 0x79, 0x05,
107 	0x49, 0xad, 0x14, 0x4a, 0x61, 0x58, 0xf2, 0x05,
108 };
109 
110 TO_EC_STR_PARAM(brainpoolp512t1_r_square);
111 
112 static const u8 brainpoolp512t1_mpinv[] = {
113 	0x7d, 0x89, 0xef, 0xc5,
114 };
115 
116 TO_EC_STR_PARAM(brainpoolp512t1_mpinv);
117 
118 static const u8 brainpoolp512t1_p_shift[] = {
119 	0x00,
120 };
121 
122 TO_EC_STR_PARAM(brainpoolp512t1_p_shift);
123 
124 static const u8 brainpoolp512t1_p_normalized[] = {
125 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
126 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
127 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
128 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x71,
129 	0x7d, 0x4d, 0x9b, 0x00, 0x9b, 0xc6, 0x68, 0x42,
130 	0xae, 0xcd, 0xa1, 0x2a, 0xe6, 0xa3, 0x80, 0xe6,
131 	0x28, 0x81, 0xff, 0x2f, 0x2d, 0x82, 0xc6, 0x85,
132 	0x28, 0xaa, 0x60, 0x56, 0x58, 0x3a, 0x48, 0xf3,
133 };
134 
135 TO_EC_STR_PARAM(brainpoolp512t1_p_normalized);
136 
137 static const u8 brainpoolp512t1_p_reciprocal[] = {
138 	0x7f, 0x8d, 0x7f, 0x4e,
139 };
140 
141 TO_EC_STR_PARAM(brainpoolp512t1_p_reciprocal);
142 
143 #elif (WORD_BYTES == 2)   /* 16-bit words */
144 static const u8 brainpoolp512t1_r[] = {
145 	0x55, 0x22, 0x62, 0x47, 0x24, 0x16, 0x3b, 0x74,
146 	0xc0, 0x2b, 0x19, 0x51, 0xcc, 0x36, 0x03, 0xf8,
147 	0x34, 0xcf, 0x72, 0x4c, 0x4c, 0x36, 0x2d, 0xf1,
148 	0x29, 0x9c, 0x63, 0x35, 0x8f, 0xcc, 0xf7, 0x8e,
149 	0x82, 0xb2, 0x64, 0xff, 0x64, 0x39, 0x97, 0xbd,
150 	0x51, 0x32, 0x5e, 0xd5, 0x19, 0x5c, 0x7f, 0x19,
151 	0xd7, 0x7e, 0x00, 0xd0, 0xd2, 0x7d, 0x39, 0x7a,
152 	0xd7, 0x55, 0x9f, 0xa9, 0xa7, 0xc5, 0xb7, 0x0d,
153 };
154 
155 TO_EC_STR_PARAM(brainpoolp512t1_r);
156 
157 static const u8 brainpoolp512t1_r_square[] = {
158 	0x3c, 0x4c, 0x9d, 0x05, 0xa9, 0xff, 0x64, 0x50,
159 	0x20, 0x2e, 0x19, 0x40, 0x20, 0x56, 0xee, 0xcc,
160 	0xa1, 0x6d, 0xaa, 0x5f, 0xd4, 0x2b, 0xff, 0x83,
161 	0x19, 0x48, 0x6f, 0xd8, 0xd5, 0x89, 0x80, 0x57,
162 	0xe0, 0xc1, 0x9a, 0x77, 0x83, 0x51, 0x4a, 0x25,
163 	0x53, 0xb7, 0xf9, 0xbc, 0x90, 0x5a, 0xff, 0xd3,
164 	0x79, 0x3f, 0xb1, 0x30, 0x27, 0x15, 0x79, 0x05,
165 	0x49, 0xad, 0x14, 0x4a, 0x61, 0x58, 0xf2, 0x05,
166 };
167 
168 TO_EC_STR_PARAM(brainpoolp512t1_r_square);
169 
170 static const u8 brainpoolp512t1_mpinv[] = {
171 	0xef, 0xc5,
172 };
173 
174 TO_EC_STR_PARAM(brainpoolp512t1_mpinv);
175 
176 static const u8 brainpoolp512t1_p_shift[] = {
177 	0x00,
178 };
179 
180 TO_EC_STR_PARAM(brainpoolp512t1_p_shift);
181 
182 static const u8 brainpoolp512t1_p_normalized[] = {
183 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
184 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
185 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
186 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x71,
187 	0x7d, 0x4d, 0x9b, 0x00, 0x9b, 0xc6, 0x68, 0x42,
188 	0xae, 0xcd, 0xa1, 0x2a, 0xe6, 0xa3, 0x80, 0xe6,
189 	0x28, 0x81, 0xff, 0x2f, 0x2d, 0x82, 0xc6, 0x85,
190 	0x28, 0xaa, 0x60, 0x56, 0x58, 0x3a, 0x48, 0xf3,
191 };
192 
193 TO_EC_STR_PARAM(brainpoolp512t1_p_normalized);
194 
195 static const u8 brainpoolp512t1_p_reciprocal[] = {
196 	0x7f, 0x8d,
197 };
198 
199 TO_EC_STR_PARAM(brainpoolp512t1_p_reciprocal);
200 
201 #else                     /* unknown word size */
202 #error "Unsupported word size"
203 #endif
204 
205 static const u8 brainpoolp512t1_a[] = {
206 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
207 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
208 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
209 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x71,
210 	0x7d, 0x4d, 0x9b, 0x00, 0x9b, 0xc6, 0x68, 0x42,
211 	0xae, 0xcd, 0xa1, 0x2a, 0xe6, 0xa3, 0x80, 0xe6,
212 	0x28, 0x81, 0xff, 0x2f, 0x2d, 0x82, 0xc6, 0x85,
213 	0x28, 0xaa, 0x60, 0x56, 0x58, 0x3a, 0x48, 0xf0,
214 };
215 
216 TO_EC_STR_PARAM(brainpoolp512t1_a);
217 
218 static const u8 brainpoolp512t1_b[] = {
219 	0x7c, 0xbb, 0xbc, 0xf9, 0x44, 0x1c, 0xfa, 0xb7,
220 	0x6e, 0x18, 0x90, 0xe4, 0x68, 0x84, 0xea, 0xe3,
221 	0x21, 0xf7, 0x0c, 0x0b, 0xcb, 0x49, 0x81, 0x52,
222 	0x78, 0x97, 0x50, 0x4b, 0xec, 0x3e, 0x36, 0xa6,
223 	0x2b, 0xcd, 0xfa, 0x23, 0x04, 0x97, 0x65, 0x40,
224 	0xf6, 0x45, 0x00, 0x85, 0xf2, 0xda, 0xe1, 0x45,
225 	0xc2, 0x25, 0x53, 0xb4, 0x65, 0x76, 0x36, 0x89,
226 	0x18, 0x0e, 0xa2, 0x57, 0x18, 0x67, 0x42, 0x3e,
227 };
228 
229 TO_EC_STR_PARAM(brainpoolp512t1_b);
230 
231 #define CURVE_BRAINPOOLP512T1_CURVE_ORDER_BITLEN 512
232 static const u8 brainpoolp512t1_curve_order[] = {
233 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
234 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
235 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
236 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x70,
237 	0x55, 0x3e, 0x5c, 0x41, 0x4c, 0xa9, 0x26, 0x19,
238 	0x41, 0x86, 0x61, 0x19, 0x7f, 0xac, 0x10, 0x47,
239 	0x1d, 0xb1, 0xd3, 0x81, 0x08, 0x5d, 0xda, 0xdd,
240 	0xb5, 0x87, 0x96, 0x82, 0x9c, 0xa9, 0x00, 0x69,
241 };
242 
243 TO_EC_STR_PARAM(brainpoolp512t1_curve_order);
244 
245 static const u8 brainpoolp512t1_gx[] = {
246 	0x64, 0x0e, 0xce, 0x5c, 0x12, 0x78, 0x87, 0x17,
247 	0xb9, 0xc1, 0xba, 0x06, 0xcb, 0xc2, 0xa6, 0xfe,
248 	0xba, 0x85, 0x84, 0x24, 0x58, 0xc5, 0x6d, 0xde,
249 	0x9d, 0xb1, 0x75, 0x8d, 0x39, 0xc0, 0x31, 0x3d,
250 	0x82, 0xba, 0x51, 0x73, 0x5c, 0xdb, 0x3e, 0xa4,
251 	0x99, 0xaa, 0x77, 0xa7, 0xd6, 0x94, 0x3a, 0x64,
252 	0xf7, 0xa3, 0xf2, 0x5f, 0xe2, 0x6f, 0x06, 0xb5,
253 	0x1b, 0xaa, 0x26, 0x96, 0xfa, 0x90, 0x35, 0xda,
254 };
255 
256 TO_EC_STR_PARAM(brainpoolp512t1_gx);
257 
258 static const u8 brainpoolp512t1_gy[] = {
259 	0x5b, 0x53, 0x4b, 0xd5, 0x95, 0xf5, 0xaf, 0x0f,
260 	0xa2, 0xc8, 0x92, 0x37, 0x6c, 0x84, 0xac, 0xe1,
261 	0xbb, 0x4e, 0x30, 0x19, 0xb7, 0x16, 0x34, 0xc0,
262 	0x11, 0x31, 0x15, 0x9c, 0xae, 0x03, 0xce, 0xe9,
263 	0xd9, 0x93, 0x21, 0x84, 0xbe, 0xef, 0x21, 0x6b,
264 	0xd7, 0x1d, 0xf2, 0xda, 0xdf, 0x86, 0xa6, 0x27,
265 	0x30, 0x6e, 0xcf, 0xf9, 0x6d, 0xbb, 0x8b, 0xac,
266 	0xe1, 0x98, 0xb6, 0x1e, 0x00, 0xf8, 0xb3, 0x32,
267 };
268 
269 TO_EC_STR_PARAM(brainpoolp512t1_gy);
270 
271 static const u8 brainpoolp512t1_gz[] = {
272 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
273 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
274 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
275 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
276 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
277 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
278 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
279 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
280 };
281 
282 TO_EC_STR_PARAM(brainpoolp512t1_gz);
283 
284 static const u8 brainpoolp512t1_gen_order[] = {
285 	0xaa, 0xdd, 0x9d, 0xb8, 0xdb, 0xe9, 0xc4, 0x8b,
286 	0x3f, 0xd4, 0xe6, 0xae, 0x33, 0xc9, 0xfc, 0x07,
287 	0xcb, 0x30, 0x8d, 0xb3, 0xb3, 0xc9, 0xd2, 0x0e,
288 	0xd6, 0x63, 0x9c, 0xca, 0x70, 0x33, 0x08, 0x70,
289 	0x55, 0x3e, 0x5c, 0x41, 0x4c, 0xa9, 0x26, 0x19,
290 	0x41, 0x86, 0x61, 0x19, 0x7f, 0xac, 0x10, 0x47,
291 	0x1d, 0xb1, 0xd3, 0x81, 0x08, 0x5d, 0xda, 0xdd,
292 	0xb5, 0x87, 0x96, 0x82, 0x9c, 0xa9, 0x00, 0x69,
293 };
294 
295 TO_EC_STR_PARAM(brainpoolp512t1_gen_order);
296 
297 #define CURVE_BRAINPOOLP512T1_Q_BITLEN 512
298 static const u8 brainpoolp512t1_gen_order_bitlen[] = {
299 	0x02, 0x00,
300 };
301 
302 TO_EC_STR_PARAM(brainpoolp512t1_gen_order_bitlen);
303 
304 static const u8 brainpoolp512t1_cofactor[] = {
305 	0x01,
306 };
307 
308 TO_EC_STR_PARAM(brainpoolp512t1_cofactor);
309 
310 static const u8 brainpoolp512t1_alpha_montgomery[] = {
311 	0x00,
312 };
313 TO_EC_STR_PARAM_FIXED_SIZE(brainpoolp512t1_alpha_montgomery, 0);
314 
315 static const u8 brainpoolp512t1_gamma_montgomery[] = {
316 	0x00,
317 };
318 TO_EC_STR_PARAM_FIXED_SIZE(brainpoolp512t1_gamma_montgomery, 0);
319 
320 static const u8 brainpoolp512t1_alpha_edwards[] = {
321 	0x00,
322 };
323 TO_EC_STR_PARAM_FIXED_SIZE(brainpoolp512t1_alpha_edwards, 0);
324 
325 static const u8 brainpoolp512t1_name[] = "BRAINPOOLP512T1";
326 TO_EC_STR_PARAM(brainpoolp512t1_name);
327 
328 static const u8 brainpoolp512t1_oid[] = "1.3.36.3.3.2.8.1.1.14";
329 TO_EC_STR_PARAM(brainpoolp512t1_oid);
330 
331 static const ec_str_params brainpoolp512t1_str_params = {
332 	.p = &brainpoolp512t1_p_str_param,
333 	.p_bitlen = &brainpoolp512t1_p_bitlen_str_param,
334 	.r = &brainpoolp512t1_r_str_param,
335 	.r_square = &brainpoolp512t1_r_square_str_param,
336 	.mpinv = &brainpoolp512t1_mpinv_str_param,
337 	.p_shift = &brainpoolp512t1_p_shift_str_param,
338 	.p_normalized = &brainpoolp512t1_p_normalized_str_param,
339 	.p_reciprocal = &brainpoolp512t1_p_reciprocal_str_param,
340 	.a = &brainpoolp512t1_a_str_param,
341 	.b = &brainpoolp512t1_b_str_param,
342 	.curve_order = &brainpoolp512t1_curve_order_str_param,
343 	.gx = &brainpoolp512t1_gx_str_param,
344 	.gy = &brainpoolp512t1_gy_str_param,
345 	.gz = &brainpoolp512t1_gz_str_param,
346 	.gen_order = &brainpoolp512t1_gen_order_str_param,
347 	.gen_order_bitlen = &brainpoolp512t1_gen_order_bitlen_str_param,
348 	.cofactor = &brainpoolp512t1_cofactor_str_param,
349 	.alpha_montgomery = &brainpoolp512t1_alpha_montgomery_str_param,
350 	.gamma_montgomery = &brainpoolp512t1_gamma_montgomery_str_param,
351 	.alpha_edwards = &brainpoolp512t1_alpha_edwards_str_param,
352 	.oid = &brainpoolp512t1_oid_str_param,
353 	.name = &brainpoolp512t1_name_str_param,
354 };
355 
356 /*
357  * Compute max bit length of all curves for p and q
358  */
359 #ifndef CURVES_MAX_P_BIT_LEN
360 #define CURVES_MAX_P_BIT_LEN    0
361 #endif
362 #if (CURVES_MAX_P_BIT_LEN < CURVE_BRAINPOOLP512T1_P_BITLEN)
363 #undef CURVES_MAX_P_BIT_LEN
364 #define CURVES_MAX_P_BIT_LEN CURVE_BRAINPOOLP512T1_P_BITLEN
365 #endif
366 #ifndef CURVES_MAX_Q_BIT_LEN
367 #define CURVES_MAX_Q_BIT_LEN    0
368 #endif
369 #if (CURVES_MAX_Q_BIT_LEN < CURVE_BRAINPOOLP512T1_Q_BITLEN)
370 #undef CURVES_MAX_Q_BIT_LEN
371 #define CURVES_MAX_Q_BIT_LEN CURVE_BRAINPOOLP512T1_Q_BITLEN
372 #endif
373 #ifndef CURVES_MAX_CURVE_ORDER_BIT_LEN
374 #define CURVES_MAX_CURVE_ORDER_BIT_LEN    0
375 #endif
376 #if (CURVES_MAX_CURVE_ORDER_BIT_LEN < CURVE_BRAINPOOLP512T1_CURVE_ORDER_BITLEN)
377 #undef CURVES_MAX_CURVE_ORDER_BIT_LEN
378 #define CURVES_MAX_CURVE_ORDER_BIT_LEN CURVE_BRAINPOOLP512T1_CURVE_ORDER_BITLEN
379 #endif
380 
381 /*
382  * Compute and adapt max name and oid length
383  */
384 #ifndef MAX_CURVE_OID_LEN
385 #define MAX_CURVE_OID_LEN 0
386 #endif
387 #ifndef MAX_CURVE_NAME_LEN
388 #define MAX_CURVE_NAME_LEN 0
389 #endif
390 #if (MAX_CURVE_OID_LEN < 1)
391 #undef MAX_CURVE_OID_LEN
392 #define MAX_CURVE_OID_LEN 1
393 #endif
394 #if (MAX_CURVE_NAME_LEN < 29)
395 #undef MAX_CURVE_NAME_LEN
396 #define MAX_CURVE_NAME_LEN 29
397 #endif
398 
399 #endif /* __EC_PARAMS_BRAINPOOLP512T1_H__ */
400 
401 #endif /* WITH_CURVE_BRAINPOOLP512T1 */
402