Post
Topic
Board Bitcoin Technical Support
Merits 21 from 3 users
Re: Please, I need help for converting a very old btc private key to WIF.
by
Cricktor
on 22/06/2025, 22:42:41 UTC
⭐ Merited by LoyceV (12) ,pooya87 (5) ,vapourminer (4)
I will give you an example where a private key had both transactions to the uncompressed and compressed public address. It is a highly non-random private key, namely in hex format
Code:
0000000000000000000000000000000000000000000000000000000000000003
or in Base64
Code:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM=

The uncompressed WIF private key is:
Code:
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreB1FQ8BZ

giving the uncompressed public key:
Code:
04F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9388F7B0F632DE8140FE337E62A37F3566500A99934C2231B6CB9FD7584B8E672

and uncompressed public address 1NZUP3JAc9JkmbvmoTv7nVgZGtyJjirKV1 which has seen so far 78 transactions. Every coin (UTXO) you send to it will be immediately stolen by bots because the private key is well known, it's not random at all.

The compressed WIF private key is:
Code:
KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU74sHUHy8S

giving the compressed public key:
Code:
02F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9

and compressed public address 1CUNEBjYrCn2y1SdiUMohaKUi4wpP326Lb which has seen so far 12 transactions. The first five UTXOs that have been sent to this address have been stolen in the same block, only the last one was snatched some weeks later because it was just dust.

You can see that a single private key can have uncompressed and compressed form and resulting public addresses and both had coins sent to either of them. Assume you had UTXOs (coins) on both uncompressed and compressed public addresses, if you import only one form, you will miss the coins of the other.


Same applies for the private key in hex form
Code:
0000000000000000000000000000000000000000000000000000000000000002
or in Base64
Code:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=

which in addition to numerous transactions on uncompressed and compressed P2PKH addresses also had three UTXOs sent to the P2WPKH Native Segwit address bc1qq6hag67dl53wl99vzg42z8eyzfz2xlkvxechjp which also were taken quickly except for the last dust UTXO that lasted about two months.


Bitcoin doesn't work like Ethereum with an accounting balance system. Bitcoin uses UTXO (unspent transaction output) which is basically a "chunk" of coin. If you spend it, it's always spent completely and if you don't need to send the whole "chunk", you need to send the change as a separate smaller "chunk" back into your own wallet.