freebsd-dev/sys/crypto
Andrew Turner 69d8dc20be Use arm64 sha256 intrinsics in libmd
Summary:
When running on a CPU that supports the arm64 sha256 intrinsics use them
to improve perfromance of sha256 calculations.

With this changethe following improvement has been seen on an Apple M1
with FreeBS running under Parallels, with similar results on a
Neoverse-N1 r3p1.

x sha256.orig
+ sha256.arm64
+--------------------------------------------------------------------+
|++                                                               x x|
|+++                                                              xxx|
||A                                                               |A||
+--------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5          3.41           3.5          3.46         3.458   0.042661458
+   5          0.47          0.54           0.5         0.504   0.027018512
Difference at 95.0% confidence
        -2.954 +/- 0.0520768
        -85.4251% +/- 0.826831%
        (Student's t, pooled s = 0.0357071)

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31284
2021-08-11 10:20:48 +00:00
..
aesni aesni: Ensure that key schedules are aligned 2021-01-18 17:07:56 -05:00
armv8 Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
blake2 crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
camellia
ccp crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
chacha20 crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
des Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
libsodium Bring in compatibility glue for libsodium 2018-08-17 00:27:56 +00:00
openssl ossl: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
rc4
rijndael Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
sha2 Use arm64 sha256 intrinsics in libmd 2021-08-11 10:20:48 +00:00
siphash
skein Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
via crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
intake.h Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
sha1.c Replace some K&R function definitions with ANSI C. 2020-11-03 22:32:30 +00:00
sha1.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00