01 / 20

Cloud
Encryption

Understand how encryption at rest and encryption in transit protect data in cloud services: the core concepts every cybersecurity student needs.

Cyber Security

What Is Encryption?

Encryption is the process of converting plaintext (readable data) into ciphertext (unreadable data) using a mathematical algorithm and a key. Only someone with the correct key can reverse the process and read the original data.

Why Cloud Encryption Matters

When you store files on a cloud service or send data over the internet, that data passes through networks you don't control and lives on servers you don't own. Without encryption, anyone who intercepts or accesses that data can read it.

✕ Without Encryption
Data is visible to anyone who gains access: hackers, rogue employees, or surveillance.
✓ With Encryption
Data appears as meaningless ciphertext. Even if stolen, it cannot be read without the key.

The Two States of Data

In cloud computing, data exists in two primary states that each require their own encryption strategy:

Data at Rest
Data stored on a disk, database, or storage service: not currently being transferred.
Data in Transit
Data actively moving across a network: between your device and a server, or between cloud services.

Encryption at Rest

CLOUD STORAGE Encrypted File A Encrypted File B Encrypted DB AES-256 KEY Attacker sees only ciphertext User has key

Encryption in Transit

Your Device Cloud Server TLS / HTTPS Encrypted Tunnel Eavesdropper cannot read data inside the tunnel Plaintext Plaintext Ciphertext in motion

At Rest vs. In Transit

At Rest In Transit
What it protects Stored data (files, databases) Data moving over networks
When it applies Data is sitting on a disk Data is being sent or received
Common protocols AES-256, BitLocker TLS, HTTPS, SSH
Threat defended Physical theft, unauthorized access Eavesdropping, MITM attacks
Key management Provider-managed or customer-managed Negotiated per session (handshake)

Symmetric vs. Asymmetric Keys

Symmetric
One shared key encrypts and decrypts. Fast and efficient. Used for data at rest (e.g., AES-256).
Asymmetric
A public key encrypts; a private key decrypts. Slower but solves key exchange. Used to start TLS sessions.

The TLS Handshake Simplified

Client Server 1. ClientHello (supported ciphers) 2. ServerHello + Certificate + Public Key 3. Client sends encrypted session key 4. Symmetric encrypted communication

How to Secure Cloud Data

1
Enable encryption at rest. Verify your cloud provider uses AES-256 or equivalent for all stored data.
2
Enforce HTTPS everywhere. Ensure all connections use TLS 1.2 or 1.3: never send data over plain HTTP.
3
Manage your keys. Decide between provider-managed keys (easier) or customer-managed keys (more control).
4
Rotate keys regularly. Set a key rotation schedule (e.g., every 90 days) to limit exposure from a compromised key.
5
Audit and monitor. Use logging to track who accessed encrypted data and when keys were used.

Example: Sending a Confidential File

Sender report.pdf TLS CLOUD SERVER AES-256 encrypted Encrypted at rest TLS Recipient report.pdf In Transit: TLS protects the upload and download At Rest: AES-256 protects the stored file

Example: Database Breach Scenario

A hospital stores patient records in a cloud database. An attacker gains unauthorized access to the storage system. What happens?

✕ No Encryption at Rest
The attacker reads all patient names, diagnoses, and social security numbers in plaintext. This is a catastrophic data breach.
✓ With Encryption at Rest
The attacker sees only ciphertext: random-looking bytes. Without the decryption key, the data is useless. The breach impact is drastically reduced.

Example: Man-in-the-Middle Attack

User Server Scenario A: No TLS Attacker reads Password: hunter2 Scenario B: With TLS Encrypted TLS Tunnel Attacker sees x7f2a...b9e1 (gibberish)

Key Management Models

Who holds the encryption key determines your level of control and trust:

Provider-Managed
The cloud provider generates, stores, and rotates keys automatically. Easiest setup but you trust the provider fully.
Customer-Managed
You generate and control the keys using a Key Management Service (KMS). More work but more control over access.
Client-Side
Data is encrypted before upload. The provider never sees the key or plaintext. Maximum security and privacy.

Common Mistakes

✕ Only Encrypting in Transit
Using HTTPS but leaving data unencrypted on disk. A server breach exposes everything in plaintext.
✕ Storing Keys with Data
Keeping the encryption key in the same database as the encrypted data. If the attacker gets both, encryption is useless.
✕ Using Outdated Protocols
Running TLS 1.0 or SSL 3.0 which have known vulnerabilities. Always enforce TLS 1.2 or 1.3.

Question 1 of 5

Which type of encryption protects data that is stored on a cloud server's hard drive?

Question 2 of 5

What protocol does HTTPS use to encrypt data traveling between your browser and a web server?

Question 3 of 5

During a TLS handshake, the client and server use asymmetric encryption to securely exchange a:

Question 4 of 5

A company encrypts its cloud database but stores the encryption key in the same database. Why is this a security problem?

Question 5 of 5

In client-side encryption, when does the cloud provider have access to your plaintext data?