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

Math.Random is insecure #2

Open
agrcrobles opened this issue Feb 4, 2018 · 0 comments
Open

Math.Random is insecure #2

agrcrobles opened this issue Feb 4, 2018 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@agrcrobles
Copy link
Owner

agrcrobles commented Feb 4, 2018

Math.Random is predictable and insecure and the only way to get a secure source of entropy is by making a native call.

I am not entirely sure where web3 uses randomBytes, probably when mining, when creating a new hash for an account or a block.

To improve that there are choices like webview-crypto or react-native-securerandom.

See: https://github.com/agrcrobles/babel-preset-react-native-web3/blob/master/src/randombytes.js#L4

@agrcrobles agrcrobles added the help wanted Extra attention is needed label Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant