Skip to content

Commit

Permalink
crypto: jitterentropy - Hide esoteric Kconfig options under FIPS and …
Browse files Browse the repository at this point in the history
…EXPERT

As JITTERENTROPY is selected by default if you enable the CRYPTO
API, any Kconfig options added there will show up for every single
user.  Hide the esoteric options under EXPERT as well as FIPS so
that only distro makers will see them.

Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Reviewed-by: Stephan Mueller <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Nov 7, 2023
1 parent a312e07 commit e7ed647
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,12 @@ config CRYPTO_JITTERENTROPY

See https://www.chronox.de/jent.html

if CRYPTO_JITTERENTROPY
if CRYPTO_FIPS && EXPERT

choice
prompt "CPU Jitter RNG Memory Size"
default CRYPTO_JITTERENTROPY_MEMSIZE_2
depends on CRYPTO_JITTERENTROPY
help
The Jitter RNG measures the execution time of memory accesses.
Multiple consecutive memory accesses are performed. If the memory
Expand Down Expand Up @@ -1344,7 +1346,6 @@ config CRYPTO_JITTERENTROPY_OSR
int "CPU Jitter RNG Oversampling Rate"
range 1 15
default 1
depends on CRYPTO_JITTERENTROPY
help
The Jitter RNG allows the specification of an oversampling rate (OSR).
The Jitter RNG operation requires a fixed amount of timing
Expand All @@ -1359,7 +1360,6 @@ config CRYPTO_JITTERENTROPY_OSR

config CRYPTO_JITTERENTROPY_TESTINTERFACE
bool "CPU Jitter RNG Test Interface"
depends on CRYPTO_JITTERENTROPY
help
The test interface allows a privileged process to capture
the raw unconditioned high resolution time stamp noise that
Expand All @@ -1377,6 +1377,28 @@ config CRYPTO_JITTERENTROPY_TESTINTERFACE

If unsure, select N.

endif # if CRYPTO_FIPS && EXPERT

if !(CRYPTO_FIPS && EXPERT)

config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
int
default 64

config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
int
default 32

config CRYPTO_JITTERENTROPY_OSR
int
default 1

config CRYPTO_JITTERENTROPY_TESTINTERFACE
bool

endif # if !(CRYPTO_FIPS && EXPERT)
endif # if CRYPTO_JITTERENTROPY

config CRYPTO_KDF800108_CTR
tristate
select CRYPTO_HMAC
Expand Down

0 comments on commit e7ed647

Please sign in to comment.