Skip to content

Math.Random is insecure #2

Open
@agrcrobles

Description

@agrcrobles

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions