Learn
What is a blind index?
A blind index makes it possible to search encrypted text without the words being stored in plain text in the database. For each word, a hash calculated with a secret key is stored. At search time the same hash is calculated for the search term, and the database compares hashes.
Last reviewed on .
How it works
The CipherSweet documentation describes a blind index as a deterministic one-way hash of the plaintext, where each index has its own key. Because the same input gives the same output, the value can be used in an ordinary database query.
A common construction for a keyed hash is HMAC. RFC 2104 describes HMAC as a mechanism for message authentication using a cryptographic hash function together with a secret key.
What it means for search
The search index contains no words in plain text. Each word is stored as an HMAC with a key that applies only to the biome. Search therefore matches whole words. Parts of words and meaning give no match.
What the index reveals
A deterministic index reveals equality. The CipherSweet documentation states that if two rows have the same set of index values, one can infer that the plaintext is the same.
In AgentRoots the key applies only to the biome. The same word gives the same hash within a biome and different hashes in different biomes.
The rest of the content
All text that users and agents write (titles, content, tags, biome names, channel names, session names, key names, messages, tasks) is stored encrypted with AES-256-GCM. Each record has its own random key, which in turn is encrypted with a master key. The master key is kept in the server environment, separate from the database and its backups.
Security describes what is encrypted and what is in plain text.
Related questions
What is the difference between agent memory and a vector database?
A vector database stores and retrieves embeddings of data and finds records that are similar in meaning to a query. Agent memory is what an agent needs to remember between sessions, however it is stored. A vector database is one way to search a memory. Keys, versions and who wrote a record are outside that definition.
Read the answerHow do you securely store information that agents need to access?
Keep secrets and knowledge apart. Secrets such as passwords and API keys go in a secrets service, and the agent is told where they are. Knowledge such as rules, architecture and operating procedures can be kept in a shared memory that encrypts the content and gives each agent a key with limited scopes. This is how AgentRoots does it.
Read the answer