lib25519

In the following speed table, smaller numbers are better. The numbers are median single-core cycle counts on various microarchitectures. Overclocking is disabled.

The table reports cycle counts from lib25519 and, for comparison, OpenSSL and s2n-bignum. For comparability to OpenSSL's speed-testing utility, the OpenSSL cycle counts omit various OpenSSL overheads; see below for details. The s2n-bignum and lib25519 cycle counts include all overheads. There is also a lib25519+s2n line showing separate measurements of lib25519 after an optional pre-configuration ./use-s2n-bignum step (which is a supported option for lib25519); a lib25519+exp line showing separate measurements of lib25519 after an experimental pre-configuration mv skipcompilers/* compilers step (which is not supported because it uses instructions not supported by valgrind); and a lib25519+s2n+exp line.

μarch software X key X dh X batch Ed key Ed sign Ed verif Ed MSM
Golden Cove (2021) OpenSSL 99570 103325 101362 96222 320673
lib25519 23782 68511 51744 24757 28039 96607 30088
lib25519+exp 25266 68304 49799 24745 28676 93508 30620
lib25519+s2n+exp 24740 67850 49945 24800 28794 95780 30223
lib25519+s2n 24290 68063 51735 25286 28948 94614 30367
s2n-bignum 24257 75395
Zen 3 (2020) OpenSSL 116119 112550 118697 111383 371930
lib25519 28212 96632 71142 29031 32497 128179 40784
lib25519+exp 25626 73060 47915 26407 29771 113420 35826
lib25519+s2n+exp 25718 73005 48216 26376 29771 112841 35657
lib25519+s2n 28378 96214 50510 29241 32596 129089 40643
s2n-bignum 26238 89699
Tiger Lake (2020) OpenSSL 113314 119132 116048 111383 369181
lib25519 28303 86103 61087 29193 32873 114671 35021
lib25519+exp 26534 64591 21647 27423 31078 107330 32849
lib25519+s2n+exp 26582 64634 21657 27419 31072 107951 32682
lib25519+s2n 28499 86021 62111 29107 32774 111938 35388
s2n-bignum 26474 83168
Zen 2 (2019) OpenSSL 127047 118791 129676 121302 395245
lib25519 27664 109306 74116 28683 31853 128656 38028
lib25519+exp 27645 101031 73809 28456 31584 129403 37934
lib25519+s2n+exp 27592 93340 73833 28334 31676 127228 38191
lib25519+s2n 27624 109307 74457 28410 31608 128845 38363
s2n-bignum 27058 92075
Ares (2019) OpenSSL 124704 469056 210912 181248 630432
lib25519 80550 246336 248292 81600 85572 285540 82479
lib25519+exp 80526 245454 272732 81456 85506 280002 81794
lib25519+s2n+exp 80418 95616 95627 81432 85956 281484 82900
lib25519+s2n 80688 95616 95670 81240 85902 282276 82598
s2n-bignum 115392 254976
Goldmont (2016) OpenSSL 247078 273628 258924 228182 753852
lib25519 93747 281776 295259 96235 106167 338370 96798
lib25519+exp 93640 282472 282975 96694 106438 347507 97205
lib25519+s2n+exp 93581 255341 258170 96235 106085 343949 97197
lib25519+s2n 93623 255308 257031 96114 106224 341928 96369
s2n-bignum 77436 255312
Cortex-A72 (2016) OpenSSL 156925 424557 163459 134998 425152
lib25519 106344 330111 330312 107879 114955 389349 116928
lib25519+exp 106307 329851 330943 107802 114915 384273 116616
lib25519+s2n+exp 107041 136513 136610 108536 115674 389278 116234
lib25519+s2n 107376 136513 136653 108857 116103 389088 117090
s2n-bignum 67271 136516
Skylake (2015) OpenSSL 130113 118411 133656 125076 410342
lib25519 29774 87971 62755 30550 34193 116991 38727
lib25519+exp 27729 83396 62311 28469 32212 104229 34226
lib25519+s2n+exp 27835 83311 62409 28581 32040 105749 33645
lib25519+s2n 29692 88037 62758 30465 34140 115452 38353
s2n-bignum 28806 84561
Airmont (2015) OpenSSL 294239 619002 307282 276812 853664
lib25519 143556 449573 449669 147077 162570 542220 155193
lib25519+exp 143690 449577 449759 147559 163466 543578 157011
lib25519+s2n+exp 143577 431947 432389 147515 163011 535507 154742
lib25519+s2n 143574 432101 432428 147600 163312 548012 154217
s2n-bignum 116864 432414
Broadwell (2014) OpenSSL 160005 121255 164427 120150 392515
lib25519 31489 93339 75648 33817 36660 121583 41126
lib25519+exp 29045 84991 73245 29855 33706 107476 34567
lib25519+s2n+exp 28952 84915 72056 29741 34362 107526 33849
lib25519+s2n 31826 95068 74803 32255 35937 126280 40088
s2n-bignum 31396 87934
Haswell (2013) OpenSSL 129719 163429 133869 126120 409113
lib25519 43627 118326 78662 44597 48406 153211 49929
lib25519+exp 41369 115219 77087 42490 46522 153486 51755
lib25519+s2n+exp 41567 115115 76679 42414 46467 150762 51108
lib25519+s2n 43637 118327 78579 44500 48368 151548 50688
s2n-bignum 45860 160318
Cortex-A53 (2012) OpenSSL 220649 513705 228344 194443 537285
lib25519 149030 463869 464098 151808 160892 520120 154072
lib25519+exp 149449 464134 464208 152091 161586 517634 153442
lib25519+s2n+exp 149814 163680 164640 151726 160924 523501 154787
lib25519+s2n 149992 163661 164625 151849 160395 514915 154407
s2n-bignum 120158 163155
Core 2 (2006) OpenSSL 260681 337177 267882 241408 741945
lib25519 93212 298639 304039 96710 106278 354754 102007
lib25519+exp 93670 298781 299398 97202 106574 355622 102093
lib25519+s2n+exp 93628 262775 262519 96884 106284 354495 102237
lib25519+s2n 93270 262946 262832 96706 106564 349492 103118
s2n-bignum 78529 262932

Microarchitectures are listed in reverse chronological order of when they were introduced. Each library is assigned one foreground color in the table.

In the lib25519 distribution, command/lib25519-speed.c measures lib25519; benchmarks/*-* is the output of lib25519-speed on various machines; speedcomparison/openssl/* has code to measure OpenSSL, and measurements from various machines; speedcomparison/s2n/* has code to measure s2n-bignum, and measurements from various machines; and autogen/md-speed extracts the table from those measurements. OpenSSL benchmarks use version 3.3.2 (2024.09.03); s2n-bignum benchmarks use commit acbb18e6343f12a7944de72c1ec0991739600f8c (2024.03.18).

The table reports only median cycle counts; see the full output files for differences between multiple measurements and the median. The table reports the following major operations:


Version: This is version 2024.09.28 of the "Speed" web page.