Field | Value | Copy |
---|---|---|
{{ row.k }} | {{ row.v }} | |
No details available. |
File encryption turns readable bytes into ciphertext that only someone with the correct password can open. It helps when you need to share or store information and still keep control of access.
Authenticated encryption adds a proof that nothing changed and that the correct secret was used, so decryption either succeeds cleanly or fails. Here you can protect a file with a password, record the context that will be required later, and keep everything portable for future use.
You choose an algorithm and enter a password, then optionally add associated data that must match at decrypt time. Results can be saved as a compact envelope that preserves essential details such as algorithm, nonce, and salt so the file can be unlocked later without guesswork.
A practical example is encrypting a contract before sending it to a vendor so only recipients with the passphrase can open it. If you save an envelope, the vendor receives all needed parameters except the secret itself.
Use long passphrases and fresh nonces for each file. Very short secrets or reused values reduce protection, and mismatched associated data will correctly make decryption fail.
Authenticated encryption with associated data (AEAD) protects confidentiality and integrity in one step. The plaintext bytes of the file are transformed into ciphertext using a key derived from a password, a per‑file random salt, and the chosen key‑derivation settings.
Key derivation uses either Argon2id with time and memory cost or PBKDF2 with HMAC‑SHA‑256 and an iteration count. A unique salt is generated when not supplied. The derived key length matches the selected algorithm’s requirement.
Results can be saved as a portable JSON envelope (.stenc
) that includes algorithm, key‑derivation label, nonce or IV, salt, optional associated data, encoding, creation time, and the ciphertext, along with the original file name and size. A “Raw” option stores only nonce or IV concatenated with ciphertext using the selected encoding.
AES‑GCM is available with 128‑bit or 256‑bit keys. ChaCha20‑Poly1305 and XChaCha20‑Poly1305 are available with 32‑byte keys and 12‑byte or 24‑byte nonces respectively. A group of legacy, unauthenticated ciphers is included purely for compatibility; prefer AEAD modes for new data.
.stenc
..enc
.Symbol | Meaning | Unit/Datatype | Source |
---|---|---|---|
M |
Plaintext file bytes | bytes | Input |
P |
Password or passphrase | UTF‑8 string | Input |
S |
Salt for KDF | 16 bytes | Generated or input |
K |
Derived key | 16 or 32 bytes | Derived |
N |
IV/nonce per file | 12 or 24 bytes | Generated or input |
A |
Additional authenticated data | bytes | Optional input |
C |
Ciphertext (includes tag for AEAD) | bytes | Derived |
E |
Envelope JSON object | text (Base64/Hex fields) | Derived |
.stenc
envelope that includes algorithm, KDF label t=3, m=64MB
, IV, salt, creation time, original name and size, and the encoded ciphertext. At decrypt time, supplying the same password and associated data restores the original file.
Parameter | Meaning | Unit/Datatype | Typical Range | Notes |
---|---|---|---|---|
Algorithm | AEAD or legacy stream/block cipher | enum | AES‑GCM‑128/256; ChaCha20‑Poly1305; XChaCha20‑Poly1305; legacy set | Prefer AEAD choices for new data. |
KDF | Key derivation function | enum | Argon2id; PBKDF2‑SHA‑256 | Argon2id recommended. |
Argon2id passes | Time cost | integer | ≥ 1 | Default 3. |
Argon2id memory | Memory cost | MB | ≥ 16 | Default 64 MB. |
PBKDF2 iterations | Work factor | integer | ≥ 10,000 | Default 210,000. |
Associated data | Context string to authenticate | UTF‑8 | optional | Must match at decryption. |
Encoding | Field and output encoding | enum | Base64; Hex | Affects .stenc and Raw. |
Field | Type | Min | Max | Step/Pattern | Error Text |
---|---|---|---|---|---|
File | File | — | — | Any type; fully buffered | “Select a file and enter a password.” |
Password | String | 1 | — | UTF‑8 | Required for both modes. |
Argon2id passes | Number | 1 | — | step 1 | — |
Argon2id memory | Number | 16 | — | MB; step 1 | — |
PBKDF2 iterations | Number | 10000 | — | step 1000 | — |
IV (hex) | String | 0 | — | Non‑hex is stripped | Auto‑generated when blank. |
Salt (hex) | String | 0 | — | Non‑hex is stripped | 16 bytes generated when blank. |
Output format | Enum | — | — | Envelope or Raw | — |
Encoding | Enum | — | — | Base64 or Hex | — |
AES‑GCM is defined in widely adopted security guidance; ChaCha20‑Poly1305 and XChaCha variants are specified in open cryptographic documents; Argon2 is the Password Hashing Competition winner; PBKDF2 with HMAC‑SHA‑256 is standardized for password‑based key derivation.
No data is transmitted or stored server‑side. The envelope embeds algorithm parameters and ciphertext along with optional context; review internal policies when handling names and sizes of files in metadata.
File encryption with a portable envelope keeps parameters with the result so decryption is predictable.
Example: Encrypt a report.pdf with AES‑GCM 256, Argon2id at 3 passes and 64 MB, and Envelope. Decrypt later by supplying the same password and associated data.
Your result includes a download plus a readable summary for record‑keeping.
No. Files are processed in the browser and written to a temporary download link. The app does not upload your file contents.
Envelope metadata includes algorithm details and original name and size.Pick an AEAD option such as AES‑GCM or XChaCha20‑Poly1305 for new data. Legacy ciphers exist for compatibility and should be avoided when possible.
Algorithm, KDF label, IV or nonce, salt, optional associated data, encoding, creation time, original name and size, and the encoded ciphertext.
Passwords, KDF settings, IV or nonce, encoding, or associated data may not match. Ensure the envelope or Raw data and all parameters are correct.
.stenc
file elsewhere?Yes, the envelope is self‑describing. Any compatible tool that honors the same fields and encoding can reconstruct the parameters and decrypt with your password.
Yes. The browser’s crypto engine requires a secure context. Use HTTPS or localhost to enable AES‑GCM operations.
.stenc
file?Select Decrypt, choose the file, enter the password, and ensure any associated data is identical to what was used at encryption.
It is context that is authenticated but not encrypted. It must be identical at encrypt and decrypt, or decryption fails.
.stenc
)