Your files will always open
An encryption app shouldn't hold your files hostage. If Clavis Encrypt ever stopped being developed, or you simply stopped using it, you'd still need your files back. So the complete .enc format is described on this page, and there's a small free decryptor that opens any file with just your password, without Clavis Encrypt.
pip install cryptography argon2-cffi python clavis_decrypt.py "C:\Files\9f3c….enc" -o restoredIt asks for your password (add
--keyfile if your vault uses one), restores each file under its original name and never deletes anything. --verify only checks that files open.No Python? Open .enc files in your browser instead, on any phone, Mac or PC. It decrypts on your device and sends nothing anywhere. To make a password-locked .enc file the same way, encrypt a file in your browser.
Everything below is what the decryptor implements; together they let anyone check that Clavis does what the Security page says. One .enc file holds everything needed to open it except your password: there's no separate key file, account or vault you'd also have to keep, unless you chose a key file as a second factor.
The current format (version 3)
Written by Clavis Encrypt 2.0 and later. Numbers are big-endian.
| Bytes | Field | Meaning |
|---|---|---|
| 4 | FENC | Marks a Clavis file |
| 1 | 0x03 | Format version |
| 16 | salt | Random, new for every file |
| 4 | Argon2id memory | In KiB (Clavis picks up to 131072 for your PC) |
| 1 | Argon2id passes | Iterations |
| 1 | Argon2id lanes | Parallelism |
| 4 | chunk size | Plaintext bytes per chunk (65536) |
| 7 | nonce prefix | Random, new for every file |
| … | chunks | Each chunk: AES-256-GCM ciphertext + 16-byte tag |
The key. key = Argon2id(password as UTF-8, salt, memory, passes, lanes, version 0x13, 32 bytes). With a key file: key = HKDF-SHA256(ikm = key || SHA-256(key file), salt = salt, info = "fileencryptionapp-keyfile-v1", 32 bytes).
The chunks. The plaintext stream is cut into chunks of exactly chunk size bytes (the last may be shorter). Chunk n is sealed with AES-256-GCM using:
- nonce = the 7-byte prefix, then n as 4 bytes, then one byte:
0x01for the last chunk,0x00for all others; - associated data = the whole 38-byte header above.
This is the "STREAM" construction also used by Tink and age: the counter stops chunks being reordered or removed, the last-chunk flag stops a file being cut short or extended, and the associated data ties every chunk to its header. Each chunk is checked before its contents are used.
Inside. The decrypted stream is: the original file name's length (2 bytes), the file name (UTF-8), then the file's content compressed with GZIP. That's why the file on disk can have a random name: the real name is encrypted inside it.
Older formats
Clavis still opens files from every earlier version, and so does the decryptor. They protect the whole file with one AES-256-GCM tag (no associated data). The decrypted payload is SHA-256(content) (32 bytes) · name length (2) · name · GZIP(content), and the SHA-256 is checked after decompressing.
| Version | Header | Key |
|---|---|---|
| 2 (Argon2id) | FENC · 0x02 · salt 16 · memory 4 · passes 1 · lanes 1 · IV 12 | Argon2id as above |
| 1 (PBKDF2) | FENC · 0x01 · iterations 4 · salt 16 · IV 12 | PBKDF2-HMAC-SHA256, 32 bytes |
| Original | FENC · salt 16 · IV 12 (no version byte) | PBKDF2-HMAC-SHA256, 65536 iterations |
For PBKDF2 files with a key file, the password used is password + NUL + hex(SHA-256(key file)). An original-format file's salt can start with 0x03; if a file looks like version 3 but its first chunk doesn't open, try it as an original-format file.
What this decryptor doesn't open
- Files made with "Encrypt for someone" (version byte
0x04). They're sealed to the recipient's Clavis ID (X25519 + ML-KEM-768 public keys), so they open only with the recipient's private keys inside Clavis Encrypt. That's the point of them. - Secure notes, the vault's own files and recovery kits: they belong to the app and aren't files you'd need to rescue.
Why publish this?
Clavis Encrypt itself isn't open source, and it hasn't had an independent audit yet; we'd rather say so than pretend. Publishing the format and a decryptor is the next best thing: anyone can check how files are protected, and nobody is ever locked in. Found a mistake? Write to hello@clavisenc.com.