iancoleman / bip39

A web tool for converting BIP39 mnemonic codes
https://iancoleman.io/bip39/
MIT License
3.53k stars 1.44k forks source link

enabling bip38 compression changes addresses from compressed to uncompressed #372

Open dooglus opened 4 years ago

dooglus commented 4 years ago

src/js/index.js says:

                // bip38 requires uncompressed keys

but that's not true. bip38 supports both compressed and uncompressed keys equally. I don't want the address to change when I encrypt the private key. It should only change the private key. It's inefficient (expensive, waste of block space) to use uncompressed public keys.

iancoleman commented 4 years ago

Uncompressed keys was implemented for bip38 because of the request here: https://github.com/iancoleman/bip39/issues/140#issuecomment-352164035

I think you're right that the default should be to use compressed keys, and only optionally use uncompressed. Any other opinions on the most appropriate default for bip38 are welcome.

Suggested changes:

dooglus commented 4 years ago

Sounds good to me. Have the new checkbox work whether or not BIP38 is in use. It's conceivable (though I can't think of a realistic reason for it) that people might want to use uncompressed pubkeys without BIP38.

For comparison see how bitaddress.org's "wallet details" tab shows both compressed and uncompressed pubkeys and privkeys whether it's using BIP38 or not.