7#include <botan/internal/aes.h>
9#include <botan/internal/bit_ops.h>
10#include <botan/internal/bswap.h>
11#include <botan/internal/ct_utils.h>
12#include <botan/internal/loadstor.h>
13#include <botan/internal/rotate.h>
16#if defined(BOTAN_HAS_CPUID)
17 #include <botan/internal/cpuid.h>
65using aes_bs_word =
word;
66static_assert(std::same_as<aes_bs_word, uint32_t> || std::same_as<aes_bs_word, uint64_t>);
68constexpr size_t AES_BITSLICED_BLOCKS = 8 *
sizeof(aes_bs_word) / 16;
73template <std::
unsigned_
integral W>
74constexpr inline W rep32(uint32_t x) {
75 if constexpr(std::same_as<W, uint32_t>) {
78 return (
static_cast<W
>(x) << 32) | x;
89template <
size_t N, std::
unsigned_
integral W>
91 if constexpr(std::same_as<W, uint32_t>) {
94 static_assert(N > 0 && N < 32);
95 constexpr W mask = rep32<W>(0xFFFFFFFFU >> N);
96 return ((x >> N) & mask) | ((x << (32 - N)) & ~mask);
122template <std::
unsigned_
integral W>
123void AES_SBOX(W V[8]) {
133 const W y14 = U3 ^ U5;
134 const W y13 = U0 ^ U6;
135 const W y9 = U0 ^ U3;
136 const W y8 = U0 ^ U5;
137 const W t0 = U1 ^ U2;
138 const W y1 = t0 ^ U7;
139 const W y4 = y1 ^ U3;
140 const W y12 = y13 ^ y14;
141 const W y2 = y1 ^ U0;
142 const W y5 = y1 ^ U6;
143 const W y3 = y5 ^ y8;
144 const W t1 = U4 ^ y12;
145 const W y15 = t1 ^ U5;
146 const W y20 = t1 ^ U1;
147 const W y6 = y15 ^ U7;
148 const W y10 = y15 ^ t0;
149 const W y11 = y20 ^ y9;
150 const W y7 = U7 ^ y11;
151 const W y17 = y10 ^ y11;
152 const W y19 = y10 ^ y8;
153 const W y16 = t0 ^ y11;
154 const W y21 = y13 ^ y16;
155 const W y18 = U0 ^ y16;
156 const W t2 = y12 & y15;
157 const W t3 = y3 & y6;
158 const W t4 = t3 ^ t2;
159 const W t5 = y4 & U7;
160 const W t6 = t5 ^ t2;
161 const W t7 = y13 & y16;
162 const W t8 = y5 & y1;
163 const W t9 = t8 ^ t7;
164 const W t10 = y2 & y7;
165 const W t11 = t10 ^ t7;
166 const W t12 = y9 & y11;
167 const W t13 = y14 & y17;
168 const W t14 = t13 ^ t12;
169 const W t15 = y8 & y10;
170 const W t16 = t15 ^ t12;
171 const W t17 = t4 ^ y20;
172 const W t18 = t6 ^ t16;
173 const W t19 = t9 ^ t14;
174 const W t20 = t11 ^ t16;
175 const W t21 = t17 ^ t14;
176 const W t22 = t18 ^ y19;
177 const W t23 = t19 ^ y21;
178 const W t24 = t20 ^ y18;
179 const W t25 = t21 ^ t22;
180 const W t26 = t21 & t23;
181 const W t27 = t24 ^ t26;
182 const W t28 = t25 & t27;
183 const W t29 = t28 ^ t22;
184 const W t30 = t23 ^ t24;
185 const W t31 = t22 ^ t26;
186 const W t32 = t31 & t30;
187 const W t33 = t32 ^ t24;
188 const W t34 = t23 ^ t33;
189 const W t35 = t27 ^ t33;
190 const W t36 = t24 & t35;
191 const W t37 = t36 ^ t34;
192 const W t38 = t27 ^ t36;
193 const W t39 = t29 & t38;
194 const W t40 = t25 ^ t39;
195 const W t41 = t40 ^ t37;
196 const W t42 = t29 ^ t33;
197 const W t43 = t29 ^ t40;
198 const W t44 = t33 ^ t37;
199 const W t45 = t42 ^ t41;
200 const W z0 = t44 & y15;
201 const W z1 = t37 & y6;
202 const W z2 = t33 & U7;
203 const W z3 = t43 & y16;
204 const W z4 = t40 & y1;
205 const W z5 = t29 & y7;
206 const W z6 = t42 & y11;
207 const W z7 = t45 & y17;
208 const W z8 = t41 & y10;
209 const W z9 = t44 & y12;
210 const W z10 = t37 & y3;
211 const W z11 = t33 & y4;
212 const W z12 = t43 & y13;
213 const W z13 = t40 & y5;
214 const W z14 = t29 & y2;
215 const W z15 = t42 & y9;
216 const W z16 = t45 & y14;
217 const W z17 = t41 & y8;
218 const W tc1 = z15 ^ z16;
219 const W tc2 = z10 ^ tc1;
220 const W tc3 = z9 ^ tc2;
221 const W tc4 = z0 ^ z2;
222 const W tc5 = z1 ^ z0;
223 const W tc6 = z3 ^ z4;
224 const W tc7 = z12 ^ tc4;
225 const W tc8 = z7 ^ tc6;
226 const W tc9 = z8 ^ tc7;
227 const W tc10 = tc8 ^ tc9;
228 const W tc11 = tc6 ^ tc5;
229 const W tc12 = z3 ^ z5;
230 const W tc13 = z13 ^ tc1;
231 const W tc14 = tc4 ^ tc12;
232 const W S3 = tc3 ^ tc11;
233 const W tc16 = z6 ^ tc8;
234 const W tc17 = z14 ^ tc10;
235 const W tc18 = ~tc13 ^ tc14;
236 const W S7 = z12 ^ tc18;
237 const W tc20 = z15 ^ tc16;
238 const W tc21 = tc2 ^ z11;
239 const W S0 = tc3 ^ tc16;
240 const W S6 = tc10 ^ tc18;
241 const W S4 = tc14 ^ S3;
242 const W S1 = ~(S3 ^ tc16);
243 const W tc26 = tc17 ^ tc20;
244 const W S2 = ~(tc26 ^ z17);
245 const W S5 = tc21 ^ tc17;
262template <std::
unsigned_
integral W>
263void AES_INV_SBOX(W V[8]) {
273 const W Y0 = U0 ^ U3;
274 const W Y2 = ~(U1 ^ U3);
275 const W Y4 = U0 ^ Y2;
276 const W RTL0 = U6 ^ U7;
277 const W Y1 = Y2 ^ RTL0;
278 const W Y7 = ~(U2 ^ Y1);
279 const W RTL1 = U3 ^ U4;
280 const W Y6 = ~(U7 ^ RTL1);
281 const W Y3 = Y1 ^ RTL1;
282 const W RTL2 = ~(U0 ^ U2);
283 const W Y5 = U5 ^ RTL2;
284 const W sa1 = Y0 ^ Y2;
285 const W sa0 = Y1 ^ Y3;
286 const W sb1 = Y4 ^ Y6;
287 const W sb0 = Y5 ^ Y7;
288 const W ah = Y0 ^ Y1;
289 const W al = Y2 ^ Y3;
290 const W aa = sa0 ^ sa1;
291 const W bh = Y4 ^ Y5;
292 const W bl = Y6 ^ Y7;
293 const W bb = sb0 ^ sb1;
294 const W ab20 = sa0 ^ sb0;
295 const W ab22 = al ^ bl;
296 const W ab23 = Y3 ^ Y7;
297 const W ab21 = sa1 ^ sb1;
298 const W abcd1 = ah & bh;
299 const W rr1 = Y0 & Y4;
300 const W ph11 = ab20 ^ abcd1;
301 const W t01 = Y1 & Y5;
302 const W ph01 = t01 ^ abcd1;
303 const W abcd2 = al & bl;
304 const W r1 = Y2 & Y6;
305 const W pl11 = ab22 ^ abcd2;
306 const W r2 = Y3 & Y7;
307 const W pl01 = r2 ^ abcd2;
308 const W r3 = sa0 & sb0;
309 const W vr1 = aa & bb;
310 const W pr1 = vr1 ^ r3;
311 const W wr1 = sa1 & sb1;
312 const W qr1 = wr1 ^ r3;
313 const W ab0 = ph11 ^ rr1;
314 const W ab1 = ph01 ^ ab21;
315 const W ab2 = pl11 ^ r1;
316 const W ab3 = pl01 ^ qr1;
317 const W cp1 = ab0 ^ pr1;
318 const W cp2 = ab1 ^ qr1;
319 const W cp3 = ab2 ^ pr1;
320 const W cp4 = ab3 ^ ab23;
321 const W tinv1 = cp3 ^ cp4;
322 const W tinv2 = cp3 & cp1;
323 const W tinv3 = cp2 ^ tinv2;
324 const W tinv4 = cp1 ^ cp2;
325 const W tinv5 = cp4 ^ tinv2;
326 const W tinv6 = tinv5 & tinv4;
327 const W tinv7 = tinv3 & tinv1;
328 const W d2 = cp4 ^ tinv7;
329 const W d0 = cp2 ^ tinv6;
330 const W tinv8 = cp1 & cp4;
331 const W tinv9 = tinv4 & tinv8;
332 const W tinv10 = tinv4 ^ tinv2;
333 const W d1 = tinv9 ^ tinv10;
334 const W tinv11 = cp2 & cp3;
335 const W tinv12 = tinv1 & tinv11;
336 const W tinv13 = tinv1 ^ tinv2;
337 const W d3 = tinv12 ^ tinv13;
338 const W sd1 = d1 ^ d3;
339 const W sd0 = d0 ^ d2;
340 const W dl = d0 ^ d1;
341 const W dh = d2 ^ d3;
342 const W dd = sd0 ^ sd1;
343 const W abcd3 = dh & bh;
344 const W rr2 = d3 & Y4;
345 const W t02 = d2 & Y5;
346 const W abcd4 = dl & bl;
347 const W r4 = d1 & Y6;
348 const W r5 = d0 & Y7;
349 const W r6 = sd0 & sb0;
350 const W vr2 = dd & bb;
351 const W wr2 = sd1 & sb1;
352 const W abcd5 = dh & ah;
353 const W r7 = d3 & Y0;
354 const W r8 = d2 & Y1;
355 const W abcd6 = dl & al;
356 const W r9 = d1 & Y2;
357 const W r10 = d0 & Y3;
358 const W r11 = sd0 & sa0;
359 const W vr3 = dd & aa;
360 const W wr3 = sd1 & sa1;
361 const W ph12 = rr2 ^ abcd3;
362 const W ph02 = t02 ^ abcd3;
363 const W pl12 = r4 ^ abcd4;
364 const W pl02 = r5 ^ abcd4;
365 const W pr2 = vr2 ^ r6;
366 const W qr2 = wr2 ^ r6;
367 const W p0 = ph12 ^ pr2;
368 const W p1 = ph02 ^ qr2;
369 const W p2 = pl12 ^ pr2;
370 const W p3 = pl02 ^ qr2;
371 const W ph13 = r7 ^ abcd5;
372 const W ph03 = r8 ^ abcd5;
373 const W pl13 = r9 ^ abcd6;
374 const W pl03 = r10 ^ abcd6;
375 const W pr3 = vr3 ^ r11;
376 const W qr3 = wr3 ^ r11;
377 const W p4 = ph13 ^ pr3;
378 const W S7 = ph03 ^ qr3;
379 const W p6 = pl13 ^ pr3;
380 const W p7 = pl03 ^ qr3;
381 const W S3 = p1 ^ p6;
382 const W S6 = p2 ^ p6;
383 const W S0 = p3 ^ p6;
384 const W X11 = p0 ^ p2;
385 const W S5 = S0 ^ X11;
386 const W X13 = p4 ^ p7;
387 const W X14 = X11 ^ X13;
388 const W S1 = S3 ^ X14;
389 const W X16 = p1 ^ S7;
390 const W S2 = X14 ^ X16;
391 const W X18 = p0 ^ p4;
392 const W X19 = S5 ^ X16;
393 const W S4 = X18 ^ X19;
405template <std::
unsigned_
integral W>
406inline void bit_transpose(W B[8]) {
423template <std::
unsigned_
integral W>
424inline void ks_expand(W B[8],
const uint32_t K[],
size_t r) {
432 for(
size_t i = 0; i != 4; ++i) {
433 B[i] = rep32<W>(K[r + i]);
453template <std::
unsigned_
integral W>
454inline void shift_rows(W B[8]) {
458 for(
size_t i = 0; i != 8; ++i) {
464template <std::
unsigned_
integral W>
465inline void inv_shift_rows(W B[8]) {
466 for(
size_t i = 0; i != 8; ++i) {
472template <std::
unsigned_
integral W>
473inline void mix_columns(W B[8]) {
486 for(
size_t i = 0; i != 8; i++) {
487 const W X3 = B[i] ^ X2[i];
488 B[i] = X2[i] ^ column_rotr<8>(B[i]) ^ column_rotr<16>(B[i]) ^ column_rotr<24>(X3);
492template <std::
unsigned_
integral W>
493void inv_mix_columns(W B[8]) {
518 for(
size_t i = 0; i != 8; i++) {
519 const W X5 = X4[i] ^ B[i];
520 B[i] = X5 ^ column_rotr<16>(X4[i]);
533template <std::
unsigned_
integral W>
534inline void bs_load(W B[8],
const uint8_t in[],
size_t n_blocks) {
535 if constexpr(std::same_as<W, uint32_t>) {
538 uint32_t T[16] = {0};
540 for(
size_t i = 0; i != 8; ++i) {
541 B[i] = (
static_cast<W
>(T[i]) << 32) | T[i + 8];
549template <std::
unsigned_
integral W>
550inline void bs_store(uint8_t out[],
const W B[8],
size_t n_blocks) {
551 if constexpr(std::same_as<W, uint32_t>) {
552 copy_out_be(std::span(out, n_blocks * 16), std::span(B, 8));
555 for(
size_t i = 0; i != 8; ++i) {
556 T[i] =
static_cast<uint32_t
>(B[i] >> 32);
557 T[i + 8] =
static_cast<uint32_t
>(B[i]);
567 BOTAN_ASSERT(EK.size() == 44 || EK.size() == 52 || EK.size() == 60,
"Key was set");
569 const size_t rounds = (EK.size() - 4) / 4;
571 using W = aes_bs_word;
574 for(
size_t i = 0; i < rounds - 1; i += 1) {
575 ks_expand(&KS[8 * i], EK.data(), 4 * i + 4);
579 const size_t this_loop = std::min(blocks, AES_BITSLICED_BLOCKS);
583 bs_load(B, in, this_loop);
587 for(
size_t i = 0; i != 8; ++i) {
588 B[i] ^= rep32<W>(EK[i % 4]);
593 for(
size_t r = 0; r != rounds - 1; ++r) {
598 for(
size_t i = 0; i != 8; ++i) {
599 B[i] ^= KS[8 * r + i];
608 for(
size_t i = 0; i != 8; ++i) {
609 B[i] ^= rep32<W>(EK[4 * rounds + i % 4]);
614 bs_store(out, B, this_loop);
616 in += this_loop * 16;
617 out += this_loop * 16;
626 BOTAN_ASSERT(DK.size() == 44 || DK.size() == 52 || DK.size() == 60,
"Key was set");
628 const size_t rounds = (DK.size() - 4) / 4;
630 using W = aes_bs_word;
633 for(
size_t i = 0; i < rounds - 1; i += 1) {
634 ks_expand(&KS[8 * i], DK.data(), 4 * i + 4);
638 const size_t this_loop = std::min(blocks, AES_BITSLICED_BLOCKS);
642 bs_load(B, in, this_loop);
646 for(
size_t i = 0; i != 8; ++i) {
647 B[i] ^= rep32<W>(DK[i % 4]);
652 for(
size_t r = 0; r != rounds - 1; ++r) {
657 for(
size_t i = 0; i != 8; ++i) {
658 B[i] ^= KS[8 * r + i];
667 for(
size_t i = 0; i != 8; ++i) {
668 B[i] ^= rep32<W>(DK[4 * rounds + i % 4]);
673 bs_store(out, B, this_loop);
675 in += this_loop * 16;
676 out += this_loop * 16;
681inline uint32_t xtime32(uint32_t s) {
682 const uint32_t lo_bit = 0x01010101;
683 const uint32_t mask = 0x7F7F7F7F;
684 const uint32_t poly = 0x1B;
686 return ((s & mask) << 1) ^ (((s >> 7) & lo_bit) * poly);
689inline uint32_t InvMixColumn(uint32_t s1) {
690 const uint32_t s2 = xtime32(s1);
691 const uint32_t s4 = xtime32(s2);
692 const uint32_t s8 = xtime32(s4);
693 const uint32_t s9 = s8 ^ s1;
694 const uint32_t s11 = s9 ^ s2;
695 const uint32_t s13 = s9 ^ s4;
696 const uint32_t s14 = s8 ^ s4 ^ s2;
701void InvMixColumn_x4(uint32_t x[4]) {
702 x[0] = InvMixColumn(x[0]);
703 x[1] = InvMixColumn(x[1]);
704 x[2] = InvMixColumn(x[2]);
705 x[3] = InvMixColumn(x[3]);
708uint32_t SE_word(uint32_t x) {
709 aes_bs_word I[8] = {0};
711 for(
size_t i = 0; i != 8; ++i) {
712 I[i] = (x >> (7 - i)) & 0x01010101;
719 for(
size_t i = 0; i != 8; ++i) {
720 x |=
static_cast<uint32_t
>((I[i] & 0x01010101) << (7 - i));
727 static const uint32_t RC[10] = {0x01000000,
738 const size_t X = length / 4;
743 const size_t rounds = (length / 4) + 6;
750 const size_t KS_len = length + 28;
754 for(
size_t i = 0; i != X; ++i) {
758 for(
size_t i = X; i < 4 * (rounds + 1); i += X) {
759 EK[i] = EK[i - X] ^ RC[(i - X) / X] ^
rotl<8>(SE_word(EK[i - 1]));
761 for(
size_t j = 1; j != X && (i + j) < EK.size(); ++j) {
762 EK[i + j] = EK[i + j - X];
764 if(X == 8 && j == 4) {
765 EK[i + j] ^= SE_word(EK[i + j - 1]);
767 EK[i + j] ^= EK[i + j - 1];
772 for(
size_t i = 0; i != 4 * (rounds + 1); i += 4) {
773 DK[i] = EK[4 * rounds - i];
774 DK[i + 1] = EK[4 * rounds - i + 1];
775 DK[i + 2] = EK[4 * rounds - i + 2];
776 DK[i + 3] = EK[4 * rounds - i + 3];
779 for(
size_t i = 4; i != 4 * rounds; i += 4) {
780 InvMixColumn_x4(&DK[i]);
788size_t aes_parallelism() {
789#if defined(BOTAN_HAS_AES_VAES)
795#if defined(BOTAN_HAS_AES_HWAES)
801#if defined(BOTAN_HAS_AES_VPERM)
808 return AES_BITSLICED_BLOCKS;
811std::string aes_provider() {
812#if defined(BOTAN_HAS_AES_VAES)
818#if defined(BOTAN_HAS_AES_HWAES)
824#if defined(BOTAN_HAS_AES_VPERM)
836 return aes_provider();
840 return aes_provider();
844 return aes_provider();
848 return aes_parallelism();
852 return aes_parallelism();
856 return aes_parallelism();
860 return !m_EK.empty();
864 return !m_EK.empty();
868 return !m_EK.empty();
874#if defined(BOTAN_HAS_AES_VAES)
876 return x86_vaes_encrypt_n(in, out, blocks);
880#if defined(BOTAN_HAS_AES_HWAES)
882 return hw_aes_encrypt_n(in, out, blocks);
886#if defined(BOTAN_HAS_AES_VPERM)
888 return vperm_encrypt_n(in, out, blocks);
892 aes_encrypt_n(in, out, blocks, m_EK);
898#if defined(BOTAN_HAS_AES_VAES)
900 return x86_vaes_decrypt_n(in, out, blocks);
904#if defined(BOTAN_HAS_AES_HWAES)
906 return hw_aes_decrypt_n(in, out, blocks);
910#if defined(BOTAN_HAS_AES_VPERM)
912 return vperm_decrypt_n(in, out, blocks);
916 aes_decrypt_n(in, out, blocks, m_DK);
919void AES_128::key_schedule(std::span<const uint8_t> key) {
920#if defined(BOTAN_HAS_AES_HWAES)
922 return hw_aes_key_schedule(key);
926#if defined(BOTAN_HAS_AES_VPERM)
928 return vperm_key_schedule(key.data(), key.size());
932 aes_key_schedule(key.data(), key.size(), m_EK, m_DK);
943#if defined(BOTAN_HAS_AES_VAES)
945 return x86_vaes_encrypt_n(in, out, blocks);
949#if defined(BOTAN_HAS_AES_HWAES)
951 return hw_aes_encrypt_n(in, out, blocks);
955#if defined(BOTAN_HAS_AES_VPERM)
957 return vperm_encrypt_n(in, out, blocks);
961 aes_encrypt_n(in, out, blocks, m_EK);
967#if defined(BOTAN_HAS_AES_VAES)
969 return x86_vaes_decrypt_n(in, out, blocks);
973#if defined(BOTAN_HAS_AES_HWAES)
975 return hw_aes_decrypt_n(in, out, blocks);
979#if defined(BOTAN_HAS_AES_VPERM)
981 return vperm_decrypt_n(in, out, blocks);
985 aes_decrypt_n(in, out, blocks, m_DK);
988void AES_192::key_schedule(std::span<const uint8_t> key) {
989#if defined(BOTAN_HAS_AES_HWAES)
991 return hw_aes_key_schedule(key);
995#if defined(BOTAN_HAS_AES_VPERM)
997 return vperm_key_schedule(key.data(), key.size());
1001 aes_key_schedule(key.data(), key.size(), m_EK, m_DK);
1012#if defined(BOTAN_HAS_AES_VAES)
1014 return x86_vaes_encrypt_n(in, out, blocks);
1018#if defined(BOTAN_HAS_AES_HWAES)
1020 return hw_aes_encrypt_n(in, out, blocks);
1024#if defined(BOTAN_HAS_AES_VPERM)
1026 return vperm_encrypt_n(in, out, blocks);
1030 aes_encrypt_n(in, out, blocks, m_EK);
1036#if defined(BOTAN_HAS_AES_VAES)
1038 return x86_vaes_decrypt_n(in, out, blocks);
1042#if defined(BOTAN_HAS_AES_HWAES)
1044 return hw_aes_decrypt_n(in, out, blocks);
1048#if defined(BOTAN_HAS_AES_VPERM)
1050 return vperm_decrypt_n(in, out, blocks);
1054 aes_decrypt_n(in, out, blocks, m_DK);
1057void AES_256::key_schedule(std::span<const uint8_t> key) {
1058#if defined(BOTAN_HAS_AES_HWAES)
1060 return hw_aes_key_schedule(key);
1064#if defined(BOTAN_HAS_AES_VPERM)
1066 return vperm_key_schedule(key.data(), key.size());
1070 aes_key_schedule(key.data(), key.size(), m_EK, m_DK);
#define BOTAN_ASSERT_NOMSG(expr)
#define BOTAN_ASSERT(expr, assertion_made)
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string provider() const override
size_t parallelism() const override
bool has_keying_material() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
bool has_keying_material() const override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string provider() const override
size_t parallelism() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
bool has_keying_material() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string provider() const override
size_t parallelism() const override
static std::optional< std::string > check(CPUID::Feature feat)
static bool has(CPUID::Feature feat)
void assert_key_material_set() const
#define BOTAN_FORCE_INLINE
constexpr void unpoison(const T *p, size_t n)
constexpr void poison(const T *p, size_t n)
void zap(std::vector< T, Alloc > &vec)
BOTAN_FORCE_INLINE constexpr void swap_bits(T &x, T &y, T mask, size_t shift)
BOTAN_FORCE_INLINE constexpr T bit_permute_step(T x, T mask, size_t shift)
void copy_out_be(std::span< uint8_t > out, const InR &in)
BOTAN_FORCE_INLINE constexpr T rotr(T input)
BOTAN_FORCE_INLINE constexpr T rotl(T input)
std::vector< T, secure_allocator< T > > secure_vector
std::conditional_t< HasNative64BitRegisters, std::uint64_t, uint32_t > word
The native machine word, used as the limb type for multiprecision integers.
constexpr auto load_be(ParamTs &&... params)