Tinker Locks and keys

by Samy (Kondasamy Jayaraman) · drawn with Colorfigures by April Zhu

The invoice and its SHA-256 fingerprint.In the open: HASH f0ec1110

Chapter 5 of 7

A fingerprint

The toy seal signed one number made from the whole invoice. That number is a fingerprint.

This chapter: What is a hash, and why does one changed character change all of it?

About this chapter

You will learn

  • A hash is a short fingerprint of any message
  • One changed character flips about half its bits
  • You can’t run a hash backwards

Words you’ll meet

Hash
A fixed-size fingerprint of any message; the same message always gives the same one.
SHA-256
A hash whose fingerprint is 256 bits, written as 64 hex characters.

Step 1 of 3

A is a fingerprint: turns the whole invoice into 64 hex characters. Signatures sign it.

Predict what one changed digit does.

SHA-256 of “Invoice 1207: pay 1880.00 to account 4417-2209.”f0ec1110d26513fa28a45aff3ebd97ae89966b7d594bc88d9aa479611506d7de

Change one digit of the invoice. How much of its SHA-256 fingerprint changes?