Add Armv8.1-M Keccak x1 backend - #1277
Conversation
CBMC Results (ML-DSA-44)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-65)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-87)
Full Results (210 proofs)
|
a1dde44 to
e8a49a1
Compare
d0543bf to
c45a108
Compare
14b78cc to
91039f7
Compare
There was a problem hiding this comment.
Mac Mini (M1, 2020) benchmarks (opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
46545 cycles |
46515 cycles |
1.00 |
ML-DSA-44 sign |
131210 cycles |
131104 cycles |
1.00 |
ML-DSA-44 verify |
47369 cycles |
47340 cycles |
1.00 |
ML-DSA-65 keypair |
81706 cycles |
81714 cycles |
1.00 |
ML-DSA-65 sign |
215415 cycles |
215483 cycles |
1.00 |
ML-DSA-65 verify |
79313 cycles |
79331 cycles |
1.00 |
ML-DSA-87 keypair |
132481 cycles |
132496 cycles |
1.00 |
ML-DSA-87 sign |
277601 cycles |
277751 cycles |
1.00 |
ML-DSA-87 verify |
133534 cycles |
133550 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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
112752 cycles |
112732 cycles |
1.00 |
ML-DSA-44 sign |
401039 cycles |
401165 cycles |
1.00 |
ML-DSA-44 verify |
119360 cycles |
119350 cycles |
1.00 |
ML-DSA-65 keypair |
192953 cycles |
192974 cycles |
1.00 |
ML-DSA-65 sign |
650062 cycles |
649955 cycles |
1.00 |
ML-DSA-65 verify |
193069 cycles |
193006 cycles |
1.00 |
ML-DSA-87 keypair |
318951 cycles |
318940 cycles |
1.00 |
ML-DSA-87 sign |
828946 cycles |
828798 cycles |
1.00 |
ML-DSA-87 verify |
321793 cycles |
321792 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.
Graviton5
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
51479 cycles |
51560 cycles |
1.00 |
ML-DSA-44 sign |
162053 cycles |
162124 cycles |
1.00 |
ML-DSA-44 verify |
54702 cycles |
54700 cycles |
1.00 |
ML-DSA-65 keypair |
90292 cycles |
90132 cycles |
1.00 |
ML-DSA-65 sign |
267890 cycles |
267374 cycles |
1.00 |
ML-DSA-65 verify |
90005 cycles |
89790 cycles |
1.00 |
ML-DSA-87 keypair |
146069 cycles |
145982 cycles |
1.00 |
ML-DSA-87 sign |
335529 cycles |
336138 cycles |
1.00 |
ML-DSA-87 verify |
145250 cycles |
145433 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.
Graviton5 (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
100181 cycles |
99983 cycles |
1.00 |
ML-DSA-44 sign |
369540 cycles |
369043 cycles |
1.00 |
ML-DSA-44 verify |
110294 cycles |
110043 cycles |
1.00 |
ML-DSA-65 keypair |
175195 cycles |
175209 cycles |
1.00 |
ML-DSA-65 sign |
597735 cycles |
596868 cycles |
1.00 |
ML-DSA-65 verify |
177754 cycles |
177498 cycles |
1.00 |
ML-DSA-87 keypair |
286479 cycles |
286715 cycles |
1.00 |
ML-DSA-87 sign |
759319 cycles |
757791 cycles |
1.00 |
ML-DSA-87 verify |
296527 cycles |
295756 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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
112292 cycles |
112421 cycles |
1.00 |
ML-DSA-44 sign |
353509 cycles |
353943 cycles |
1.00 |
ML-DSA-44 verify |
117045 cycles |
117107 cycles |
1.00 |
ML-DSA-65 keypair |
194768 cycles |
194811 cycles |
1.00 |
ML-DSA-65 sign |
583684 cycles |
583921 cycles |
1.00 |
ML-DSA-65 verify |
192841 cycles |
192856 cycles |
1.00 |
ML-DSA-87 keypair |
320755 cycles |
321141 cycles |
1.00 |
ML-DSA-87 sign |
746990 cycles |
747840 cycles |
1.00 |
ML-DSA-87 verify |
318459 cycles |
318856 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.
Graviton3 (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
138441 cycles |
138205 cycles |
1.00 |
ML-DSA-44 sign |
486106 cycles |
485764 cycles |
1.00 |
ML-DSA-44 verify |
149269 cycles |
149259 cycles |
1.00 |
ML-DSA-65 keypair |
242153 cycles |
241613 cycles |
1.00 |
ML-DSA-65 sign |
791700 cycles |
791618 cycles |
1.00 |
ML-DSA-65 verify |
241534 cycles |
241503 cycles |
1.00 |
ML-DSA-87 keypair |
396162 cycles |
395195 cycles |
1.00 |
ML-DSA-87 sign |
1013608 cycles |
1014135 cycles |
1.00 |
ML-DSA-87 verify |
403785 cycles |
404031 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.
Intel Xeon 4th gen (c7i)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
43290 cycles |
43407 cycles |
1.00 |
ML-DSA-44 sign |
130107 cycles |
130440 cycles |
1.00 |
ML-DSA-44 verify |
45233 cycles |
45231 cycles |
1.00 |
ML-DSA-65 keypair |
75800 cycles |
75611 cycles |
1.00 |
ML-DSA-65 sign |
213743 cycles |
213750 cycles |
1.00 |
ML-DSA-65 verify |
74411 cycles |
74462 cycles |
1.00 |
ML-DSA-87 keypair |
122926 cycles |
122917 cycles |
1.00 |
ML-DSA-87 sign |
270981 cycles |
271210 cycles |
1.00 |
ML-DSA-87 verify |
120778 cycles |
120613 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.
AMD EPYC 4th gen (c7a)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
46735 cycles |
46709 cycles |
1.00 |
ML-DSA-44 sign |
139947 cycles |
139435 cycles |
1.00 |
ML-DSA-44 verify |
49469 cycles |
49461 cycles |
1.00 |
ML-DSA-65 keypair |
82621 cycles |
81967 cycles |
1.01 |
ML-DSA-65 sign |
227154 cycles |
226735 cycles |
1.00 |
ML-DSA-65 verify |
81978 cycles |
82665 cycles |
0.99 |
ML-DSA-87 keypair |
130551 cycles |
129492 cycles |
1.01 |
ML-DSA-87 sign |
279924 cycles |
280340 cycles |
1.00 |
ML-DSA-87 verify |
128506 cycles |
128405 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.
Intel Xeon 4th gen (c7i) (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
91704 cycles |
91774 cycles |
1.00 |
ML-DSA-44 sign |
351502 cycles |
351709 cycles |
1.00 |
ML-DSA-44 verify |
99387 cycles |
99709 cycles |
1.00 |
ML-DSA-65 keypair |
154237 cycles |
154289 cycles |
1.00 |
ML-DSA-65 sign |
571927 cycles |
570738 cycles |
1.00 |
ML-DSA-65 verify |
160351 cycles |
160181 cycles |
1.00 |
ML-DSA-87 keypair |
255233 cycles |
255166 cycles |
1.00 |
ML-DSA-87 sign |
720046 cycles |
720821 cycles |
1.00 |
ML-DSA-87 verify |
264335 cycles |
263865 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.
Graviton2
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
112198 cycles |
112399 cycles |
1.00 |
ML-DSA-44 sign |
353753 cycles |
353820 cycles |
1.00 |
ML-DSA-44 verify |
117415 cycles |
117171 cycles |
1.00 |
ML-DSA-65 keypair |
194605 cycles |
194786 cycles |
1.00 |
ML-DSA-65 sign |
584072 cycles |
584013 cycles |
1.00 |
ML-DSA-65 verify |
193382 cycles |
193015 cycles |
1.00 |
ML-DSA-87 keypair |
320883 cycles |
320852 cycles |
1.00 |
ML-DSA-87 sign |
747307 cycles |
747201 cycles |
1.00 |
ML-DSA-87 verify |
318179 cycles |
318645 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.
AMD EPYC 3rd gen (c6a)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
52008 cycles |
51879 cycles |
1.00 |
ML-DSA-44 sign |
154462 cycles |
155064 cycles |
1.00 |
ML-DSA-44 verify |
54166 cycles |
54259 cycles |
1.00 |
ML-DSA-65 keypair |
89427 cycles |
89685 cycles |
1.00 |
ML-DSA-65 sign |
253071 cycles |
254754 cycles |
0.99 |
ML-DSA-65 verify |
89176 cycles |
89439 cycles |
1.00 |
ML-DSA-87 keypair |
143367 cycles |
142352 cycles |
1.01 |
ML-DSA-87 sign |
310438 cycles |
311341 cycles |
1.00 |
ML-DSA-87 verify |
138807 cycles |
139359 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.
AMD EPYC 4th gen (c7a) (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
118639 cycles |
118234 cycles |
1.00 |
ML-DSA-44 sign |
458559 cycles |
458712 cycles |
1.00 |
ML-DSA-44 verify |
130837 cycles |
131121 cycles |
1.00 |
ML-DSA-65 keypair |
201470 cycles |
200822 cycles |
1.00 |
ML-DSA-65 sign |
743521 cycles |
747583 cycles |
0.99 |
ML-DSA-65 verify |
209873 cycles |
209481 cycles |
1.00 |
ML-DSA-87 keypair |
331170 cycles |
332858 cycles |
0.99 |
ML-DSA-87 sign |
935608 cycles |
936652 cycles |
1.00 |
ML-DSA-87 verify |
343114 cycles |
343994 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.
AMD EPYC 3rd gen (c6a) (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
133187 cycles |
134282 cycles |
0.99 |
ML-DSA-44 sign |
518022 cycles |
520818 cycles |
0.99 |
ML-DSA-44 verify |
146634 cycles |
147777 cycles |
0.99 |
ML-DSA-65 keypair |
224332 cycles |
224694 cycles |
1.00 |
ML-DSA-65 sign |
843960 cycles |
843127 cycles |
1.00 |
ML-DSA-65 verify |
234144 cycles |
233924 cycles |
1.00 |
ML-DSA-87 keypair |
367057 cycles |
367125 cycles |
1.00 |
ML-DSA-87 sign |
1058600 cycles |
1057892 cycles |
1.00 |
ML-DSA-87 verify |
380447 cycles |
380252 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.
Graviton2 (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
212129 cycles |
212335 cycles |
1.00 |
ML-DSA-44 sign |
760693 cycles |
761210 cycles |
1.00 |
ML-DSA-44 verify |
229484 cycles |
229974 cycles |
1.00 |
ML-DSA-65 keypair |
375440 cycles |
376324 cycles |
1.00 |
ML-DSA-65 sign |
1248106 cycles |
1248564 cycles |
1.00 |
ML-DSA-65 verify |
371579 cycles |
372377 cycles |
1.00 |
ML-DSA-87 keypair |
600041 cycles |
601386 cycles |
1.00 |
ML-DSA-87 sign |
1586041 cycles |
1607791 cycles |
0.99 |
ML-DSA-87 verify |
615917 cycles |
617602 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.
Intel Xeon 3rd gen (c6i)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
61706 cycles |
61819 cycles |
1.00 |
ML-DSA-44 sign |
187966 cycles |
188851 cycles |
1.00 |
ML-DSA-44 verify |
66228 cycles |
66399 cycles |
1.00 |
ML-DSA-65 keypair |
109427 cycles |
110427 cycles |
0.99 |
ML-DSA-65 sign |
311800 cycles |
313769 cycles |
0.99 |
ML-DSA-65 verify |
109443 cycles |
111323 cycles |
0.98 |
ML-DSA-87 keypair |
170673 cycles |
173116 cycles |
0.99 |
ML-DSA-87 sign |
379405 cycles |
385429 cycles |
0.98 |
ML-DSA-87 verify |
170627 cycles |
174422 cycles |
0.98 |
This comment was automatically generated by workflow using github-action-benchmark.
oqs-bot
left a comment
There was a problem hiding this comment.
Intel Xeon 3rd gen (c6i) (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
154055 cycles |
154452 cycles |
1.00 |
ML-DSA-44 sign |
587101 cycles |
588162 cycles |
1.00 |
ML-DSA-44 verify |
169059 cycles |
168998 cycles |
1.00 |
ML-DSA-65 keypair |
261730 cycles |
262562 cycles |
1.00 |
ML-DSA-65 sign |
964081 cycles |
965903 cycles |
1.00 |
ML-DSA-65 verify |
271336 cycles |
272372 cycles |
1.00 |
ML-DSA-87 keypair |
431609 cycles |
431929 cycles |
1.00 |
ML-DSA-87 sign |
1212961 cycles |
1211899 cycles |
1.00 |
ML-DSA-87 verify |
447991 cycles |
447459 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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
1690331 cycles |
2328440 cycles |
0.73 |
ML-DSA-44 sign |
13600033 cycles |
17851737 cycles |
0.76 |
ML-DSA-44 verify |
1806518 cycles |
2398876 cycles |
0.75 |
ML-DSA-65 keypair |
2895358 cycles |
4025122 cycles |
0.72 |
ML-DSA-65 sign |
11228232 cycles |
14793522 cycles |
0.76 |
ML-DSA-65 verify |
2973684 cycles |
4012792 cycles |
0.74 |
ML-DSA-87 keypair |
4888795 cycles |
6864887 cycles |
0.71 |
ML-DSA-87 sign |
18455928 cycles |
24785157 cycles |
0.74 |
ML-DSA-87 verify |
5009804 cycles |
6864412 cycles |
0.73 |
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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
2328440 cycles |
2328440 cycles |
1 |
ML-DSA-44 sign |
17851737 cycles |
17851737 cycles |
1 |
ML-DSA-44 verify |
2398876 cycles |
2398876 cycles |
1 |
ML-DSA-65 keypair |
4025122 cycles |
4025122 cycles |
1 |
ML-DSA-65 sign |
14793522 cycles |
14793522 cycles |
1 |
ML-DSA-65 verify |
4012792 cycles |
4012792 cycles |
1 |
ML-DSA-87 keypair |
6864887 cycles |
6864887 cycles |
1 |
ML-DSA-87 sign |
24785157 cycles |
24785157 cycles |
1 |
ML-DSA-87 verify |
6864412 cycles |
6864412 cycles |
1 |
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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
272258 cycles |
271067 cycles |
1.00 |
ML-DSA-44 sign |
811182 cycles |
812320 cycles |
1.00 |
ML-DSA-44 verify |
273722 cycles |
273045 cycles |
1.00 |
ML-DSA-65 keypair |
467921 cycles |
467726 cycles |
1.00 |
ML-DSA-65 sign |
1374610 cycles |
1341160 cycles |
1.02 |
ML-DSA-65 verify |
452328 cycles |
454368 cycles |
1.00 |
ML-DSA-87 keypair |
794593 cycles |
803830 cycles |
0.99 |
ML-DSA-87 sign |
1852551 cycles |
1831323 cycles |
1.01 |
ML-DSA-87 verify |
781142 cycles |
778295 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 (no-opt)
Details
| Benchmark suite | Current: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
465428 cycles |
465494 cycles |
1.00 |
ML-DSA-44 sign |
2134682 cycles |
2144256 cycles |
1.00 |
ML-DSA-44 verify |
556859 cycles |
559936 cycles |
0.99 |
ML-DSA-65 keypair |
784546 cycles |
783372 cycles |
1.00 |
ML-DSA-65 sign |
3502813 cycles |
3496274 cycles |
1.00 |
ML-DSA-65 verify |
867806 cycles |
869188 cycles |
1.00 |
ML-DSA-87 keypair |
1265637 cycles |
1266792 cycles |
1.00 |
ML-DSA-87 sign |
4348278 cycles |
4317269 cycles |
1.01 |
ML-DSA-87 verify |
1387880 cycles |
1394437 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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
218060 cycles |
216344 cycles |
1.01 |
ML-DSA-44 sign |
597336 cycles |
593807 cycles |
1.01 |
ML-DSA-44 verify |
217728 cycles |
216553 cycles |
1.01 |
ML-DSA-65 keypair |
380946 cycles |
378995 cycles |
1.01 |
ML-DSA-65 sign |
983605 cycles |
982529 cycles |
1.00 |
ML-DSA-65 verify |
363319 cycles |
363919 cycles |
1.00 |
ML-DSA-87 keypair |
636094 cycles |
636641 cycles |
1.00 |
ML-DSA-87 sign |
1312206 cycles |
1318452 cycles |
1.00 |
ML-DSA-87 verify |
617779 cycles |
619777 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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
301299 cycles |
301210 cycles |
1.00 |
ML-DSA-44 sign |
1140771 cycles |
1141652 cycles |
1.00 |
ML-DSA-44 verify |
333412 cycles |
330898 cycles |
1.01 |
ML-DSA-65 keypair |
550692 cycles |
543839 cycles |
1.01 |
ML-DSA-65 sign |
1876845 cycles |
1856990 cycles |
1.01 |
ML-DSA-65 verify |
533547 cycles |
525059 cycles |
1.02 |
ML-DSA-87 keypair |
845041 cycles |
846962 cycles |
1.00 |
ML-DSA-87 sign |
2351108 cycles |
2362668 cycles |
1.00 |
ML-DSA-87 verify |
874370 cycles |
876584 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: 91039f7 | Previous: 27aebe7 | Ratio |
|---|---|---|---|
ML-DSA-44 keypair |
760366 cycles |
760367 cycles |
1.00 |
ML-DSA-44 sign |
3142358 cycles |
3140398 cycles |
1.00 |
ML-DSA-44 verify |
859639 cycles |
859497 cycles |
1.00 |
ML-DSA-65 keypair |
1287922 cycles |
1289584 cycles |
1.00 |
ML-DSA-65 sign |
5081104 cycles |
5091406 cycles |
1.00 |
ML-DSA-65 verify |
1367411 cycles |
1368454 cycles |
1.00 |
ML-DSA-87 keypair |
2109891 cycles |
2109786 cycles |
1.00 |
ML-DSA-87 sign |
6360762 cycles |
6373090 cycles |
1.00 |
ML-DSA-87 verify |
2224537 cycles |
2226888 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
|
Added metadata YAML to the input source file so that slothy will preserve it and autogen will pass. This is a comment-only change and benchmarks do not need to be re-run. |
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @bremoran.
I have a number of comments. Please look at the LICENSE first as that will likely block this PR.
| #if defined(MLD_USE_NATIVE_FIPS202_X1_EXTRACT_BYTES) | ||
| if (mld_keccakf1600_extract_bytes_x1_native(state, data, offset, length) == | ||
| MLD_NATIVE_FUNC_SUCCESS) | ||
| { | ||
| return; | ||
| } | ||
| #endif /* MLD_USE_NATIVE_FIPS202_X1_EXTRACT_BYTES */ | ||
| #if defined(MLD_SYS_LITTLE_ENDIAN) | ||
| uint8_t *state_ptr = (uint8_t *)state + offset; |
There was a problem hiding this comment.
This breaks C90 on platforms impkementing exract bytes due to the state_ptr declaration a little lower. that needs to be fixed. Also maybe worth switching to C90 to catch this in the future (unless this leads to more problems, then please open an issue).
| /* The Adomnicai x1 core consumes 24 bit-interleaved round constants followed | ||
| * by a 0xff loop terminator. Keep this table private to this backend. */ | ||
| static MLD_ALIGN const uint32_t mld_keccakf1600_round_constants_x1[49] = { | ||
| 0x00000001, 0x00000000, /* RC0 */ | ||
| 0x00000000, 0x00000089, /* RC1 */ | ||
| 0x00000000, 0x8000008b, /* RC2 */ | ||
| 0x00000000, 0x80008080, /* RC3 */ | ||
| 0x00000001, 0x0000008b, /* RC4 */ | ||
| 0x00000001, 0x00008000, /* RC5 */ | ||
| 0x00000001, 0x80008088, /* RC6 */ | ||
| 0x00000001, 0x80000082, /* RC7 */ | ||
| 0x00000000, 0x0000000b, /* RC8 */ | ||
| 0x00000000, 0x0000000a, /* RC9 */ | ||
| 0x00000001, 0x00008082, /* RC10 */ | ||
| 0x00000000, 0x00008003, /* RC11 */ | ||
| 0x00000001, 0x0000808b, /* RC12 */ | ||
| 0x00000001, 0x8000000b, /* RC13 */ | ||
| 0x00000001, 0x8000008a, /* RC14 */ | ||
| 0x00000001, 0x80000081, /* RC15 */ | ||
| 0x00000000, 0x80000081, /* RC16 */ | ||
| 0x00000000, 0x80000008, /* RC17 */ | ||
| 0x00000000, 0x00000083, /* RC18 */ | ||
| 0x00000000, 0x80008003, /* RC19 */ | ||
| 0x00000001, 0x80008088, /* RC20 */ | ||
| 0x00000000, 0x80000088, /* RC21 */ | ||
| 0x00000001, 0x00008000, /* RC22 */ | ||
| 0x00000000, 0x80008082, /* RC23 */ | ||
| 0x000000ff, /* loop terminator */ | ||
| }; |
There was a problem hiding this comment.
Please auto generate in autogen this in a similar way it is autogenerated for other platforms.
| unsigned offset, | ||
| unsigned length); | ||
|
|
||
| /* The Adomnicai x1 core consumes 24 bit-interleaved round constants followed |
There was a problem hiding this comment.
Let's acknowledge the source of this implementation once in the assembly and then keep all other comments general, i.e., do not talk about the Adomnicai x1 core - it only leads to confusion later on.
| */ | ||
|
|
||
| /* | ||
| * This helper is derived from the public-domain XKCP implementation and the |
There was a problem hiding this comment.
Be more specific here: CC0. public domain means different things for different people.
|
|
||
| /* | ||
| * This helper is derived from the public-domain XKCP implementation and the | ||
| * Armv7-M optimizations described in [ADOMNICAI23]. See the backend README, |
There was a problem hiding this comment.
Please cite the implementation directly
| ZEPHYR_FIPS202_BACKEND_mps3-an547 := fips202/native/armv81m/mve.h | ||
| ZEPHYR_FIPS202_BACKEND_nucleo-n657x0-q := fips202/native/armv81m/mve.h | ||
| ZEPHYR_FIPS202_BACKEND_mps3-an547 := fips202/native/armv81m/mve_x1.h | ||
| ZEPHYR_FIPS202_BACKEND_nucleo-n657x0-q := fips202/native/armv81m/mve_x1.h |
There was a problem hiding this comment.
This swaps out the backend. Does this introduce a test gap as the x4 Keccak is no longer tested? We should not be regressing test coverage, so we need to at least add a x4 unit test to CI.
|
|
||
| #define mld_keccak_f1600_x1_native_impl \ | ||
| MLD_NAMESPACE(keccak_f1600_x1_native_impl) | ||
| int mld_keccak_f1600_x1_native_impl(uint64_t *state); |
There was a problem hiding this comment.
These should be marked MLD_INTERNAL_API
| QEMU_TIMEOUT ?= 300 | ||
| export QEMU_TIMEOUT | ||
|
|
||
| # Native backends are an OPT=1 feature (an547 builds the Armv8.1-M MVE backend). |
| @@ -65,48 +65,75 @@ unsigned int mld_rej_eta_c(int32_t *a, unsigned int target, unsigned int offset, | |||
| void mld_keccakf1600_permute_c(uint64_t *state); | |||
|
|
|||
| #if defined(MLD_USE_NATIVE_FIPS202_X1) | |||
There was a problem hiding this comment.
CI does not run unit tests for Armv8.1-M. Please enable it.
| The Armv8.1-M Keccak implementation contains portions adapted from SLOTHY | ||
| examples distributed under the MIT license. The applicable SLOTHY copyright | ||
| notices are included below. | ||
|
|
There was a problem hiding this comment.
Which portions are MIT licensed? I did not see any file in this PR being MIT-only licensed and we wouldn't be able to take it for anything under mldsa/. Maybe this is an outdated notice that can be removed?
The lazy/eager polyvector unit test allocates both ML-DSA-87 representations and their scratch space through MLD_ALLOC. The default MLD_ALLOC implementation expands to aligned automatic arrays, so this single test exceeds the Zephyr test thread stack on the Cortex-M55 test configuration. Use test-local, aligned static buffers for this workspace. The TEST_STATIC_ALLOC and TEST_STATIC_FREE helpers are deliberately scoped to test_unit.c: they preserve cleanup by zeroizing every buffer and clearing its pointer, without changing the allocator used by production code or other tests. Only test/src/test_unit.c changes. The test inputs, comparisons, and coverage remain the same; this commit changes where its temporary workspace is stored. Signed-off-by: Brendan Moran <brendan.moran@arm.com>
Generated ABI checks normally fill every assembly argument buffer with random bytes. That is unsuitable for interfaces containing control data. The Armv8.1-M Keccak x1 permutation consumes 49 round-constant words and requires the final word to be 0x000000ff as a loop terminator. Leaving that word random can make the checker read beyond the supplied buffer. Add an optional test_bytes mapping to buffer entries in the assembly ABI YAML. scripts/autogen validates that offsets are integers within the buffer and that values are bytes, sorts the overrides, and emits them after randombytes initializes the rest of the buffer. Existing ABI metadata without test_bytes retains its current behaviour. Document the new metadata in test/abicheck/README.md. The generic facility is introduced here before its Keccak x1 consumer so the following backend commit contains only feature-specific metadata and generated checks. Signed-off-by: Brendan Moran <brendan.moran@arm.com>
Add a scalar Armv8.1-M Keccak backend using the Armv7-M bit-interleaved representation and an M7-scheduled permutation. Keep states interleaved across permutations and convert only the lanes crossing the byte interface. Include the clean source, final SLOTHY scheduling driver, generated production sources, x1 xor/extract helpers, native integration, focused unit coverage, and AAPCS32 ABI checks. Preserve the assembly metadata and integration guards through regeneration, and keep the existing x4 implementation unchanged. Document the XKCP, Adomnicai, and SLOTHY provenance and licensing. Signed-off-by: Brendan Moran <brendan.moran@arm.com>
Run the full functional, KAT, ACVP, and unit suites for the retained x4 backend on mps3-an547 instead of relying on the new x1 default. Keep the ordinary unit suite enabled for all three ML-DSA parameter sets and reduce only its QEMU randomized budgets to fit the 300-second execution deadline. Until the upstream unaligned-access fallback is available, constrain only the Armv8.1-M x4 xor/extract test buffers and offsets to the implementation's supported alignment. The x1 path and other backends retain arbitrary-alignment coverage. Signed-off-by: Brendan Moran <brendan.moran@arm.com>
ade6b34 to
55c0d98
Compare
Add the unmodified upstream Adomnicai Armv7-M Keccak source under armv81m_clean and the Slothy-generated M7 optimized x1 permutation under armv81m_opt, with a Makefile regeneration path.
Move the Armv8.1-M FIPS202 development sources to armv81m_opt and synchronize the production backend. Route x1 state XOR/extract through the clean-source assembly helpers so the optimized permutation can keep the state in the bit-interleaved native representation.
Keep the test changes focused on representation-aware Keccak x1/x4 unit coverage, including extracted-byte state dumps on x1 failures, and the static ML-DSA-87 unit-test workspace needed for Zephyr stack pressure.
Fixes #1322