Skip to content

Conversation

@junderw
Copy link
Contributor

@junderw junderw commented Dec 15, 2021

Fixes #245

In the event that Web Crypto API is not existent, nothing changes. But this usage will cover even IE11 so most browsers should be covered.

@meixler
Copy link

meixler commented Dec 16, 2021

@junderw, Thanks for your quick response to issue 245. This PR seems like it ought to solve the problem.

I like how you made the solution backward-compatible, so that if the user’s browser does not support Crypto.getRandomValues(), it falls back to the old method of generating random values for the private key.

In that case, perhaps the application should warn the user that it is using a non-CSPRNG to generate the private key?

@ghost
Copy link

ghost commented May 16, 2022

@OutCast3k This PR is a must have feature, could you review this?

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

Successfully merging this pull request may close these issues.

Consider changing coinjs.newPrivkey() function to use a CSPRNG to generate random values for private keys

2 participants