D4TE Technical Specification
This document provides a technical overview of the D4TE (Decay 4-Tooth Encryption) protocol for security researchers, auditors, and developers. It covers cryptographic primitives, key derivation hierarchy, message encryption, and security properties.
Cryptographic Primitives
Algorithm Suite
| Function | Algorithm | Parameters |
|---|---|---|
| Symmetric Encryption | AES-256-GCM |
256-bit key, 96-bit nonce, 128-bit tag |
| Key Derivation | HKDF-SHA256 |
Per RFC 5869 |
| Password KDF | Argon2id |
m=64 MiB, t=3, p=1, 256-bit output |
| Hash | SHA-512/SHA-512-256 |
512/256-bit output |
| MAC | HMAC-SHA256 |
256-bit tag |
| KEM | ML-KEM-768 |
NIST FIPS 203, Level 3 |
Security Levels
All primitives are designed for at least 128-bit security against quantum adversaries (formal proofs are classical-ROM to date; QROM analysis is in progress):
- AES-256: 128-bit post-quantum (Grover's algorithm halves effective key length)
- ML-KEM-768: NIST Level 3 (~128-bit quantum)
- SHA-256/512: 128/256-bit (preimage), 128/256-bit (collision)
The 4-Tooth Key Hierarchy
D4TE derives keys through four distinct "teeth," each representing an independent security requirement:
Tooth 1: Group Master Key (GMK)
The GMK anchors all network-specific keys to the passphrase. The random network nonce rn_nw ensures identical passphrases produce different keys across networks.
Tooth 2: Domain Keys
Domain keys bind keys to specific users and purposes, preventing key confusion attacks.
Tooth 3: Device-Bound Keys (Spice v1)
The device_secret is generated locally and stored on the device: on iOS it is protected by the Keychain and Secure Enclave; on Android it lives in app-private storage, with hardware-backed protection on our roadmap. The cycle_secret is distributed via ML-KEM-768 encapsulation.
Tooth 4: Backstop Ratchet
The backstop ratchet provides forward secrecy at the cycle boundary, with a per-message one-way advancement inside a cycle. Each advancement irreversibly destroys previous backstop values, and rotating a cycle destroys that cycle's keys.
Message Encryption
Envelope Format
Additional Authenticated Data (AAD)
All envelope metadata is authenticated but not encrypted, enabling routing while preventing tampering.
Security Properties
Forward Secrecy
Level: Cycle boundary, with a per-message one-way ratchet inside a cycle
Mechanism: Backstop ratchet advances after each message; cycle rotation destroys the prior cycle's keys
Property: Compromise of current keys cannot decrypt messages from destroyed prior cycles
Post-Compromise Security (Roadmap)
Status: Not yet delivered. Cycle rotation today re-seals to the same long-term device key. Device-key rotation is tracked on our roadmap; until it ships, rotating credentials limits exposure but is not a full post-compromise recovery mechanism.
Key Indistinguishability
Property: Keys appear random to attackers without full key chain
Basis: HKDF security under random oracle model
Authentication
Mechanism: token_ext proves sender membership; tag2 provides integrity
Property: Messages cannot be forged from outside the group; authenticity is membership-scoped (any member can derive any member's domain key)
Test Vector (Abbreviated)
Limitations and Open Problems
- Metadata: D4TE encrypts content but not routing metadata (sender, recipient, timing)
- Formal Proofs: Security analysis is informal; formal proofs in standard models remain future work
- Large Group Scaling: Cycle rotation is O(n) in group size; tree-based schemes could improve this
- Multi-Device Sync: Device-bound secrets complicate multi-device support
Key Takeaways
- D4TE uses a four-level key hierarchy requiring passphrase, device, time, and message-specific components
- All cryptographic primitives are designed for 128-bit post-quantum security
- Cycle-boundary forward secrecy via a one-way backstop ratchet
- ML-KEM-768 Spice protocol provides phrase-compromise resistance
- Complete test vectors enable independent implementation verification