IPsec Cryptographic Algorithms and Cipher Suites
What you'll learn: You'll understand which cryptographic algorithms IPsec uses and how to balance security with performance.
The Core Idea
IPsec doesn't just protect your data—it lets you choose how to protect it. During IKE negotiation (which you learned in phases 1 and 2), both sides agree on a cipher suite: a combination of encryption, authentication, and key derivation algorithms. Think of it like ordering a security meal—you pick the encryption "entrée," the authentication "side dish," and the PRF (pseudorandom function) "dessert."
Common Algorithm Categories
Encryption (confidentiality):
- AES (128/192/256-bit): The gold standard—fast and secure
- 3DES: Legacy option, slow and outdated
- ChaCha20: Modern alternative, excellent on mobile devices
Authentication (integrity):
- HMAC-SHA256: Strong and widely supported
- HMAC-SHA1: Deprecated, avoid for new deployments
- HMAC-SHA512: Extra security margin, slightly slower
PRF (key derivation in IKE):
- PRF-HMAC-SHA256: Most common choice
- PRF-AES128: Hardware-accelerated on some platforms
Security Trade-Offs
Stronger algorithms (AES-256, SHA-512) offer better security margins but consume more CPU cycles. Weaker algorithms (3DES, SHA-1) are faster but vulnerable to modern attacks. The sweet spot for most deployments: AES-128 or AES-256 with HMAC-SHA256—proven security with excellent performance, especially with hardware acceleration (AES-NI on Intel/AMD processors).
Always prefer ESP over AH since ESP provides both encryption and authentication, while AH only authenticates.
Key Takeaway: IPsec cipher suites let you negotiate encryption, authentication, and PRF algorithms—choose modern options like AES-128/256 with SHA-256 for the best balance of security and performance.