- 1.Security Architecture Philosophy
- 2.Cryptographic Primitives & Specifications
- 3.Key Hierarchy & Derivation Flow
- 4.Canonical Authenticated Associated Data (AAD)
- 5.End-to-End Encrypted Media
- 6.Blind Server Relay Operations
- 7.Constant-Time Authentication & Rate Limiting
- 8.Known Limitations & Threat Boundaries
- 9.Vulnerability Disclosure & Auditing
1. Security Architecture Philosophy
ENCLAVE is engineered under the assumption that the server environment must be treated as untrusted. Rather than relying on operator promises or database access controls, ENCLAVE enforces confidentiality and integrity through client-side mathematics. All cryptographic keys are generated and held exclusively in the volatile memory of the participating clients' browsers.
2. Cryptographic Primitives & Specifications
ENCLAVE utilizes standard, audited cryptographic primitives provided by the W3C Web Cryptography API and WebAssembly implementations:
| Cryptographic Function | Primitive / Algorithm | Parameters / Key Size | Standard Reference |
|---|---|---|---|
| Symmetric Encryption | AES-GCM (AEAD) | 256-bit Key, 96-bit CSPRNG IV, 128-bit Auth Tag | NIST SP 800-38D |
| Password-Based Key Derivation | Argon2id (hash-wasm) | m=64 MB, t=3 iterations, p=4 lanes, 256-bit salt | RFC 9106 (IETF) |
| PBKDF2 Fallback | PBKDF2-HMAC-SHA256 | 600,000 iterations, 256-bit salt | NIST SP 800-132 |
| Ephemeral Session Key Derivation | HKDF-SHA256 | 256-bit output per unidirectional session key | RFC 5869 (IETF) |
| Commitment & Integrity Hashing | SHA-256 | 256-bit digest output | FIPS PUB 180-4 |
| Random Number Generation | CSPRNG (`crypto.getRandomValues`) | Hardware-backed entropy source | W3C Web Cryptography API |
3. Key Hierarchy & Derivation Flow
- Room Passphrase / Link Secret: High-entropy Diceware passphrase or CSPRNG token generated client-side.
- Pass-Derived Key (PDK): Derived from passphrase and room salt using memory-hard Argon2id.
- Key Wrapping Key (KWK): Derived from PDK to securely wrap the 256-bit Room Master Secret (RMS).
- Room Master Secret (RMS): Random 256-bit entropy generated client-side by room creator. Stored on server only as an AES-256-GCM encrypted ciphertext bundle.
- Ephemeral Session Keys: Participants use HKDF-SHA256 with distinct context strings to derive independent unidirectional sender and receiver keys.
4. Canonical Authenticated Associated Data (AAD)
Every encrypted packet binds immutable routing context into the AES-256-GCM authentication tag via Canonical AAD:
ENCLAVE-v1|ROOM:<roomId>|PKT:<packetId>|SENDER:<senderId>|SEQ:<sequence>|TS:<timestamp>If a malicious relay or network adversary modifies a packet ID, reorders sequence numbers, modifies timestamps, or replays a packet from another room, the AES-256-GCM tag verification fails immediately, and the client discards the packet.
5. End-to-End Encrypted Media
Photo and video attachments are encrypted in client browser memory before transmission:
- Client-Side Sanitization: EXIF metadata, GPS geotags, camera serials, and timestamps are stripped before encryption.
- Dedicated Media Keys: High-entropy AES-256-GCM keys are derived per attachment.
- Zero-Knowledge Binary Storage: The server receives only opaque encrypted binary chunks and cannot preview or index media.
6. Blind Server Relay Operations
The ENCLAVE server maintains an in-memory transient ring buffer (maximum 50 packets per active room). Packets exist solely to bridge transient network disconnections among active participants and are zeroized upon room dissolution.
7. Constant-Time Authentication & Rate Limiting
To defend against side-channel timing attacks and brute-force access attempts:
- Constant-Time Commitment Verification: Auth commitment comparisons use cryptographic constant-time equality algorithms to prevent byte-by-byte timing analysis.
- In-Memory Rate Limiting: Clients are limited to 5 failed verification attempts per 5 minutes per room, triggering a 5-minute lockout upon repeated failures.
8. Known Limitations & Threat Boundaries
No communication system can defend against every conceivable attack vector. We transparently disclose the following architectural boundaries:
- Compromised Client Endpoints: If a participant's device has malware, keyloggers, or an untrusted browser extension, message content can be captured before encryption or after decryption.
- Physical Screen Capture: Photography of physical device screens or shoulder surfing cannot be prevented cryptographically.
- Out-of-Band Passphrase Interception: If a room pass or link is shared over an unencrypted or compromised third-party channel (e.g. SMS), unauthorized recipients can decrypt the room.
9. Vulnerability Disclosure & Auditing
We welcome coordinated security research. Please review our Security Vulnerability Disclosure Policy for reporting procedures and safe harbor rules.
For formal data rights requests, security disclosures, or regulatory inquiries concerning this policy, submit a verified request through our official channels.
Related Legal & Privacy Documents
Detailed lifecycle specifications for transient in-memory packet ring buffers.
Guidelines for reporting security vulnerabilities to our engineering team.
Overview of minimal data collection and operational metadata handling.