Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Integrity Algorithms

Direct answer

IPsec integrity algorithms detect tampering, such as HMAC-SHA-256 or SHA-384. AES-GCM includes integrity itself; MD5 and SHA-1 should no longer be used.

When to use this

Use this when choosing IPsec integrity algorithms.

First 30 seconds

1. Integrity: HMAC-SHA2 or AEAD built-in.

2. No MD5; avoid SHA-1.

3. PRF for IKE (SHA-256+).

4. Truncation lengths correct (RFC 4868).

5. Interop check.

Operational verification

packet → integrity check value → verify

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • 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).
Platform / version applicability
Network security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetwork security
Key commandshow crypto ipsec sa detail | include transform
Scope / prerequisiteUse this when choosing IPsec integrity algorithms.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • Use SHA-256 or stronger.
  • AES-GCM includes integrity.
  • MD5 and SHA-1 are obsolete.
Key checks
  • ip xfrm state | grep auth — integrity algorithm
  • Proposal: HMAC-SHA-256/384/512 or AEAD — config
  • No MD5/SHA-1 — audit
ReferenceWhy it matters1 section · depth on demand

Recommended choices

UseAvoid
HMAC-SHA-256, SHA-384, SHA-512MD5, SHA-1
AEAD ciphers (AES-GCM) with no separate integrity

With IKEv2, the PRF (pseudo-random function) is configured separately and should also be SHA-2.

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.

AlgorithmStatus
SHA-512, SHA-384, SHA-256 (HMAC)Recommended
SHA-1 (HMAC)Deprecated — remove where possible
MD5Remove

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.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetwork security current

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%
Confirmation

Confirm action

Continue?