liveBook · Manning

Checksum

As explained in Troubleshooting Java, Second Edition

A checksum is a computed value derived from data for detecting changes or transmission and storage errors.

A checksum is a small, fixed-size value calculated from larger data to detect accidental corruption during storage, transmission, or processing. Checksums are fast integrity checks, not protection against intentional tampering. section 13.3.1

Use a checksum to investigate data mismatches across system boundaries:

  • Calculate and store or transmit the checksum when the data is generated. section 13.3.1
  • Recalculate the value when the data is received or read, then compare it with the original. section 13.3.1
  • Treat a mismatch as evidence of likely alteration or corruption, such as an incomplete write, bit flip, or faulty transmission. section 13.3.1

Verifying a downloaded file

A download site publishes file.exe with CRC32 checksum A12F3B4C. Recomputing the received file's CRC32 and matching A12F3B4C indicates a likely-correct download; a mismatch signals possible corruption. section 13.3.1

File: file.exe  
CRC32 Checksum: A12F3B4C

Inspect the compact file-and-checksum listing used to demonstrate integrity verification. section 13.3.1

How Troubleshooting Java, Second Edition covers it

How deep it goes
Defines fixed-size checksums, contrasts cryptographic hashes, names CRC32 and Adler-32, and explains recomputation and comparison.
Examples
Uses a downloadable file with CRC32 A12F3B4C and a hashed InvoiceCreated event.
What it assumes
Assumes no checksum background; defines data integrity and the data life cycle before applying the technique.
What you can do after
Diagnose likely corruption by recomputing a checksum and comparing it with the stored or transmitted value.
How it connects
Connects data integrity with distributed systems, cryptographic hashes, storage, transmission, reconciliation jobs, and consistency monitoring.

Also explained in

Compare how 5 books explain checksum →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.