-
Notifications
You must be signed in to change notification settings - Fork 920
Benchmark: add cycle counts for asym ops #9317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🛟 Devin Lifeguard found 1 likely issues in this PR
@SparkiDev |
7ab8522 to
2d1cdaf
Compare
2d1cdaf to
e77246a
Compare
dgarske
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I resolved the merge conflict tested and approve.
JacobBarthelmeh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cycles per byte calculation seems off. What I see on the Linaro node:
./configure --enable-armasm --enable-sp --enable-sp-asm && make
------------------------------------------------------------------------------
wolfSSL version 5.8.2
------------------------------------------------------------------------------
Math: Multi-Precision: Wolf(SP) word-size=64 bits=4096 sp_int.c
Single Precision: ecc 256 384 521 rsa/dh 2048 3072 4096 asm sp_arm64.c
Assembly Speedups: ARMASM ALIGN
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG 85 MiB took 1.048 seconds, 81.094 MiB/s Cycles per byte = 0.01
AES-128-CBC-enc 650 MiB took 1.007 seconds, 645.666 MiB/s Cycles per byte = 0.00
AES-128-CBC-dec 605 MiB took 1.002 seconds, 603.849 MiB/s Cycles per byte = 0.00
AES-192-CBC-enc 570 MiB took 1.006 seconds, 566.793 MiB/s Cycles per byte = 0.00
AES-192-CBC-dec 550 MiB took 1.002 seconds, 548.960 MiB/s Cycles per byte = 0.00
AES-256-CBC-enc 505 MiB took 1.006 seconds, 502.021 MiB/s Cycles per byte = 0.00
AES-256-CBC-dec 495 MiB took 1.008 seconds, 490.868 MiB/s Cycles per byte = 0.00
AES-128-GCM-enc 555 MiB took 1.006 seconds, 551.961 MiB/s Cycles per byte = 0.00
AES-128-GCM-dec 555 MiB took 1.004 seconds, 552.964 MiB/s Cycles per byte = 0.00
AES-192-GCM-enc 515 MiB took 1.005 seconds, 512.671 MiB/s Cycles per byte = 0.00
AES-192-GCM-dec 515 MiB took 1.005 seconds, 512.650 MiB/s Cycles per byte = 0.00
AES-256-GCM-enc 485 MiB took 1.007 seconds, 481.773 MiB/s Cycles per byte = 0.00
AES-256-GCM-dec 485 MiB took 1.008 seconds, 481.231 MiB/s Cycles per byte = 0.00
GMAC Table 4-bit 1012 MiB took 1.000 seconds, 1011.610 MiB/s Cycles per byte = 0.00
CHACHA 260 MiB took 1.010 seconds, 257.478 MiB/s Cycles per byte = 0.00
CHA-POLY 175 MiB took 1.002 seconds, 174.628 MiB/s Cycles per byte = 0.01
POLY1305 530 MiB took 1.006 seconds, 526.602 MiB/s Cycles per byte = 0.00
SHA 110 MiB took 1.032 seconds, 106.555 MiB/s Cycles per byte = 0.01
SHA-224 525 MiB took 1.000 seconds, 524.798 MiB/s Cycles per byte = 0.00
SHA-256 525 MiB took 1.003 seconds, 523.473 MiB/s Cycles per byte = 0.00
SHA-384 125 MiB took 1.022 seconds, 122.336 MiB/s Cycles per byte = 0.01
SHA-512 125 MiB took 1.023 seconds, 122.210 MiB/s Cycles per byte = 0.01
SHA-512/224 125 MiB took 1.022 seconds, 122.290 MiB/s Cycles per byte = 0.01
SHA-512/256 125 MiB took 1.020 seconds, 122.555 MiB/s Cycles per byte = 0.01
SHA3-224 85 MiB took 1.037 seconds, 82.000 MiB/s Cycles per byte = 0.01
SHA3-256 80 MiB took 1.029 seconds, 77.765 MiB/s Cycles per byte = 0.01
SHA3-384 65 MiB took 1.076 seconds, 60.427 MiB/s Cycles per byte = 0.02
SHA3-512 45 MiB took 1.053 seconds, 42.734 MiB/s Cycles per byte = 0.03
HMAC-SHA 110 MiB took 1.035 seconds, 106.322 MiB/s Cycles per byte = 0.01
HMAC-SHA224 525 MiB took 1.006 seconds, 521.686 MiB/s Cycles per byte = 0.00
HMAC-SHA256 530 MiB took 1.005 seconds, 527.105 MiB/s Cycles per byte = 0.00
HMAC-SHA384 125 MiB took 1.021 seconds, 122.440 MiB/s Cycles per byte = 0.01
HMAC-SHA512 125 MiB took 1.021 seconds, 122.459 MiB/s Cycles per byte = 0.01
PBKDF2 30 KiB took 1.001 seconds, 29.855 KiB/s Cycles per byte = 39.25
RSA 2048 public 4300 ops took 1.019 sec, avg 0.237 ms, 4218.856 ops/sec, 1223080 cycles 284.4 Cycles/op
RSA 2048 private 200 ops took 1.747 sec, avg 8.733 ms, 114.508 ops/sec, 2095926 cycles 10479.6 Cycles/op
DH 2048 key gen 232 ops took 1.000 sec, avg 4.311 ms, 231.969 ops/sec, 1200162 cycles 5173.1 Cycles/op
DH 2048 agree 300 ops took 1.292 sec, avg 4.308 ms, 232.117 ops/sec, 1550939 cycles 5169.8 Cycles/op
ECC [ SECP256R1] 256 key gen 7200 ops took 1.006 sec, avg 0.140 ms, 7158.320 ops/sec, 1206986 cycles 167.6 Cycles/op
ECDHE [ SECP256R1] 256 agree 1900 ops took 1.003 sec, avg 0.528 ms, 1894.778 ops/sec, 1203307 cycles 633.3 Cycles/op
ECDSA [ SECP256R1] 256 sign 4800 ops took 1.018 sec, avg 0.212 ms, 4713.935 ops/sec, 1221909 cycles 254.6 Cycles/op
ECDSA [ SECP256R1] 256 verify 1800 ops took 1.011 sec, avg 0.562 ms, 1780.586 ops/sec, 1213084 cycles 673.9 Cycles/op
Benchmark complete
A 0.01 cycle per byte would be blazingly fast.
7e2e00f to
c3b9b32
Compare
|
It just so happens that this was requested in ZD 20619. |
7d96b09 to
b6bd332
Compare
|
Can't get the real frequency so I've put the clock frequency into the header and allowed the setting of actual frequency with -freq for Aarch64 only. |
|
retest this please fipsv2: |
|
I'm still seeing some issue with using -freq. Sent a private note, maybe I am building incorrectly for collecting cycles/byte ? |
f172db7 to
34dc8b2
Compare
Added million of cycles per op information. Getting cycle count for Aarch64 now too.
34dc8b2 to
dc45a6f
Compare
|
retest this please PRB tests aborted |
JacobBarthelmeh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked for me now when setting the -freq argument.
Description
Added million of cycles per op information.
Getting cycle count for Aarch64 now too.
Testing
Inte x64l and Aarch64 emulator.
Checklist