Commit f789e8d
committed
x86_64: Replace rej_uniform_eta2/eta4 intrinsics with hand-written assembly
Add hand-written x86_64 AVX2 assembly for rej_uniform_eta2 and
rej_uniform_eta4 and remove the AVX2 intrinsics implementations they
replace, following the rej_uniform approach in #1014: the table is
passed as a parameter and all constants are built from immediates (no
.rodata), enabling future HOL-Light verification. Both eta2 and eta4 are
wired to the new asm in meta.h, with contracts in arith_native_x86_64.h,
bytecode dump targets in autogen and the Makefile, and a
poly_uniform_eta_4x component benchmark.
The eta2 vector path applies the centered mod-5 reduction to (2 - nibble)
directly (matching the reference), rather than reducing the raw nibble and
subtracting afterwards; the two are not equivalent because vpmulhrsw rounds
to nearest. Verified against the ACVP keyGen vectors for all parameter sets.
Signed-off-by: jake massimo <jakemas@amazon.com>1 parent 70fdba0 commit f789e8d
20 files changed
Lines changed: 1255 additions & 625 deletions
File tree
- dev/x86_64
- src
- mldsa
- src/native/x86_64
- src
- proofs/hol_light/x86_64
- mldsa
- scripts
- test/bench
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
| 282 | + | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
| 300 | + | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | | - | |
89 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
90 | 101 | | |
91 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
92 | 105 | | |
93 | | - | |
94 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
95 | 117 | | |
96 | 118 | | |
97 | 119 | | |
| |||
This file was deleted.
0 commit comments