How Chunk Encryption Works

Large files can be too expensive to process as one giant in-memory encryption operation. CipherDriveâ„¢ therefore supports a chunked encryption architecture in which a file is divided into smaller ordered pieces and each piece is encrypted locally.

Why chunk files?

Chunking allows a client to:

One file key, multiple chunks

A file receives a random per-file key. Multiple chunks of that file can be encrypted using the same file key only if each encryption operation uses a unique IV.

The documented IV construction

The CipherDrive whitepaper describes the chunk IV conceptually as:

Chunk IV = 64-bit random file nonce + 32-bit chunk number

Each file receives a random 64-bit base nonce. Each chunk receives a unique 32-bit chunk number. Together they form a 96-bit AES-GCM IV.

Why the chunk number matters

For chunks encrypted under the same file key, the changing chunk number helps ensure that each AES-GCM operation uses a distinct IV.

IV uniqueness is essential because AES-GCM security can be seriously weakened if an IV is reused with the same key.

Integrity per chunk

Each AES-GCM encrypted chunk includes authentication information. When CipherDrive decrypts the file, each chunk must authenticate correctly.

If a chunk is corrupted, altered, or associated with the wrong cryptographic context, the client should fail the affected decryption instead of silently accepting modified data.

Additional Authenticated Data

Where used, AAD can bind a chunk to context such as its chunk number, file identifier, object type, or protocol version. This makes it harder to treat valid ciphertext from one context as though it belonged to another.

Reconstructing the file

During download:

  1. the file key is unwrapped locally;

  2. encrypted chunks are retrieved;

  3. each chunk is authenticated and decrypted;

  4. the plaintext chunks are placed back in the correct order;

  5. the client reconstructs the original file.

Does chunking guarantee resumable uploads?

No. Chunking provides an architecture that can support resumable or multipart workflows, but actual resume behavior depends on the current client implementation and service configuration.