How to use it
- Choose a file or drop it on the box. A file encrypted here is recognised and set to “Decrypt”.
- Enter a password (twice when encrypting). A long one from the password generator is best.
- Select “Encrypt” or “Decrypt” and wait for the check to finish.
- Download the result: “name.enc” after encrypting, the original name after decrypting.
Rules and limits
How the file is encrypted
- The key is made from your password with PBKDF2-HMAC-SHA-256, 600,000 rounds (the figure the OWASP Password Storage Cheat Sheet recommends) and a random 16-byte salt, so guessing passwords is slow even for a fast computer.
- The file is encrypted with AES-256-GCM in pieces of 1 MiB. Each piece carries a 16-byte check (tag), its number and a mark on the last piece, so a changed, removed, added or moved piece, a cut file and a changed header are all detected.
- A decrypted file is given to you only after its last piece has passed the check: never a partial or altered file. A wrong password is reported at the first piece.
- The result is the original size plus 40 bytes of header and 16 bytes per MiB. The original file name is not stored inside; “.enc” is added to it.
The file format (version 1)
- Header, 40 bytes:
KDBENC, version 1, key derivation 1 (PBKDF2-HMAC-SHA-256), the rounds and the piece size as 4-byte big-endian numbers, the 16-byte salt, a 7-byte nonce prefix and one zero byte. - Then for each piece: AES-256-GCM ciphertext and its 16-byte tag. Nonce: the 7-byte prefix, the piece number (4 bytes, big-endian) and 1 for the last piece, else 0. Additional data: the 40 header bytes. The password is used as UTF-8 in Unicode NFC.
- Checked against an independent reader and writer built with Python’s “cryptography” 46 library: it decrypts this page’s files, and this page decrypts its files.
Limits
- Tested in Chrome: a 5 MB file encrypted by the page was decrypted by Python’s “cryptography” library, and a changed byte and a cut file were refused; the format tests also use files of 2 MB with 600,000 rounds. The time for very large files was not measured.
- The page encrypts files of up to 1 GB; files that large were not tested. Phones have less memory and may stop earlier; the page then says so instead of giving a broken file.
Questions and answers
What if I forget the password?
Then the file cannot be opened: there is no reset and no back door, because the password itself is the key. Keep it in a password manager.
How do I send the password?
Not in the same message as the file. Tell it by phone or send it through a different app, so that someone who gets one of them still cannot open the file.
Can the person I send it to open it without this website?
Yes, the format is open and written out under the rules above: a few lines of Python with the “cryptography” library read it, as the tests of this page do. The easiest way is still to open this page and choose “Decrypt”.
Is my file or my password uploaded?
No. Both stay in this browser tab; the page cannot send them anywhere and stores nothing, not even the password. You can check this in the Network tab of your browser’s developer tools.