CompTIA Security+ Preparation · lesson 7 of 45 · 25 min
Symmetric Encryption Algorithms
Symmetric encryption uses the same key for encryption and decryption. Fast — used for bulk data encryption.
AES (Advanced Encryption Standard) — the gold standard for symmetric encryption. Block cipher. Key sizes: 128, 192, or 256 bits. AES-256 is used for top-secret data. Replaced DES and 3DES. Used in: TLS, disk encryption (BitLocker, FileVault), VPNs, Wi-Fi (WPA2/WPA3).
DES (Data Encryption Standard) — 56-bit key. Broken — do not use. Historical only.
3DES (Triple DES) — applies DES three times. 112-bit effective security. Being phased out. Slower than AES.
ChaCha20 — stream cipher. Fast on devices without AES hardware acceleration (mobile). Used in TLS 1.3 as an alternative to AES-GCM.
Modes of operation: ECB (insecure — same plaintext → same ciphertext), CBC (uses IV, sequential), CTR (counter mode, parallelizable), GCM (authenticated encryption — provides both confidentiality and integrity). AES-GCM is the preferred mode.
Asymmetric Encryption Algorithms
Asymmetric encryption uses a key pair: public key (encrypt/verify) and private key (decrypt/sign). Slower than symmetric — used for key exchange and digital signatures.
RSA (Rivest-Shamir-Adleman) — most widely used asymmetric algorithm. Security based on difficulty of factoring large numbers. Key sizes: 2048 bit minimum (4096 recommended). Used for: key exchange, digital signatures, certificate signing.
ECC (Elliptic Curve Cryptography) — smaller key sizes for equivalent security. 256-bit ECC ≈ 3072-bit RSA. Faster and more efficient. Used in: TLS, mobile devices, IoT. Variants: ECDSA (signatures), ECDH (key exchange).
DH (Diffie-Hellman) — key exchange protocol. Allows two parties to establish a shared secret over an insecure channel without transmitting the secret. DHE (ephemeral) provides perfect forward secrecy.
DSA (Digital Signature Algorithm) — used only for digital signatures (not encryption). Government standard. Being replaced by ECDSA.
Perfect Forward Secrecy
PFS (Perfect Forward Secrecy) means that session keys are not derived from a long-term key. If the long-term key is later compromised, past sessions cannot be decrypted. Achieved with DHE or ECDHE key exchange. Required for TLS 1.3.
Key Terms
Key Terms
Knowledge Check — 12 Questions
Security+ — Encryption Algorithms
Which symmetric encryption algorithm is the current gold standard?
- DES
- 3DES
- AES
- RSA
Answer: AES
AES (Advanced Encryption Standard) replaced DES and 3DES as the standard for symmetric encryption. AES-256 is used for top-secret data.
AES-GCM provides:
- Confidentiality only
- Integrity only
- Both confidentiality and integrity (authenticated encryption)
- Key exchange
- Answer: Both confidentiality and integrity (authenticated encryption)
GCM (Galois/Counter Mode) is an authenticated encryption mode — it provides both confidentiality and integrity verification. ECC provides equivalent security to RSA with:
- Larger key sizes
- Smaller key sizes
- The same key sizes
- No key at all
- Answer: Smaller key sizes
256-bit ECC provides security equivalent to 3072-bit RSA — much smaller keys mean faster operations and less computational overhead. Diffie-Hellman is used for:
- Encrypting data
- Digital signatures
- Key exchange over an insecure channel
- Hashing passwords
- Answer: Key exchange over an insecure channel
DH allows two parties to establish a shared secret without transmitting it — the shared secret is then used for symmetric encryption. Perfect Forward Secrecy (PFS) means:
- All keys are stored forever
- Past sessions cannot be decrypted if the long-term key is later compromised
- The same key is used for all sessions
- Keys are never changed
- Answer: Past sessions cannot be decrypted if the long-term key is later compromised
PFS uses ephemeral session keys — even if the server’s private key is stolen later, past recorded sessions remain encrypted.
DES is still considered secure for protecting sensitive data.
- True
- False
Answer: False
DES uses a 56-bit key and has been broken. It should never be used for new implementations — use AES instead.
Which AES mode is insecure because identical plaintext blocks produce identical ciphertext blocks?
- CBC
- CTR
- GCM
- ECB
Answer: ECB
ECB (Electronic Codebook) mode encrypts each block independently — same plaintext = same ciphertext, revealing patterns in the data.
RSA security is based on the difficulty of:
- Solving discrete logarithms
- Factoring large numbers
- Computing elliptic curves
- Reversing hash functions
- Answer: Factoring large numbers
RSA security relies on the computational difficulty of factoring the product of two large prime numbers. ECDSA is used for:
- Key exchange
- Symmetric encryption
- Digital signatures using elliptic curves
- Password hashing
- Answer: Digital signatures using elliptic curves
ECDSA (Elliptic Curve Digital Signature Algorithm) uses ECC for digital signatures — smaller and faster than RSA signatures.
TLS 1.3 requires _____ key exchange to provide perfect forward secrecy.
Answer: ephemeral
TLS 1.3 mandates ephemeral key exchange (DHE or ECDHE) — static RSA key exchange (which lacks PFS) was removed.
ChaCha20 is preferred over AES on:
- Servers with AES hardware acceleration
- Mobile devices without AES hardware acceleration
- Desktop computers
- Network switches
- Answer: Mobile devices without AES hardware acceleration
ChaCha20 is a software-efficient stream cipher — faster than AES on devices that lack dedicated AES hardware (many mobile/IoT devices). The minimum recommended RSA key size is:
- 512 bit
- 1024 bit
- 2048 bit
- 4096 bit
- Answer: 2048 bit
2048-bit RSA is the current minimum — 4096-bit is recommended for long-term security. Keys below 2048 bits are considered insecure.
Previous lesson: PKI: certificates, CAs, CRLs, OCSP, certificate types and use cases
Back to CompTIA Security+ Preparation
Next lesson: Hashing algorithms: MD5, SHA-1, SHA-256, HMAC, digital signatures