What is the significance of the last 5 digits of Base 58 WIF?

2

I'm trying to understand the Base 58 WIF number. While messing around with importing on blockchain I noticed that if you change the last five (or so) digits, it doesn't appear to affect which address is imported - i.e. i get the "This address is already present in the wallet" note. Does anyone have any insight they could share about this?

confused_wallet

Posted 2016-08-16T23:03:40.650

Reputation: 123

Answers

3

The last 4 bytes of the WIF format is a checksum. The details can be seen here: https://en.bitcoin.it/wiki/Wallet_import_format

That's approximately 5 characters of Base58 that are essentially redundant. This is so that errors in the WIF encoded private key can be detected easily. I believe some wallets will simply ignore the checksum if it's not correct.

Jimmy Song

Posted 2016-08-16T23:03:40.650

Reputation: 7 067

2

A picture is worth a 1000 words. See Figure 6 from Chapter 4 of the Bitcoin Book. The last 4 bytes are used as a checksum for error checking. The version prefix is different for Bitcoin altcoin forks. See the 3rd column of this Table for versions used by various altcoins.

skaht

Posted 2016-08-16T23:03:40.650

Reputation: 2 588