Commit 8472767
committed
Re-import mlkem-native and mldsa-native; drop custom meta headers
This commit re-imports mlkem-native (v1.3.0, 398050c87) and mldsa-native
(c800f268c) and removes the three "shadow" backend meta headers owned by
AWS-LC (ml_kem/mlkem_aarch64_meta.h, ml_dsa/mldsa_aarch64_meta.h, and
ml_dsa/mldsa_x86_64_meta.h). The AArch64 shadows existed to add a runtime
NEON gate with a C fallback; upstream now gates NEON in the vendored
meta.h itself. The x86_64 mldsa shadow trimmed the backend to the
assembly-backed subset. Upstream has since converted the remaining AVX2
C-intrinsic operations to proven assembly, so the full backend is
imported and its meta.h is used as-is.
The commit also removes a previous label-renaming at import time that
was in place to avoid a name clash between mlkem and mldsa labels:
Upstream has since made the labels globally unique (mlkem-native PR#1813
and mldsa-native PR#1310).
Finally, the commit removes a previous file-renaming at import time that
was in place to avoid a name clash between the mlkem and mldsa assembly
files, which are compiled into the same FIPS module. Upstream has since
prefixed the backend assembly filenames per project (mlkem_*_asm.S and
mldsa_*_asm.S), so the basenames are globally unique and the individual
.S files can again be built directly.
The mlkem importer gains -UMLK_CONFIG_NO_{KEYPAIR,ENCAPS,DECAPS}_API in
the assembly unifdef invocation, mirroring what the mldsa importer
already does: v1.3.0 added these terms to the backend guards, and without
resolving them the guards would not collapse, leaving the imported
assembly gated on macros that are no longer in scope once common.h is
replaced by the s2n-bignum header.
This commit also reverts the custom configs to the vendored capability
enum (mldsa: `MLD_SYS_CAP_X86_64_AVX2`), adjusts ml_dsa.c for the
`sig_len`-less upstream sign/verify API, and makes `GITHUB_SERVER_URL`
overridable in both importers.
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>1 parent fe08b9c commit 8472767
141 files changed
Lines changed: 9934 additions & 5492 deletions
File tree
- crypto/fipsmodule
- ml_dsa
- mldsa
- native
- aarch64
- src
- x86_64
- src
- ml_kem
- mlkem
- native
- aarch64
- src
- x86_64
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
480 | 473 | | |
481 | 474 | | |
482 | 475 | | |
483 | 476 | | |
484 | 477 | | |
485 | 478 | | |
486 | 479 | | |
487 | | - | |
| 480 | + | |
488 | 481 | | |
489 | 482 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
513 | 489 | | |
514 | 490 | | |
515 | 491 | | |
| |||
524 | 500 | | |
525 | 501 | | |
526 | 502 | | |
527 | | - | |
| 503 | + | |
528 | 504 | | |
529 | 505 | | |
530 | 506 | | |
| |||
541 | 517 | | |
542 | 518 | | |
543 | 519 | | |
544 | | - | |
545 | 520 | | |
546 | 521 | | |
547 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
90 | 86 | | |
91 | 87 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
96 | 91 | | |
97 | 92 | | |
98 | 93 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
| |||
141 | 136 | | |
142 | 137 | | |
143 | 138 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | 139 | | |
151 | 140 | | |
152 | 141 | | |
| |||
188 | 177 | | |
189 | 178 | | |
190 | 179 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 180 | | |
202 | 181 | | |
203 | 182 | | |
| |||
0 commit comments