Post
Topic
Board Bitcoin Technical Support
Re: Invalid private key error
by
ETFbitcoin
on 15/01/2023, 12:19:35 UTC
Can anybody advise me where am I going wrong and if possible please let me know any reference to gain some information.
The problem is that the strings provided by lionheart78 are not valid.

I don't know where he got them from, or is he just made them up himself, but the WIF key he provided is the wrong length and contains invalid characters, and is not a valid private key. The address he provided is similarly invalid, with an invalid checksum. The correct checksum for that string would give the following (valid) address: 1cDwMSxYstvetZTFn54X5m4GFgztvxDw4

I can confirm he show invalid example of private key/address. Bitcoin Core gave me these error messages.

Code:
Invalid private key encoding (code -5)

Code:
Invalid Bitcoin address or script (code -5)

--snip--
Thanks for your response. I sincerely appreciate your efforts. Please let me know which website or tool is the best for checking the checksum and correcting the public address. Thanks.

You could just try import the private key/address on wallet such as Electrum or Bitcoin Core.