← Back to Glossary
Security Glossary

Encryption at Rest & in Transit

Data Protection

Encryption transforms readable data into an unreadable format that can only be decoded with the correct cryptographic key. "In transit" encryption protects data as it moves between systems, from a user's browser to your server, from your server to a database, or between microservices. This is typically handled by TLS/SSL. "At rest" encryption protects data where it is stored, on disk in databases, file storage, backups, and logs. Even if someone gains physical access to the storage device or downloads a backup file, the data is unreadable without the decryption key. Modern cloud providers like AWS, Vercel, and Neon offer encryption at rest by default using AES-256, the same encryption standard used by the US government for classified information. Application-level encryption adds another layer by encrypting sensitive fields (like SSNs or payment data) in your code before they even reach the database, so even database administrators cannot read them.

Why It Matters

Encryption is your last line of defense when everything else fails. Firewalls can be bypassed, access controls can be misconfigured, and databases can be breached. But if the data itself is encrypted, the attacker gets a pile of meaningless bytes instead of customer records. For regulated industries, encryption is not optional, HIPAA requires encryption of protected health information, PCI DSS mandates it for payment data, and GDPR considers it a key technical safeguard. Beyond compliance, encryption at rest protects against physical theft (a stolen laptop or hard drive), unauthorized access by insiders (a rogue employee with server access), and backup exposure (database dumps left in accessible storage). Combined, encryption in transit and at rest ensures that data is protected throughout its entire lifecycle, from the moment a user types it to where it sits on a server years later.

What Happens Without It

In 2019, Capital One suffered a breach that exposed personal information of 106 million credit card applicants. While the initial breach exploited a misconfigured firewall, the severity was amplified because much of the data was stored unencrypted. Social Security numbers, bank account numbers, and credit scores were all readable once accessed. The breach resulted in an $80 million fine from the OCC and a $190 million class action settlement. In another case, the Anthem health insurance breach of 2015 exposed unencrypted records of 78.8 million people, including Social Security numbers, birth dates, and medical IDs. Anthem had no encryption on its database, a fact that regulators specifically cited. The breach cost Anthem $115 million in settlements. Had either company implemented proper encryption at rest, the stolen data would have been useless to the attackers, dramatically reducing the impact and regulatory penalties.

Every app I build includes encryption at rest and in transit by default.

(737) 637-1651