diff mbox series

crypto: JENT - set default OSR to 3

Message ID 2185508.xKdoZgZVDs@tauon.atsec.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: JENT - set default OSR to 3 | expand

Commit Message

Stephan Mueller Aug. 12, 2024, 6:25 a.m. UTC
The user space Jitter RNG library uses the oversampling rate of 3 which
implies that each time stamp is credited with 1/3 bit of entropy. To
obtain 256 bits of entropy, 768 time stamps need to be sampled. The
increase in OSR is applied based on a report where the Jitter RNG is
used on a system exhibiting a challenging environment to collect
entropy.

This OSR default value is now applied to the Linux kernel version of
the Jitter RNG as well.

The increase in the OSR from 1 to 3 also implies that the Jitter RNG is
now slower by default.

Reported-by: Jeff Barnes <jeffbarnes@microsoft.com>
Signed-off-by: Stephan Mueller <smueller@chronox.com>
---
 crypto/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Aug. 24, 2024, 1:48 p.m. UTC | #1
On Mon, Aug 12, 2024 at 08:25:42AM +0200, Stephan Mueller wrote:
> The user space Jitter RNG library uses the oversampling rate of 3 which
> implies that each time stamp is credited with 1/3 bit of entropy. To
> obtain 256 bits of entropy, 768 time stamps need to be sampled. The
> increase in OSR is applied based on a report where the Jitter RNG is
> used on a system exhibiting a challenging environment to collect
> entropy.
> 
> This OSR default value is now applied to the Linux kernel version of
> the Jitter RNG as well.
> 
> The increase in the OSR from 1 to 3 also implies that the Jitter RNG is
> now slower by default.
> 
> Reported-by: Jeff Barnes <jeffbarnes@microsoft.com>
> Signed-off-by: Stephan Mueller <smueller@chronox.com>
> ---
>  crypto/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 72e2decb8c6a..a779cab668c2 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1305,7 +1305,7 @@  config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
 config CRYPTO_JITTERENTROPY_OSR
 	int "CPU Jitter RNG Oversampling Rate"
 	range 1 15
-	default 1
+	default 3
 	help
 	  The Jitter RNG allows the specification of an oversampling rate (OSR).
 	  The Jitter RNG operation requires a fixed amount of timing