Checksumming
Checksumming
TsFile v4 has no general Page, Chunk, or whole-file checksum. A completed-looking file can still contain damaged values, so the head and tail magic strings should not be used as content checksums.
What Structural Validation Detects
Lengths, offsets, and counts help detect incomplete or malformed structures. A Page that extends beyond its Chunk, a footer length outside the file, or a decompressed payload with the wrong size can all be rejected. These checks are described in Binary Representation and Data Pages.
They do not detect every change. A modified value can occupy the same number of bytes and leave all surrounding boundaries intact. Structural checks remain necessary even when a separate checksum is available.
Integrity at Rest or in Transit
To detect changes anywhere in a file, maintain an external checksum or use the storage system's integrity mechanism. If protection against intentional modification is required, use a keyed authentication code or signature with a trusted key or reference stored outside the file. Cover the complete byte sequence, including the footer length and tail magic.
Page AEAD provides a narrower guarantee: it authenticates non-empty Page bodies and their context, and binds Chunk ordinals to file positions. It does not cover all visible headers, Statistics, indexes, or footer metadata. Empty aligned Value Pages have no Page authentication tag, and legacy encryption does not necessarily authenticate its ciphertext. See Encryption for the exact scope.