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.
How it works
- 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.
- 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.
- 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.
- 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.
If you lose the password there is no way to recover the data; the password is not stored anywhere.