Expand description
Checkpoint serialization and deserialization for VectorCollection.
ยงOn-disk framing
Plaintext checkpoints are raw MessagePack bytes (existing format).
The first 4 bytes are never SEGV, so detection is unambiguous.
Encrypted checkpoints use the following layout:
[SEGV (4B)] [version_u16_le (2B)] [cipher_alg_u8 (1B)] [kid_u8 (1B)]
[HKDF salt (16B)] [random nonce (12B)] [AES-256-GCM ciphertext + tag]The complete current preamble is authenticated as AAD. Each envelope uses its salt and nonce to derive a one-use data key from the KEK, eliminating restart-sensitive nonce state.