Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: gondel on April 10, 2019, 07:38:37 PM



Title: Do you think BIP38 is good for keep my BTC safe?
Post by: gondel on April 10, 2019, 07:38:37 PM
Hi all,
I want to protect my coins with BIP38 on paper, but my main worry is lot of wallets are not supporting this encryption.
So lets say after 10 years no one uses wallets which support BIP38 encryption will I be able to get my coins back?
Is there are universal way to decrypt BIP38 if you do KNow your pass?
THanks!


Title: Re: Do you think BIP38 is good for keep my BTC safe?
Post by: TryNinja on April 10, 2019, 07:49:23 PM
Is there are universal way to decrypt BIP38 if you do KNow your pass?
Yes. Even if there are no wallets supporting BIP38 in the future, you can just use a tool to decrypt it and import it in any Bitcoin wallet.

For example, BitAddress.org (http://BitAddress.org) (which is open source and can be run offline) has an option to decrypt them.


Title: Re: Do you think BIP38 is good for keep my BTC safe?
Post by: HCP on April 10, 2019, 09:12:26 PM
Is there are universal way to decrypt BIP38 if you do KNow your pass?
Further to this, the methods for encrypting and decrypting are publicly and well defined in the published "BIP38" standard here: https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki

Basic method for decryption is:
Decryption steps:
  • Collect encrypted private key and passphrase from user.
  • Derive derivedhalf1 and derivedhalf2 by passing the passphrase and addresshash into scrypt function.
  • Decrypt encryptedhalf1 and encryptedhalf2 using AES256Decrypt, merge them to form the encrypted private key.
  • Convert that private key into a Bitcoin address, honoring the compression preference specified in flagbyte of the encrypted key record.
  • Hash the Bitcoin address, and verify that addresshash from the encrypted private key record matches the hash. If not, report that the passphrase entry was incorrect.

There are also some test vectors at the bottom of the page that would allow you to "practice" decryption if you felt the need.


Title: Re: Do you think BIP38 is good for keep my BTC safe?
Post by: Thirdspace on April 11, 2019, 01:23:31 AM
So lets say after 10 years no one uses wallets which support BIP38 encryption will I be able to get my coins back?
Is there are universal way to decrypt BIP38 if you do KNow your pass?
Yes, just keep yourself a copy of BIP38 tool, such as the one TryNinja mentioned, on your usb/cloudstorage/hdd
or the hard way, you can read and understand what HCP posted :D the technical way
finding BIP38 tool (or decrypting it) in the future is the least of your problem,
your main problem is if you forgot your passphrase, recovering your bitcoin by bruteforcing BIP38 would be very hard


Title: Re: Do you think BIP38 is good for keep my BTC safe?
Post by: pooya87 on April 11, 2019, 03:08:59 AM
when you encrypt your private key using BIP38 you using two cryptography functions that are well known: AES and scrypt. so the security of it mainly depends on those functions and they are both widely used, reviewed and secure functions.
if some day you couldn't find a tool to decrypt your BIP38 encrypted key you can just ask a developer to take a look at BIP38 link posted above and write you a code (it will be less than 10 lines of code if you aren't using the EC-multiplied keys which normally you wouldn't).

in the end if you don't like BIP38 then simply use AES to encrypt your keys. you will find lots of applications to do it since it is a well known and well used encryption technique BUT remember that you need to know what you are doing and the application you use must be safe not anything you find on the internet!


Title: Re: Do you think BIP38 is good for keep my BTC safe?
Post by: gondel on April 11, 2019, 01:27:08 PM
Thank you very much for the good answers!
I decided to go with BIP38
Thanks


Title: Re: Do you think BIP38 is good for keep my BTC safe?
Post by: TryNinja on April 28, 2019, 12:53:18 PM
we have to use it in offline mode for more security?
It’s up for you to decide. Doing it offline increases your security and blocks possible external threats.