We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
This idea carries a full system design question on its own. Each walks through the full answer.
System Design Masterclass · Security Architecture
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Security Architecture
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
In 2006, the US Department of Veterans Affairs lost a laptop containing personal data on 26.5 million veterans. Social Security numbers, dates of birth, and disability ratings for millions of people, all sitting on an unencrypted hard drive. One stolen device, 26.5 million exposed records.
In 2017, an engineer at Heathrow Airport found a USB stick on the street containing 2.5 GB of unencrypted security data: the Queen's travel routes, security patrol timetables, and details of the underground tunnel network.
Encryption at rest protects data stored on disks, databases, backups, and any persistent storage. Even if an attacker gains physical access to a server, steals a hard drive, finds a USB stick on the sidewalk, or accesses a backup tape, the data is unreadable without the encryption key.
Every cloud provider offers encryption at rest. AWS EBS volumes, S3 buckets, RDS databases, all encrypted with a single toggle. The performance overhead is 1-5% because modern CPUs have hardware acceleration for AES encryption (AES-NI instructions). Google encrypts all data at rest by default in GCP, you cannot turn it off. There is no legitimate reason to store sensitive data unencrypted in 2026.
Two ciphers dominate encryption at rest, and one pattern ties them together.
AES-256-GCM is the industry standard. Every Intel and ARM CPU since 2010 includes AES-NI hardware instructions that push past 10 GB/s. GCM mode provides authenticated encryption: it detects both eavesdropping and tampering. AWS uses AES-256-GCM for EBS, S3, and RDS encryption. When someone says "military-grade encryption," they usually mean AES-256.
ChaCha20-Poly1305 is the alternative when hardware acceleration is unavailable. Designed by Daniel Bernstein, it runs 3x faster than AES in pure software. Google chose it for Android disk encryption on older devices without AES-NI. It is also the default cipher in WireGuard VPN and a preferred cipher in TLS 1.3 for clients that report no AES hardware support.
Envelope encryption is not a cipher but a key management pattern. You generate a data encryption key (DEK), encrypt the actual data with the DEK, then encrypt the DEK with a master key (KEK) stored in a hardware security module. When you need to rotate the master key, you re-encrypt only the small DEK (a few hundred bytes), not terabytes of actual data. All three major cloud providers, AWS KMS, GCP Cloud KMS, and Azure Key Vault, use envelope encryption.