Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: calkob on March 29, 2017, 09:27:18 PM



Title: Invalid private key encoding (code -5) ?
Post by: calkob on March 29, 2017, 09:27:18 PM
currently trying to importprivkey from an encrypted bitaddress.org paperwallet.  am getting "Invalid private key encoding (code -5)"   any ideas?


Title: Re: Invalid private key encoding (code -5) ?
Post by: achow101 on March 29, 2017, 09:28:49 PM
Are you sure you copied it correctly? Are you sure your private key is in WIF format (begins with 5, K, or L)?


Title: Re: Invalid private key encoding (code -5) ?
Post by: calkob on March 29, 2017, 09:40:36 PM
starts with a 6 from bitaddress.  does the encryption have anything to do with it?

i can sweep it on to breadwallet, but was trying to import it straight to core wallet.


Dont scare me like that man.......... :o  had to go sweep it there to make sure.....lol


Title: Re: Invalid private key encoding (code -5) ?
Post by: achow101 on March 29, 2017, 09:50:40 PM
starts with a 6 from bitaddress.  does the encryption have anything to do with it?
Yes. That means that it is BIP 38 encrypted. Bitcoin Core does not support importing BIP 38 encrypted private keys. You will need to decrypt it and get the normal WIF private key.


Title: Re: Invalid private key encoding (code -5) ?
Post by: calkob on March 29, 2017, 09:55:25 PM
starts with a 6 from bitaddress.  does the encryption have anything to do with it?
Yes. That means that it is BIP 38 encrypted. Bitcoin Core does not support importing BIP 38 encrypted private keys. You will need to decrypt it and get the normal WIF private key.

Cheers Achow, just checked it out on bitaddress, many thanks.