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

Protect data in your database

The values live in your own tables and the application reads them back. These use cases cover encrypting the columns, the cost in KMS calls, a set of keys for each customer, lookups by an encrypted value, and erasing a customer.

Pick this whenUse case
Customers’ emails, phone numbers or API tokens sit in your own tablesEncrypt personal data and secrets in your database
Reads or writes make too many KMS callsCut KMS calls with a DEK cache and DEK reuse
One customer needs its keys rotated or destroyed without touching the othersGive each customer of a SaaS its own keys
A row has to be found by an encrypted value, such as an emailFind a user by an encrypted email
A customer’s data has to become unreadable, backups includedErase one customer’s data for good