Page MenuHomeFreeBSD

ossl: Convert CHACHA20 to use new cipher layer
AbandonedPublic

Authored by kd on Sep 24 2021, 11:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 21 2024, 7:04 PM
Unknown Object (File)
Dec 28 2023, 4:30 PM
Unknown Object (File)
Dec 24 2023, 8:23 PM
Unknown Object (File)
Dec 22 2023, 9:27 PM
Unknown Object (File)
Nov 1 2023, 11:48 PM
Unknown Object (File)
Oct 19 2023, 5:51 PM
Unknown Object (File)
Sep 3 2023, 6:36 PM
Unknown Object (File)
Mar 22 2023, 6:11 PM
Subscribers
None

Details

Reviewers
jhb
mw
wma
cem
Summary

This removes some of now duplicated code.
I'm not sure if this should be merged as the patch comes with some performance drawback.
See below for details.

Test Plan

Tested on Intel i5-10500E

Reference:
cryptotest -d ossl -a chacha20 100000 64 128 256 512 1024 1480 65

0.159 sec,  200000 chacha20       crypts,      64 bytes, 80494538 byte/sec,   614.1 Mb/sec
0.168 sec,  200000 chacha20       crypts,     128 bytes, 152291209 byte/sec,  1161.9 Mb/sec
0.182 sec,  200000 chacha20       crypts,     256 bytes, 280840327 byte/sec,  2142.6 Mb/sec
0.184 sec,  200000 chacha20       crypts,     512 bytes, 557312274 byte/sec,  4252.0 Mb/sec
0.224 sec,  200000 chacha20       crypts,    1024 bytes, 912977385 byte/sec,  6965.5 Mb/sec
0.291 sec,  200000 chacha20       crypts,    1480 bytes, 1016899076 byte/sec,  7758.3 Mb/sec
5.718 sec,  200000 chacha20       crypts,   65536 bytes, 2292098057 byte/sec, 17487.3 Mb/sec

This patch:
cryptotest -d ossl -a chacha20 100000 64 128 256 512 1024 1480 65536

0.166 sec,  200000 chacha20       crypts,      64 bytes, 77102396 byte/sec,   588.2 Mb/sec
0.175 sec,  200000 chacha20       crypts,     128 bytes, 145898874 byte/sec,  1113.1 Mb/sec
0.189 sec,  200000 chacha20       crypts,     256 bytes, 270600236 byte/sec,  2064.5 Mb/sec
0.192 sec,  200000 chacha20       crypts,     512 bytes, 532761724 byte/sec,  4064.6 Mb/sec
0.233 sec,  200000 chacha20       crypts,    1024 bytes, 880496655 byte/sec,  6717.7 Mb/sec
0.298 sec,  200000 chacha20       crypts,    1480 bytes, 993952337 byte/sec,  7583.3 Mb/sec
5.707 sec,  200000 chacha20       crypts,   65536 bytes, 2296720473 byte/sec, 17522.6 Mb/sec

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kd requested review of this revision.Sep 24 2021, 11:38 AM
kd created this revision.
kd edited the test plan for this revision. (Show Details)