Vault Health & Bit-Rot Salvage Engine: Recovering Damaged Archives

How ZevSafe detects silent hardware degradation, isolates corrupted 4 MB ciphertext blocks, and salvages surviving data from damaged archives.

1. The Reality of Silent Bit-Rot in Storage

All digital storage media degrade over time:

2. The "All-or-Nothing" Dilemma in Traditional Crypto

Modern authenticated encryption (like AES-GCM or ChaCha20-Poly1305) contains a mathematical authentication tag. If even a single bit is altered or corrupted anywhere in the ciphertext, the tag check fails, and the cryptographic primitive rejects the entire payload.

⚠️ The Total Data Loss Trap

In monolithic container architectures (where a 10 GB file is encrypted as a single continuous block), a single flipped bit in block 4 makes the entire 10 GB archive completely un-decryptable!

3. 4 MB Chunk Isolation: Fault Containment

ZevSafe circumvents this catastrophe through STREAM AEAD chunk isolation:

4. How to Run the Deep Cryptographic Integrity Audit

Before relying on an archived vault for multi-year storage, you can run a complete cryptographic health scan in Vault Explorer:

  1. Unlock the vault in ZevSafe.
  2. Click 🩺 Audit Vault Health in the explorer toolbar.
  3. ZevSafe's parallel worker pool streams through every chunk in the file:
    • Verifies the 57-byte container header and magic bytes.
    • Verifies PBKDF2 salt length ($\ge 32$ bytes) and iteration count floor ($\ge 100,000$).
    • Reconstructs 12-byte IVs and 42-byte Associated Authenticated Data (AAD) for every chunk.
    • Verifies the 16-byte GCM authentication tag for each 4 MB block.
  4. Displays a detailed Cryptographic Scorecard showing verified chunk count, byte integrity percentage, and bit-rot status.

5. The Emergency Salvage Workflow

If a damaged vault with corrupted sectors is detected:

JavaScript Architecture · Fault-Tolerant Chunk Salvage
// In js/stream-unpacker.js:
try {
    const chunkPlaintext = await decryptChunk(chunkIndex, ciphertext, tag);
    salvagedStream.write(chunkPlaintext);
} catch (authTagError) {
    console.warn(`[Salvage Engine] Chunk ${chunkIndex} authentication failed. Quarantining block.`);
    // Quarantine corrupted chunk, log byte range, and continue with next chunk
    quarantinedRanges.push({ chunkIndex, offset: chunkIndex * 4194304 });
}

The Salvage Engine isolates the damaged chunks, replaces missing bytes with null filler markers, rescues all surviving files, and downloads a clean, reconstructed ZIP archive.