3 ms·
You can use "truly" random numbers for cryptography. /dev/random is not recommended (except for perhaps long-term keys if you're worried about the randomness al
by witty_username 11y ago
You can use "truly" random numbers for cryptography. /dev/random is not recommended (except for perhaps long-term keys if you're worried about the randomness algorithms having a vulnerability), use /dev/urandom.
- atoponce 11y agoThere is no difference between /dev/random and /dev/urandom in the Linux kernel, other than /dev/random blocks when the entropy estimate is low or depleted. Both source them same CSPRNG, which is based on SHA-1. /dev/urandom is absolutely recommended for long-term keys.
- floatboth 11y ago> except for perhaps long-term keys On most systems, urandom and random are the exact same thing. Only Linux does this weird "blocking random" thing, based on some weird estimate of "running out of entropy" which is not an actual thing. (u)random is powered by a CSPRNG which is seeded by "truly random numbers" gathered from multiple hardware sources.