3 ms·
That sounds incorrect, though WASM you have access to webcrypto getrandombytes which is native OS randomness.
by nailer 4y ago
That sounds incorrect, though WASM you have access to webcrypto getrandombytes which is native OS randomness.
- lxgr 4y agoYes, but that wasn't even the problem. Trust Wallet needlessly wrapped `std::random_device` (which might or might not be cryptographically secure by itself, depending on how it's implemented in whatever WASM-generating stack they use) in an instance of `std::mt19937` (which is definitely insecure, whether seeded cryptographically or not, due to being seeded with only 32 bits of entropy in their implementation; but even seeded properly, a Mersenne Twister would eventually leak internal state).