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:

PassLayer 1Layer 2Layer 3
Pass 1 (key set 1)Camellia-256-CBC + HMAC-SHA-512ChaCha20-Poly1305AES-256-GCM
Pass 2 (key set 2)Camellia-256-CBC + HMAC-SHA-512ChaCha20-Poly1305AES-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.

LevelArgon2id memoryscrypt memoryCombined memory
standard128 MB~128 MB~256 MB
high512 MB~512 MB~1 GB
paranoid (default)1 GB~1 GB~2 GB
fortress2 GB~2 GB~4 GB

Defensive features

FeaturePurpose
Key commitment (SHA3-512)Prevents key-switching attacks
Dual hash familiesSHA-2 for the header, SHA-3 for the footer — independent authentication paths
Anti-forensic paddingRandom padding per chunk hides content-length patterns
Trap sequenceOrdered codes; a wrong entry destroys the file header — enforced only once the real password has authenticated the header
Duress modeA 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 comparisonAll 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.