One of our products is currently using the CryptGenRandom API for random number generation. Recently, I came across the Cryptography API: Next Generation (CNG) that provides a new API BCryptGenRandom (in bcrypt.h) for the same. As per the description provided in MSDN - both APIs comply with the NIST SP800-90 standard in Windows Vista with Service Pack 1 (SP1) and later.
- If I go with the default Microsoft provider, is there any difference in the random number generation process between the two APIs?
- If there isn't any difference, should I move to the CNG API because CNG is the long-term replacement for the CryptoAPI?