Re:Funds of every Trust Wallet browser extension could have ...
by nailer on Monday May 01, 2023 @09:26AM
(#35772501)
That sounds incorrect, though WASM you have access to webcrypto getrandombytes which is native OS randomness.
[ Parent
| on HN ]
Re:Funds of every Trust Wallet browser extension could have ...
by lxgr on Monday May 01, 2023 @04:20PM
(#35778590)
Yes, 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).