From 6f21e073cc4c61705ffacbe641f80640f22e5850 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Wed, 30 Oct 2024 16:26:46 +0800 Subject: [PATCH] update benchmarks --- benchmarks.csv | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ benchmarks.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/benchmarks.csv b/benchmarks.csv index 28be1159..9667498b 100644 --- a/benchmarks.csv +++ b/benchmarks.csv @@ -19,14 +19,26 @@ kyber768 (10 executions),m4fspeed,631912,631599,632459,656455,656155,656969,7055 kyber768 (10 executions),m4fstack,634213,632786,644273,662556,661130,672615,712081,710655,722140 Signature Schemes,,,,,,,,,, Scheme,Implementation,Key Generation [cycles] (mean),Key Generation [cycles] (min),Key Generation [cycles] (max),Sign [cycles] (mean),Sign [cycles] (min),Sign [cycles] (max),Verify [cycles] (mean),Verify [cycles] (min),Verify [cycles] (max) +aimer128f (10 executions),m4speed,490087,490087,490088,28590420,28590395,28590439,26750578,26749771,26751014 +aimer128f (10 executions),m4stack,490082,490082,490083,46470710,46470162,46471507,26743713,26743128,26744143 aimer128f (10 executions),mem_opt,564325,564324,564326,46875341,46874593,46876276,26989249,26988505,26989828 aimer128f (10 executions),ref,564323,564323,564324,28991142,28991115,28991171,26994617,26994234,26994927 +aimer128s (10 executions),m4speed,490085,490085,490086,277353540,277345110,277354485,225136633,225136625,225136640 +aimer128s (10 executions),m4stack,490088,490088,490088,372458535,372458327,372459135,225134323,225134115,225134367 aimer128s (10 executions),mem_opt,564323,564323,564325,374834586,374834473,374834973,227230761,227230441,227230833 +aimer192f (10 executions),m4speed,1192752,1192752,1192753,80106923,80106896,80106945,75084294,75083653,75085373 +aimer192f (10 executions),m4stack,1192753,1192753,1192754,116329912,116328844,116330708,75138063,75137469,75138892 aimer192f (10 executions),mem_opt,1397043,1397043,1397043,117993511,117991579,117995094,76372135,76370763,76373839 aimer192f (10 executions),ref,1397040,1397040,1397041,81884026,81883991,81884035,76458825,76456517,76460984 +aimer192s (10 executions),m4speed,1192756,1192756,1192758,763112898,763110056,763113314,617799254,617799226,617799272 +aimer192s (10 executions),m4stack,1192756,1192756,1192756,904630579,904630192,904631379,617834636,617834607,617834652 aimer192s (10 executions),mem_opt,1397047,1397039,1397079,916637185,916637133,916637425,629249382,629249345,629249415 +aimer256f (10 executions),m4speed,2899948,2899948,2899949,160891483,160891455,160891501,166071755,166068640,166073951 +aimer256f (10 executions),m4stack,2899950,2899947,2899985,228360437,228359438,228362262,166042220,166040702,166043056 aimer256f (10 executions),mem_opt,3344254,3344250,3344255,233973308,233969892,233976707,170620601,170617448,170623743 aimer256f (10 executions),ref,3344258,3344255,3344292,164484408,164483962,164484481,170648722,170647189,170651027 +aimer256s (10 executions),m4speed,2899956,2899949,2899989,1391295720,1391289067,1391297144,1321985344,1321984834,1321985426 +aimer256s (10 executions),m4stack,2899950,2899950,2899950,1712314043,1712314001,1712314175,1322034101,1322034066,1322034132 aimer256s (10 executions),mem_opt,3344262,3344252,3344293,1752719642,1752719422,1752720844,1361337862,1361336718,1361338013 ascon-sign-128f-robust (10 executions),ref,122506162,122506099,122506254,2855797836,2855797243,2855798602,174707763,169973472,179525137 ascon-sign-128f-simple (10 executions),ref,69376878,69376875,69376883,1629111557,1629111334,1629112028,97798317,95509050,98714007 @@ -179,14 +191,26 @@ kyber768,m4fspeed,5396,6468,6452,,,,,, kyber768,m4fstack,2820,2860,2844,,,,,, Signature Schemes,,,,,,,,,, Scheme,Implementation,Key Generation [bytes],Sign [bytes],Verify [bytes],,,,,, +aimer128f,m4speed,8720,123376,15448,,,,,, +aimer128f,m4stack,8720,13864,15440,,,,,, aimer128f,mem_opt,8728,13864,15440,,,,,, aimer128f,ref,8728,123376,15448,,,,,, +aimer128s,m4speed,8720,166204,34624,,,,,, +aimer128s,m4stack,8720,27324,34624,,,,,, aimer128s,mem_opt,8728,27324,34624,,,,,, +aimer192f,m4speed,19184,273104,31608,,,,,, +aimer192f,m4stack,19184,29976,31608,,,,,, aimer192f,mem_opt,19192,29976,31608,,,,,, aimer192f,ref,19192,273104,31608,,,,,, +aimer192s,m4speed,19184,349788,60384,,,,,, +aimer192s,m4stack,19184,43220,60384,,,,,, aimer192s,mem_opt,19192,43220,60384,,,,,, +aimer256f,m4speed,50032,573176,78608,,,,,, +aimer256f,m4stack,50032,77056,78568,,,,,, aimer256f,mem_opt,50040,77164,78568,,,,,, aimer256f,ref,50040,573284,78716,,,,,, +aimer256s,m4speed,50032,615856,116936,,,,,, +aimer256s,m4stack,50032,76032,116936,,,,,, aimer256s,mem_opt,50040,76140,117044,,,,,, ascon-sign-128f-robust,ref,3260,2772,2992,,,,,, ascon-sign-128f-simple,ref,2632,2144,2448,,,,,, @@ -340,14 +364,26 @@ kyber768,m4fspeed,75.4,74.4,69.2,,,,,, kyber768,m4fstack,75.3,73.8,68.7,,,,,, Signature Schemes,,,,,,,,,, Scheme,Implementation,Key Generation [%],Sign [%],Verify [%],,,,,, +aimer128f,m4speed,57.9,49.5,50.1,,,,,, +aimer128f,m4stack,57.9,66.6,50.1,,,,,, aimer128f,mem_opt,50.6,66.1,49.6,,,,,, aimer128f,ref,50.6,48.8,49.6,,,,,, +aimer128s,m4speed,57.9,43.2,50.7,,,,,, +aimer128s,m4stack,57.9,68.3,50.7,,,,,, aimer128s,mem_opt,50.6,67.9,50.2,,,,,, +aimer192f,m4speed,62.3,40.7,41.2,,,,,, +aimer192f,m4stack,62.3,57.2,41.2,,,,,, aimer192f,mem_opt,53.5,56.4,40.5,,,,,, aimer192f,ref,53.5,39.8,40.5,,,,,, +aimer192s,m4speed,62.3,43.4,41.7,,,,,, +aimer192s,m4stack,62.3,58.9,41.7,,,,,, aimer192s,mem_opt,53.5,58.1,40.9,,,,,, +aimer256f,m4speed,67.7,28.6,27.8,,,,,, +aimer256f,m4stack,67.7,41.5,27.8,,,,,, aimer256f,mem_opt,58.9,40.6,27.0,,,,,, aimer256f,ref,58.9,28.0,27.0,,,,,, +aimer256s,m4speed,67.7,32.2,28.0,,,,,, +aimer256s,m4stack,67.7,43.3,28.0,,,,,, aimer256s,mem_opt,58.9,42.4,27.2,,,,,, ascon-sign-128f-robust,ref,0.0,0.0,0.0,,,,,, ascon-sign-128f-simple,ref,0.0,0.0,0.0,,,,,, @@ -500,14 +536,26 @@ kyber768,m4fspeed,15964,0,0,15964,,,,, kyber768,m4fstack,13288,0,0,13288,,,,, Signature Schemes,,,,,,,,,, Scheme,Implementation,.text [bytes],.data [bytes],.bss [bytes],Total [bytes],,,,, +aimer128f,m4speed,15992,0,0,15992,,,,, +aimer128f,m4stack,16392,0,0,16392,,,,, aimer128f,mem_opt,17476,0,0,17476,,,,, aimer128f,ref,17076,0,0,17076,,,,, +aimer128s,m4speed,16764,0,0,16764,,,,, +aimer128s,m4stack,16368,0,0,16368,,,,, aimer128s,mem_opt,17452,0,0,17452,,,,, +aimer192f,m4speed,23528,0,0,23528,,,,, +aimer192f,m4stack,23956,0,0,23956,,,,, aimer192f,mem_opt,25384,0,0,25384,,,,, aimer192f,ref,24956,0,0,24956,,,,, +aimer192s,m4speed,24256,0,0,24256,,,,, +aimer192s,m4stack,23860,0,0,23860,,,,, aimer192s,mem_opt,25288,0,0,25288,,,,, +aimer256f,m4speed,25596,0,0,25596,,,,, +aimer256f,m4stack,26096,0,0,26096,,,,, aimer256f,mem_opt,27804,0,0,27804,,,,, aimer256f,ref,27304,0,0,27304,,,,, +aimer256s,m4speed,26372,0,0,26372,,,,, +aimer256s,m4stack,25928,0,0,25928,,,,, aimer256s,mem_opt,27636,0,0,27636,,,,, ascon-sign-128f-robust,ref,17664,0,0,17664,,,,, ascon-sign-128f-simple,ref,17596,0,0,17596,,,,, diff --git a/benchmarks.md b/benchmarks.md index dfc2106f..ae39b338 100644 --- a/benchmarks.md +++ b/benchmarks.md @@ -21,14 +21,26 @@ ## Signature Schemes | scheme | implementation | key generation [cycles] | sign [cycles] | verify [cycles] | | ------ | -------------- | ----------------------- | ------------- | --------------- | +| aimer128f (10 executions) | m4speed | AVG: 490,087
MIN: 490,087
MAX: 490,088 | AVG: 28,590,420
MIN: 28,590,395
MAX: 28,590,439 | AVG: 26,750,578
MIN: 26,749,771
MAX: 26,751,014 | +| aimer128f (10 executions) | m4stack | AVG: 490,082
MIN: 490,082
MAX: 490,083 | AVG: 46,470,710
MIN: 46,470,162
MAX: 46,471,507 | AVG: 26,743,713
MIN: 26,743,128
MAX: 26,744,143 | | aimer128f (10 executions) | mem_opt | AVG: 564,325
MIN: 564,324
MAX: 564,326 | AVG: 46,875,341
MIN: 46,874,593
MAX: 46,876,276 | AVG: 26,989,249
MIN: 26,988,505
MAX: 26,989,828 | | aimer128f (10 executions) | ref | AVG: 564,323
MIN: 564,323
MAX: 564,324 | AVG: 28,991,142
MIN: 28,991,115
MAX: 28,991,171 | AVG: 26,994,617
MIN: 26,994,234
MAX: 26,994,927 | +| aimer128s (10 executions) | m4speed | AVG: 490,085
MIN: 490,085
MAX: 490,086 | AVG: 277,353,540
MIN: 277,345,110
MAX: 277,354,485 | AVG: 225,136,633
MIN: 225,136,625
MAX: 225,136,640 | +| aimer128s (10 executions) | m4stack | AVG: 490,088
MIN: 490,088
MAX: 490,088 | AVG: 372,458,535
MIN: 372,458,327
MAX: 372,459,135 | AVG: 225,134,323
MIN: 225,134,115
MAX: 225,134,367 | | aimer128s (10 executions) | mem_opt | AVG: 564,323
MIN: 564,323
MAX: 564,325 | AVG: 374,834,586
MIN: 374,834,473
MAX: 374,834,973 | AVG: 227,230,761
MIN: 227,230,441
MAX: 227,230,833 | +| aimer192f (10 executions) | m4speed | AVG: 1,192,752
MIN: 1,192,752
MAX: 1,192,753 | AVG: 80,106,923
MIN: 80,106,896
MAX: 80,106,945 | AVG: 75,084,294
MIN: 75,083,653
MAX: 75,085,373 | +| aimer192f (10 executions) | m4stack | AVG: 1,192,753
MIN: 1,192,753
MAX: 1,192,754 | AVG: 116,329,912
MIN: 116,328,844
MAX: 116,330,708 | AVG: 75,138,063
MIN: 75,137,469
MAX: 75,138,892 | | aimer192f (10 executions) | mem_opt | AVG: 1,397,043
MIN: 1,397,043
MAX: 1,397,043 | AVG: 117,993,511
MIN: 117,991,579
MAX: 117,995,094 | AVG: 76,372,135
MIN: 76,370,763
MAX: 76,373,839 | | aimer192f (10 executions) | ref | AVG: 1,397,040
MIN: 1,397,040
MAX: 1,397,041 | AVG: 81,884,026
MIN: 81,883,991
MAX: 81,884,035 | AVG: 76,458,825
MIN: 76,456,517
MAX: 76,460,984 | +| aimer192s (10 executions) | m4speed | AVG: 1,192,756
MIN: 1,192,756
MAX: 1,192,758 | AVG: 763,112,898
MIN: 763,110,056
MAX: 763,113,314 | AVG: 617,799,254
MIN: 617,799,226
MAX: 617,799,272 | +| aimer192s (10 executions) | m4stack | AVG: 1,192,756
MIN: 1,192,756
MAX: 1,192,756 | AVG: 904,630,579
MIN: 904,630,192
MAX: 904,631,379 | AVG: 617,834,636
MIN: 617,834,607
MAX: 617,834,652 | | aimer192s (10 executions) | mem_opt | AVG: 1,397,047
MIN: 1,397,039
MAX: 1,397,079 | AVG: 916,637,185
MIN: 916,637,133
MAX: 916,637,425 | AVG: 629,249,382
MIN: 629,249,345
MAX: 629,249,415 | +| aimer256f (10 executions) | m4speed | AVG: 2,899,948
MIN: 2,899,948
MAX: 2,899,949 | AVG: 160,891,483
MIN: 160,891,455
MAX: 160,891,501 | AVG: 166,071,755
MIN: 166,068,640
MAX: 166,073,951 | +| aimer256f (10 executions) | m4stack | AVG: 2,899,950
MIN: 2,899,947
MAX: 2,899,985 | AVG: 228,360,437
MIN: 228,359,438
MAX: 228,362,262 | AVG: 166,042,220
MIN: 166,040,702
MAX: 166,043,056 | | aimer256f (10 executions) | mem_opt | AVG: 3,344,254
MIN: 3,344,250
MAX: 3,344,255 | AVG: 233,973,308
MIN: 233,969,892
MAX: 233,976,707 | AVG: 170,620,601
MIN: 170,617,448
MAX: 170,623,743 | | aimer256f (10 executions) | ref | AVG: 3,344,258
MIN: 3,344,255
MAX: 3,344,292 | AVG: 164,484,408
MIN: 164,483,962
MAX: 164,484,481 | AVG: 170,648,722
MIN: 170,647,189
MAX: 170,651,027 | +| aimer256s (10 executions) | m4speed | AVG: 2,899,956
MIN: 2,899,949
MAX: 2,899,989 | AVG: 1,391,295,720
MIN: 1,391,289,067
MAX: 1,391,297,144 | AVG: 1,321,985,344
MIN: 1,321,984,834
MAX: 1,321,985,426 | +| aimer256s (10 executions) | m4stack | AVG: 2,899,950
MIN: 2,899,950
MAX: 2,899,950 | AVG: 1,712,314,043
MIN: 1,712,314,001
MAX: 1,712,314,175 | AVG: 1,322,034,101
MIN: 1,322,034,066
MAX: 1,322,034,132 | | aimer256s (10 executions) | mem_opt | AVG: 3,344,262
MIN: 3,344,252
MAX: 3,344,293 | AVG: 1,752,719,642
MIN: 1,752,719,422
MAX: 1,752,720,844 | AVG: 1,361,337,862
MIN: 1,361,336,718
MAX: 1,361,338,013 | | ascon-sign-128f-robust (10 executions) | ref | AVG: 122,506,162
MIN: 122,506,099
MAX: 122,506,254 | AVG: 2,855,797,836
MIN: 2,855,797,243
MAX: 2,855,798,602 | AVG: 174,707,763
MIN: 169,973,472
MAX: 179,525,137 | | ascon-sign-128f-simple (10 executions) | ref | AVG: 69,376,878
MIN: 69,376,875
MAX: 69,376,883 | AVG: 1,629,111,557
MIN: 1,629,111,334
MAX: 1,629,112,028 | AVG: 97,798,317
MIN: 95,509,050
MAX: 98,714,007 | @@ -183,14 +195,26 @@ ## Signature Schemes | Scheme | Implementation | Key Generation [bytes] | Sign [bytes] | Verify [bytes] | | ------ | -------------- | ---------------------- | ------------ | -------------- | +| aimer128f | m4speed | 8,720 | 123,376 | 15,448 | +| aimer128f | m4stack | 8,720 | 13,864 | 15,440 | | aimer128f | mem_opt | 8,728 | 13,864 | 15,440 | | aimer128f | ref | 8,728 | 123,376 | 15,448 | +| aimer128s | m4speed | 8,720 | 166,204 | 34,624 | +| aimer128s | m4stack | 8,720 | 27,324 | 34,624 | | aimer128s | mem_opt | 8,728 | 27,324 | 34,624 | +| aimer192f | m4speed | 19,184 | 273,104 | 31,608 | +| aimer192f | m4stack | 19,184 | 29,976 | 31,608 | | aimer192f | mem_opt | 19,192 | 29,976 | 31,608 | | aimer192f | ref | 19,192 | 273,104 | 31,608 | +| aimer192s | m4speed | 19,184 | 349,788 | 60,384 | +| aimer192s | m4stack | 19,184 | 43,220 | 60,384 | | aimer192s | mem_opt | 19,192 | 43,220 | 60,384 | +| aimer256f | m4speed | 50,032 | 573,176 | 78,608 | +| aimer256f | m4stack | 50,032 | 77,056 | 78,568 | | aimer256f | mem_opt | 50,040 | 77,164 | 78,568 | | aimer256f | ref | 50,040 | 573,284 | 78,716 | +| aimer256s | m4speed | 50,032 | 615,856 | 116,936 | +| aimer256s | m4stack | 50,032 | 76,032 | 116,936 | | aimer256s | mem_opt | 50,040 | 76,140 | 117,044 | | ascon-sign-128f-robust | ref | 3,260 | 2,772 | 2,992 | | ascon-sign-128f-simple | ref | 2,632 | 2,144 | 2,448 | @@ -346,14 +370,26 @@ ## Signature Schemes | Scheme | Implementation | Key Generation [%] | Sign [%] | Verify [%] | | ------ | -------------- | ------------------ | -------- | ---------- | +| aimer128f | m4speed | 57.9% | 49.5% | 50.1% | +| aimer128f | m4stack | 57.9% | 66.6% | 50.1% | | aimer128f | mem_opt | 50.6% | 66.1% | 49.6% | | aimer128f | ref | 50.6% | 48.8% | 49.6% | +| aimer128s | m4speed | 57.9% | 43.2% | 50.7% | +| aimer128s | m4stack | 57.9% | 68.3% | 50.7% | | aimer128s | mem_opt | 50.6% | 67.9% | 50.2% | +| aimer192f | m4speed | 62.3% | 40.7% | 41.2% | +| aimer192f | m4stack | 62.3% | 57.2% | 41.2% | | aimer192f | mem_opt | 53.5% | 56.4% | 40.5% | | aimer192f | ref | 53.5% | 39.8% | 40.5% | +| aimer192s | m4speed | 62.3% | 43.4% | 41.7% | +| aimer192s | m4stack | 62.3% | 58.9% | 41.7% | | aimer192s | mem_opt | 53.5% | 58.1% | 40.9% | +| aimer256f | m4speed | 67.7% | 28.6% | 27.8% | +| aimer256f | m4stack | 67.7% | 41.5% | 27.8% | | aimer256f | mem_opt | 58.9% | 40.6% | 27.0% | | aimer256f | ref | 58.9% | 28.0% | 27.0% | +| aimer256s | m4speed | 67.7% | 32.2% | 28.0% | +| aimer256s | m4stack | 67.7% | 43.3% | 28.0% | | aimer256s | mem_opt | 58.9% | 42.4% | 27.2% | | ascon-sign-128f-robust | ref | 0.0% | 0.0% | 0.0% | | ascon-sign-128f-simple | ref | 0.0% | 0.0% | 0.0% | @@ -508,14 +544,26 @@ ## Signature Schemes | Scheme | Implementation | .text [bytes] | .data [bytes] | .bss [bytes] | Total [bytes] | | ------ | -------------- | ------------- | ------------- | ------------ | ------------- | +| aimer128f | m4speed | 15,992 | 0 | 0 | 15,992 | +| aimer128f | m4stack | 16,392 | 0 | 0 | 16,392 | | aimer128f | mem_opt | 17,476 | 0 | 0 | 17,476 | | aimer128f | ref | 17,076 | 0 | 0 | 17,076 | +| aimer128s | m4speed | 16,764 | 0 | 0 | 16,764 | +| aimer128s | m4stack | 16,368 | 0 | 0 | 16,368 | | aimer128s | mem_opt | 17,452 | 0 | 0 | 17,452 | +| aimer192f | m4speed | 23,528 | 0 | 0 | 23,528 | +| aimer192f | m4stack | 23,956 | 0 | 0 | 23,956 | | aimer192f | mem_opt | 25,384 | 0 | 0 | 25,384 | | aimer192f | ref | 24,956 | 0 | 0 | 24,956 | +| aimer192s | m4speed | 24,256 | 0 | 0 | 24,256 | +| aimer192s | m4stack | 23,860 | 0 | 0 | 23,860 | | aimer192s | mem_opt | 25,288 | 0 | 0 | 25,288 | +| aimer256f | m4speed | 25,596 | 0 | 0 | 25,596 | +| aimer256f | m4stack | 26,096 | 0 | 0 | 26,096 | | aimer256f | mem_opt | 27,804 | 0 | 0 | 27,804 | | aimer256f | ref | 27,304 | 0 | 0 | 27,304 | +| aimer256s | m4speed | 26,372 | 0 | 0 | 26,372 | +| aimer256s | m4stack | 25,928 | 0 | 0 | 25,928 | | aimer256s | mem_opt | 27,636 | 0 | 0 | 27,636 | | ascon-sign-128f-robust | ref | 17,664 | 0 | 0 | 17,664 | | ascon-sign-128f-simple | ref | 17,596 | 0 | 0 | 17,596 |