How is a file encrypted?
Your file is split into chunks, each encrypted with its own key derived from the transfer key, and all the chunks are tied together by a shared fingerprint. A watermarked PDF is encrypted page by page.
What is this about?
Your browser splits the file into 4 MiB chunks and encrypts each one with its own key, derived from the transfer key, and its own nonce. The fingerprints of the chunks are then combined into a Merkle tree, whose root represents the entire file. The chunks are sent one after the other: a large file doesn't have to be loaded entirely into your device's memory.
When you add a watermark to a PDF, each page is first converted into an image on your device, and the watermark is embedded in it before encryption; the pages are then encrypted one by one. This conversion runs in a background task of your browser.
What you gain
- An intact file: each chunk is tied to its position. A chunk that has been altered or moved would not decrypt.
- Large files: up to the maximum size of your plan, and if the network drops briefly, only the chunk in progress has to be restarted.
A real-world example
An engineering firm sends a client a 300 MB technical file, including plans. The client receives it complete, in its original order, and each chunk is verified as it is decrypted.