Tech Community Live: Windows edition
Jun 05 2024, 07:30 AM - 11:30 AM (PDT)
Microsoft Tech Community

How can I access the small buffer of CryptGenRandom?

Copper Contributor

I have a Windows 10 laptop.

One of the main PRNG's in Windows 10 is CryptGenRandom. Niels Ferguson wrote a whitepaper about this function. At the bottom of page 4, it says that  CryptGenRandom uses a small buffer for requests of less than 128 random bytes. When such a request is made, the data is taken out of the buffer rather than newly generated. Once the buffer is empty, it is filled with 128 new random bytes.

I would like to access this buffer. Where can I find it in my memory?

0 Replies