← Back to the chapter

Technical detail · Service Management, SLAs, and Economics

Trace an exact match on an encrypted field

Suppose records A and C have status OPEN and record B has status CLOSED. A query for records with status OPEN should return A and C. Compare two ways to run it.

DesignWhere matching happensWhere the plaintext and key are
Storage encryption onlyThe database system reads and decrypts stored pages, then compares the readable status with OPEN and returns A and C.The database runtime handles readable status values and can use the storage decryption key. Someone who only obtains the encrypted storage and lacks the key cannot read those pages directly.
Illustrative deterministic field encryptionThe application encrypts OPEN with the same field key and context it used to write the values. The database matches the resulting ciphertext and returns A and C.The application holds the field key and handles plaintext. The database can match status ciphertext without that key, but can see that A and C share the same value and how often it occurs.

The second design assumes a database observer can see stored values and queries but cannot access the application or its field key. Repeated ciphertext still reveals equality. A compromise of the application or its field key is outside that protection. The match test also says nothing about a range query, such as finding records above a priority threshold. Test that operation separately against known results and verify what must be decrypted and where. Independently test whether the team’s existing connector can authenticate and return those known records through the actual product. Keep product-specific query results, connector results and evidence of where decryption occurs.

← Back to the chapter