I'm reading a lot about entropy on macOS...
I know it doesn't use Yarrow anymore as per this FIPS 140-02 doc a NIST compliant DRBG.
I read a lot:
https://github.com/briansmith/ring/pull/398 How can I measure (and increase) entropy on Mac OS X? https://stackoverflow.com/questions/5832941/how-good-is-secrandomcopybytes http://serverascode.com/2014/03/04/yarrow.html https://stackoverflow.com/questions/3170500/random-number-generator-dev-random https://stackoverflow.com/questions/42197958/secrandomcopybytes-provider-sha1prng-or-nativeprng-type-in-objc
Even mailed Craig F: https://apple.stackexchange.com/questions/362531/does-macos-still-use-yarrow-as-its-cryptographically-secure-pseudorandom-number
I see that SecRandomCopyBytes
is now effectively using:
While /dev/urandom
uses:
https://opensource.apple.com/source/xnu/xnu-4570.41.2/osfmk/prng/random.c.auto.html
I have much old code using /dev/urandom
, on Catalina is it still valid to use /dev/urandom/
for key material, is it cryptographically secure?
I don't want to port everything to a macOS specific lib.
Even libsodium
seems to use /dev/urandom
, so I guess it's ok?