Yarrow and weak cryptographic keys on macOS Given that macOS uses Yarrow as a PRNG, and Yarrow is only capable of 160 bit outputs (/dev/random on macOS is actually Yarrow) are keys generated on macOS weaker than Linux?

Even BSD has switched to Fortuna. 

Is this is big gaping hole in Modern macOS security?

https://en.m.wikipedia.org/wiki/Yarrow_algorithm

EDIT:

I have looked through the source and it seems as if they switched to a DRBG NIST generator?

https://opensource.apple.com/source/xnu/xnu-4903.221.2/osfmk/corecrypto/ccdbrg/src/ccdrbg_nisthmac.c.auto.html

There are very few references to Yarrow in the 10.14 XNU code compared with older versions of the Kernel, but 10.14 still contains this string in key.c :

/* Our PRNG is based on Yarrow and doesn't need to be seeded */
That said if you looked at older XNU Yarrow is littered everywhere.


Source code for XNU:

Lots of Yarrow references in XNU 2782 - macOS 10.11

Very few Yarrow references in XNU 4903 - macOS 10.14

So, are Apple still using Yarrow?





Update: Apple are using Fortuna.
A 160-bit seed is plenty for a cryptographically-secure PRNG. We are not going to be able to count to 2160 any time soon, so there is no need to worry that this is a "gaping hole". While in theory Linux's random driver may have a larger keyspace, it's not going to make a difference in real life. Fortuna does have advantages over Yarrow, but a larger key size is not what's important. What really matters is resistance to side-channel attacks and adequate entropy collection at boot time.

By default, Yarrow-160 actually uses 3DES in counter mode to generate the random output, which gives it approximately 112 bits of security. Fortuna uses any other block cipher in counter mode, but typically 128-bit AES. The Linux randomness driver uses ChaCha20. It starts out with 320 bits of secret material (a 256-bit key and a 64-bit nonce). Each reseed updates the 256-bit key. So yes, Linux has a larger keyspace. No, this doesn't matter in practice. Yarrow, Fortuna, and Linux's CRNG are all secure.