Home / Learn Secure SQL / Encryption at Rest Basics

Encryption at Rest Basics

Protecting stored data even if the disk itself is stolen or copied.

The gistProtecting stored data even if the disk itself is stolen or copied.

The idea, explained simply

Without vs with encryption at restWithoutRaw disk/backup readable byanyone with physical orstorage accessWithRaw disk/backup unreadablewithout the separately-managedkey
Without vs with encryption at rest

What it is

Encryption at rest means the database's stored files (on disk, in backups, in snapshots) are encrypted, so that someone who obtains the raw storage without the decryption key cannot read the data directly.

Why it matters

A stolen laptop, a misconfigured backup made public, or a leaked disk snapshot are all real-world scenarios where encryption at rest is the only layer standing between the data and whoever obtained the raw storage.

Mechanically speaking

Enable your database or cloud provider's encryption-at-rest feature (often a simple checkbox for managed databases), and ensure backups/snapshots inherit the same encryption, not just the live database.

Shows up in

  • Web application code review
  • Backend development
  • Database administration

Encryption at rest is almost always a configuration setting on managed databases (AWS RDS, Google Cloud SQL, Azure Database all offer it with one setting) rather than application code, so it is covered here conceptually rather than with a runnable example.

Check yourself

1. Encryption at rest mainly protects against...