Encrypt files
Lock any file with a passphrase (AES-256-GCM, streamed in 1 MiB chunks) as a .fnenc file, and unlock it back to the original name.
Questions
How is the file encrypted?
A 256 bit key is derived from your passphrase with PBKDF2-HMAC-SHA-256 at 600,000 iterations and a random 16 byte salt (or Argon2id, 64 MiB memory, 3 passes, 1 lane, if you choose it). The file is split into 1 MiB chunks and each chunk is sealed with AES-256-GCM. Each chunk IV is a random 8 byte prefix plus a 4 byte chunk counter, so chunks cannot be swapped or dropped without detection.
What is inside a .fnenc file?
A 44 byte header: the bytes FNEC, version 1, kind 2 (file), the key derivation id and settings, the salt, the chunk size and the nonce prefix. Then a 4 byte length and the sealed file details (original name, type and size), then the sealed chunks, each 16 bytes longer than its plaintext. The header is authenticated with every chunk.
What happens with a wrong passphrase?
Decryption stops at once with a clear message. AES-GCM checks a 128 bit tag on every chunk, so a wrong passphrase, a damaged byte or a cut short file is always caught; you never get a half decrypted file.
Is there a size limit?
The file is read in chunks in a background worker, so the page stays responsive. The finished file is kept by the browser until you download it, so very large files (several GB) need enough free memory.