ab69c4858c
Chacha20 with a 256 bit key and 128 bit counter size is a good match for an AES256-ICM replacement. In userspace, Chacha20 is typically marginally slower than AES-ICM on machines with AESNI intrinsics, but typically much faster than AES on machines without special intrinsics. ChaCha20 does well on typical modern architectures with SIMD instructions, which includes most types of machines FreeBSD runs on. In the kernel, we can't (or don't) make use of AESNI intrinsics for random(4) anyway. So even on amd64, using Chacha provides a modest performance improvement in random device throughput today. This change makes the stream cipher used by random(4) configurable at boot time with the 'kern.random.use_chacha20_cipher' tunable. Very rough, non-scientific measurements at the /dev/random device, on a GENERIC-NODEBUG amd64 VM with 'pv', show a factor of 2.2x higher throughput for Chacha20 over the existing AES-ICM mode. Reviewed by: delphij, markm Approved by: secteam (delphij) Differential Revision: https://reviews.freebsd.org/D19475 |
||
---|---|---|
.. | ||
build.sh | ||
darn.c | ||
fortuna.c | ||
fortuna.h | ||
hash.c | ||
hash.h | ||
ivy.c | ||
nehemiah.c | ||
other_algorithm.c | ||
other_algorithm.h | ||
random_harvestq.c | ||
random_harvestq.h | ||
random_infra.c | ||
randomdev.c | ||
randomdev.h | ||
uint128.h | ||
unit_test.c | ||
unit_test.h |