문제

I need to use the Microsoft CNG API to generate secure random numbers for cryptography.

Am I supposed to generate all the numbers using this API, or just obtain a seed value for another random generator from it?

Any help appreciated! Thanks.

도움이 되었습니까?

해결책

How many random numbers do you want? There is only a limited amount of entropy in the MS CNG entropy pool. For just a single number/key then it is fine. For multiple keys, then you are better off using the CNG to seed a separate crypto quality PRNG.

There is a description of the MS CNG in section 7.1.3 of RFC 4086

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top