FREE STUDY NOTES · SC-500

Always Encrypted, TDE and dynamic data masking compared

Where each Azure SQL data protection feature works and who it protects data from.

From Ultra Transcenders SC-500 by Tony Rough (publishing soon)

Always Encrypted protects individual columns so that even database administrators never see plaintext. It is the choice when data owners must be kept apart from the people who run the database.

A grid with three columns (client application, database engine, database at rest) and one row per feature. Always Encrypted encrypts in the client driver, so the engine and the files hold only ciphertext. TDE encrypts the database files at rest but decrypts for anyone with query access, DBAs included. Dynamic data masking is applied by the database engine, which masks query results for non-privileged users (the client sees XXXX or 1900-01-01) and leaves stored data unchanged.
Figure 6.1: Where Always Encrypted, TDE and dynamic data masking each protect data

Common trap: Giving developers both the column encryption key and the column master key - they need credentials and the CMK only; the CEK is protected by the CMK and delivered by the database.

Common trap: Generating a key on an HSM device to let apps use the column master key - generating a key doesn’t authorise any identity to use it; a Key Vault access policy does.

Encryption type Behaviour Use for
Deterministic Same plaintext always gives the same ciphertext, so it supports point lookups, equality joins, grouping and indexing. It can reveal patterns. Exact-match values such as government ID numbers
Randomized More secure; no equality operations Data not searched by exact value, such as free-text comments

Get the whole book

This note is one section of Ultra Transcenders SC-500: Implementing End-to-End Security Controls for Cloud and AI Workloads, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.

Amazon.co.ukKindle: coming soonPaperback: coming soon
Amazon.comKindle: coming soonPaperback: coming soon

Publishing soon on Amazon in Kindle and paperback editions.

About the book · Free SC-500 glossary · All SC-500 study notes

More SC-500 study notes