Skip to content

Commit 4e4ed83

Browse files
nhormanherbertx
authored andcommitted
crypto: fips - Depend on ansi_cprng
What about something like this? It defaults the CPRNG to m and makes FIPS dependent on the CPRNG. That way you get a module build by default, but you can change it to y manually during config and still satisfy the dependency, and if you select N it disables FIPS as well. I rather like that better than making FIPS a tristate. I just tested it out here and it seems to work well. Let me know what you think Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 63b5ac2 commit 4e4ed83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crypto/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ comment "Crypto core or helper"
2323

2424
config CRYPTO_FIPS
2525
bool "FIPS 200 compliance"
26+
depends on CRYPTO_ANSI_CPRNG
2627
help
2728
This options enables the fips boot option which is
2829
required if you want to system to operate in a FIPS 200
2930
certification. You should say no unless you know what
30-
this is.
31+
this is. Note that CRYPTO_ANSI_CPRNG is requred if this
32+
option is selected
3133

3234
config CRYPTO_ALGAPI
3335
tristate
@@ -787,12 +789,14 @@ comment "Random Number Generation"
787789

788790
config CRYPTO_ANSI_CPRNG
789791
tristate "Pseudo Random Number Generation for Cryptographic modules"
792+
default m
790793
select CRYPTO_AES
791794
select CRYPTO_RNG
792795
help
793796
This option enables the generic pseudo random number generator
794797
for cryptographic modules. Uses the Algorithm specified in
795-
ANSI X9.31 A.2.4
798+
ANSI X9.31 A.2.4. Not this option must be enabled if CRYPTO_FIPS
799+
is selected
796800

797801
source "drivers/crypto/Kconfig"
798802

0 commit comments

Comments
 (0)