Commit 5956c93
committed
mlkem_native.h: Add PCT-aware MLK_TOTAL_ALLOC constants
Split KEYPAIR allocation constants into _NO_PCT and _PCT variants to
accurately reflect memory usage with and without pairwise consistency
testing (PCT). MLK_TOTAL_ALLOC_*_KEYPAIR now automatically selects
the appropriate value based on MLK_CONFIG_KEYGEN_PCT.
For legacy configs, assume PCT is enabled (conservative).
The default alloc test config no longer enables PCT; PCT is tested
via config-variations.
- Ported from pq-code-package/mldsa-native#869
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>1 parent 6876ac6 commit 5956c93
File tree
6 files changed
+38
-15
lines changed- mlkem
- test
- configs
- src
6 files changed
+38
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
| 192 | + | |
| 193 | + | |
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| 175 | + | |
| 176 | + | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
| 181 | + | |
| 182 | + | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
| 488 | + | |
488 | 489 | | |
489 | 490 | | |
490 | | - | |
| 491 | + | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | | - | |
| 495 | + | |
| 496 | + | |
494 | 497 | | |
495 | 498 | | |
496 | 499 | | |
497 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
498 | 516 | | |
499 | 517 | | |
500 | 518 | | |
501 | | - | |
502 | | - | |
503 | 519 | | |
504 | 520 | | |
505 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | 437 | | |
443 | 438 | | |
444 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
| 637 | + | |
642 | 638 | | |
643 | 639 | | |
644 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
485 | 488 | | |
486 | 489 | | |
487 | 490 | | |
| 491 | + | |
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
| |||
0 commit comments