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 unsupported: 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 23914 68409 51758 24748 28210 95452 30420
lib25519+exp 23917 67931 49930 24320 27837 95627 30638
lib25519+s2n+exp 23565 68471 49924 24449 27792 94975 30663
lib25519+s2n 24298 68204 51738 24538 27915 96525 30390
s2n-bignum 24257 75395
Zen 3 (2020) OpenSSL 116119 112550 118697 111383 371930
lib25519 28685 96311 50504 28851 32440 127382 40617
lib25519+exp 25741 72993 47762 26555 29973 113644 35889
lib25519+s2n+exp 25615 73012 47731 26412 29922 114244 36038
lib25519+s2n 28079 96085 71267 28913 32276 126871 40647
s2n-bignum 26238 89699
Tiger Lake (2020) OpenSSL 113314 119132 116048 111383 369181
lib25519 28401 85953 62349 29251 32894 112179 35878
lib25519+exp 26468 64705 21672 27395 31589 109090 32759
lib25519+s2n+exp 26555 64620 21658 27424 31478 108282 33056
lib25519+s2n 28186 85883 60803 28983 32853 114156 35329
s2n-bignum 26474 83168
Zen 2 (2019) OpenSSL 127047 118791 129676 121302 395245
lib25519 27665 107760 74220 28473 31733 127604 37991
lib25519+exp 27718 101005 73841 28568 31949 127591 38142
lib25519+s2n+exp 26449 92446 74184 28539 32042 127768 38007
lib25519+s2n 27647 108855 74127 28455 31751 127741 38208
s2n-bignum 27058 92075
Ares (2019) OpenSSL 124704 469056 210912 181248 630432
lib25519 80796 246594 246302 81672 85248 286386 82363
lib25519+exp 80640 246024 246783 81534 85158 284712 82282
lib25519+s2n+exp 43410 95616 96381 81408 85620 283638 82711
lib25519+s2n 43386 95616 95594 81450 85596 283896 82608
s2n-bignum 115392 254976
Goldmont (2016) OpenSSL 247078 273628 258924 228182 753852
lib25519 93798 281771 284141 96345 106290 340904 96753
lib25519+exp 93581 281769 285958 96064 106090 335658 95987
lib25519+s2n+exp 76428 255309 262507 95938 106071 340408 96728
lib25519+s2n 76448 255298 256944 96410 105941 342036 97016
s2n-bignum 77436 255312
Cortex-A72 (2016) OpenSSL 156925 424557 163459 134998 425152
lib25519 106181 329823 331034 108075 115362 391903 116174
lib25519+exp 106339 329820 330725 108134 115296 388337 117125
lib25519+s2n+exp 66728 136513 136679 109065 116737 392035 115822
lib25519+s2n 66998 136513 136634 109568 115893 387046 116484
s2n-bignum 67271 136516
Skylake (2015) OpenSSL 130113 118411 133656 125076 410342
lib25519 29692 87876 63356 30487 34178 115932 37897
lib25519+exp 27768 82617 62859 28591 32066 102912 34192
lib25519+s2n+exp 27720 82538 62349 28548 31974 103861 33864
lib25519+s2n 29632 91320 63021 30519 34153 116812 37771
s2n-bignum 28806 84561
Airmont (2015) OpenSSL 294239 619002 307282 276812 853664
lib25519 143354 449531 453233 147006 162360 538729 155831
lib25519+exp 143469 449526 449664 147268 162544 545049 155471
lib25519+s2n+exp 115796 432250 432474 147040 162443 540996 155551
lib25519+s2n 115310 431887 432423 147519 162521 534689 154865
s2n-bignum 116864 432414
Broadwell (2014) OpenSSL 160005 121255 164427 120150 392515
lib25519 32283 98703 76275 32446 35978 122367 40335
lib25519+exp 29087 84887 72019 29798 33519 108336 34087
lib25519+s2n+exp 29072 85183 72074 29924 33656 108075 34176
lib25519+s2n 31999 93402 75268 32349 35995 123093 39784
s2n-bignum 31396 87934
Haswell (2013) OpenSSL 129719 163429 133869 126120 409113
lib25519 43651 118295 78589 44625 48554 152655 50027
lib25519+exp 41529 115343 76711 42391 46307 152299 51095
lib25519+s2n+exp 41622 115321 76639 42549 46292 152021 51281
lib25519+s2n 43725 118643 78694 44474 48505 154119 50258
s2n-bignum 45860 160318
Cortex-A53 (2012) OpenSSL 220649 513705 228344 194443 537285
lib25519 150257 464193 462874 152356 161604 514499 154920
lib25519+exp 149390 464490 463997 152091 161371 517547 153988
lib25519+s2n+exp 116303 163712 164737 151835 161198 518829 155405
lib25519+s2n 116449 163004 164667 151644 161403 516001 155364
s2n-bignum 120158 163155
Core 2 (2006) OpenSSL 260681 337177 267882 241408 741945
lib25519 93286 300023 299458 96897 105719 350100 102180
lib25519+exp 93748 300631 299729 97339 106421 353709 102230
lib25519+s2n+exp 70996 262775 262533 97322 106036 355995 103031
lib25519+s2n 71073 262945 262594 96803 105512 346167 102056
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.10.04 of the "Speed" web page.