Use this when choosing IPsec integrity algorithms.
Integrity Algorithms
packet → integrity check value → verify
Context & applicabilityCommon mistakes · platform/version boundaries
- Configuring HMAC-SHA1 for compatibility and never removing it.
- Mixing up the IKE PRF and the ESP integrity algorithm when matching peers.
- Separate integrity configured together with AES-GCM, which some platforms reject.
- Truncated HMAC lengths not matching between vendors (SHA-256 96-bit vs 128-bit truncation in old implementations).
Operational reference
Fast context before you go deeper.
show crypto ipsec sa detail | include transformVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
show crypto ipsec sa detail | include transform
swanctl --list-sas
The negotiated transform shows the integrity algorithm, e.g. esp-sha256-hmac or none with esp-gcm.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Integrity algorithms in IPsec authenticate packets so tampering is detected. In IKEv2 they also serve as the PRF for key derivation. With AEAD encryption (AES-GCM) in ESP, integrity is built in and no separate algorithm is configured.
| Algorithm | Status |
|---|---|
| SHA-512, SHA-384, SHA-256 (HMAC) | Recommended |
| SHA-1 (HMAC) | Deprecated — remove where possible |
| MD5 | Remove |
Cloud providers and modern firewalls default to SHA-256 or stronger; mismatched integrity proposals are a frequent cause of tunnels failing to establish between different vendors.
Algorithms
| Algorithm | Status |
|---|---|
| HMAC-MD5 | Do not use |
| HMAC-SHA1 | Legacy, avoid |
| HMAC-SHA-256/384/512 | Recommended |
| AES-GCM (AEAD) | Integrity built in — no separate HMAC |
For IKE PRF use SHA-256 or stronger.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IPsec → Integrity Algorithms. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4301 · confidence 94%