-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
randomBytes is not random enough #7
Comments
This repository provides just the latest version as a modularized port of https://code.google.com/p/crypto-js/ project. You should report this issue directly to this project. The project owner is Jeff.Mott.OR, I also found a github user @Jeff-Mott-OR, but I'm not sure whether he is the same guy. But 6 months ago he did some activity on his repository CryptoJS, but this repository doesn't exists anymore. |
@daviddahl you can implement more sophisticated entropy, randomized seeds. Javascript wasn't designed for cryptography, so you'd have to implement a stronger generator. For instance, try seeding a curve-based generator and re-seed it per round, then fallback, switch to another generator, etc. it gets better with more entropy. Here's a custom generator using Donald Knuth's linear congruential pseudo-random number generator (described in Art of Computer Programming - Volume 2: Seminumerical Algorithms, section 3.2.1):
I added the |
Please create a pull request with your fix on the Is there somebody up to review it? |
Done in 3.2.1-4, special thanks to @KenanSulayman |
@KenanSulayman |
https://github.com/evanvosberg/crypto-js/blob/59e465a8055946e84099bfaa8d9ce0e1d1371f51/src/core.js#L274-L281
This is not generating sufficiently random bytes. Math.random was never intended for use in cryptographic applications.
see:
https://code.google.com/p/chromium/issues/detail?id=246054
The text was updated successfully, but these errors were encountered: