How Fortress Crypt works
This page describes the construction precisely enough to reason about it. It doesn’t invent cryptography — it cascades standardized, peer-reviewed primitives so that no single break, in any one algorithm or any one implementation, is enough to expose your data. The normative reference is the Python core; iOS and Android are ports that must match its byte-level behavior.
The cipher cascade (6 layers)
Every chunk of plaintext (1 MiB by default) passes through two independent cascades, each combining three cipher families:
| Pass | Layer 1 | Layer 2 | Layer 3 |
|---|---|---|---|
| Pass 1 (key set 1) | Camellia-256-CBC + HMAC-SHA-512 | ChaCha20-Poly1305 | AES-256-GCM |
| Pass 2 (key set 2) | Camellia-256-CBC + HMAC-SHA-512 | ChaCha20-Poly1305 | AES-256-GCM |
An attacker must break all three cipher families, twice, using independent keys. All 6 authentication tags per chunk must verify, or decryption halts — nothing partially decrypted is ever released before every tag is checked.
Key derivation (triple chain)
Your password never encrypts anything directly. It passes through three independent derivation stages before producing the eleven sub-keys the cascade needs:
password → Argon2id → scrypt → HKDF-SHA512 → master key → 11 sub-keys
Argon2id and scrypt are two independent memory-hard functions, XOR-combined before HKDF expansion — a weakness discovered in either one alone does not compromise the master key. An optional ML-KEM-1024 (FIPS 203) shared secret can be mixed in for a post-quantum hybrid mode.
Security levels
Each level fixes the memory-hardness cost of both KDF stages. The chosen level is stored in the file header, so decryption always uses the parameters the file was created with, not a local default.
| Level | Argon2id memory | scrypt memory | Combined memory |
|---|---|---|---|
| standard | 128 MB | ~128 MB | ~256 MB |
| high | 512 MB | ~512 MB | ~1 GB |
| paranoid (default) | 1 GB | ~1 GB | ~2 GB |
| fortress | 2 GB | ~2 GB | ~4 GB |
Defensive features
| Feature | Purpose |
|---|---|
| Key commitment (SHA3-512) | Prevents key-switching attacks |
| Dual hash families | SHA-2 for the header, SHA-3 for the footer — independent authentication paths |
| Anti-forensic padding | Random padding per chunk hides content-length patterns |
| Trap sequence | Ordered codes; a wrong entry destroys the file header — enforced only once the real password has authenticated the header |
| Duress mode | A secondary password decrypts decoy data. At paranoid/fortress levels this also wipes the real data automatically; at standard/high it does not unless explicitly requested |
| Constant-time comparison | All authentication checks resist timing side-channels |
Full detail on how the trap and duress features were hardened against forged-header attacks is on the Security & Transparency page — including the residual risk that’s documented rather than hidden.
Design philosophy
This system layers well-vetted, standardized primitives (AES, ChaCha20, Camellia, Argon2id, scrypt, ML-KEM) rather than inventing new cryptography. The strength comes from cascading independent, peer-reviewed algorithms so that no single break compromises the data — the same principle behind cascade encryption in tools like VeraCrypt. It has not undergone formal third-party cryptographic audit. Treat Fortress Crypt as a serious engineering project and a defense-in-depth design study, and use established, audited tools for protecting real high-value data against sophisticated adversaries today.
