Skip to content

RADIUS, EAP and IKEv2: GTC, MSCHAPv2 and their security boundaries

Original English article

๐Ÿ” RADIUS EAP with IKEv2: Understanding EAP-GTC & EAP-MSCHAPv2

For remote-access VPNs, a possible architecture combines RADIUS , EAP (Extensible Authentication Protocol), and IKEv2 for separate transport, authentication and AAA roles. Enterprise Wi-Fi usually carries EAP over 802.1X instead of IKEv2. Two methods worth comparing are EAP-GTC and EAP-MSCHAPv2 . Understanding how each works—and when to use which—is essential for network architects, security engineers, and IT administrators.

๐Ÿ—️ The Big Picture: RADIUS + EAP + IKEv2 Architecture
๐Ÿ‘ค Client
(Supplicant)
⟺
๐Ÿ”’ IKE_AUTH exchange
(encrypted IKE messages)
⟺
๐ŸŒ VPN / NAS
(Authenticator)
⟺
๐Ÿ–ง RADIUS
Server
⟺
๐Ÿ—„️ Identity
(backend depends on method)
VPN path: EAP in encrypted IKE_AUTH messages; gateway proxies EAP to RADIUS. The gateway–RADIUS link needs its own protection. ESP carries user traffic after a Child SA is established. Source: RFC 7296: IKEv2 §§2.15–2.16; strongSwan eap-radius;

๐Ÿ“ก What is RADIUS?

RADIUS (Remote Authentication Dial-In User Service, RFC 2865/2866) is a client-server protocol that provides Authentication, Authorization, and Accounting (AAA) services. In the context of IKEv2 VPNs, the NAS (Network Access Server) — typically a VPN gateway — acts as a RADIUS client. It forwards authentication data from the end-user to the RADIUS server (e.g., Cisco ISE, FreeRADIUS, Microsoft NPS), which in turn validates the credentials against a backend identity store.

๐Ÿ“ฆ RADIUS Packet Flow for EAP Authentication
1. Access-Request
EAP response or configured EAP start
→
2. Access-Challenge
EAP-Request
→
3. Access-Request
EAP-Response
→
4. Access-Accept / Access-Reject
EAP result and policy attributes
Traditional RADIUS commonly uses UDP 1812 for authentication and 1813 for accounting. EAP-Message is attribute 79; RFC 3579 requires Message-Authenticator on packets carrying it. Integrity protection is not encryption of the EAP payload; protect the AAA path separately and follow supported current implementations. Source: RFC 3579: RADIUS and EAP;

๐Ÿ”‘ What is EAP?

EAP (RFC 3748) is an authentication framework — not a specific authentication mechanism. It defines a set of message types (Request, Response, Success, Failure) and allows pluggable methods such as EAP-TLS, EAP-TTLS, PEAP, EAP-GTC and EAP-MSCHAPv2. IKEv2 carries EAP during encrypted IKE_AUTH exchanges, after IKE_SA_INIT but before authentication completes. Encryption at this stage is not a substitute for validating the gateway identity. Source: RFC 3748: EAP and GTC; RFC 7296: IKEv2 §§2.15–2.16;

๐Ÿ›ก️ What is IKEv2?

IKEv2 establishes and maintains IPsec security associations. EAP support is part of the base protocol described in RFC 7296; RFC 5998 is a separate EAP-only authentication extension for suitable mutually authenticating, key-generating methods. The base EAP flow below uses gateway public-key authentication. Product and client support must be checked rather than assumed universal. Source: RFC 5998: EAP-only extension;

๐Ÿ”„ IKEv2 Exchange with EAP — Step by Step
IKE_SA_INIT →
Diffie-Hellman key exchange, nonces, SA proposals
← IKE_SA_INIT
DH public key, nonce, chosen SA, certificate request
IKE_AUTH →
Client sends IDi (identity), no AUTH payload (signals EAP)
← IKE_AUTH
Gateway sends identity, certificate if needed, and AUTH; client validates trust and expected identity
← EAP-Request
Server requests EAP identity or a method exchange
EAP-Response →
Client responds (credentials, challenge response, etc.)
... (multiple rounds possible) ...
← EAP-Success
RADIUS Access-Accept → IKEv2 forwards EAP-Success
IKE_AUTH →
Client AUTH uses the EAP MSK when generated; otherwise SK_pi under the base specification
← IKE_AUTH
Gateway AUTH uses the corresponding key; accepted authentication and policy allow Child SA creation

⚡ EAP-GTC (Generic Token Card) — RFC 3748

What is EAP-GTC?

EAP-GTC is a simple text challenge/response method defined in RFC 3748. It can carry token output or another user-entered response; the method itself does not encrypt that response or derive session keys. One supported deployment pattern is GTC inside a PEAP tunnel, often called PEAP-GTC . Source: RFC 3748: EAP and GTC;

๐ŸŽฏ EAP-GTC Authentication Flow
Supplicant
RADIUS / Auth Server
Server →
EAP-Request/GTC
"Enter password:" (prompt text)
EAP-Response/GTC
Cleartext Password / OTP
→ Server
Server →
EAP-Success ✅
(RADIUS Access-Accept)
⚠️ Security Note: EAP-GTC transmits the password in plaintext . Use a server-authenticated protected channel appropriate to the deployment, such as supported PEAP/TTLS encapsulation or the IKEv2 model discussed here. Validate the expected server before sending a secret; the name of a tunnel alone is not a security guarantee.

๐Ÿ“‹ Illustrative GTC packet fields — sample token, not real credentials


EAP-Request (GTC):
+--------+--------+--------+--------+-------------------------+
|  Code  | Ident  |     Length      |  Type  |  Message (text) |
|  0x01  | 0xXX   |     0xXXXX      |  0x06  | "Enter OTP:"    |
+--------+--------+--------+--------+-------------------------+

EAP-Response (GTC):
+--------+--------+--------+--------+-------------------------+
|  Code  | Ident  |     Length      |  Type  |  Value (token)  |
|  0x02  | 0xXX   |     0xXXXX      |  0x06  | "847291"        |
+--------+--------+--------+--------+-------------------------+
  EAP Type 6 = GTC

✅ When & Where EAP-GTC is Used

  • OTP / Token-based Authentication: A backend may validate RSA SecurID, TOTP or other token responses if that integration and the client prompt are supported. GTC does not itself implement the token algorithm, enforce one-time use or make OTP phishing-resistant. Source: NIST SP 800-63B-4: phishing resistance;
  • PEAP-GTC with Cisco Infrastructure: PEAP-GTC is an interoperability choice on implementations supporting that inner method; it is not a universal Cisco default. Its backend can validate a supplied password or token without computing an MSCHAPv2 response, subject to the backend’s actual capabilities.
  • Non-Windows Clients: Support depends on the supplicant, OS version, configured EAP profile and backend—not just the operating-system family. LDAP password validation and AD challenge-response validation are different integration paths.
  • IKEv2 with EAP-GTC: strongSwan documents an IKEv2 eap-gtc plugin. GTC generates no MSK: RFC 7296 discourages non-key-generating EAP methods and defines SK_pi/SK_pr for their final AUTH computations. Treat support as implementation-specific and validate the server; this is not the RFC 5998 EAP-only model. Source: strongSwan eap-gtc; RFC 7296: IKEv2 §§2.15–2.16;
๐Ÿ—บ️ Example PEAP-GTC path for 802.1X
๐Ÿ“ฑ Mobile Client
PEAP-GTC
๐Ÿ”’ TLS
๐ŸŒ Access point / WLC
NAS / Authenticator
RADIUS
๐Ÿ–ง Cisco ISE /
FreeRADIUS
→
๐Ÿ”‘ RSA SecurID /
LDAP
PEAP TLS runs between the supplicant and the EAP server through the NAS. Server validation and protection of the backend leg remain necessary. This is a different path from direct EAP-GTC in IKEv2.

๐Ÿ” EAP-MSCHAPv2 — Microsoft EAP encapsulation of RFC 2759

What is EAP-MSCHAPv2?

EAP-MSCHAPv2 is Microsoft's encapsulation of the MS-CHAPv2 (Microsoft Challenge Handshake Authentication Protocol v2) within the EAP framework. Unlike EAP-GTC, it uses a mutual challenge-response mechanism that proves possession of password-derived material without sending the password itself. Captured exchanges can still enable offline attacks, so this does not replace server-certificate validation and a protected channel. Windows supports this method in documented profiles, but behavior depends on version, policy and Credential Guard; do not disable platform protection simply to preserve legacy SSO. Source: Microsoft: Credential Guard considerations; Microsoft: VPN authentication;

๐Ÿ”„ EAP-MSCHAPv2 Detailed Authentication Flow
Client
Message
RADIUS Server
Step 1
Server → Client:
EAP-Request/Identity
Step 2
Client → Server:
EAP-Response/Identity
Username
Step 3
Server → Client:
EAP-Request/MSCHAPv2
OpCode=1 (Challenge): 16-byte Server Challenge (SC)
Step 4
Client → Server:
EAP-Response/MSCHAPv2
OpCode=2: includes a 16-byte PeerChallenge and 24-byte NT-Response (other packet fields omitted)
Step 5
Server → Client:
EAP-Request/MSCHAPv2
OpCode=3 (Success): AuthenticatorResponse string
Step 6
Client → Server:
EAP-Response/MSCHAPv2
OpCode=3 acknowledgment only after the client validates AuthenticatorResponse Source: Microsoft: EAP-MSCHAPv2 syntax;
Step 7
Server → Client:
EAP-Success ✅

๐Ÿงฎ MSCHAPv2 cryptographic outline — explanatory, not an implementation

Explanatory notation, not runnable cryptographic code.
|| means byte concatenation. UserName excludes a prepended domain.
Challenge = SHA1(PeerChallenge || AuthenticatorChallenge || UserName)[0:8]
PasswordHash = MD4(UTF16LE(Password))
PasswordHashHash = MD4(PasswordHash)
PaddedHash = PasswordHash zero-padded to 21 bytes
K1, K2, K3 = its three 7-byte pieces, converted to DES keys with parity
NTResponse = DES(K1, Challenge) || DES(K2, Challenge) || DES(K3, Challenge)
Digest1 = SHA1(PasswordHashHash || NTResponse || Magic1)
Digest2 = SHA1(Digest1 || Challenge || Magic2)
AuthenticatorResponse = "S=" || uppercase_hex(Digest2)
Magic1 and Magic2 are the distinct byte constants in RFC 2759 section 8.7.
This legacy construction is not a recommendation for new cryptography.

Outline references: RFC 2759: MS-CHAPv2; Microsoft: EAP-MSCHAPv2 syntax;

✅ When & Where EAP-MSCHAPv2 is Used

  • PEAP-MSCHAPv2 (802.1X Wi-Fi): A common legacy enterprise Wi-Fi profile wraps EAP-MSCHAPv2 in PEAP. The TLS server name and trusted CA must be enforced; relying on a user to accept any presented certificate defeats the protection.
  • IKEv2 + EAP-MSCHAPv2 VPN: Microsoft documents EAP-MSCHAPv2 for its built-in VPN authentication. An IKEv2 gateway may handle the method locally or proxy EAP to RADIUS; the latter is an explicit configuration choice. Always On VPN has multiple authentication designs, so validate the actual profile and security policy. Source: Microsoft: VPN authentication;
  • Active Directory Integration: The verifier needs suitable password-derived material or a service able to validate the challenge response. AD integration may delegate to a domain controller, for example through Samba/winbind in FreeRADIUS. It is not a generic LDAP read of AD NT hashes or a Kerberos replacement for MSCHAPv2. Source: FreeRADIUS: AD integration (4.0 documentation);
  • Legacy PPP/SSTP: MSCHAPv2 was defined for PPP and appears in legacy VPN authentication designs. That history is not a recommendation to deploy PPTP or to treat all PPP-based transports as equivalent.
๐Ÿ—บ️ EAP-MSCHAPv2 with IKEv2 VPN — Full Stack
Windows Client
IKEv2/EAP
IKEv2+ESP
VPN Gateway
(NAS/RADIUS Client)
RADIUS UDP/1812
NPS / ISE
RADIUS Server
Backend-specific validation
Active Directory
Domain-controller validation
EAP is proxied only when configured; the RADIUS verifier may delegate challenge-response validation to AD. Protect each link and avoid authorizing solely from an unverified claimed username. Source: strongSwan eap-radius;

⚖️ EAP-GTC vs EAP-MSCHAPv2 — Side-by-Side Comparison

๐Ÿ“Š EAP-GTC vs EAP-MSCHAPv2 Comparison Table
Feature EAP-GTC EAP-MSCHAPv2
RFC / Standard RFC 3748 (Type 6) Microsoft EAP; RFC 2759; RFC 3079 for keys
Password Transmission Cleartext (needs authenticated protection) NT-Hash Challenge-Response
Mutual Authentication No, not by GTC alone Yes (password-derived proof; still validate server)
OTP / Token Support Carries a supported backend’s token response Not a native generic OTP transport
Active Directory Depends on backend (for example, supported password validation) Backend integration required (challenge-response validation)
Windows Native Support Check the chosen client (often requires another supplicant) Documented in Windows profiles (version and policy dependent)
Complexity Simple (core challenge/response; outer rounds vary) Moderate (identity, challenge and success exchanges)
IKEv2 EAP Usage Implementation-specific; no EAP MSK Supported profiles; verify policy
PEAP Inner Method PEAP-GTC where supported PEAP-MSCHAPv2 where configured
Security Without Tunnel ❌ Insecure ⚠️ Vulnerable to offline attack

๐Ÿšจ Security Considerations

๐Ÿ›ก️ Qualitative risks — no measured risk scores
Attack Vector EAP-GTC Risk EAP-MSCHAPv2 Risk Mitigation
Credential Eavesdropping Response visible without protected channel Password not sent, but captured response is sensitive Authenticate the server and protect the complete path
Rogue AP / MITM Secret or OTP can be relayed Captured challenge-response enables attacks Validate server certificate strictly
Offline Dictionary Attack Depends on response type; GTC may carry a password Known weakness of the legacy construction Prefer supported certificate-based designs; protect legacy exchanges
Replay Attack Depends on backend one-time-use and freshness checks Fresh challenges help; implementation still matters Enforce token replay checks; use fresh challenges; OTP can still be phished
✅ Best Practice: For new compatible deployments, evaluate EAP-TLS with managed certificate issuance, private-key protection, server validation and revocation/renewal policy. If a legacy password profile uses PEAP-MSCHAPv2 , validate its TLS server strictly. If it uses PEAP-GTC , an OTP does not make it phishing-resistant: an attacker can relay manually entered codes. Keep protected-channel validation and backend controls. Source: NIST SP 800-63B-4: phishing resistance; Microsoft: Credential Guard considerations;

⚙️ Configuration review, not deployment instructions

strongSwan: distinguish local EAP from a RADIUS proxy

NON-EXECUTABLE strongSwan REVIEW CHECKLIST
- Decide whether EAP is verified locally or proxied to RADIUS.
- The original rightauth=eap-mschapv2 selects a local EAP method;
  it does not alone configure a RADIUS backend.
- The eap-radius plugin provides proxying when explicitly configured.
- Review the installed release and its swanctl.conf/plugin documentation.
- Verify gateway certificate trust and expected identity on each client.
- Review allowed algorithms, client addressing, traffic selectors,
  routing, policy, revocation and the independently protected AAA path.
- Review secret handling without embedding credentials in examples.
- Test compatibility and failure cases in an authorized isolated lab.
No configuration is applied and no credentials are accessed here.

Outline references: strongSwan eap-radius;

FreeRADIUS: version-specific EAP/backend review

NON-EXECUTABLE FreeRADIUS REVIEW CHECKLIST
- Identify the actual server version; configuration schemas differ.
- Choose the EAP method and, where applicable, its protected outer method.
- For MSCHAPv2, identify the supported challenge-response verifier.
- For GTC, identify the actual password or OTP validation backend.
- PAM and an OTP module are not interchangeable just because a comment says so.
- Configure server identity, trust, access policy and AAA transport protection.
- Test token reuse, wrong passwords, wrong server identity and backend failure.
- Keep secrets out of logs and review material.
This is not a deployable eap.conf file and has not been executed.

Outline references: FreeRADIUS: AD integration (4.0 documentation);

๐Ÿ Summary

Both EAP-GTC and EAP-MSCHAPv2 solve different integration problems. GTC carries a text response and relies on authenticated channel protection and backend token/password checks; OTP is not inherently phishing-resistant. MSCHAPv2 provides legacy password-derived challenge-response, not modern immunity to offline attacks. Match the EAP method, transport, client, AAA service and identity backend explicitly. For a new supported design, evaluate EAP-TLS with sound certificate lifecycle and private-key management. No method label alone guarantees a secure deployment. Source: Microsoft: Credential Guard considerations;

๐ŸŽฏ Quick Decision Guide: Which EAP Method?
๐Ÿ”‘ EAP-GTC
✔ OTP / Token cards
✔ Verified client support
✔ Compatible password/token backend
✔ Supported PEAP or IKEv2 profile
๐ŸชŸ EAP-MSCHAPv2
✔ Legacy AD integration when required
✔ Verified IKEv2/Windows policy
✔ Protected legacy 802.1X profile
✔ Migration plan for legacy password use
๐Ÿ† EAP-TLS
✔ Strong design when correctly managed
✔ Certificate-based
✔ Protect keys; passwords are not the only risk
✔ Evaluate support and certificate lifecycle

Post a Comment

Previous Post Next Post