AES-256-GCM · PBKDF2-SHA256

Password encryption

Encrypt text or a file with a password. Nobody can open the package without the password; you can decrypt it with the same password.

Operation
Source

Input

File

Output

The result will appear here. Nothing is sent to the server.
How it works
  1. A 256-bit AES key is derived from your password with PBKDF2-SHA256 (600,000 iterations) and a random 16-byte salt. The iterations slow down password guessing; the salt makes the same password give a different key every time.
  2. The data is encrypted with AES-256-GCM and a random 12-byte IV. Besides encrypting, GCM produces a 16-byte authentication tag: if even one bit of the package changes, decryption is refused.
  3. The version, iteration count, salt and IV are written at the start of the package and included as "additional data" (AAD), so they cannot be changed either. The password and the key are never in the package.
  4. Decryption runs the same steps backwards: the salt and iteration count are read from the header, the key is derived again and the tag is checked. A wrong password and a modified package look the same; in both cases the tag does not match.
Byte layout of a package
CTK3 B v11 B PBKDF2 iterations4 B Salt16 B IV12 B Ciphertextn B GCM tag16 B

If you lose the password there is no way to recover the data; the password is not stored anywhere.