Skip to content
StackDecode
System Design
13. Security ArchitectureAnimated

Encryption at Rest

Encrypting stored data.

The idea

Disks and databases are encrypted so stolen media is unreadable.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

AppKMSStorageGenerateDataKey
  • current message
  • earlier
  • failure or attack

The app asks the key management service for a data key.

step:
1/5
from:
App
to:
KMS
1/5

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Encrypt with a data key
  2. 2Protect the data key with a master key
  3. 3Decrypt in memory when used
  4. 4Rotate keys

Where it is used

Databases and backups.

Watch out for

Protect the keys as carefully as the data.

Related