Show HN: Hadamask – Encrypt RAG metadata, keep exact vector search A project called hadamask released alpha software that applies a keyed orthogonal transform to embeddings and AES-256-GCM encryption to metadata so vector databases can run exact cosine, dot-product and L2 similarity search on protected data, according to its Show HN post. The library works behind one API with Qdrant, Weaviate, Milvus, Chroma, pgvector, Elasticsearch, OpenSearch, Redis and MongoDB Atlas, plus LangChain and LlamaIndex, and keeps master keys wrapped by HashiCorp Vault, AWS KMS, Google Cloud KMS or Azure Key Vault. The authors state the embedding transform is "obfuscation with measured leakage, not encryption": in experiments reported in Cernica & Popescu, Applied Sciences 2026, an attacker holding only protected vectors and public same-distribution data inferred document topics with 81–87% accuracy across four classes, and the software has not had an external cryptographic audit. Client-side protection for vector databases. Keyed orthogonal obfuscation for embeddings, AES-256-GCM for metadata. Similarity search stays exact. Quick start quick-start · Security model security-model · Store API the-store-api · Databases supported-databases · Key management key-management · Frameworks langchain-and-llamaindex · Design design Vector databases need the geometry of your embeddings to search them, so the vectors usually sit in the database exactly as your embedding model produced them, next to the documents' metadata. Anyone who gets a snapshot, a backup or an over-privileged database account gets both. hadamask protects that data before it leaves your application: - Embeddings go through a secret orthogonal transform. Queries get the same transform, so the database computes exactly the same cosine, dot-product and L2 scores as on the clear vectors. Your index, your database and your recall stay the same. - Metadata and document text are encrypted field by field with AES-256-GCM, with a fresh nonce per value and length padding. An amount of 100.00 and one of 9,999,999.99 produce ciphertexts of the same length. - Filters still work. Fields you declare blind get keyed equality tokens. Fields you declare plaintext stay in clear and support ranges. - Keys stay with you. It is a library, not a proxy or a service. The master key can stay wrapped by HashiCorp Vault, AWS KMS, Google Cloud KMS or Azure Key Vault. It works with Qdrant, Weaviate, Milvus, Chroma, pgvector, Elasticsearch, OpenSearch, Redis and MongoDB Atlas , behind one API, and with LangChain and LlamaIndex . The method and its leakage are analysed in What a Secret Rotation Buys: Exact Retrieval and Measured Leakage in Vector Databases https://doi.org/10.3390/app162010259 Cernica & Popescu, Applied Sciences 2026 . Important What it is not. The embedding transform is obfuscation with measured leakage, not encryption . It hides the coordinate system, but the relative geometry of your corpus which documents are similar to which stays visible. In the paper's experiments, an attacker holding only the protected vectors and public data from the same distribution inferred document topics with 81–87% accuracy four classes . Metadata is encrypted. Read the security model security-model before deploying. hadamask is alpha software and has not had an external cryptographic audit. Note What "exact" means. Scores are mathematically identical to those on the clear vectors up to float32 rounding . With an approximate index such as HNSW, the database returns what that index would return on the clear data: recall against exhaustive search is the engine's own, not hadamask's. In the benchmark benchmarks , recall and the top-10 sets match the unprotected collections. flowchart LR subgraph trusted "Your application trusted " A Documents and queries -- B Embedding model B -- C "hadamask