Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

IPsec Encryption

Direct answer

IPsec encryption protects confidentiality with symmetric ciphers such as AES-GCM or AES-CBC, using keys negotiated by IKE.

When to use this

Use it when choosing IPsec ciphers, or when peers fail to agree on encryption.

First 30 seconds

1. Use AES-GCM or AES-CBC with SHA-2.

2. Avoid DES/3DES/MD5.

3. Proposals must match peers.

4. Higher strength costs CPU.

5. Review against policy.

Operational verification

proposal negotiated → keys → encryption

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
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.

PlatformProtocol standard · Cisco IOS / IOS XE
Scope / prerequisiteUse it when choosing IPsec ciphers, or when peers fail to agree on encryption.
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.

3 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 Verification and what it shows Verify boundary

Read the active SA and record the negotiated encryption algorithm/key size, then generate matching traffic and confirm encaps/decaps counters move on both peers. Configuration allowing AES does not show AES was selected; the live SA is the effective-state evidence. Encryption does not by itself show integrity, identity or end-to-end application health.

Step 2 Observation → implication → next check Narrow the fault

Observation → implication → next check: negotiation rejection moves to algorithm/key-length compatibility and policy order. A live SA using an unexpected algorithm points to proposal preference or peer policy. Encrypted counters without application success move to selectors, routing, integrity/replay or remote service rather than changing the cipher blindly.

Step 3 Common mistakes Narrow the fault
  • Still allowing DES/3DES or DH groups 1, 2 or 5.
  • Choosing AES-CBC without an integrity algorithm.
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
Command lookup Jump straight to Cisco syntax
Key points
  • IKE SA and IPsec child SA are separate evidence boundaries
  • Proxy identities/selectors must agree at both peers
  • ESP commonly carries protected data; NAT traversal can encapsulate it in UDP 4500
  • Encaps and decaps counters must be interpreted with generated interesting traffic and the return path.
Key checks
  • show crypto ipsec sa detail — transform set (AES-GCM)
  • show crypto ikev2 sa detailed — IKE encryption
ReferenceWhy it matters1 section · depth on demand

How it works in operation

IPsec encryption protects payload confidentiality using the algorithm and key material negotiated for the active SA. Configured proposals are desired state; the effective algorithm is the one negotiated in the live SA. Encryption strength is separate from peer authentication, integrity/replay handling and whether the intended traffic is selected for IPsec.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Encryption in IPsec: keeping the payload confidential

ESP provides confidentiality by encrypting the payload, padding, pad length and next-header fields. RFC 4303 allows separate encryption and integrity algorithms, or combined-mode algorithms that provide both in one operation. The keys come from IKE: the IKE_SA_INIT Diffie-Hellman exchange creates shared secrets from which keys for the IKE SA and the Child SAs are derived (RFC 7296).

Algorithm choices

AlgorithmTypeStatus
AES-GCM 128/256Combined (encryption + integrity)Recommended
AES-CBC 128/256 with HMAC-SHA-256/384SeparateAcceptable
ChaCha20-Poly1305CombinedGood on devices without AES hardware
3DES, DESSeparateDeprecated; don't use

Diffie-Hellman groups

GroupTypeStatus
1, 2, 5768–1536-bit MODPToo weak
142048-bit MODPMinimum acceptable
19, 20, 21ECP 256/384/521-bitRecommended
R1(config)# crypto ikev2 proposal PROP
R1(config-ikev2-proposal)# encryption aes-gcm-256
R1(config-ikev2-proposal)# prf sha384
R1(config-ikev2-proposal)# group 20
R1(config)# crypto ipsec transform-set TS esp-gcm 256
R1(cfg-crypto-trans)# mode tunnel
R1(config)# crypto ipsec profile VTI-PROF
R1(ipsec-profile)# set pfs group20
R1# show crypto ipsec sa | include transform
        transform: esp-gcm 256 ,

Perfect forward secrecy

With PFS (set pfs group<n>), every Child SA rekey includes a new Diffie-Hellman exchange (RFC 7296 allows one in CREATE_CHILD_SA). If a long-term key is ever compromised, previously recorded traffic still can't be decrypted.

Padding and traffic-flow confidentiality

RFC 4303 allows 0–255 bytes of padding. Besides block alignment, padding can hide the real payload length, which is part of ESP's limited traffic-flow confidentiality.

Performance

Encryption is usually handled by crypto hardware on routers and firewalls. Throughput numbers in data sheets are often measured with large packets; with small packets (VoIP), real throughput is much lower.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

The encryption algorithm decides how well the tunnel's contents are protected and how much processing it costs. Modern deployments use AES, preferably in GCM mode, which encrypts and authenticates in one step. Old algorithms like DES and 3DES are breakable or deprecated and should be removed from proposals, along with weak Diffie-Hellman groups.

IPsec encryption choices:

AlgorithmStatus
AES-GCM 128/256Recommended (AEAD: encryption + integrity)
AES-CBC 128/256 + HMAC-SHA256+Acceptable
3DES, DESDeprecated — remove

Diffie-Hellman groups 19/20 (ECP 256/384) or 21; avoid groups 1, 2 and 5. Hardware crypto support matters: on routers, throughput limits often come from the crypto engine or licensing (throughput tiers), not the interface speed.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 docProtocol standard + deployed implementation RFC 4301

Authoritative/upstream documentation reviewed for bounded claims in Virtualization & Overlays → IPsec → Encryption. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4301.html · confidence 94%
Confirmation

Confirm action

Continue?