- The envelope encryption key (EEK) is the top-level key. You control it, and Tilde never stores it.
- A data encryption key (DEK) encrypts your secrets. Tilde generates it, encrypts it with the EEK, and stores only that encrypted copy in PostgreSQL.
Click to zoom
A database dump alone is useless to an attacker. Without your EEK, the DEK cannot be unwrapped, and without the DEK, no secret can be read.
Choose an envelope key provider
Tilde generates and manages DEKs for you. You configure the EEK when the gateway starts.- AWS KMS
- User-provided key
Create a KMS key and give the gateway’s role permission to use it. Tilde asks KMS to generate the DEK and to unwrap it at startup, so the EEK never leaves the KMS hardware security modules.The gateway needs only two permissions on the key:
kms:GenerateDataKey and kms:Decrypt. Tilde binds every KMS call to an encryption context, and verifies that KMS used the key you configured.We can add other key providers to meet your requirements, such as HashiCorp Vault.
How secrets are encrypted
Context binding stops an attacker who can write to the database from moving a ciphertext to another record or field. A secret copied into the wrong row fails authentication and is rejected.
What is encrypted and what is hashed
Tilde encrypts values it must read back, and hashes values it only needs to verify.
Tilde shows a hashed credential once, when you create it. It cannot show it again.
How secrets are handled in memory
Encryption at rest protects the database. Tilde also limits how long a decrypted secret exists in the gateway’s memory, and what can read it there.- Short-lived. Tilde holds a decrypted credential in memory only briefly, and never longer than the credential itself is valid.
- Wiped, not only freed. Tilde overwrites keys and decrypted values the moment it releases them. Secrets do not linger in freed memory, where a memory disclosure bug, core dump, or swap file could expose them.
- Never logged. Secrets are carried in types that redact themselves in debug output and refuse serialization. A stray log line or error report cannot contain a secret.
- Never traced. Credential headers are marked sensitive, and Tilde’s instrumentation does not capture request bodies or authorization headers.
- Constant-time checks. Tilde verifies signatures without leaking timing information.
- Memory safe. The gateway is written in Rust, which rules out the buffer overflows and use-after-free bugs behind most memory disclosure attacks.