Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sovereign, high-performance data protection

Redis with Findex

The KMS can store its entire database in Redis using the Redis-with-Findex backend. Redis-with-Findex combines application-level encryption with encrypted, searchable indexes, so the KMS can query encrypted data without revealing it to the Redis server.

Non-FIPS only

Redis-with-Findex is gated behind the non-fips feature and is not available in FIPS mode.

Redis with Findex: keys derived in the KMS, only ciphertext in Redis

Configuration

Redis-with-Findex requires the database URL and a master password:

[db]
database_type = "redis-findex"
database_url = "redis://localhost:6379"
redis_master_password = "password"
redis_findex_label = "label"

The corresponding environment variables are KMS_DATABASE_TYPE, KMS_DATABASE_URL (also KMS_REDIS_URL), KMS_REDIS_MASTER_PASSWORD, and KMS_REDIS_FINDEX_LABEL.

For the other backends, see Databases; clearing and migration are described in Database maintenance.

Clearing the database

When clear_database is set, the KMS issues a FLUSHDB to Redis on startup, deleting all keys in the selected Redis database.

What it is

With Redis-with-Findex, the KMS server encrypts all data before sending it to Redis:

  • Objects and permissions are encrypted with AES-256-GCM using a key derived from a master password.
  • Indexes are built with Findex, an Eviden cryptographic algorithm that produces encrypted indexes over encrypted data. The indexes are also stored in Redis, allowing fast encrypted queries (for example Locate by tag or attribute) without the KMS ever sending plaintext to Redis.

Redis-with-Findex provides post-quantum resistance on both the encrypted data and the encrypted indexes.

When to use it

Redis-with-Findex is most useful when:

  • The KMS servers run inside a confidential VM or an enclave. In this case the secret used to encrypt the Redis data and indexes is protected by the VM or enclave and cannot be recovered at runtime by inspecting the KMS servers' memory.
  • The KMS servers are run by a trusted party, but the Redis backend is managed by an untrusted third party.

It is the database selected to run the Eviden KMS in the cloud or any other zero-trust environment.

How encryption keys are derived

  1. A master password is provided at startup (redis_master_password).
  2. A 32-byte master key is derived from the password using Argon2 with a 16-byte salt stored in the database (kms_kdf_salt): random for a database created by this version, the legacy fixed salt rediswithfindex_ for a database created by an older version.
  3. A database key is derived from the master key (salt db) and is used to encrypt the object and permission data with AES-256-GCM.
  4. The master key is also used by the Findex encryption layer to encrypt the searchable indexes.

The master password never leaves the KMS server; only the derived keys are used in memory.

Connection & Operation Workflow

The sequence diagram below shows how the Eviden KMS connects to Redis, initializes cryptographic keys in memory, and performs encrypted storage and indexing operations:

Redis with Findex: startup key derivation and encrypted object storage

Concurrent writes

Every object write (create, update, state change, delete, and multi-object batches) runs as a single Lua script on Redis. The script checks that each object still has the value the KMS read, then applies all the writes, or none. If another writer changed an object in between, the KMS re-reads and retries the whole batch (up to 64 attempts), so concurrent updates never overwrite each other. The Findex index is updated after the object write is committed; searches discard index hits whose stored object no longer matches.

Single-node Redis only

The script touches several keys in one call, which Redis Cluster rejects when the keys live in different hash slots (CROSSSLOT). Use a standalone Redis, not Redis Cluster.

Data layout in Redis

Redis-with-Findex does not use relational tables (see Database tables for the SQL schema). Instead it stores:

DataStorage
ObjectsAES-256-GCM encrypted values, keyed by object UID
PermissionsEncrypted, indexed through Findex
Searchable indexesFindex encrypted indexes (Redis is used as the Findex memory layer)
Database metadataInternal keys holding the database state (ready/upgrading) and version
Ceremony recordsEncrypted records under key names obfuscated with the master key
Server parametersAES-256-GCM encrypted under the database key at kms::parameter::<name> (e.g. the KV/SSH identifier key); the first value written wins across replicas
Web UI session revocationsui_session_revoked:<sid> keys with a time-to-live equal to the session's remaining lifetime
KDF saltkms_kdf_salt: 16 non-secret random bytes, the salt of the master-key derivation (see above); not removed when the database is cleared

Migration

Redis-with-Findex databases created on KMS 5.12.0 or later upgrade in place at server startup. Databases created before 5.12.0 are refused at startup and must be exported from the old KMS and imported into a fresh Redis database on the new release.

Downgrade. A database that already holds data keeps the legacy fixed salt (recorded in kms_kdf_salt on first start), so it can still be opened by an older KMS. A database created empty by this version uses a random salt: an older KMS derives a different master key from the same password and cannot read it. Do not roll a database created by this version back to an older release.

For full upgrade procedures and multi-instance startup behavior, see Database Migrations.