freebsd-dev/tests/sys
Conrad Meyer 844d9543dc Add ccp(4): experimental driver for AMD Crypto Co-Processor
* Registers TRNG source for random(4)
* Finds available queues, LSBs; allocates static objects
* Allocates a shared MSI-X for all queues.  The hardware does not have
  separate interrupts per queue.  Working interrupt mode driver.
* Computes SHA hashes, HMAC.  Passes cryptotest.py, cryptocheck tests.
* Does AES-CBC, CTR mode, and XTS.  cryptotest.py and cryptocheck pass.
* Support for "authenc" (AES + HMAC).  (SHA1 seems to result in
  "unaligned" cleartext inputs from cryptocheck -- which the engine
  cannot handle.  SHA2 seems to work fine.)
* GCM passes for block-multiple AAD, input lengths

Largely based on ccr(4), part of cxgbe(4).

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

As you can see, performance is poor in comparison to aesni(4) and even
cryptosoft (due to high setup cost).  At a larger buffer size (128kB),
throughput is a little better (but still worse than aesni(4)):

aesni:      SHA1:~10400 Mb/s    SHA256: ~9950 Mb/s
ccp:              ~2200 Mb/s    SHA256: ~2600 Mb/s  SHA512: ~3800 Mb/s
cryptosoft:       ~1750 Mb/s    SHA256: ~1800 Mb/s  SHA512: ~2700 Mb/s

AES performance has a similar story:

aesni:      4kB: ~11250 Mb/s    128kB: ~11250 Mb/s
ccp:               ~350 Mb/s    128kB:  ~4600 Mb/s
cryptosoft:       ~1750 Mb/s    128kB:  ~1700 Mb/s

This driver is EXPERIMENTAL.  You should verify cryptographic results on
typical and corner case inputs from your application against a known- good
implementation.

Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12723
2018-01-18 22:01:30 +00:00
..
acl Make test scripts under tests/... non-executable 2017-08-08 04:59:16 +00:00
aio Fix build on arm after r325817 2017-11-14 21:11:55 +00:00
fifo other: Fix several typos and minor errors 2017-12-27 03:23:58 +00:00
file DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fs DIRDEPS_BUILD: Connect new directories. 2017-10-31 00:04:07 +00:00
geom gnop(8): add the ability to set a nop provider's physical path 2018-01-18 05:57:10 +00:00
kern other: Fix several typos and minor errors 2017-12-27 03:23:58 +00:00
kqueue DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mqueue DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
netinet DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
netipsec tests: ipsec: Don't load/unload aesni.ko in the test header 2017-12-03 18:35:07 +00:00
netpfil pf tests: Fix pft_ping.py to work with scapy 2.3.3 2018-01-09 19:02:42 +00:00
opencrypto Add ccp(4): experimental driver for AMD Crypto Co-Processor 2018-01-18 22:01:30 +00:00
pjdfstest DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
posixshm DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sys DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
vfs vfs_lookup: Allow PATH_MAX-1 symlinks 2017-11-17 19:25:39 +00:00
vm DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
Makefile Add IPSec tests in tunnel mode 2017-12-03 13:52:35 +00:00
Makefile.depend DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
Makefile.inc Use MK_CHECK_USE_SANDBOX in tests/..., to deal with the fact that 2017-08-02 22:24:08 +00:00