As far as you know, there is a Fortuna RNG implementation that is part of the Linux…
- User
As far as you know, there is a Fortuna RNG implementation that is part of the Linux kernel implementation, like in /dev/random?
- Assistant
As of my last update in October 2023, the Linux kernel's random number generator, also known as the random subsystem, does not specifically use the Fortuna algorithm. Instead, it traditionally relied on a combination of the /dev/random and /dev/urandom interfaces to provide random numbers.
The Linux random number subsystem had historically utilized a pool of entropy collected from various sources, such as keyboard timings and mouse movements, to generate random numbers. In recent years, significant improvements have been made to the random number generator to enhance its security and performance, largely influenced by the ChaCha20 cipher and other cryptographic techniques.
While Fortuna is a well-regarded cryptographic algorithm for pseudorandom number generation, known for its sound design and security properties, the Linux kernel's RNG opted for different designs. In particular, after Linux kernel 5.6, the /dev/random and /dev/urandom interfaces have been unified in terms of their output behavior, focusing on simpler, more efficient cryptographic constructions instead of relying on complex entropy pool management strategies.
- User
Yes, but both /dev/random and /dev/urandom uses an underlying ChaCha20 cipher, or am I wrong?
- Assistant
Yes, you are correct. As of recent updates to the Linux kernel, the random number generator subsystem uses the ChaCha20 cipher as part of its mechanism. The transition to using ChaCha20 helps in achieving both efficient performance and strong cryptographic security.
In particular, since Linux kernel version 5.6, the generator for both
/dev/randomand/dev/urandomhas been unified, making them behave identically in terms of output while generating random data. The kernel uses a cryptographic random number generator that is based on ChaCha20, which has become a preferred choice due to its speed and security properties.This shift means that the kernel can provide high-quality randomness without the same concerns about entropy depletion that were more relevant with older implementations. This change also simplified the behavior and expectations around
/dev/randomand/dev/urandom, as both now use the same underlying cryptographic mechanism. - User
Do you know a project from Jean-Luc Cooke about improve /dev/random within a Fortuna-like RNG?
- Assistant
Yes, there was a proposal by Jean-Luc Cooke to improve the Linux kernel's
/dev/randomimplementation with ideas inspired by the Fortuna random number generator. Fortuna is a cryptographically secure pseudorandom number generator designed by Bruce Schneier and Niels Ferguson, which addresses some of the perceived weaknesses in earlier random number generator designs.Jean-Luc Cooke's work focused on improving the entropy management and the overall robustness of the Linux random number generator by incorporating a design similar to Fortuna's, which features multiple entropy pools and periodic reseeding to enhance security. This approach aimed to make the generator more resilient to certain types of attacks and to provide more reliable randomness even in low-entropy environments.
However, integrating such significant changes into the Linux kernel's random number generator is a complex task involving considerations for backward compatibility, security, and performance. While the actual adoption of all Fortuna-like characteristics didn't occur, the proposal contributed to the discussion and influenced broader efforts to strengthen the randomness provided by the Linux kernel.