freebsd-dev/sys/conf
Conrad Meyer fe182ba1d0 aesni(4): Add support for x86 SHA intrinsics
Some x86 class CPUs have accelerated intrinsics for SHA1 and SHA256.
Provide this functionality on CPUs that support it.

This implements CRYPTO_SHA1, CRYPTO_SHA1_HMAC, and CRYPTO_SHA2_256_HMAC.

Correctness: The cryptotest.py suite in tests/sys/opencrypto has been
enhanced to verify SHA1 and SHA256 HMAC using standard NIST test vectors.
The test passes on this driver.  Additionally, jhb's cryptocheck tool has
been used to compare various random inputs against OpenSSL.  This test also
passes.

Rough performance averages on AMD Ryzen 1950X (4kB buffer):
aesni:      SHA1: ~8300 Mb/s    SHA256: ~8000 Mb/s
cryptosoft:       ~1800 Mb/s    SHA256: ~1800 Mb/s

So ~4.4-4.6x speedup depending on algorithm choice.  This is consistent with
the results the Linux folks saw for 4kB buffers.

The driver borrows SHA update code from sys/crypto sha1 and sha256.  The
intrinsic step function comes from Intel under a 3-clause BSDL.[0]  The
intel_sha_extensions_sha<foo>_intrinsic.c files were renamed and lightly
modified (added const, resolved a warning or two; included the sha_sse
header to declare the functions).

[0]: https://software.intel.com/en-us/articles/intel-sha-extensions-implementations

Reviewed by:	jhb
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12452
2017-09-26 23:12:32 +00:00
..
config.mk Revert r319053 due to lack of sence. As pointed out by kib@ opt_global.h 2017-06-04 18:24:41 +00:00
dtb.mk make.conf: Add the possibility to use another DTC 2017-06-17 23:34:53 +00:00
files Miscellaneous fixes and improvements to MMCCAM stack 2017-09-15 19:47:44 +00:00
files.amd64 aesni(4): Add support for x86 SHA intrinsics 2017-09-26 23:12:32 +00:00
files.arm Add ptrace operations to fetch and store VFP registers. 2017-09-14 15:03:43 +00:00
files.arm64 Add support for handling undefined instructions in userspace and the 2017-09-14 17:29:51 +00:00
files.i386 aesni(4): Add support for x86 SHA intrinsics 2017-09-26 23:12:32 +00:00
files.mips
files.powerpc Compile the atomic64 emulation for powerpcspe 2017-07-21 03:48:09 +00:00
files.riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
files.sparc64
kern.mk gcc builds: reenable -Wstrict-overflow for kern.mk 2017-09-14 03:42:41 +00:00
kern.opts.mk Add MK_TESTS to kern.opts.mk to support r31800 2017-05-09 05:03:35 +00:00
kern.post.mk Quote ${MAKE} when passing in env in case it contains spaces. 2017-08-16 17:54:24 +00:00
kern.pre.mk add arm64 objcopy output target for embedfs 2017-07-20 18:22:49 +00:00
kmod_syms_prefix.awk Add the infrastructure to support loading multiple versions of TCP 2017-06-08 20:41:28 +00:00
kmod_syms.awk
kmod.mk Include ARCH_FLAGS in CFLAGS when building modules. 2017-07-19 22:06:35 +00:00
ldscript.amd64 Introduce __read_frequently 2017-09-06 20:32:49 +00:00
ldscript.arm
ldscript.arm64
ldscript.i386 use INT3 instead of NOP for x86 binary padding 2017-03-19 00:22:13 +00:00
ldscript.mips
ldscript.mips.cfe
ldscript.mips.mips64
ldscript.mips.octeon1
ldscript.powerpc
ldscript.powerpc64
ldscript.powerpcspe
ldscript.riscv
ldscript.sparc64
Makefile.amd64
Makefile.arm Always pass the linker emulation via -m when linking modules and kernels. 2017-04-05 03:05:04 +00:00
Makefile.arm64
Makefile.i386
Makefile.mips
Makefile.powerpc
Makefile.riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
Makefile.sparc64
makeLINT.mk
makeLINT.sed
newvers.sh newvers.sh: speed up failing git-svn revision search 2017-09-11 00:14:04 +00:00
NOTES Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. 2017-09-13 03:56:03 +00:00
options Add new compile-time option NVME_USE_NVD that sets the default value 2017-08-28 23:54:25 +00:00
options.amd64
options.arm Remove the MULTIDELAY option from arm. It's now enabled when PLATFORM is 2017-07-07 13:55:11 +00:00
options.arm64 arm64: Add Allwinner H5 SoC 2017-08-02 20:19:19 +00:00
options.i386
options.mips [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
options.powerpc
options.riscv
options.sparc64
systags.sh
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE