01 / 21

Encryption &
Data Protection

Master the methods that safeguard confidentiality, integrity, and availability of data: from symmetric and asymmetric encryption to hashing and key management.

CPA (ISC)

What Is Encryption?

Encryption transforms plaintext (readable data) into ciphertext (unreadable data) using a mathematical algorithm and a key. Only someone possessing the correct key can reverse the process and recover the original data.

Plaintext Algorithm + Key Ciphertext

Why Data Protection Matters

Organizations face legal, financial, and reputational consequences when data is breached. Encryption and data protection controls address three pillars of information security:

Confidentiality
Only authorized parties can read the data. Encryption is the primary control.
Integrity
Data has not been altered in transit or at rest. Hashing and digital signatures verify this.
Availability
Data is accessible when needed. Key management and backup strategies ensure recovery.

Three States of Data

Data protection methods must address data in every state. Each state has unique vulnerabilities and appropriate controls:

Data at Rest
Stored on disk, database, or backup media. Protected by full-disk encryption (FDE) and database encryption.
Data in Transit
Moving across networks. Protected by TLS/SSL, VPN tunnels, and IPsec protocols.
Data in Use
Being processed in memory. Hardest to protect: uses secure enclaves, memory encryption, and access controls.

Symmetric Encryption

Symmetric encryption uses a single shared key for both encryption and decryption. It is fast and efficient for large volumes of data.

Sender Shared Key (K) Encrypt Ciphertext Decrypt Receiver Same Key Examples: AES-256, 3DES, Blowfish

Asymmetric Encryption

Asymmetric encryption (public-key cryptography) uses a key pair: a public key for encryption and a private key for decryption. It solves the key distribution problem.

Sender Receiver's Public Key Encrypt Ciphertext Receiver's Private Key Decrypt Receiver Examples: RSA, ECC, Diffie-Hellman (key exchange)

Symmetric vs Asymmetric

Symmetric Asymmetric
Keys 1 shared key Key pair (public + private)
Speed Fast Slow
Key Distribution Difficult Easy (public key shared openly)
Best For Bulk data encryption Key exchange, digital signatures
Examples AES, 3DES, Blowfish RSA, ECC, Diffie-Hellman
Key Length (typical) 128 or 256 bits 2048 or 4096 bits

Hashing for Integrity

A hash function takes any input and produces a fixed-length output called a digest. Hashing is one-way: you cannot reverse the digest back to the original data.

Any Input (any size) Hash Function SHA-256, SHA-3 Digest (fixed size) ✕ Not reversible
1
Deterministic: Same input always produces the same hash.
2
Collision-resistant: It should be computationally infeasible for two different inputs to produce the same hash.
3
Avalanche effect: A tiny change in input drastically changes the output digest.

Digital Signatures

A digital signature combines hashing and asymmetric encryption to provide authentication, integrity, and non-repudiation.

1
Hash the message: The sender creates a digest of the original message using a hash function (e.g., SHA-256).
2
Encrypt the hash: The sender encrypts the digest with their private key. This encrypted hash is the digital signature.
3
Verify: The receiver decrypts the signature with the sender's public key, hashes the message independently, and compares the two digests.

Key Management Lifecycle

Encryption is only as strong as its key management. A compromised key renders all encryption worthless. The key lifecycle includes:

1. Generation 2. Distribution 3. Storage 4. Usage 5. Rotation 6. Destruction

How to Assess Encryption Controls

When evaluating an organization's encryption and data protection methods, follow this structured approach:

1
Identify data classification: Determine what data is sensitive (PII, PHI, financial data) and where it resides.
2
Map encryption to data states: Verify encryption is applied at rest, in transit, and (where feasible) in use.
3
Evaluate algorithm strength: Confirm use of current standards (AES-256, RSA-2048+, SHA-256+). Flag deprecated algorithms (DES, MD5, SHA-1).
4
Review key management: Check for documented generation, distribution, storage, rotation, and destruction procedures.
5
Test compliance: Validate against regulatory requirements (SOC 2, GDPR, HIPAA, PCI DSS).

Example 1: TLS Handshake

When you visit a website with HTTPS, your browser performs a TLS handshake that combines asymmetric and symmetric encryption:

Browser Server 1. Client Hello (supported ciphers) 2. Server Hello + Certificate (public key) 3. Pre-master secret (encrypted with public key) 4. Both derive session key (symmetric) 5. Encrypted communication (AES)

Example 2: Evaluating a Database

A CPA is reviewing an e-commerce company's database that stores credit card numbers. Here is the assessment checklist:

1
Data at rest: Is the database encrypted? The company uses AES-256 Transparent Data Encryption (TDE). ✓ Pass
2
Data in transit: Are connections encrypted? API calls use TLS 1.3. ✓ Pass
3
Key storage: Where are encryption keys stored? Keys are in a Hardware Security Module (HSM), not on the same server. ✓ Pass
4
Key rotation: How often are keys rotated? The company has no documented rotation schedule. ✕ Finding
5
PCI DSS compliance: Cardholder data must be masked when displayed. Some admin screens show full card numbers. ✕ Finding

Example 3: Identifying Weak Encryption

During a SOC 2 audit, you discover the following encryption configurations. Which are acceptable?

✓ AES-256
Current NIST standard. Widely accepted for data at rest and in transit. No known practical attacks.
✕ DES (56-bit)
Deprecated since 1999. Can be brute-forced in hours. Must be replaced immediately.
✕ MD5 (hashing)
Collision vulnerabilities discovered. Not suitable for integrity checks. Use SHA-256 or SHA-3 instead.
✓ RSA-2048
Currently acceptable for asymmetric operations. RSA-4096 recommended for high-sensitivity applications.

Common Mistakes

✕ Confusing Encryption with Hashing
Encryption is reversible (with a key). Hashing is one-way. Hashing does not provide confidentiality; it provides integrity verification.
✕ Storing Keys with Data
If encryption keys are stored on the same server as encrypted data, a breach exposes both. Keys must be stored separately (HSM or key vault).
✕ Using Deprecated Algorithms
DES, RC4, MD5, and SHA-1 are all deprecated. Using them creates audit findings. Always verify algorithm currency.
✕ Ignoring Data in Transit
Encrypting data at rest but transmitting over unencrypted channels (HTTP instead of HTTPS) leaves data vulnerable to interception.

Summary: Protection Methods

Method Purpose Examples CIA Pillar
Symmetric Encryption Bulk data confidentiality AES-256, 3DES Confidentiality
Asymmetric Encryption Key exchange, signatures RSA, ECC Confidentiality
Hashing Data integrity verification SHA-256, SHA-3 Integrity
Digital Signatures Authentication + integrity RSA + SHA-256 Integrity
TLS / SSL Data-in-transit protection TLS 1.3 Confidentiality
Key Management Lifecycle control of keys HSM, Key Vault Availability

Question 1 of 5

Which type of encryption uses a single shared key for both encryption and decryption?

Question 2 of 5

A CPA discovers a company stores its encryption keys on the same database server as the encrypted data. What is the primary risk?

Question 3 of 5

Which of the following algorithms is deprecated and should be flagged as a finding during an audit?

Question 4 of 5

In a TLS handshake, the pre-master secret is encrypted using the server's public key. This is an example of which type of encryption?

Question 5 of 5

A digital signature provides non-repudiation because: