3 ms·
xorshift128+ has exactly 128 bits of internal state. After collecting a small number of outputs, it is trivial to determine the internal state by constructing a
by Retr0id 2y ago
xorshift128+ has exactly 128 bits of internal state. After collecting a small number of outputs, it is trivial to determine the internal state by constructing and then solving an equation (where the variables are GF(2) elements), regardless of how the "seed" was initialized. Once you have the internal state, you can predict all future outputs with 100% certainty.
This only becomes a problem when people assume this isn't possible (for example, using it to pick lottery numbers) - this is more likely to happen on the server-side than the client-side (and v8 runs on both), but it can be security-relevant in client-only apps too (consider an insecure "password generator" app).
https://en.wikipedia.org/wiki/GF(2) https://en.wikipedia.org/wiki/GF(2)
- Retr0id 2y agoBy the way, the "password generator app" is not a contrived hypothetical, it was actually one of my first ever bug-bounty payouts.