bitcoinjs / bip39

JavaScript implementation of Bitcoin BIP39: Mnemonic code for generating deterministic keys
ISC License
1.11k stars 447 forks source link

Why we need a dependency on randombytes package? #133

Closed tiero closed 4 years ago

tiero commented 4 years ago

Although it's a well-known package, why we need to add an external dependency for just 40line of codes for browsers? (it could be made even less than that)

 crypto.getRandomValues()
junderw commented 4 years ago

for browsers

That's the reason. We are using randombytes because we want to support browsers.

If you can make the support smaller and still work securely on most browsers, please create a pull request on the randombytes repo.