Skip to content

1 min read中文

Where the Entropy for /dev/random and /dev/urandom in WSL Comes From

Traces the entropy behind getrandom, /dev/random, and /dev/urandom in WSL to Windows' BCryptGenRandom rather than to the Linux kernel.

Machine-translated from the Chinese original.

Conclusion: BCryptGenRandom backup

This has already been discussed on GitHub: Does WSL provide decent entropy? backup.

WSL developer @benhillis gave this reply:

@evancox10 - Great question. We use the BCryptGenRandom API in our driver to generate random bytes for the getrandom syscall as well as /dev/random and /dev/urandom.

So the entropy for getrandom, /dev/random, and /dev/urandom in WSL comes from Windows, not from what the Linux kernel collects.

WSL