bitcoinjs / bip38

BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is less susceptible to brute force attacks thus protecting the user.
http://cryptocoinjs.com/modules/currency/bip38/
MIT License
206 stars 100 forks source link

Scryptsy library complications #46

Closed SpicyPete closed 5 years ago

SpicyPete commented 5 years ago

Hello, I'm trying to include bip38 in one of my react-native projects, but since it relies on scryptsy which relies on the node module crypto which react-native does not have access to, it is failing.

Edit: I am mistaken, thanks for responses.

junderw commented 5 years ago

6th line of index.js

it is used.

also BIP38 is discouraged for implementation FYI.

It is recommended to use BIP39 + BIP32 + BIP39

SpicyPete commented 5 years ago

@junderw It is being imported on the 6th line of index.js, but I do not see that import variable being used anywhere.

I will look into the combination of BIP39 + BIP32, is there a third you meant to type as well?

woodser commented 5 years ago

@junderw Why is BIP38 discouraged for implementation?

junderw commented 5 years ago

https://github.com/bitcoinjs/bip38/blob/ebf70644bf7e3d433a728c749b17c48d51afce9d/index.js#L57

junderw commented 5 years ago

@woodser https://github.com/bitcoin/bips/wiki/Comments:BIP-0038

woodser commented 5 years ago

@junderw Securing a single private key using BIP38 is a valid use case without known fundamental flaws, even according to what you linked (that is, without using a confirmation code). Single key wallets which re-use a single address can weaken privacy, but re-use is not mandated by BIP38. BIP38 being discouraged for implementation is matter of preference, opinion, or the target use case.