3 ms·
They spend a lot of time telling you std::random_device::entropy() is useless, but I don't see anywhere that it says std::random_device itself is bad. The poin
by mark-r 6y ago
They spend a lot of time telling you std::random_device::entropy() is useless, but I don't see anywhere that it says std::random_device itself is bad. The point of my link was to show that random_device itself is unreliable, even if you use it correctly. It doesn't always work as advertised.
- loeg 6y agoI read this part as describing that flaw: > The problem is that std::random_device is poorly specified, and inscrutable. > In theory, it should serve as an abstraction over some external source of entropy. In practice, an implementation is allowed to use any deterministic random number engine to implement it, e.g. a Mersenne twister, and there is no way to find out. There is a member function std::random_device::entropy(), which is in theory there to detect such case, but it does not work in practice. They go on to discuss ::entropy()'s flaws after that.