Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/random/hash.c
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Experimental Chacha20-based PRF for Fortuna keystream primitive. For now, | * Experimental Chacha20-based PRF for Fortuna keystream primitive. For now, | ||||
* disabled by default. But we may enable it in the future. | * disabled by default. But we may enable it in the future. | ||||
* | * | ||||
* Benefits include somewhat faster keystream generation compared with | * Benefits include somewhat faster keystream generation compared with | ||||
* unaccelerated AES-ICM. | * unaccelerated AES-ICM. | ||||
*/ | */ | ||||
bool random_chachamode = false; | bool random_chachamode __read_frequently = false; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
SYSCTL_BOOL(_kern_random, OID_AUTO, use_chacha20_cipher, CTLFLAG_RDTUN, | SYSCTL_BOOL(_kern_random, OID_AUTO, use_chacha20_cipher, CTLFLAG_RDTUN, | ||||
&random_chachamode, 0, | &random_chachamode, 0, | ||||
"If non-zero, use the ChaCha20 cipher for randomdev PRF. " | "If non-zero, use the ChaCha20 cipher for randomdev PRF. " | ||||
"If zero, use AES-ICM cipher for randomdev PRF (default)."); | "If zero, use AES-ICM cipher for randomdev PRF (default)."); | ||||
#endif | #endif | ||||
/* Initialise the hash */ | /* Initialise the hash */ | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |