K076 / Cryptographic protocols and formats
IPsec
IPsec is a suite of protocols for secure communication between two sites over the Internet.
CRYPTOGRAPHY LAB / K076
Cryptography Lab · IPsec
Run real computations and inspect intermediate states step by step.
Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.
IPsec ESP (RFC 4106 AES-GCM payload with AAD, no packet transport)
See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.Output
Previous state
- Definition and overview
- IPsec is a suite of protocols for secure communication between two sites over the Internet. Source document ↗
- Classification and reversibility
- ESP/AH processing includes decryption/authentication/integrity checks; ESP provides confidentiality with receiver decryption. Source document ↗
- Key or secret requirements
- IKE authentication uses secrets such as PSK; exchange derives ESP encryption keys. Source document ↗
- Operating principle and structure
- Negotiate AH/ESP IPsec SA pairs protected by IKE SA, then encrypt tunnel data. Source document ↗
- Key size, block size and parameters
- SEED available in IPsec uses 128-bit blocks. Source document ↗
- Security strength and recommendation
- Retire IKEv1; IKEv2 recommended. Source document ↗
- Known attacks and vulnerabilities
- CISA known-exploited list includes vendor IKE flaws such as CVE-2026-50751. Source document ↗
- Standards and certification
- IKEv2 standardized in RFC 7296 manages IPsec connection establishment. Source document ↗
- Typical uses
- VPN encrypting data between peers over IPsec tunnel. Source document ↗
- Implementations, libraries and tools
- DPDK IPsec library provides ESP/AH datapath processing. Source document ↗
- Decryption or decoding
- Check integrity/authentication on received ESP/AH packets, decrypt where applicable and remove related headers. Source document ↗
- Advantages
- ESP can provide confidentiality and data integrity together. Source document ↗
- Limitations and cautions
- PSK authentication is discouraged in source; use stronger authentication such as digital signatures. Source document ↗
- Distinguishing encryption, encoding and hashing
- AH provides integrity; ESP confidentiality and integrity, not encoding/hashing. Source document ↗
Practical examples
Example
Input IP packet and SA policy; output ESP-encapsulated ciphertext packet. IKEv2 negotiation, Child SA, ESP encryption/ICV, transmission, receiver verification/decryption.
Procedure
IKEv2 peer authentication/exchange/SA negotiation; confirm tunnel/transport mode and algorithm; build ESP headers/trailer, encrypt and generate ICV; verify ICV, decrypt and remove header on receipt. ESP requires keys; Base64 does not.
Scenario
HQ-branch and remote-access VPN use IKEv2 SA and ESP tunnels for internal traffic, also cloud-branch network-layer encryption.
Pitfalls and alternatives
Avoid IKEv1, overuse of PSK and vulnerable algorithms; use IKEv2, digital signatures and modern ciphers. Distinguish ESP confidentiality/integrity and AH integrity from encoding/hash.
References
- CycloneIPSEC | Embedded IPsec/IKEv2 Library for STM32, PIC32, ARM Cortex-M ↗
- 2. IPsec Packet Processing Library — Data Plane Development Kit 26.11.0 documentation ↗
- IPsec and IKEv2: Interactive Visualizer ↗
- IPSec Framework - AR500, AR510, AR531, AR550, AR1500, and AR2500 V200R010 CLI-based Configuration Guide - VPN - Huawei ↗
- draft-lee-ipsec-cipher-seed-01 - The SEED Cipher Algorithm and Its Use with IPsec ↗
- Guidance on securely configuring network protocols (ITSP.40.062) - Canadian Centre for Cyber Security ↗
- IPsec Security Guide: IKEv2, Algorithms, Hardening ↗
- Introduction to the IPsec Protocol :: strongSwan Documentation ↗