Visual RFC.
ALL RFCs / RFC 1071
Read the RFC ↗

RFC 1071 / START HERE

Internet checksum, before the details

Internet checksum is a name, not an acronym. A checksum is a small value calculated from selected bytes so a receiver can check them.

Pair the bytes into 16-bit words, add them with a carry that wraps around, and flip the result’s 16 bits. The receiver includes that value in the sum and expects all ones.

The idea in one picture

  1. Pair covered bytes

  2. Fold and complement

  3. Check for all ones

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

This September 1988 Informational memo explains efficient Internet-checksum techniques. It is not a protocol standard. It covers full computation; later RFC 1141 and RFC 1624 refine the separate incremental-update technique.

A familiar example

Imagine adding the amounts on a packing list and sending a balancing entry with it. A changed amount can break the balance, but two changes can cancel. A matching checksum does not prove that the message is unchanged or that its sender is trusted.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. Pair bytes and clear the checksum fieldTreat adjacent bytes as 16-bit words, preserving their positions and handling a final unpaired byte.
  2. Fold carries in the published worked exampleThe carry from the top of a 16-bit word comes back around to its low end.
  3. Check received bytes and see what can escapeAn all-ones result passes this arithmetic check, while some changed messages can still pass.
  4. Preserve byte positions across orders and chunksByte-order independence requires consistency, and an odd chunk boundary needs alignment correction.
  5. Optimize the work without changing the arithmeticWider sums, combined copying and later incremental guidance preserve the same checksum meaning.
Start with chapter one →

This introduction explains RFC 1071 (1988). Read the original RFC ↗