Skip to content
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

The random function may be a vulnerability #12

Open
lnkyan opened this issue Mar 27, 2019 · 0 comments
Open

The random function may be a vulnerability #12

lnkyan opened this issue Mar 27, 2019 · 0 comments

Comments

@lnkyan
Copy link

lnkyan commented Mar 27, 2019

window.crypto.getRandomValues is easy to overwrite. So I don't think it is very safe to create random for account private key.

https://github.com/MaiaVictor/eth-lib/blob/d959c54faa1e1ac8d474028ed1568c5dce27cc7a/src/bytes.js#L6-L18

https://github.com/MaiaVictor/eth-lib/blob/d959c54faa1e1ac8d474028ed1568c5dce27cc7a/src/account.js#L8-L13

Maybe you should make sure the entropy is not empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant