Checksum
A checksum is a value computed from specified data and later compared with a reference value to detect changes.
A checksum names a checking role, not a security level. Storage systems can use a CRC or a cryptographic digest in that role. Btrfs supports both categories. State the covered bytes, algorithm and location of the reference value; disagreement alone does not identify which copy is correct. [1] [2]
Constructed same-length CRC collisions distinguish burst span from changed-bit count in the linked experiment. [6]
XZ listing can display a stored checksum without testing the payload. In a nine-fixture native study on XZ Utils/liblzma 5.4.5, a one-bit payload mutation left the verbose listing unchanged but failed full testing. An absent data check and an explicitly ignored check are different policies; correct output bytes can also precede a failed final check. These are designed controls on one build, not corruption-rate estimates. [8] [9] [10]
CPIO crc uses a byte sum, not a CRC. In controlled GNU cpio 2.15 runs, detected checksum errors produced diagnostics but exit status zero. The tested libarchive 3.7.2 reader did not check that sum. Algorithm, reader policy and failure signalling are separate properties. [14] [15] [16] [17]
RocksDB v10.10.1 separates verification from byte provenance: fill_cache=false prevents cache filling, not lookup of existing entries. Its SST data-block verifier can use a configured persistent cache; serialized hits run trailer verification when verify_checksums=true (the default), while uncompressed hits return before that comparison. A cache may supply separate checks. This source review does not establish a fresh physical-media read or report an engine experiment. [18] [19] [20]
Relations
- related
- Silent data corruption, ReFS integrity streams, FITS checksum convention, Full-object checksum, Composite checksum, Cryptographic hash function, Hash collision, Data scrubbing, End-to-end data protection, Btrfs NODATASUM, Filesystem consistency invariant, dm-integrity, LZ4 frame, Block-independent compression, Cyclic redundancy check, CRC-32C, Hamming distance, Algebraic signature, NumPy NPY format, NumPy NPZ archive, WARC revisit record, Hexadecimal byte encoding, File signature, Adler-32, Fletcher checksum
Limitations
- CRC error-detection properties depend on the polynomial, message length and error model; CRC is not an authentication mechanism. [3]
- A valid checksum alone does not establish the requested address, committed generation or successful repair. [4]
- A matching checksum does not establish that filesystem metadata relationships are consistent. [5]
- A checksum can protect a representation after numerical conversion has already changed the intended source values. [7]
- A liblzma check-type notification is not a completed comparison. In the v5.4.5 streaming API, LZMA_CONCATENATED requires LZMA_FINISH before LZMA_STREAM_END can be returned; filling an output buffer is not that completion signal. [11]
- In XZ for Java 1.10, SingleXZInputStream completion covers one stream, whereas XZInputStream processes concatenated input. Reading the expected decoded length alone can leave footer validation unfinished; a short positive read can precede a pending exception. [12, 13]
- A checksum diagnostic need not prevent output: the tested GNU cpio 2.15 stdout and disk-extraction modes exposed the altered bytes. Stage and verify output before irreversible downstream use; this is not an atomicity or durability guarantee. [15, 17]
- RocksDB's block_protection_bytes_per_key creates a reference on block load. It does not enable the separate memtable or write-batch protection settings, nor establish the application's intended value. [21]
- RocksDB v10.10.1 DB::VerifyChecksum() forwards the supplied ReadOptions. With verify_checksums=false, the data-block fetcher skips its trailer checksum comparison; parsing and I/O errors remain possible. The method name alone does not establish an executed comparison. [22, 19, 20]
- RocksDB v10.10.1 takes the block checksum type from the SST footer. With verify_checksums=true and kNoChecksum, the computation returns constant zero and does not hash the payload; a trailer comparison still occurs. Success is not payload-integrity evidence. BlockBasedTableOptions::checksum defaults to kXXH3 for newly created files, not a retrofit of existing SSTs. [23, 24, 25]
- In libFLAC 1.4.3 and 1.5.0 controls, seeking to sample zero disabled MD5 comparison while the setting getter stayed true and all samples were returned. Reset restored checking; a fresh enabled pass rejected the wrong reference at finish. Reusing the decoder after finish requires enabling the setting again before initialization, because finish restores constructor defaults. [26, 29]
- Equal FLAC sample digests do not bind sample-rate or channel-mask metadata. Identical digest inputs can describe different durations or speaker assignments without a hash collision. [27, 29]
- The tested FLAC CLI accepted an unset sample MD5 with a warning; -w rejected it. Warning policy does not establish whole-file identity. [28, 29]
- A bounded OpenZFS zfs-2.3.4 scalar-function study gives identical four-word Fletcher-4 checksums for [0,4,0,4,0] and [1,0,6,0,1]. Six bits change while the original reference stays fixed. The signed difference [1,-4,6,-4,1] cancels the four position moments without overflow. This is constructed algorithm-level evidence, not a mounted-pool test or hardware-error frequency estimate. A 256-bit stored result alone does not establish a universal 2^-256 miss probability. Exact inputs, controls, source pins and an offline replay bundle are linked. [30, 31]
- In two constructed SQLite 3.45.1 captures, a three-byte BLOB change preserved the original WAL checksums and a later committed marker; integrity_check returned ok. A one-byte rejection control recovered the old base state, also structurally ok. Matching checksums and structural checks alone establish neither the intended value nor its generation. A direct-C follow-through on SQLite 3.45.1 and 3.51.0 completed all 16 backups; cold main-file-only copies retained these discrepancies while integrity_check stayed ok. Copying fidelity is not source correctness. [32, 33, 34, 35]
Citations
- NIST CSRC glossary: checksum (definitions with source attribution)
- Btrfs documentation: Checksumming, algorithm choices and verification boundary
- RFC 3385: iSCSI CRC/Checksum Considerations, sections 1-2 and 10 (historical error-model analysis)
- Hesela: Why a valid checksum can still return the wrong data
- Fryer et al. Recon: Verifying File System Consistency at Runtime. FAST 2012, sections 2, 4.1 and 5
- Hesela: CRC polynomials, constructed error patterns and exact small-code enumeration
- Hesela: HDF5 integer casts and checksum-protected representations
- XZ v5.4.5 list.c: parse_check_value and parse_details
- XZ v5.4.5 manual: test/list modes, data-check policy and --ignore-check
- Hesela: XZ stored checks, executed checks and intended stream sequence
- liblzma v5.4.5 container.h: decoder notifications and concatenated-stream completion
- XZ for Java 1.10: SingleXZInputStream completion and pending-exception contract
- XZ for Java 1.10: XZInputStream concatenation and input-end handling
- Linux v6.8 initramfs format: c_magic and c_chksum
- GNU cpio 2.15 source: copyin.c lines 523-545 and 1561-1568; paxexit*.c
- libarchive v3.7.2 CPIO reader: format detection, header_newc and read_data
- Hesela: CPIO checksum scope, reader policy and failure signalling
- RocksDB v10.10.1 options.h: ReadOptions checksum and cache-insertion controls.
- RocksDB v10.10.1 BlockBasedTable: cache lookup and VerifyChecksumInBlocks.
- RocksDB v10.10.1 BlockFetcher: uncompressed, serialized and file read paths.
- RocksDB v10.10.1 AdvancedColumnFamilyOptions: separate block and memtable per-key protection controls.
- RocksDB v10.10.1 DBImpl::VerifyChecksum and VerifyChecksumInternal: ReadOptions forwarding to SST verification.
- RocksDB v10.10.1 VerifyBlockChecksum: footer algorithm, context-adjusted trailer comparison.
- RocksDB v10.10.1 ComputeBuiltinChecksum: payload-independent kNoChecksum result.
- RocksDB v10.10.1 BlockBasedTableOptions: checksum selection for new SST files.
- Xiph libFLAC decoder API: configured MD5 flag, seek/reset and finish
- RFC 9639: FLAC sample MD5 and channel-mask interpretation, sections 8.2 and 8.6.2
- Xiph FLAC CLI manual: test mode and warnings-as-errors
- Hesela: FLAC decoder history, checksum scope and preservation policy
- OpenZFS zfs-2.3.4: pinned scalar Fletcher-4 functions and overflow arithmetic.
- Hesela: pinned Fletcher-4 scalar study, exact results, controls and offline replay (synthetic algorithm fixtures).
- SQLite file format: WAL checksum recurrence and frame coverage, sections 4.1-4.2.
- Hesela: SQLite WAL checksum-neutral native fixtures, controls and offline replay.
- SQLite C Backup API: completed copying versus finish status.
- Hesela: 16 direct-C backups, exact output images and two-build reproduction supplement.
Sources & caveats
- XZ: nine designed synthetic fixtures, 36 reader observations per capture, two retained repeats on one XZ Utils/liblzma 5.4.5 binary; no field rate or independent replication. Evidence: https://hesela.dev/research/xz-verification/README.md
- CPIO: eleven synthetic regular-file fixtures, 55 native reader operations per retained capture and same-host replays. GNU cpio 2.15 / libarchive 3.7.2; not a field-rate or kernel-boot experiment. https://hesela.dev/research/cpio-checksum-contract/README.md
- FLAC: six synthetic files and 84 native operations across libFLAC 1.4.3 and 1.5.0; same-host reproduction of documented behavior, not field rates or independent peer replication. Evidence: https://hesela.dev/research/flac-verification/PUBLICATION.md
- Fletcher-4: nine constructed configurations, pinned scalar functions and a fixed reference. No mounted pool, field-rate estimate or independent peer replication. https://hesela.dev/research/fletcher4/results.json
- Fletcher-4 source pins, licensing and claim limits: https://hesela.dev/research/fletcher4/sources.json
- SQLite WAL: four designed cases in each of two captured SQLite 3.45.1 fixtures; original fields and exact payloads retained. No power loss, random-fault estimate or independent-person replication. https://hesela.dev/research/sqlite-wal-neutral/results.json
- SQLite backup follow-through: two frozen captures x four designed cases x two engine builds. All 16 copies completed; only intact controls matched both expected payload and marker. One host, no field rate or independent-person replication. https://hesela.dev/research/sqlite-wal-backup/summary.json