Attach & Authentication (EPS-AKA) in LTE 4G
Initial Attach, the EPS-AKA authentication run, and NAS security setup.
Before an LTE UE can carry a single byte of user traffic it has to introduce itself to the network, and both sides have to prove who they are before anything sensitive flows. That introduction is the EPS Attach procedure; the proof is the EPS-AKA authentication run woven into it. This page walks the control-plane spine end to end โ the NAS signalling between UE, MME and HSS, plus the S-GW/P-GW leg that lights up the first bearer โ grounded in TS 24.301 (NAS protocol), TS 23.401 (EPS procedures) and TS 33.401 (security architecture).
Introduction
EPS Attach is the first full NAS procedure a UE runs against an LTE network, and it is the gate everything else passes through. In one continuous run it registers the UE with the MME, authenticates both parties, switches on NAS security, and — piggybacked on the very first message — asks for the first PDN connection so the UE ends up with an IP address and a working default bearer.
It sits at the power-on end of the UE lifecycle. Before attach, the UE is EMM-DEREGISTERED: unknown to the core, unauthenticated, unable to send or receive user data. After a successful attach it is EMM-REGISTERED and ECM-CONNECTED, pageable, secured, and carrying traffic. Every later procedure — Service Request, Tracking Area Update, dedicated-bearer setup, handover — assumes attach already happened.
Attach is a multi-message, multi-node procedure (UE, eNB, MME, HSS, S-GW, P-GW), so when it fails, it fails at an identifiable point: identity resolution, authentication, security mode, the S-GW/P-GW session, or the final accept/complete. Learning to walk it message by message turns "attach failed" into a specific, testable hypothesis.
On this page
Why attach is needed
In plain words: attach is like the first day at a secure office. You show ID at the desk (identity), the guard checks it against head office and you check the guard's badge too (mutual authentication), you're issued an access card (NAS security context), and only then are you given a desk with a network drop (the default bearer and IP address). Nobody gets to use the network until all of that is done, once.
The network must not serve an unauthenticated device, and the UE must not trust a rogue base station — so attach is the one moment where mutual authentication and NAS security are established before any user traffic, paging, or location updates are allowed. It is also the cheapest place to hand the UE its first data pipe: by piggybacking a PDN Connectivity Request on the Attach Request, registration and connectivity complete in a single run rather than two.
A NAS-level registration between the UE and the MME. The UE sends an Attach Request carrying an identity (GUTI or IMSI), its UE network capability, and โ nested inside an ESM container โ a PDN Connectivity Request.
The network must not serve an unauthenticated device, and the UE must not trust a rogue base station. Attach is the one moment where mutual authentication and NAS security get established before user traffic, paging, or location updates are allowed.
Identity → EPS-AKA (a challenge/response using vectors the MME fetches from the HSS) → NAS Security Mode Command/Complete → default bearer setup toward the S-GW/P-GW → Attach Accept and Attach Complete.
What EPS Attach Is
Attach is how a UE registers with the Evolved Packet System. In one continuous run it establishes a NAS signalling relationship with the MME, authenticates both parties, switches on NAS ciphering and integrity, and โ piggybacked on the very first message โ requests the first PDN connection so the user walks away with an IP address and a working default bearer. Nothing else the UE ever does over LTE happens until attach completes, which is why every design decision here is about establishing trust and state in the fewest possible round trips.
Two protocols share the NAS layer during attach and it pays to keep them separate in your head. EMM (EPS Mobility Management) owns the mobility and security half โ Attach Request, Authentication Request, Security Mode Command, Attach Accept. ESM (EPS Session Management) owns the bearer half โ PDN Connectivity Request and Activate Default EPS Bearer Context Request. During attach the ESM messages do not travel on their own: they ride inside an ESM message container IE carried by the EMM messages. That nesting is what lets a single Attach Request both register the device and ask for connectivity, and it is the detail that trips up most people reading a NAS trace for the first time.
Two authentications in one run: the UE authenticates the network by checking AUTN, and the network authenticates the user by comparing RES against XRES. Both must pass โ that is what "mutual" means, and it is the property GSM lacked.
The Attach Request and Its Contents
The Attach Request is the first NAS message the UE sends, and it is dense. It is delivered to the eNB inside an RRC RRCConnectionSetupComplete, which the eNB forwards to the MME as the NAS payload of an S1AP Initial UE Message. Because it is sent before any security context exists, the message goes out with no ciphering and, on a fresh attach, no integrity protection either โ a constraint that shapes everything the network does next.
The IEs that matter most:
EPS attach typeโ tells theMMEwhat kind of registration this is: a plain EPS attach, a combined EPS/IMSI attach (for a UE that also wants circuit-switched services via anMSC), or an emergency attach.EPS mobile identityโ the identity, either anIMSI(permanent) or, far more commonly, aGUTI(temporary) from a prior attach.UE network capabilityโ a bitmap of the security algorithms the UE supports: the EPS encryption algorithms (EEA0โEEA3) and integrity algorithms (EIA0โEIA3). TheMMEuses this list to choose the NAS algorithms it will command later, so it must be delivered before ciphering is on โ and it is echoed back protected during Security Mode to defeat bidding-down attacks.NAS key set identifier(KSIASME, also writteneKSI) โ a small index that names a cached security context. If the UE and network still share a validKASMEfrom a previous run, this lets them skip a fresh authentication entirely.ESM message containerโ the nestedPDN Connectivity Request, carrying the requested PDN type (IPv4, IPv6, IPv4v6), an optionalAPN, and PCO (Protocol Configuration Options) for things like DNS server discovery.
EPS attach type | Meaning | Typical trigger |
|---|---|---|
EPS attach | Register for packet (EPS) services only. | Data-only device, or VoLTE handset in a network using IMS for voice. |
Combined EPS/IMSI attach | Register for EPS and non-EPS (CS-domain) services in one shot; the MME performs a Location Update toward the MSC/VLR via the SGs interface. | Handset relying on CS Fallback for voice/SMS. |
EPS emergency attach | Attach purely to place an emergency call; may proceed even without a valid subscription or with authentication skipped per operator policy. | Emergency call from a UE with no (or a failed) USIM. |
Reading a trace: if you see an Attach Request with an ESM message container but no visible PDN Connectivity Request, look inside the container โ the ESM message is encapsulated, not omitted.
How the Attach Request is carried (channels & identity): the RRC that delivers it runs over SRB1, which itself was set up by an RRC connection whose Msg3/Msg4 rode PDSCH/PUSCH scheduled against the TC-RNTI then C-RNTI (see Random Access). On S1 it is the NAS payload of the S1AP Initial UE Message, routed to an MME chosen from the GUMMEI inside the GUTI (or by NAS node-selection when only an IMSI is present).
✅ Debugging steps
- Confirm the
Attach Requestreached the MME — check for the S1APInitial UE Messagecarrying it and that the eNB selected a reachable MME. - Verify the
EPS attach typematches the scenario (plain EPS vs combined EPS/IMSI vs emergency); a combined attach that never triggers an SGs Location Update points at MME/MSC configuration. - Check the
ESM message containeris present and decodes to aPDN Connectivity Requestwith a sensible PDN type / APN. - Read the
UE network capabilityand remember it — you will compare it against the echo in the Security Mode Command.
⚠ Common causes of failure
- eNB routes the
Initial UE Messageto an unreachable or wrong MME, so attach never starts. - Missing or malformed
ESM message container, so no default bearer is ever requested. - Requested
APNnot subscribed / not resolvable, so the ESM half is later rejected even if EMM succeeds. - UE presents a
GUTIwhose MME is unreachable and no fallback toIMSI, stalling identity resolution.
Identity โ GUTI First, IMSI Only if Forced
The UE would rather not broadcast its permanent identity. On a very first attach to a network where it holds no temporary identity it must present its IMSI, but whenever it already carries a valid GUTI (Globally Unique Temporary Identity, assigned by an MME on a previous attach) it uses that instead. The GUTI does double duty: it hides the IMSI over the air, and it encodes the identity of the MME that issued it, so a receiving MME can route to the old MME and fetch the existing UE context rather than starting from scratch.
If the MME cannot resolve the identity it was handed โ for example a GUTI whose issuing MME is unreachable, or whose context has been purged โ it runs the Identity procedure. It sends an Identity Request naming the identity type it needs (typically IMSI), and the UE answers with an Identity Response carrying that value. Only once the MME holds the IMSI can it locate the subscription in the correct HSS and begin authentication. The Identity procedure is therefore conditional: on a clean GUTI-based attach with a reachable old MME, it never runs at all.
Privacy note: sending the IMSI in the clear is exactly what IMSI-catchers exploit. LTE mitigates this with GUTI reuse and periodic GUTI reallocation; 5G closes the gap further with the encrypted SUCI, which never exposes the permanent SUPI over the air.
✅ Debugging steps
- Check whether an
Identity Request/Identity Responseexchange appears — if it does, GUTI resolution failed and the MME had to fall back toIMSI. - Decode the presented
EPS mobile identity: on a returning UE it should be aGUTI; a bareIMSImeans the temporary identity was rejected, unknown, or never stored. - For an inter-MME case, confirm the old MME named by the
GUMMEIis reachable and still holds the context.
⚠ Common causes of failure
- Old MME unreachable or context purged, so the
GUTIcannot be resolved and the UE is forced to exposeIMSI. - UE presents a stale
GUTIfrom a different PLMN, causing a rejected identity and an Identity procedure. IMSImaps to no subscription in the reachableHSS, so authentication can never start.
EPS-AKA โ the Challenge/Response Run
Once the MME knows the IMSI, it authenticates. LTE uses EPS-AKA (Authentication and Key Agreement), a challenge/response scheme rooted in a permanent secret key K that lives in exactly two places: the USIM on the UE side and the HSS/Authentication Centre (AuC) on the network side. The MME never sees K โ it only ever handles derived material, which is precisely what makes a compromised MME far less catastrophic than a compromised HSS.
1. Fetch vectors (MME ↔ HSS over S6a). The MME sends an Authentication-Information-Request (AIR) to the HSS over the S6a Diameter interface, including the IMSI, the serving network identity (PLMN), and the number of vectors it wants. The HSS runs the AKA algorithms on K, and returns one or more EPS authentication vectors in the Authentication-Information-Answer (AIA). Each vector is a quadruplet: RAND, AUTN, XRES, KASME. Crucially, the HSS binds KASME to the serving network identity, so a vector minted for one operator cannot be replayed by another.
2. Challenge the UE. The MME picks one vector and sends a NAS Authentication Request containing RAND (the random challenge), AUTN (an authentication token derived from K, a sequence number SQN, and an authentication management field AMF), and the KSIASME that will name the resulting context. It retains XRES and KASME; those never leave the core.
3. UE checks the network. The USIM runs the AKA functions on RAND using K. It first verifies AUTN by recomputing the expected MAC and checking the freshness of SQN. A valid AUTN proves the challenge came from an entity that knows K and that this is not a replay of an old exchange. If verification fails, the UE returns an Authentication Failure with a cause โ MAC failure, synch failure (with an AUTS token so the network can resynchronise SQN), or non-EPS authentication unacceptable โ and the network has failed to authenticate.
4. UE answers. On success the USIM computes RES and the key material, and the UE returns a NAS Authentication Response carrying RES.
5. Network checks the user. The MME compares the received RES against the XRES from the vector. A match authenticates the user; a mismatch triggers an Authentication Reject (which moves the UE to the deregistered state) or an authentication-failure flow.
| Vector parameter | Full name | Role | Crosses the air? |
|---|---|---|---|
RAND | Random challenge | 128-bit random number the USIM runs the AKA functions over. | Yes (in Authentication Request) |
AUTN | Authentication token | SQN⊕AK ‖ AMF ‖ MAC; lets the UE authenticate the network and check freshness. | Yes (in Authentication Request) |
XRES | Expected response | What the UE's RES must equal; kept by the MME to verify the user. | No |
KASME | Key for Access Security Management Entity | The 256-bit root of the EPS key hierarchy, bound to the serving PLMN. | No |
RES | Response | Computed by the USIM from RAND and K; returned to prove knowledge of K. | Yes (in Authentication Response) |
Where the keys come from: both sides independently arrive at KASME โ the UE derives it inside the USIM/ME from K, the HSS delivers it inside the vector. Neither KASME nor K ever crosses the radio interface. Only RAND, AUTN and RES travel over the air.
✅ Debugging steps
- Check the S6a exchange first: did the
Authentication-Information-Requestget anAuthentication-Information-Answerwith vectors, or a Diameter error (unknown IMSI, roaming-not-allowed)? - If the UE returns
Authentication Failure, read the cause:MAC failure(network/key mismatch or rogue base station),synch failure(SQN out of range — look for theAUTSresync), ornon-EPS authentication unacceptable. - On an
Authentication Reject, theRES/XREScomparison failed — confirm the MME used the vector matching theRANDit actually sent. - Confirm the serving-network identity sent to the HSS matches the visited PLMN, since
KASMEis bound to it.
⚠ Common causes of failure
- HSS returns no vectors: unknown
IMSI, subscription barred, or S6a/Diameter connectivity down. synch failurefrom anSQNdrift between USIM and AuC, needing anAUTS-based resynchronisation.MAC failurebecause the challenge did not come from an entity holding K — a genuine key mismatch or a fake base station.RES≠XRESfrom a provisioning mismatch (wrong K in USIM vs AuC), triggeringAuthentication Reject.
The EPS Key Hierarchy โ K to KASME to KeNB
Authentication does more than prove identity: it seeds an entire tree of keys. Understanding that tree is what turns "security is on" into a precise mental model of who holds what.
At the root sits K, the permanent subscriber key in the USIM and AuC. During AKA the AuC (and independently the USIM) computes two intermediate keys, the cipher key CK and the integrity key IK, from K and RAND using the AKA functions f3/f4. In classic UMTS these would be used directly; EPS instead folds them one level further. A key derivation function (HMAC-SHA-256) combines CK and IK with the serving network identity and the SQN⊕AK value to produce KASME โ the 256-bit anchor that the HSS ships to the MME. Binding to the serving network identity is the step that stops one operator from impersonating another with a stolen vector.
From KASME the tree splits. The MME and UE derive the two NAS keys โ KNASenc for ciphering NAS messages and KNASint for integrity-protecting them โ each computed with the identifier of the chosen algorithm so that changing algorithms changes the key. Separately, KASME and a NAS uplink count produce KeNB, which the MME hands to the eNB inside the S1AP setup. The eNB then derives the Access Stratum keys from KeNB: KRRCenc and KRRCint for signalling radio bearers, and KUPenc (and optionally KUPint) for user-plane radio bearers. So a single EPS-AKA run feeds both the NAS security world (terminated in the MME) and the AS security world (terminated in the eNB) โ this is the LTE key hierarchy in one breath.
KNASenc, KNASint } and KeNB → { KRRCenc, KRRCint, KUPenc }Why the extra layer: because KeNB lives in an exposed base station, EPS never lets the eNB near KASME or the NAS keys. Compromising one eNB yields only that cell's AS keys, and key change on handover (via the NH/NCC chain) limits even that. The full derivation chain, including horizontal and vertical key derivation on handover, is treated on the EPS security key hierarchy page.
NAS Security Mode & the Full Message Sequence
Authentication agrees on KASME but does not by itself protect NAS messages. That is the job of the NAS Security Mode Control procedure. Immediately after a successful EPS-AKA, the MME sends a NAS Security Mode Command โ itself integrity-protected with the freshly derived KNASint โ that tells the UE which algorithms to use (a selected EEA for ciphering and EIA for integrity), names the context with the KSIASME, and, importantly, echoes back the UE network capability the UE originally sent. The UE compares that echo against what it actually transmitted; a mismatch means someone tampered with the unprotected Attach Request to force weaker algorithms, and the UE aborts. This is the anti-bidding-down check.
The UE verifies the integrity of the command, activates ciphering and integrity, and replies with a NAS Security Mode Complete that is both integrity-protected and ciphered. From this point every NAS message โ including the Attach Accept to come โ is protected, which is exactly why the network defers anything sensitive (a new GUTI, the bearer configuration) until after this exchange.
Putting identity, vector retrieval, the challenge/response, NAS security, the S-GW/P-GW bearer leg, and the accept/complete handshake together gives the full attach skeleton:
| Message | Between | Key IEs / keys involved |
|---|---|---|
Attach Request (+ PDN Connectivity Request) | UE → MME | EPS attach type, EPS mobile identity (GUTI/IMSI), UE network capability, KSIASME, ESM message container. |
Identity Request / Identity Response | MME ↔ UE | Identity type; returns IMSI when the given identity can't be resolved. |
Authentication-Information-Request / -Answer | MME ↔ HSS (S6a) | IMSI, serving-network id → vectors RAND, AUTN, XRES, KASME. |
Authentication Request | MME → UE | RAND, AUTN, KSIASME; UE authenticates the network. |
Authentication Response | UE → MME | RES; MME authenticates the user against XRES. |
NAS Security Mode Command / Complete | MME ↔ UE | Selected EEA/EIA, replayed UE network capability; activates KNASenc, KNASint. |
Attach Accept (+ Activate Default EPS Bearer Context Request) | MME → UE | GUTI, TAI list, EPS bearer identity, assigned IP / APN, QCI; carried in S1AP Initial Context Setup with KeNB. |
Attach Complete (+ Activate Default EPS Bearer Context Accept) | UE → MME | Confirms the new GUTI and default bearer; ends the procedure. |
✅ Debugging steps
- Confirm the
NAS Security Mode Commandcarries a validMessage Authentication Codeand that its replayedUE network capabilitymatches the originalAttach Request. - Verify the UE returned a
NAS Security Mode Completethat is integrity-protected and ciphered — the marker that NAS security is now active. - Check that the selected
EEA/EIAare algorithms the UE advertised; a non-advertised choice is a bidding-down flag. - Confirm the
Attach Acceptthat follows is sent with the security-protected header (it should be ciphered, since it carries the newGUTI).
⚠ Common causes of failure
- UE aborts the SMC because the echoed
UE network capabilitywas altered (suspected bidding-down attack). - NAS
MAC failureon the Security Mode Command from a wrongKNASintor a NASCOUNTdesync. - No common algorithm between UE and MME policy, so security mode cannot complete.
- Security mode passes but the sensitive
Attach Acceptis sent unciphered by a misconfigured MME, exposing the newGUTI.
Attach Accept, the Default Bearer & GUTI Reallocation
With authentication done and NAS security on, the MME turns to the ESM half it has been holding since the PDN Connectivity Request. It selects an S-GW and P-GW, then sends a Create Session Request (S11 toward the S-GW, relayed on S5/S8 to the P-GW). The P-GW allocates the UE's IP address, sets up the default bearer's context, and returns it in the Create Session Response. This is where the user's connectivity physically comes into being; everything before it was signalling about trust.
The MME now composes the Attach Accept. It carries the EMM-level results โ a freshly allocated GUTI, a TAI list (the set of tracking areas in which the UE may move without re-registering), and mobility timers such as T3412 for periodic TAU โ and it nests, inside its ESM message container, an Activate Default EPS Bearer Context Request. That ESM message is what actually creates the default EPS bearer: it names the EPS bearer identity, the APN, the assigned IP address, and the bearer's QoS in the form of a QCI (typically the non-GBR QCI 9 for internet) and an APN-AMBR. The default bearer is "default" precisely because it is created automatically at attach and lives for the whole PDN connection; dedicated bearers, if any, are added later by the network.
The Attach Accept does not travel as a lone NAS message. The MME hands it to the eNB inside an S1AP Initial Context Setup Request, together with KeNB and the bearer's QoS. The eNB uses that to run RRC SecurityModeCommand and RRCConnectionReconfiguration, arming the radio bearers, and delivers the Attach Accept to the UE inside the reconfiguration. The UE responds with an Attach Complete carrying the nested Activate Default EPS Bearer Context Accept, which the eNB relays to the MME. At that instant the UE is EMM-REGISTERED and ECM-CONNECTED, with a working default bearer and an IP address.
The Attach Accept is also the natural home for GUTI reallocation. Because a temporary identity loses its privacy value the more often it is observed, the network refreshes it: on attach, the new GUTI is delivered inside the (now ciphered) Attach Accept and confirmed by the Attach Complete. At other times the same job is done by the standalone GUTI Reallocation Command / GUTI Reallocation Complete pair. Delivering the new GUTI only after NAS security is active is deliberate โ it goes out encrypted, so an eavesdropper cannot link the new temporary identity either to the old one or to the IMSI.
The nesting, restated: EMM messages carry ESM messages. Attach Request wraps PDN Connectivity Request; Attach Accept wraps Activate Default EPS Bearer Context Request; Attach Complete wraps Activate Default EPS Bearer Context Accept. One procedure, two protocols, always paired.
✅ Debugging steps
- Check the
Create Session Request/Responseon S11/S5: did the P-GW allocate an IP and return the default bearer, or return a GTP-C cause error? - Confirm the
Attach Acceptcarries aGUTI, aTAI list, and a nestedActivate Default EPS Bearer Context Requestwith a saneQCIandAPN-AMBR. - Verify the S1AP
Initial Context Setup RequestdeliveredKeNBand that the eNB completed RRCSecurityModeCommand/RRCConnectionReconfiguration. - Confirm the UE sent
Attach Completewith the nestedActivate Default EPS Bearer Context Accept— without it the procedure has not finished.
⚠ Common causes of failure
- P-GW/S-GW session setup fails (no IP pool, APN not authorised, GTP-C error), so the default bearer never comes up despite EMM success.
- S1AP
Initial Context Setupfails at the eNB (radio-bearer or security setup error), so theAttach Acceptnever reaches the UE. - UE never sends
Attach Complete(poor DL, or it rejected the reallocatedGUTI), leaving the MME's procedure timer to expire. - QoS the eNB cannot admit (e.g. requested resources unavailable), causing bearer setup to be refused.
Reading attach in the logs
An attach spans several nodes, so a full trace usually stitches the UE NAS log, the MME NAS/S1AP/S6a logs, and the S11/S5 GTP-C logs. Walk it in the procedure order — identity, authentication, security, session, accept/complete — and the first line that does not line up is your root cause. Below is a compressed MME-side view of a clean attach.
Representative MME attach trace — illustrative, values vary by vendor/build:
| Field | Meaning | Example (from log) | Check |
|---|---|---|---|
attachType | Kind of registration requested (EPS attach type). | EPS | Should match the scenario; combined should trigger an SGs Location Update, emergency may skip auth. |
id / KSIasme | Presented identity and whether a cached context exists. | GUTI, KSIasme=7(no key) | "no key" means a fresh EPS-AKA must run; a valid eKSI could have skipped it. |
PTI / APN | ESM transaction id and requested access point name. | PTI=1, internet | PTI must reappear on the Activate Default EPS Bearer; APN must be subscribed/resolvable. |
AIR/AIA result | S6a vector fetch outcome from the HSS. | DIAMETER_SUCCESS, vectors=1 | Any Diameter error (unknown IMSI, roaming-not-allowed) stops attach before the challenge. |
RES vs XRES | User-authentication comparison at the MME. | OK | A mismatch is an Authentication Reject; check the vector matched the sent RAND. |
SMC cipher/integrity | Selected NAS algorithms (EEA/EIA). | EEA2/EIA2 | Must be UE-advertised; Security Mode Complete must be integrity-protected and ciphered. |
Create Session cause | S11/S5 bearer-setup outcome at S/P-GW. | REQUEST_ACCEPTED | A GTP-C failure (no IP pool, APN not authorised) blocks the default bearer. |
PDN-Addr / EBI | Assigned IP and the default bearer's EPS bearer identity. | 10.12.34.56, EBI=5 | Same EBI must appear in Attach Accept and the Attach Complete accept. |
QCI | QoS class of the default bearer. | 9 | Non-GBR QCI 9 is typical for internet; the eNB must be able to admit it. |
T3412 | Periodic TAU timer given in the accept. | 54min | Drives the UE's later periodic TAU heartbeat; sanity-check against operator policy. |
Summary
EPS Attach is one procedure doing four jobs at once — register, authenticate, secure, connect — and the fastest way to root-cause a failure is to walk those jobs in order. Identity: does the UE present a resolvable GUTI, or is it forced to an IMSI via the Identity procedure? Authentication: did the HSS return vectors over S6a, did AUTN verify at the UE, and did RES match XRES? Security: did the NAS Security Mode Command/Complete switch on KNASint/KNASenc without a bidding-down mismatch? Connectivity: did Create Session bring up the default bearer, and did Attach Accept/Attach Complete close the loop?
Keep the two structural ideas in front of you: EMM carries ESM (so Attach Request/Accept/Complete each wrap a bearer message), and nothing sensitive — the new GUTI, the bearer config — is sent until after NAS security is on. Localise a break to one of the four jobs and a vague "attach failed" becomes a specific, testable cause.
LTE ↔ NR: the 5G successor to attach is the Registration procedure (TS 24.501) toward the AMF, using 5G-AKA (or EAP-AKA') instead of EPS-AKA. The master key is K_AMF rather than KASME; the temporary identity is the 5G-GUTI; and, crucially, the permanent identity is never sent in the clear — the UE presents an encrypted SUCI that conceals the SUPI, closing the IMSI-catcher gap LTE's clear-text IMSI fallback leaves open. The nested ESM-in-EMM idea becomes 5GSM-in-5GMM, and the default-bearer notion is replaced by a PDU Session established over N2/N4 toward the SMF/UPF.
Q. In EPS-AKA, what does the UE check and what does the network check?
A. The UE verifies AUTN to authenticate the network โ it proves the peer knows K and that SQN is fresh, defeating replay. The network compares the UE's RES against the XRES from the vector to authenticate the user. Both directions together make it mutual authentication.
Q. Which node holds the permanent key K, and does the MME ever see it?
A. K lives only in the USIM and the HSS/AuC. The MME never sees K โ the HSS gives it derived authentication vectors (RAND, AUTN, XRES, KASME) over S6a, and the MME uses those to run the challenge and derive the NAS keys.
Q. How is the PDN Connectivity Request related to the Attach Request?
A. It is carried inside the Attach Request's ESM message container. That piggybacking lets a single message both register the device (EMM) and request the first PDN connection (ESM), so the default bearer and IP address are set up as part of attach rather than in a separate procedure.
Q. Why is the new GUTI sent in the Attach Accept rather than earlier?
A. Because the Attach Accept is sent after NAS Security Mode, so it is ciphered. If the new GUTI went out in the clear, an attacker could link it to the identity used at the start of attach, defeating the privacy the temporary identity exists to provide.
Q. What creates the default EPS bearer, and what determines its QoS?
A. The Activate Default EPS Bearer Context Request, nested in the Attach Accept, creates it; the physical bearer is set up via Create Session Request/Response toward the S-GW/P-GW. Its QoS is set by the QCI (often non-GBR QCI 9) and the APN-AMBR.
Q. What is the KSIASME for?
A. It names a cached NAS security context. If the UE presents a KSIASME that still maps to a valid KASME, the network can reuse that context and skip a fresh EPS-AKA run, saving the round trips to the HSS.
Where attach connects
The attach and EPS-AKA run sit on top of the NAS protocol and feed directly into the security key hierarchy; the bearer it creates is the entry point to LTE QoS, and the whole thing has a direct 5G analogue in Registration.