-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: use better source of entropy #2
Comments
Or if performance is a concern, at least throw in a few other cheap entropy sources likely to be more unique per browser in a default, performance-oriented entropy pool and additionally offer swappable entropy pools so that more security conscious applications could choose the WebCrypto one? :) |
No, just default to secure, and leave it at that. Performance shouldn't be a concern, at least not if we only seed it once. |
In case this is helpful for any future onlookers, here's an example of how one might use
I'm curious if anyone finds this approach misguided. My understanding essentially achieves a 128bit seed over the 32bit seed of |
Basing randomness on current time is very low entropy, at most 1000 unique values available per second, shared across all browsers in the world. Birthday paradox says 38 browsers loading the site in the same second have a 50% chance of at least one collision.
Can we please use
WebCrypto.getRandomValues()
for seeding the PRNG?People generally assume two browsers fetching random values at the same time to get different values.
The text was updated successfully, but these errors were encountered: