]> git.ipfire.org Git - thirdparty/linux.git/commit
crypto: rng - Make crypto_stdrng_get_bytes() use normal RNG in non-FIPS mode
authorEric Biggers <ebiggers@kernel.org>
Thu, 26 Mar 2026 00:15:05 +0000 (17:15 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Apr 2026 00:56:12 +0000 (08:56 +0800)
commit65b3c2f6278516397bebcdbf4698bd3102120ca5
treec25d669d4c22db493955adefa15edfc7f6573d90
parentbdd2cc93bfd051f05084115faad35f9b5402a194
crypto: rng - Make crypto_stdrng_get_bytes() use normal RNG in non-FIPS mode

"stdrng" is needed only in "FIPS mode".  Therefore, make
crypto_stdrng_get_bytes() delegate to either the normal Linux RNG or to
"stdrng", depending on the current mode.

This will eliminate the need to built the SP800-90A DRBG and its
dependencies into CRYPTO_FIPS=n kernels.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/rng.c
include/crypto/rng.h