Add entropy pool and strong random number generator

Entropy pool gathers environmental noise from device drivers, user-space, etc., and returns good random numbers, suitable for cryptographic use. Based on entropy pool design from *BSDs and uses BLAKE2Xs algorithm for CSPRNG output.

Patch also adds /dev/urandom support for using entropy pool RNG and new 'getrandom' system call for getting randomness without file-descriptor usage (thus avoiding file-descriptor exhaustion attacks). The 'getrandom' interface is similar as 'getentropy' and 'getrandom' available on OpenBSD and Linux respectively.
This commit is contained in:
Jussi Kivilinna
2017-03-30 07:38:37 -06:00
committed by Gregory Nutt
parent 21545ab643
commit dffb8a67e3
50 changed files with 2005 additions and 9 deletions
+21
View File
@@ -2015,6 +2015,27 @@ config BOARD_RESET_ON_CRASH
If selected the board_crashdump should reset the machine after
saveing the state of the machine
config BOARD_ENTROPY_POOL
bool "Enable Board level storing of entropy pool structure"
default n
depends on CRYPTO_RANDOM_POOL
---help---
Entropy pool structure can be provided by board source.
Use for this is, for example, to allocate entropy pool
from special area of RAM which content is kept over
system reset.
config BOARD_INITRNGSEED
bool "Enable Board level initial seeding of entropy pool RNG"
default n
depends on CRYPTO_RANDOM_POOL
---help---
If enabled, entropy pool random number generator will call
board_init_rndseed() upon initialization. This function
can then provide early entropy seed to the pool through
entropy injection APIs provided at 'nuttx/random.h'.
#endif
config LIB_BOARDCTL
bool "Enable boardctl() interface"
default n