The recent work by longtime kernel developer Andy Lutomirski on improving Linux's random APIs and introducing a new "GRND_INSECURE" option is now queued into the random dev queue ahead of the Linux 5.6 cycle. Learn more: . These changes to the random number generation add a new GRND_INSECURE flag for getentropy() and removes the blocking pool (though /dev/random can still block after the system has booted). These changes provide for some code cleanups and GRND_INSECURE allows returning potentially "insecure" random data. Depending upon the system state, GRND_INSECURE output may not meet the standards for being cryptographically random but is enough for the kernel providing the best random output it can when requested. GRND_INSECURE is sufficient for "best-effort non-cryptographic bytes" when users may not necessarily need strong random output. The link for this article located at Phoronix is no longer available. . New GRND_INSECURE flag introduced in Linux 5.6 enhances random data generation options for users needing less secure outputs.. recent, longtime, kernel, developer, lutomirski, improving, linux', random. . LinuxSecurity.com Team
PHP comes with two random number generators named rand() and mt_rand(). The first is just a wrapper around the libc rand() function and the second one is an implementation of the Mersenne Twister pseudo random number generator. Both of these algorithms are seeded by a single 32 bit dword when they are first used in a process or one of the seeding functions srand() or mt_srand() is called. This is a great article by Stefan Esser on attacking php PRNG. He explains the attack in such a way that it's easy to understand. . The link for this article located at suspekt is no longer available. . Analyzing PHP's inadequate random number generators reveals vulnerabilities and risks of exploitation.. PHP Random Numbers, mt_rand Attack, PRNG Security, PHP Security Risks. . LinuxSecurity.com Team
Get the latest Linux and open source security news straight to your inbox.