Legal Center
Last Updated: October 9, 2026·Effective: October 9, 2026
SecurityVerified Codebase Spec

Security & Encryption Policy

The exact mathematical, algorithmic, and architectural specifications governing client-side cryptography and zero-knowledge relays in ENCLAVE.

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 FunctionPrimitive / AlgorithmParameters / Key SizeStandard Reference
Symmetric EncryptionAES-GCM (AEAD)256-bit Key, 96-bit CSPRNG IV, 128-bit Auth TagNIST SP 800-38D
Password-Based Key DerivationArgon2id (hash-wasm)m=64 MB, t=3 iterations, p=4 lanes, 256-bit saltRFC 9106 (IETF)
PBKDF2 FallbackPBKDF2-HMAC-SHA256600,000 iterations, 256-bit saltNIST SP 800-132
Ephemeral Session Key DerivationHKDF-SHA256256-bit output per unidirectional session keyRFC 5869 (IETF)
Commitment & Integrity HashingSHA-256256-bit digest outputFIPS PUB 180-4
Random Number GenerationCSPRNG (`crypto.getRandomValues`)Hardware-backed entropy sourceW3C Web Cryptography API

3. Key Hierarchy & Derivation Flow

Multi-Tiered Key Lifecycle
  1. Room Passphrase / Link Secret: High-entropy Diceware passphrase or CSPRNG token generated client-side.
  2. Pass-Derived Key (PDK): Derived from passphrase and room salt using memory-hard Argon2id.
  3. Key Wrapping Key (KWK): Derived from PDK to securely wrap the 256-bit Room Master Secret (RMS).
  4. 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.
  5. 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

Realistic Security 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.

Inquiries & Grievance Redressal

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