Reviewed Aug 2026
DE
BA-04 · LESSON 11

WIF, Base58Check, Bech32, Bech32m, and checksums

KEY DEFINITIONS

Terms used in this lesson

WIF
Wallet Import Format, a Base58Check text encoding for a Bitcoin private scalar plus network and public-key compression metadata.
Witness
Signatures, scripts, or other data supplied to satisfy a Bitcoin output’s spending condition.
P2PKH
Pay to Public Key Hash, a legacy Bitcoin output template that commits to the hash of a public key.
P2WPKH
Pay to Witness Public Key Hash: a native SegWit output for one public-key hash.
P2TR
Pay to Taproot, the Bitcoin output type introduced with Taproot.
SegWit
Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
HASH256
Bitcoin's name for applying SHA-256 twice to the same byte sequence.

Encode and decode private-key and destination text formats byte by byte, including network markers, witness versions, conversion alphabets, and checksum limits.

55 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

Bitcoin text encodings carry exact bytes plus error-detecting checksums. Wallet Import Format, called WIF, encodes a private scalar with network and compression metadata using Base58Check. Legacy addresses also use Base58Check. SegWit addresses use Bech32 for witness version 0 and Bech32m for versions 1 through 16. A checksum detects many mistakes but does not authenticate the intended recipient.

GUIDED EXPLANATION1/5 ideas inspected
1

Build Base58Check bytes

Concatenate the version byte and payload, append the first four bytes of HASH256, convert the whole big-endian integer to the Base58 alphabet, and preserve each leading zero byte as a leading 1 character.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionBech32 and Base58 are cryptographic protections that make the encoded key or address secret.

They are public text encodings with checksums. WIF contains a private key and must remain secret despite its checksum.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.