112 const uint64_t X00 = get_uint32(xw, 0);
113 const uint64_t X01 = get_uint32(xw, 1);
114 const uint64_t X02 = get_uint32(xw, 2);
115 const uint64_t X03 = get_uint32(xw, 3);
116 const uint64_t X04 = get_uint32(xw, 4);
117 const uint64_t X05 = get_uint32(xw, 5);
118 const uint64_t X06 = get_uint32(xw, 6);
119 const uint64_t X07 = get_uint32(xw, 7);
120 const uint64_t X08 = get_uint32(xw, 8);
121 const uint64_t X09 = get_uint32(xw, 9);
122 const uint64_t X10 = get_uint32(xw, 10);
123 const uint64_t X11 = get_uint32(xw, 11);
125 const uint64_t S0 = X00 + X06 + X10;
126 const uint64_t S1 = X01 + X07 + X11;
127 const uint64_t S2 = X02 + X06 + X08 + X10;
128 const uint64_t S3 = X03 + X07 + X09 + X11;
129 const uint64_t S4 = X04 + X08 + X10;
130 const uint64_t S5 = X05 + X09 + X11;
133 uint32_t R0 = 0, R1 = 0;
136 R0 =
static_cast<uint32_t
>(S);
140 R1 =
static_cast<uint32_t
>(S);
143 set_words(xw, 0, R0, R1);
146 R0 =
static_cast<uint32_t
>(S);
150 R1 =
static_cast<uint32_t
>(S);
153 set_words(xw, 2, R0, R1);
156 R0 =
static_cast<uint32_t
>(S);
160 R1 =
static_cast<uint32_t
>(S);
163 set_words(xw, 4, R0, R1);
170 static const constinit std::array<word, p192_limbs> p192_mults[3] = {
171 hex_to_words<word>(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),
172 hex_to_words<word>(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFE"),
173 hex_to_words<word>(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFFFFFFD"),
201 const int64_t X00 = get_uint32(xw, 0);
202 const int64_t X01 = get_uint32(xw, 1);
203 const int64_t X02 = get_uint32(xw, 2);
204 const int64_t X03 = get_uint32(xw, 3);
205 const int64_t X04 = get_uint32(xw, 4);
206 const int64_t X05 = get_uint32(xw, 5);
207 const int64_t X06 = get_uint32(xw, 6);
208 const int64_t X07 = get_uint32(xw, 7);
209 const int64_t X08 = get_uint32(xw, 8);
210 const int64_t X09 = get_uint32(xw, 9);
211 const int64_t X10 = get_uint32(xw, 10);
212 const int64_t X11 = get_uint32(xw, 11);
213 const int64_t X12 = get_uint32(xw, 12);
214 const int64_t X13 = get_uint32(xw, 13);
218 const int64_t S0 = 0x00000001 + X00 - X07 - X11;
219 const int64_t S1 = 0x00000000 + X01 - X08 - X12;
220 const int64_t S2 = 0x00000000 + X02 - X09 - X13;
221 const int64_t S3 = 0xFFFFFFFF + X03 + X07 + X11 - X10;
222 const int64_t S4 = 0xFFFFFFFF + X04 + X08 + X12 - X11;
223 const int64_t S5 = 0xFFFFFFFF + X05 + X09 + X13 - X12;
224 const int64_t S6 = 0xFFFFFFFF + X06 + X10 - X13;
227 uint32_t R0 = 0, R1 = 0;
230 R0 =
static_cast<uint32_t
>(S);
234 R1 =
static_cast<uint32_t
>(S);
237 set_words(xw, 0, R0, R1);
240 R0 =
static_cast<uint32_t
>(S);
244 R1 =
static_cast<uint32_t
>(S);
247 set_words(xw, 2, R0, R1);
250 R0 =
static_cast<uint32_t
>(S);
254 R1 =
static_cast<uint32_t
>(S);
257 set_words(xw, 4, R0, R1);
260 R0 =
static_cast<uint32_t
>(S);
263 set_words(xw, 6, R0, 0);
265 static const constinit std::array<word, p224_limbs> p224_mults[3] = {
266 hex_to_words<word>(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"),
267 hex_to_words<word>(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE000000000000000000000002"),
268 hex_to_words<word>(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD000000000000000000000003"),
296 const int64_t X00 = get_uint32(xw, 0);
297 const int64_t X01 = get_uint32(xw, 1);
298 const int64_t X02 = get_uint32(xw, 2);
299 const int64_t X03 = get_uint32(xw, 3);
300 const int64_t X04 = get_uint32(xw, 4);
301 const int64_t X05 = get_uint32(xw, 5);
302 const int64_t X06 = get_uint32(xw, 6);
303 const int64_t X07 = get_uint32(xw, 7);
304 const int64_t X08 = get_uint32(xw, 8);
305 const int64_t X09 = get_uint32(xw, 9);
306 const int64_t X10 = get_uint32(xw, 10);
307 const int64_t X11 = get_uint32(xw, 11);
308 const int64_t X12 = get_uint32(xw, 12);
309 const int64_t X13 = get_uint32(xw, 13);
310 const int64_t X14 = get_uint32(xw, 14);
311 const int64_t X15 = get_uint32(xw, 15);
314 const int64_t S0 = 0xFFFFFFFA + X00 + X08 + X09 - (X11 + X12 + X13) - X14;
315 const int64_t S1 = 0xFFFFFFFF + X01 + X09 + X10 - X12 - (X13 + X14 + X15);
316 const int64_t S2 = 0xFFFFFFFF + X02 + X10 + X11 - (X13 + X14 + X15);
317 const int64_t S3 = 0x00000005 + X03 + (X11 + X12) * 2 + X13 - X15 - X08 - X09;
318 const int64_t S4 = 0x00000000 + X04 + (X12 + X13) * 2 + X14 - X09 - X10;
319 const int64_t S5 = 0x00000000 + X05 + (X13 + X14) * 2 + X15 - X10 - X11;
320 const int64_t S6 = 0x00000006 + X06 + X13 + X14 * 3 + X15 * 2 - X08 - X09;
321 const int64_t S7 = 0xFFFFFFFA + X07 + X15 * 3 + X08 - X10 - (X11 + X12 + X13);
325 uint32_t R0 = 0, R1 = 0;
328 R0 =
static_cast<uint32_t
>(S);
332 R1 =
static_cast<uint32_t
>(S);
335 set_words(xw, 0, R0, R1);
338 R0 =
static_cast<uint32_t
>(S);
342 R1 =
static_cast<uint32_t
>(S);
345 set_words(xw, 2, R0, R1);
348 R0 =
static_cast<uint32_t
>(S);
352 R1 =
static_cast<uint32_t
>(S);
355 set_words(xw, 4, R0, R1);
358 R0 =
static_cast<uint32_t
>(S);
362 R1 =
static_cast<uint32_t
>(S);
364 set_words(xw, 6, R0, R1);
371 static const constinit std::array<word, p256_limbs> p256_mults[11] = {
372 hex_to_words<word>(
"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),
373 hex_to_words<word>(
"FFFFFFFE00000002000000000000000000000001FFFFFFFFFFFFFFFFFFFFFFFE"),
374 hex_to_words<word>(
"FFFFFFFD00000003000000000000000000000002FFFFFFFFFFFFFFFFFFFFFFFD"),
375 hex_to_words<word>(
"FFFFFFFC00000004000000000000000000000003FFFFFFFFFFFFFFFFFFFFFFFC"),
376 hex_to_words<word>(
"FFFFFFFB00000005000000000000000000000004FFFFFFFFFFFFFFFFFFFFFFFB"),
377 hex_to_words<word>(
"FFFFFFFA00000006000000000000000000000005FFFFFFFFFFFFFFFFFFFFFFFA"),
378 hex_to_words<word>(
"FFFFFFF900000007000000000000000000000006FFFFFFFFFFFFFFFFFFFFFFF9"),
379 hex_to_words<word>(
"FFFFFFF800000008000000000000000000000007FFFFFFFFFFFFFFFFFFFFFFF8"),
380 hex_to_words<word>(
"FFFFFFF700000009000000000000000000000008FFFFFFFFFFFFFFFFFFFFFFF7"),
381 hex_to_words<word>(
"FFFFFFF60000000A000000000000000000000009FFFFFFFFFFFFFFFFFFFFFFF6"),
382 hex_to_words<word>(
"FFFFFFF50000000B00000000000000000000000AFFFFFFFFFFFFFFFFFFFFFFF5"),
411 const int64_t X00 = get_uint32(xw, 0);
412 const int64_t X01 = get_uint32(xw, 1);
413 const int64_t X02 = get_uint32(xw, 2);
414 const int64_t X03 = get_uint32(xw, 3);
415 const int64_t X04 = get_uint32(xw, 4);
416 const int64_t X05 = get_uint32(xw, 5);
417 const int64_t X06 = get_uint32(xw, 6);
418 const int64_t X07 = get_uint32(xw, 7);
419 const int64_t X08 = get_uint32(xw, 8);
420 const int64_t X09 = get_uint32(xw, 9);
421 const int64_t X10 = get_uint32(xw, 10);
422 const int64_t X11 = get_uint32(xw, 11);
423 const int64_t X12 = get_uint32(xw, 12);
424 const int64_t X13 = get_uint32(xw, 13);
425 const int64_t X14 = get_uint32(xw, 14);
426 const int64_t X15 = get_uint32(xw, 15);
427 const int64_t X16 = get_uint32(xw, 16);
428 const int64_t X17 = get_uint32(xw, 17);
429 const int64_t X18 = get_uint32(xw, 18);
430 const int64_t X19 = get_uint32(xw, 19);
431 const int64_t X20 = get_uint32(xw, 20);
432 const int64_t X21 = get_uint32(xw, 21);
433 const int64_t X22 = get_uint32(xw, 22);
434 const int64_t X23 = get_uint32(xw, 23);
437 const int64_t S0 = 0xFFFFFFFF + X00 + X12 + X20 + X21 - X23;
438 const int64_t S1 = 0x00000000 + X01 + X13 + X22 + X23 - X12 - X20;
439 const int64_t S2 = 0x00000000 + X02 + X14 + X23 - X13 - X21;
440 const int64_t S3 = 0xFFFFFFFF + X03 + X12 + X15 + X20 + X21 - X14 - X22 - X23;
441 const int64_t S4 = 0xFFFFFFFE + X04 + X12 + X13 + X16 + X20 + X21 * 2 + X22 - X15 - X23 * 2;
442 const int64_t S5 = 0xFFFFFFFF + X05 + X13 + X14 + X17 + X21 + X22 * 2 + X23 - X16;
443 const int64_t S6 = 0xFFFFFFFF + X06 + X14 + X15 + X18 + X22 + X23 * 2 - X17;
444 const int64_t S7 = 0xFFFFFFFF + X07 + X15 + X16 + X19 + X23 - X18;
445 const int64_t S8 = 0xFFFFFFFF + X08 + X16 + X17 + X20 - X19;
446 const int64_t S9 = 0xFFFFFFFF + X09 + X17 + X18 + X21 - X20;
447 const int64_t SA = 0xFFFFFFFF + X10 + X18 + X19 + X22 - X21;
448 const int64_t SB = 0xFFFFFFFF + X11 + X19 + X20 + X23 - X22;
452 uint32_t R0 = 0, R1 = 0;
455 R0 =
static_cast<uint32_t
>(S);
459 R1 =
static_cast<uint32_t
>(S);
462 set_words(xw, 0, R0, R1);
465 R0 =
static_cast<uint32_t
>(S);
469 R1 =
static_cast<uint32_t
>(S);
472 set_words(xw, 2, R0, R1);
475 R0 =
static_cast<uint32_t
>(S);
479 R1 =
static_cast<uint32_t
>(S);
482 set_words(xw, 4, R0, R1);
485 R0 =
static_cast<uint32_t
>(S);
489 R1 =
static_cast<uint32_t
>(S);
492 set_words(xw, 6, R0, R1);
495 R0 =
static_cast<uint32_t
>(S);
499 R1 =
static_cast<uint32_t
>(S);
502 set_words(xw, 8, R0, R1);
505 R0 =
static_cast<uint32_t
>(S);
509 R1 =
static_cast<uint32_t
>(S);
512 set_words(xw, 10, R0, R1);
517 static const constinit std::array<word, p384_limbs> p384_mults[5] = {
519 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF"),
521 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFE0000000000000001FFFFFFFE"),
523 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFFFFFD0000000000000002FFFFFFFD"),
525 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFC0000000000000003FFFFFFFC"),
527 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFFFFFFFB0000000000000004FFFFFFFB"),