On Fri, Nov 02, 2012 at 03:10:05AM +0200, Lasse Kärkkäinen wrote: > Thank you for your answers, they should be very helpful for someone > who is actually blanking or shredding their disks. However, I am > just genuinely interested on why is no better CSPRNG algorithm used > in the kernel (is it simply because no-one sent a patch or am I > missing something?).
The answer is that the goal of /dev/urandom is not to be a cryptographic random number generator (CRNG); a CRNG relies on the security of the cryptographic primitive for its strength. For example, a CRNG which is based on DES or AES encrypting an incrementing counter using a secret key, is fundamentally reliant on the strength of DES or AES. If DES were to be broken, for example, an attacker would be able to determine secret key and thus predict all future outputs of a DES-based CRNG. The design of the /dev/random and /dev/urandom is to take advantage of the kernel's access to unpredictability from the hardware, and to avoid being "brittle" even in the face of a discovery of a weakness of its cryptographic primitives. Regards, - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/