Post
Topic
Board Bitcoin Technical Support
Re: Invalid private key encoding (code -5)
by
shorena
on 31/01/2015, 22:05:22 UTC
What is the first character of the private key?

Try importing it without a label:

Code:
importprivkey yourPrivateKeyInWalletImportFormat

I've tried that.

I have two keys to import, one starts with 'D' the other with 'C', same error with both.

Do they end with "==" or "="? It might be encrypted.

Quote
For private keys associated with uncompressed public keys, they are 51 characters and always start with the number 5 on mainnet (9 on testnet). Private keys associated with compressed public keys are 52 characters and start with a capital L or K on mainnet (c on testnet).

https://en.bitcoin.it/wiki/Private_key