← Cryptography guide

K076 / Cryptographic protocols and formats

IPsec

IPsec ESP IKE · Survey date 2026-12-05

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.

Scope: Limited implementation

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.

Reference ↗

Open lab →

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

Examples are illustrative; they are not execution-tested implementations or operational recommendations.

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