1 min read

A checksum is a small string of bytes appended to a larger piece of data in order to easily verify its validity and protect against typos or tampering. Most checksums are generated by taking the first several bytes of the hash of the target data.

When a checksum is attached to a piece of data, anyone examining this data can easily check that the hash of the target data matches the checksum, giving them confidence that the data has not changed since the checksum was generated.

Bitcoin uses a double SHA-256 hash as the hash function for deriving checksums. Checksums are used with addresses as well as private keys in Wallet Import Format. These two pieces of data are exchanged between services and users, so checksums are important to prevent transcription or transmission errors such as typos.