Oceum Recall · Security Architecture
Oceum Recall compresses the knowledge base's embedding vectors using quantized vector representations. This document describes the security properties of the system.
1. Overview
Recall is Oceum's compressed semantic memory infrastructure. It takes the high-dimensional embedding vectors of the knowledge base and stores platform and governance documents as half-precision floats with Brotli, and the rest quantized to 3 or 2 bits per dimension after a keyed rotation; time-based decay can later lower a vector to 4, 3 or 2 bits.
Because these compressed vectors encode organizational knowledge (customer interactions, internal documents, decision context) Recall applies a keyed rotation to vectors stored at 4, 3 or 2 bits, which gives each organization its own coordinate space. This document covers the cryptographic design, isolation guarantees, key management, and known limitations.
2. Keyed Rotation
- Per-organization rotation keys. Each organization's rotation key is derived via
HMAC-SHA256from a master secret and the organization'sorg_id. No two organizations share a rotation matrix. - Orthogonal rotation transform. The derived key seeds a deterministic orthogonal rotation matrix. This rotation transforms vectors into an organization-specific coordinate space before quantization. Without the rotation key, compressed indices cannot be mapped back to meaningful vector positions.
- Similarity preservation. Dot products (and therefore cosine similarity) are preserved under orthogonal rotation. Because the transform is orthogonal, similarity can be scored in the rotated space; Recall dequantizes compressed vectors in memory at query time, and a vector stored at 4, 3 or 2 bits is stored only in rotated form (the half-precision form is not rotated).
3. Tenant Isolation
- Mathematical isolation. Each
org_idproduces a unique rotation matrix. Even if compressed data from two organizations is co-located in the same database table, cross-org similarity search over vectors stored at 4, 3 or 2 bits produces meaningless results because the coordinate spaces are incompatible; platform and governance documents stored at half precision are not rotated. - Defense in depth. Keyed rotation is an additional isolation layer, not a replacement for standard database-level controls. Knowledge storage carries Row-Level Security (RLS) policies, and tenant-facing queries are scoped to the caller's organization by
org_idin application code. The rotation provides a second, mathematically independent barrier. - No shared state. Rotation matrices are derived on-the-fly from the master secret and
org_id. No per-tenant key material is stored in the database.
4. Data at Rest
- Storage format. Compressed embeddings are stored hex-encoded in the
compressed_embeddingcolumn ofknowledge_chunks. A vector stored at 4, 3 or 2 bits contains quantized indices and normalization metadata; the half-precision form holds the vector's values at half precision, and the full-precision embedding is stored beside both. - Database encryption. Standard Supabase/PostgreSQL encryption at rest applies to all stored data, including compressed vectors.
- Layered protection. The keyed rotation adds a second layer on top of database encryption. Even if an attacker obtains a raw database dump, the compressed data is computationally useless without the organization-specific rotation key derived from the master secret.
5. Key Management
- Master secret. The master secret is read from the
RECALL_SECRETenvironment variable. If not set, Recall falls back toOAUTH_ENCRYPTION_KEY. The master secret should be a high-entropy string of at least 32 characters. - Deterministic derivation. Per-org keys are derived deterministically from the master secret and
org_id. No additional key storage is required. The same inputs always produce the same rotation matrix.
6. Compression Fidelity
Recall supports three quantization bit-widths, each trading storage for fidelity. The sizes below are one 1536-dimension embedding as Recall stores it (hex text), against the same vector as 32-bit floats (6,144 bytes):
| Bit-Width | Tier | Stored Size | Compression |
|---|---|---|---|
4-bit |
Hot | 1,592 characters | ~3.9x |
3-bit |
Warm | 1,208 characters | ~5.1x |
2-bit |
Cold | 824 characters | ~7.5x |
Recall supports time-based decay from 4-bit to 3-bit to 2-bit. Decay recompresses from the stored full-precision vector, so a memory that moves to a lower tier is quantized once, at its new width.
7. Limitations
- Computational security, not information-theoretic. The keyed rotation provides computational security. The seed space derived from HMAC-SHA256 is used to generate a 32-bit seeded random rotation. For adversaries with knowledge of the algorithm and sufficient compute, brute-force recovery of the rotation is theoretically possible. The rotation is a practical isolation barrier, not a cryptographic guarantee equivalent to AES.
- Use AES-256 for classified data. For regulated or classified data that requires information-theoretic encryption guarantees, standard AES-256 encryption should be applied in addition to Recall's keyed rotation. Recall's rotation is designed for tenant isolation and defense-in-depth, not as a standalone encryption layer for sensitive data classifications.
- Lossy compression. Compressed vectors are lossy by design. Exact recovery of the original vector values is not possible after quantization: a reconstruction is close to the original vector, never equal to it.
8. Contact
Questions about Recall's security architecture can be directed to jo@oceum.ai.