Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

FWIW, the C++ random number library is very much not meant for cryptography. This is obvious when you see the weak guarantees given by std::random_device: on Windows, libstdc++ will actually use the Mersenne Twister with a hardcoded seed, and this is standard-compliant! Additionally, every engine included in the library is not cryptographic at all.

The Boost random library actually does the right thing, and states that boost::random_device must not be implemented where a proper source of random bits is not available. The standard tries to be all things to all people, and std::random_device ends up being useless for any serious application.

As a mathematical random number generation library, the C++ library is much superior to its Go counterpart, math/rand.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: