|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch optimizes SHA1 compress function for arm64 architecture by
taking advantage of SHA-1 instructions of Armv8 crypto extension.
The SHA-1 instructions:
SHA1C: SHA1 hash update (choose)
SHA1H: SHA1 fixed rotate
SHA1M: SHA1 hash update (majority)
SHA1P: SHA1 hash update (parity)
SHA1SU0: SHA1 schedule update 0
SHA1SU1: SHA1 schedule update 1
Benchmark on gcc117 instance of CFarm before applying the patch:
Algorithm mode Mbyte/s
sha1 update 214.16
openssl sha1 update 849.44
hmac-sha1 64 bytes 61.69
hmac-sha1 256 bytes 131.50
hmac-sha1 1024 bytes 185.20
hmac-sha1 4096 bytes 204.55
hmac-sha1 single msg 210.97
Benchmark on gcc117 instance of CFarm after applying the patch:
Algorithm mode Mbyte/s
sha1 update 800.80
openssl sha1 update 849.17
hmac-sha1 64 bytes 166.10
hmac-sha1 256 bytes 409.24
hmac-sha1 1024 bytes 636.98
hmac-sha1 4096 bytes 739.20
hmac-sha1 single msg 775.67
|