Repository navigation
New 3-way batched Keccak-f1600 (x3) improves ML-DSA performance by 2.5 to 13.0% on Neoverse V3 - #1489
soumya2094 wants to merge 8 commits into
Conversation
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (245 configurations)
|
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (245 configurations)
|
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (245 configurations)
|
CBMC Results (ML-DSA-44)
Full Results (245 configurations)
|
CBMC Results (ML-DSA-65)
Full Results (245 configurations)
|
CBMC Results (ML-DSA-87)
Full Results (245 configurations)
|
5197c8b to
d3db6bf
Compare
There was a problem hiding this comment.
Intel Xeon 4th gen (c7i)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
43944 cycles |
43730 cycles |
1.00 |
ML-DSA-44 sign |
130450 cycles |
129969 cycles |
1.00 |
ML-DSA-44 verify |
45010 cycles |
45099 cycles |
1.00 |
ML-DSA-65 keypair |
74823 cycles |
74743 cycles |
1.00 |
ML-DSA-65 sign |
212503 cycles |
212343 cycles |
1.00 |
ML-DSA-65 verify |
74214 cycles |
74602 cycles |
0.99 |
ML-DSA-87 keypair |
123660 cycles |
123989 cycles |
1.00 |
ML-DSA-87 sign |
269982 cycles |
270624 cycles |
1.00 |
ML-DSA-87 verify |
119925 cycles |
120053 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Intel Xeon 4th gen (c7i) (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
91995 cycles |
91828 cycles |
1.00 |
ML-DSA-44 sign |
348156 cycles |
347290 cycles |
1.00 |
ML-DSA-44 verify |
99345 cycles |
99167 cycles |
1.00 |
ML-DSA-65 keypair |
155589 cycles |
155306 cycles |
1.00 |
ML-DSA-65 sign |
567594 cycles |
568167 cycles |
1.00 |
ML-DSA-65 verify |
159576 cycles |
159379 cycles |
1.00 |
ML-DSA-87 keypair |
257426 cycles |
258174 cycles |
1.00 |
ML-DSA-87 sign |
721212 cycles |
719356 cycles |
1.00 |
ML-DSA-87 verify |
263861 cycles |
263638 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
AMD EPYC 4th gen (c7a)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
48213 cycles |
47952 cycles |
1.01 |
ML-DSA-44 sign |
139478 cycles |
140374 cycles |
0.99 |
ML-DSA-44 verify |
49354 cycles |
49286 cycles |
1.00 |
ML-DSA-65 keypair |
83940 cycles |
82656 cycles |
1.02 |
ML-DSA-65 sign |
227982 cycles |
226703 cycles |
1.01 |
ML-DSA-65 verify |
83605 cycles |
82393 cycles |
1.01 |
ML-DSA-87 keypair |
132436 cycles |
132575 cycles |
1.00 |
ML-DSA-87 sign |
280685 cycles |
279595 cycles |
1.00 |
ML-DSA-87 verify |
129529 cycles |
128405 cycles |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
AMD EPYC 4th gen (c7a) (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
115293 cycles |
115137 cycles |
1.00 |
ML-DSA-44 sign |
419824 cycles |
420433 cycles |
1.00 |
ML-DSA-44 verify |
123722 cycles |
123747 cycles |
1.00 |
ML-DSA-65 keypair |
195272 cycles |
195252 cycles |
1.00 |
ML-DSA-65 sign |
683860 cycles |
685019 cycles |
1.00 |
ML-DSA-65 verify |
199502 cycles |
199512 cycles |
1.00 |
ML-DSA-87 keypair |
325551 cycles |
324488 cycles |
1.00 |
ML-DSA-87 sign |
866667 cycles |
867952 cycles |
1.00 |
ML-DSA-87 verify |
330757 cycles |
330118 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
AMD EPYC 3rd gen (c6a)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
52512 cycles |
52559 cycles |
1.00 |
ML-DSA-44 sign |
155862 cycles |
156148 cycles |
1.00 |
ML-DSA-44 verify |
53908 cycles |
54123 cycles |
1.00 |
ML-DSA-65 keypair |
89507 cycles |
89889 cycles |
1.00 |
ML-DSA-65 sign |
252530 cycles |
252834 cycles |
1.00 |
ML-DSA-65 verify |
89656 cycles |
90026 cycles |
1.00 |
ML-DSA-87 keypair |
146722 cycles |
146339 cycles |
1.00 |
ML-DSA-87 sign |
314079 cycles |
312566 cycles |
1.00 |
ML-DSA-87 verify |
140128 cycles |
139465 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
oqs-bot
left a comment
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'AMD EPYC 4th gen (c7a) (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: d3db6bf | Previous: d7b1b6d | Ratio |
|---|---|---|---|
ML-DSA-65 verify |
206914 cycles |
199906 cycles |
1.04 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton5
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
47652 cycles |
52381 cycles |
0.91 |
ML-DSA-44 sign |
161204 cycles |
162216 cycles |
0.99 |
ML-DSA-44 verify |
51839 cycles |
54836 cycles |
0.95 |
ML-DSA-65 keypair |
78734 cycles |
91235 cycles |
0.86 |
ML-DSA-65 sign |
251023 cycles |
266193 cycles |
0.94 |
ML-DSA-65 verify |
78921 cycles |
89883 cycles |
0.88 |
ML-DSA-87 keypair |
133123 cycles |
148004 cycles |
0.90 |
ML-DSA-87 sign |
315864 cycles |
334857 cycles |
0.94 |
ML-DSA-87 verify |
131724 cycles |
145169 cycles |
0.91 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Intel Xeon 3rd gen (c6i)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
64400 cycles |
63887 cycles |
1.01 |
ML-DSA-44 sign |
194919 cycles |
192108 cycles |
1.01 |
ML-DSA-44 verify |
68723 cycles |
68083 cycles |
1.01 |
ML-DSA-65 keypair |
110524 cycles |
110095 cycles |
1.00 |
ML-DSA-65 sign |
319649 cycles |
318086 cycles |
1.00 |
ML-DSA-65 verify |
112155 cycles |
111442 cycles |
1.01 |
ML-DSA-87 keypair |
174729 cycles |
174451 cycles |
1.00 |
ML-DSA-87 sign |
382171 cycles |
382132 cycles |
1.00 |
ML-DSA-87 verify |
173153 cycles |
172546 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
AMD EPYC 3rd gen (c6a) (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
133877 cycles |
134010 cycles |
1.00 |
ML-DSA-44 sign |
520185 cycles |
520149 cycles |
1.00 |
ML-DSA-44 verify |
145787 cycles |
146079 cycles |
1.00 |
ML-DSA-65 keypair |
223966 cycles |
223726 cycles |
1.00 |
ML-DSA-65 sign |
848011 cycles |
847014 cycles |
1.00 |
ML-DSA-65 verify |
234233 cycles |
233798 cycles |
1.00 |
ML-DSA-87 keypair |
370639 cycles |
371896 cycles |
1.00 |
ML-DSA-87 sign |
1061453 cycles |
1064787 cycles |
1.00 |
ML-DSA-87 verify |
381187 cycles |
383120 cycles |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton5 (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
103401 cycles |
102862 cycles |
1.01 |
ML-DSA-44 sign |
372867 cycles |
373835 cycles |
1.00 |
ML-DSA-44 verify |
111195 cycles |
111286 cycles |
1.00 |
ML-DSA-65 keypair |
176815 cycles |
177304 cycles |
1.00 |
ML-DSA-65 sign |
621771 cycles |
605124 cycles |
1.03 |
ML-DSA-65 verify |
180098 cycles |
179404 cycles |
1.00 |
ML-DSA-87 keypair |
284840 cycles |
284743 cycles |
1.00 |
ML-DSA-87 sign |
763654 cycles |
771394 cycles |
0.99 |
ML-DSA-87 verify |
296496 cycles |
294457 cycles |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
oqs-bot
left a comment
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Graviton5 (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: d3db6bf | Previous: d7b1b6d | Ratio |
|---|---|---|---|
ML-DSA-65 sign |
624867 cycles |
605385 cycles |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Intel Xeon 3rd gen (c6i) (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
165744 cycles |
165766 cycles |
1.00 |
ML-DSA-44 sign |
627417 cycles |
626376 cycles |
1.00 |
ML-DSA-44 verify |
179499 cycles |
181191 cycles |
0.99 |
ML-DSA-65 keypair |
282999 cycles |
281493 cycles |
1.01 |
ML-DSA-65 sign |
1034327 cycles |
1013590 cycles |
1.02 |
ML-DSA-65 verify |
291908 cycles |
290267 cycles |
1.01 |
ML-DSA-87 keypair |
470285 cycles |
462216 cycles |
1.02 |
ML-DSA-87 sign |
1316667 cycles |
1264955 cycles |
1.04 |
ML-DSA-87 verify |
486758 cycles |
473565 cycles |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton4
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
68290 cycles |
68497 cycles |
1.00 |
ML-DSA-44 sign |
198909 cycles |
198809 cycles |
1.00 |
ML-DSA-44 verify |
70367 cycles |
70325 cycles |
1.00 |
ML-DSA-65 keypair |
120190 cycles |
120403 cycles |
1.00 |
ML-DSA-65 sign |
325982 cycles |
326041 cycles |
1.00 |
ML-DSA-65 verify |
116937 cycles |
117149 cycles |
1.00 |
ML-DSA-87 keypair |
198368 cycles |
198735 cycles |
1.00 |
ML-DSA-87 sign |
421947 cycles |
422959 cycles |
1.00 |
ML-DSA-87 verify |
193500 cycles |
193695 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Intel Xeon 3rd gen (c6i) (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-87 sign |
1316667 cycles |
1264955 cycles |
1.04 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton4 (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
129962 cycles |
129792 cycles |
1.00 |
ML-DSA-44 sign |
443899 cycles |
444028 cycles |
1.00 |
ML-DSA-44 verify |
137642 cycles |
137906 cycles |
1.00 |
ML-DSA-65 keypair |
226069 cycles |
227248 cycles |
0.99 |
ML-DSA-65 sign |
718215 cycles |
718261 cycles |
1.00 |
ML-DSA-65 verify |
223066 cycles |
223008 cycles |
1.00 |
ML-DSA-87 keypair |
368346 cycles |
369452 cycles |
1.00 |
ML-DSA-87 sign |
920349 cycles |
923439 cycles |
1.00 |
ML-DSA-87 verify |
373062 cycles |
374051 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-A76 (Raspberry Pi 5) benchmarks (opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
113419 cycles |
113360 cycles |
1.00 |
ML-DSA-44 sign |
354642 cycles |
354339 cycles |
1.00 |
ML-DSA-44 verify |
117343 cycles |
117191 cycles |
1.00 |
ML-DSA-65 keypair |
195444 cycles |
195631 cycles |
1.00 |
ML-DSA-65 sign |
583594 cycles |
583538 cycles |
1.00 |
ML-DSA-65 verify |
193215 cycles |
193005 cycles |
1.00 |
ML-DSA-87 keypair |
322168 cycles |
322119 cycles |
1.00 |
ML-DSA-87 sign |
746821 cycles |
747524 cycles |
1.00 |
ML-DSA-87 verify |
317823 cycles |
317939 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton3
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
72394 cycles |
72393 cycles |
1.00 |
ML-DSA-44 sign |
209931 cycles |
209984 cycles |
1.00 |
ML-DSA-44 verify |
74985 cycles |
74880 cycles |
1.00 |
ML-DSA-65 keypair |
126676 cycles |
126759 cycles |
1.00 |
ML-DSA-65 sign |
345430 cycles |
345270 cycles |
1.00 |
ML-DSA-65 verify |
124139 cycles |
124136 cycles |
1.00 |
ML-DSA-87 keypair |
208322 cycles |
208205 cycles |
1.00 |
ML-DSA-87 sign |
439742 cycles |
439770 cycles |
1.00 |
ML-DSA-87 verify |
204460 cycles |
204504 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-A76 (Raspberry Pi 5) benchmarks (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
210343 cycles |
210830 cycles |
1.00 |
ML-DSA-44 sign |
756586 cycles |
757227 cycles |
1.00 |
ML-DSA-44 verify |
227378 cycles |
227286 cycles |
1.00 |
ML-DSA-65 keypair |
373064 cycles |
374699 cycles |
1.00 |
ML-DSA-65 sign |
1240518 cycles |
1242073 cycles |
1.00 |
ML-DSA-65 verify |
368551 cycles |
368653 cycles |
1.00 |
ML-DSA-87 keypair |
597253 cycles |
597196 cycles |
1.00 |
ML-DSA-87 sign |
1576059 cycles |
1579067 cycles |
1.00 |
ML-DSA-87 verify |
610647 cycles |
611771 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton3 (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
140844 cycles |
140675 cycles |
1.00 |
ML-DSA-44 sign |
490523 cycles |
490334 cycles |
1.00 |
ML-DSA-44 verify |
151068 cycles |
151249 cycles |
1.00 |
ML-DSA-65 keypair |
245989 cycles |
247127 cycles |
1.00 |
ML-DSA-65 sign |
798010 cycles |
797798 cycles |
1.00 |
ML-DSA-65 verify |
244924 cycles |
244638 cycles |
1.00 |
ML-DSA-87 keypair |
399877 cycles |
400782 cycles |
1.00 |
ML-DSA-87 sign |
1019840 cycles |
1023896 cycles |
1.00 |
ML-DSA-87 verify |
407324 cycles |
408361 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton2
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
113451 cycles |
113704 cycles |
1.00 |
ML-DSA-44 sign |
354655 cycles |
355253 cycles |
1.00 |
ML-DSA-44 verify |
117318 cycles |
117688 cycles |
1.00 |
ML-DSA-65 keypair |
196454 cycles |
195805 cycles |
1.00 |
ML-DSA-65 sign |
585782 cycles |
584563 cycles |
1.00 |
ML-DSA-65 verify |
193793 cycles |
193692 cycles |
1.00 |
ML-DSA-87 keypair |
322673 cycles |
322466 cycles |
1.00 |
ML-DSA-87 sign |
748511 cycles |
748282 cycles |
1.00 |
ML-DSA-87 verify |
318420 cycles |
318279 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Graviton2 (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
210819 cycles |
210640 cycles |
1.00 |
ML-DSA-44 sign |
757985 cycles |
757125 cycles |
1.00 |
ML-DSA-44 verify |
227608 cycles |
228080 cycles |
1.00 |
ML-DSA-65 keypair |
374154 cycles |
373760 cycles |
1.00 |
ML-DSA-65 sign |
1241755 cycles |
1242290 cycles |
1.00 |
ML-DSA-65 verify |
368572 cycles |
369324 cycles |
1.00 |
ML-DSA-87 keypair |
597197 cycles |
598479 cycles |
1.00 |
ML-DSA-87 sign |
1600428 cycles |
1597028 cycles |
1.00 |
ML-DSA-87 verify |
611960 cycles |
610887 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-M55 (NUCLEO-N657X0-Q) benchmarks (opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
2134310 cycles |
2134310 cycles |
1 |
ML-DSA-44 sign |
17791748 cycles |
17791748 cycles |
1 |
ML-DSA-44 verify |
2398890 cycles |
2398890 cycles |
1 |
ML-DSA-65 keypair |
3732866 cycles |
3732866 cycles |
1 |
ML-DSA-65 sign |
15034558 cycles |
15034558 cycles |
1 |
ML-DSA-65 verify |
4012806 cycles |
4012806 cycles |
1 |
ML-DSA-87 keypair |
6516715 cycles |
6516715 cycles |
1 |
ML-DSA-87 sign |
25055900 cycles |
25055900 cycles |
1 |
ML-DSA-87 verify |
6865674 cycles |
6865674 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-M55 (NUCLEO-N657X0-Q) benchmarks (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
2332104 cycles |
2332104 cycles |
1 |
ML-DSA-44 sign |
17791726 cycles |
17791726 cycles |
1 |
ML-DSA-44 verify |
2398861 cycles |
2398861 cycles |
1 |
ML-DSA-65 keypair |
4028005 cycles |
4028005 cycles |
1 |
ML-DSA-65 sign |
15034565 cycles |
15034565 cycles |
1 |
ML-DSA-65 verify |
4012799 cycles |
4012799 cycles |
1 |
ML-DSA-87 keypair |
6896513 cycles |
6896513 cycles |
1 |
ML-DSA-87 sign |
25049115 cycles |
25049115 cycles |
1 |
ML-DSA-87 verify |
6864412 cycles |
6864412 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
d3db6bf to
a59eb86
Compare
Port the symbolic Keccak-f1600 sources and SLOTHY recipes from mlkem-native, so that `autogen --slothy` regenerates the existing x1 and x4 kernels and the SLOTHY CI job tests them. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Add an opt-in 3-way Keccak-f1600 (MLD_CONFIG_USE_X3) with a C fallback and an AArch64 kernel that runs two states on Neon with SHA3 and one on scalar registers. It targets cores that issue SHA3 on all SIMD pipes, such as Neoverse V3. Default builds are unchanged. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Prove functional correctness, ABI compliance, memory safety and constant-time behaviour of the x3 kernel, following the x4 v84a proof. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Sample three polynomials per XOF call when MLD_CONFIG_USE_X3 is set (Batch ExpandA, ExpandS and ExpandMask). Nonces are unchanged, so outputs match the default path. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Mirror the existing proofs for the x3 primitives, samplers and callers, built with MLD_CONFIG_USE_X3. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Run the x3 config variation and the x3_v84a_scalar backend tests, and test the regenerated x3 kernel in the SLOTHY job. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
Use MLD_CONFIG_USE_X3 instead of MLD_SYS_AARCH64_FAST_SHA3, which would select x2_v84a ahead of x3. Signed-off-by: Soumya Bhattacharya <somoamz@amazon.com>
a59eb86 to
b622325
Compare
There was a problem hiding this comment.
Mac Mini (M1, 2020) benchmarks (opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
47124 cycles |
47125 cycles |
1.00 |
ML-DSA-44 sign |
131342 cycles |
131417 cycles |
1.00 |
ML-DSA-44 verify |
47314 cycles |
47389 cycles |
1.00 |
ML-DSA-65 keypair |
81742 cycles |
81744 cycles |
1.00 |
ML-DSA-65 sign |
215162 cycles |
215169 cycles |
1.00 |
ML-DSA-65 verify |
79288 cycles |
79285 cycles |
1.00 |
ML-DSA-87 keypair |
133554 cycles |
133554 cycles |
1 |
ML-DSA-87 sign |
277601 cycles |
277736 cycles |
1.00 |
ML-DSA-87 verify |
134234 cycles |
134284 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Mac Mini (M1, 2020) benchmarks (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
114120 cycles |
113818 cycles |
1.00 |
ML-DSA-44 sign |
405053 cycles |
404019 cycles |
1.00 |
ML-DSA-44 verify |
120713 cycles |
120395 cycles |
1.00 |
ML-DSA-65 keypair |
193995 cycles |
193966 cycles |
1.00 |
ML-DSA-65 sign |
653976 cycles |
653692 cycles |
1.00 |
ML-DSA-65 verify |
193058 cycles |
192991 cycles |
1.00 |
ML-DSA-87 keypair |
320045 cycles |
320177 cycles |
1.00 |
ML-DSA-87 sign |
831241 cycles |
831648 cycles |
1.00 |
ML-DSA-87 verify |
326885 cycles |
326995 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-A55 (Snapdragon 888) benchmarks (opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
273654 cycles |
270571 cycles |
1.01 |
ML-DSA-44 sign |
823084 cycles |
809712 cycles |
1.02 |
ML-DSA-44 verify |
275348 cycles |
270186 cycles |
1.02 |
ML-DSA-65 keypair |
468014 cycles |
463085 cycles |
1.01 |
ML-DSA-65 sign |
1331770 cycles |
1323109 cycles |
1.01 |
ML-DSA-65 verify |
455497 cycles |
446841 cycles |
1.02 |
ML-DSA-87 keypair |
800712 cycles |
789701 cycles |
1.01 |
ML-DSA-87 sign |
1841227 cycles |
1780296 cycles |
1.03 |
ML-DSA-87 verify |
774202 cycles |
766029 cycles |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Arm Cortex-A55 (Snapdragon 888) benchmarks (opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-87 sign |
1841227 cycles |
1780296 cycles |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-A55 (Snapdragon 888) benchmarks (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
461384 cycles |
460388 cycles |
1.00 |
ML-DSA-44 sign |
2126110 cycles |
2122332 cycles |
1.00 |
ML-DSA-44 verify |
552373 cycles |
549592 cycles |
1.01 |
ML-DSA-65 keypair |
774902 cycles |
772173 cycles |
1.00 |
ML-DSA-65 sign |
3476487 cycles |
3460868 cycles |
1.00 |
ML-DSA-65 verify |
857005 cycles |
855394 cycles |
1.00 |
ML-DSA-87 keypair |
1248658 cycles |
1247284 cycles |
1.00 |
ML-DSA-87 sign |
4315667 cycles |
4263921 cycles |
1.01 |
ML-DSA-87 verify |
1369497 cycles |
1366794 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-A72 (Raspberry Pi 4) benchmarks (opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
214542 cycles |
213756 cycles |
1.00 |
ML-DSA-44 sign |
585737 cycles |
584182 cycles |
1.00 |
ML-DSA-44 verify |
211481 cycles |
210896 cycles |
1.00 |
ML-DSA-65 keypair |
374245 cycles |
373873 cycles |
1.00 |
ML-DSA-65 sign |
969476 cycles |
962846 cycles |
1.01 |
ML-DSA-65 verify |
357454 cycles |
355854 cycles |
1.00 |
ML-DSA-87 keypair |
629791 cycles |
628671 cycles |
1.00 |
ML-DSA-87 sign |
1286836 cycles |
1297569 cycles |
0.99 |
ML-DSA-87 verify |
607627 cycles |
606774 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Arm Cortex-A72 (Raspberry Pi 4) benchmarks (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
293004 cycles |
295318 cycles |
0.99 |
ML-DSA-44 sign |
1111099 cycles |
1110298 cycles |
1.00 |
ML-DSA-44 verify |
322481 cycles |
322756 cycles |
1.00 |
ML-DSA-65 keypair |
535827 cycles |
536415 cycles |
1.00 |
ML-DSA-65 sign |
1816556 cycles |
1817668 cycles |
1.00 |
ML-DSA-65 verify |
515271 cycles |
514367 cycles |
1.00 |
ML-DSA-87 keypair |
823658 cycles |
825690 cycles |
1.00 |
ML-DSA-87 sign |
2298373 cycles |
2325584 cycles |
0.99 |
ML-DSA-87 verify |
850451 cycles |
852301 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
SpacemiT K1 8 (Banana Pi F3) benchmarks (no-opt)
Details
| Benchmark suite | Current: b622325 | Previous: 4ec47ce | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
765612 cycles |
764774 cycles |
1.00 |
ML-DSA-44 sign |
3142110 cycles |
3144213 cycles |
1.00 |
ML-DSA-44 verify |
858484 cycles |
858080 cycles |
1.00 |
ML-DSA-65 keypair |
1289359 cycles |
1289582 cycles |
1.00 |
ML-DSA-65 sign |
5090080 cycles |
5087169 cycles |
1.00 |
ML-DSA-65 verify |
1366208 cycles |
1366024 cycles |
1.00 |
ML-DSA-87 keypair |
2122994 cycles |
2122831 cycles |
1.00 |
ML-DSA-87 sign |
6370419 cycles |
6356312 cycles |
1.00 |
ML-DSA-87 verify |
2224945 cycles |
2225428 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
This PR adds a new 3-way Keccak-f1600 batching (x3) for Neoverse V3 cores by exploiting the optimized SHA3 hashing. It is aimed at cores that execute the Armv8.4-A SHA3 instructions on all SIMD pipes (e.g. Neoverse V3). It is off by default (
MLD_CONFIG_USE_X3). The assembly and its HOL Light proof are included.The PR also makes mldsa-native's FIPS202 AArch64 development tree structurally consistent with mlkem-native: it adds the symbolic (clean) Keccak-f1600 sources in
dev/fips202/aarch64_symbolic/and the SLOTHY recipes indev/fips202/aarch64/src/Makefile, and enablesautogen --slothyfor the Keccak kernels. With this, the existing x4 kernels and the new x3 kernel can be regenerated from their symbolic sources, reproducing the committed machine code exactly.What it adds
keccak_f1600_x3_v8a_v84a_scalar_hybrid_aarch64_asm: two Keccak states on Neon (SHA3 instructions), one state on scalar registers with lazy rotations, one scalar and one vector round per iteration in a single pass. Scheduled with SLOTHY (interleaving only) from the symbolic sourcedev/fips202/aarch64_symbolic/keccak_f1600_x3_v8a_v84a_scalar_hybrid_clean.S; the recipe is indev/fips202/aarch64/src/Makefile(autogen --slothy keccak_f1600_x3_v8a_v84a_scalar_hybrid_aarch64_asm) and regenerates the committed kernel.proofs/hol_light/aarch64/proofs/keccak_f1600_x3_v8a_v84a_scalar_hybrid_aarch64_asm.ml):_CORRECT,_SUBROUTINE_CORRECT): the kernel computes the full 24-round Keccak-f[1600] permutation on each of the three 200-byte states. Called as a C function, it also preserves all registers the calling convention requires and writes no memory other than the 600-byte state buffer and its own 224-byte stack frame._SUBROUTINE_SAFE: memory safety and secret-independent timing (mk_safety_spec), with an x3 entrysha3_keccak3_f1600_altinsubroutine_signatures.ml, named similar to the existing x4 entrysha3_keccak4_f1600_alt.x3_v8a_v84a_scalar.h, selection inauto.hunderMLD_CONFIG_USE_X3.MLD_CONFIG_USE_X3. Every polynomial keeps its FIPS 204 nonce, so outputs are byte-identical to the default path.MLD_CONFIG_REDUCE_RAM.test/configs/x3_keccak_config.h; component benchmark rows for the x3 permute and samplers, plus x4 baselines (keccakf1600x4_permute,poly_uniform_4x,poly_uniform_gamma1_4x).x3-keccakconfig variation (native x3 on AArch64, C fallback elsewhere) andx3_v8a_v84a_scalarin the AArch64 backend matrix.Commits (each builds and passes format / autogen / func / KAT / examples):
Notes on Commit 0: FIPS202 symbolic sources and SLOTHY recipes (parity with mlkem-native)
The mldsa-native did not carry the symbolic/clean sources from which its AArch64 Keccak-f1600 kernels are generated, nor the SLOTHY recipes. The
autogen --slothyhad a keccak code path that could not be reached. This commit brings the FIPS202 AArch64 tree in line with mlkem-native (commita7914d4):dev/fips202/aarch64_symbolic/:keccak_f1600_x1_scalar_symbolic.S,keccak_f1600_x4_v8a_scalar_hybrid_clean.S,keccak_f1600_x4_v8a_v84a_scalar_hybrid_clean.S.dev/fips202/aarch64/src/Makefile: mlkem-native'sslothy-clirecipes ported over to mldsa-native.scripts/autogen: the three kernels added to--slothy, similar to mlkem-native.The shipped kernels are unchanged. Running
autogen --slothywith these recipes regenerates kernels similar to the committed ones.Testing
MLD_CONFIG_USE_X3on Neoverse V1, V2 and V3 (native AArch64). On x86_64, where there is no x3 assembly and the 3-way permutation falls back to three calls of the C permutation, func and KAT pass with and withoutMLD_CONFIG_USE_X3.MLD_CONFIG_USE_X3builds compile only the x3 path and link only the x3 kernel.scripts/lint,scripts/format,autogen --dry-runclean.Performance (pinned to one core)
Per component (
bench_components), x3 vs x4 per polynomial / per state (an x3 call handles 3, an x4 call 4; cycles per call for ML-DSA-87 in brackets, x3 vs x4). Neoverse V3: median of 5 runs; V2/V1: one run:poly_uniform_3xvs_4x)poly_uniform_eta_3xvs_4x)poly_uniform_gamma1_3xvs_4x)End to end, x3 vs x4 (KeyGen/Verify:
bench_mldsaaverage; Sign: change in median cycles over 20,000 signs with identical key/message/randomness in both builds, paired Wilcoxon signed-rank p < 0.001):x3 only pays off where SHA3 runs on all SIMD pipes (Neoverse V3); elsewhere it is slower, hence opt-in only.
Reproduce:
make bench_components_87 OPT=1 AUTO=1 CYCLES=PERFandmake bench_87 …, once with the default config and once with-DMLD_CONFIG_USE_X3.Feedback welcome
x3 is enabled with the config option
MLD_CONFIG_USE_X3(off by default). Note that the option also switches ExpandA/ExpandS/ExpandMask to 3-way batching on other platforms; on Neoverse V1 and V2 the default x4 is faster, and without a native x3 kernel the 3-way Keccak runs as three single-state permutations. Feedback on the C integration approach is welcome. The current implementation is functional, but the 3-way FIPS202 layer and samplers largely duplicate their 4-way counterparts; a single code path parameterised by the batch width (3 or 4) would be preferable, and suggestions on this proposal are welcome.