← Book home
Part 1 · Foundations of 5G Security
3

5G System Architecture — Security View

Every network function, asked one question: what is your security job?

“You cannot protect a network you cannot draw. Draw this one until you can do it from memory.” — THE WHITEBOARD RULE

This chapter is the book’s reference map. We walk through every network function (NF) in the 5G system — not as an architecture course, but asking one question of each box: what is its security job, and what happens if it falls? Master this chapter and Parts 2–7 become applications of a picture you already own.

🎯 Learning objectives
📘 Standards reference box — Chapter 3
SpecificationTitleRelease / version verified
TS 23.501System architecture for the 5G SystemRel-19, v19.6.0
TS 33.501Security architecture and procedures for 5G SystemRel-18, v18.11.0 (2026-04)
TS 23.502Procedures for the 5G SystemRel-19, v19.5.0

Checked June 2026 — verify against the latest 3GPP version.

3.1 The 5G System at a Glance

A 5G system has three zones: the UE (mobile equipment + the USIM holding the long-term key K), the NG-RAN (gNBs converting radio into IP), and the 5G Core — software network functions where control-plane NFs talk HTTP/2 APIs over a common service-based bus, and the user plane is one function, the UPF, forwarding subscriber packets.

FIGURE 3.1The Full 5G System Reference Architecture
CONTROL PLANE — Service-Based Architecture NSSF NEF NRF PCF UDM AF AUSF SBI bus — every NF exposes services: Namf · Nsmf · Nudm · Nnrf … (SCP = optional fabric) AMF SMF SEPP PLMN border guard N32 partner PLMN USER PLANE UE gNB UPF DataNetwork Uu N3 (GTP-U) N6 N9 (UPF↔UPF) N2 N4 N1 (NAS)
Purpose: the master map every later diagram zooms into. Two representations in one: the blue bus (service-based view, secured by TLS+OAuth) and the numbered lines (reference points, secured per link).
FIGURE 3.2Service-Based vs Reference-Point Representation
SERVICE-BASED VIEW AMF SMF UDM NamfNsmfNudm security here = mTLS + OAuth 2.0 → Chapter 10 = REFERENCE-POINT VIEW AMF SMF UDM N8 N11 N10 security here = per-link transport protection → Chapter 14
Purpose: end the perennial confusion — same network, two official drawings. SBA security follows the bus; transport security follows the lines.

3.2 Walking the Functions: Who Does What for Security

UE and USIM — the credential vault you don’t control

The UE is the only 5G element deployed into hostile territory by design. The USIM (an application on the tamper-resistant UICC) stores K, runs the AKA algorithms (MILENAGE or TUAK), maintains the sequence number, and usually computes SUCI. The ME holds session keys only and executes NAS/AS protection. Malware on the phone OS can steal session keys; K never leaves the card.

FIGURE 3.3UE Internal Security Architecture (ME + USIM)
UE UICC / USIM tamper-resistant K — long-term key 🔑 MILENAGE / TUAK SQN management home network public key ⟵ K NEVER CROSSES — only CK/IK results pass ⟶ ME (OS · baseband) session keys: K_AMF → AS NAS protocol stack AS / PDCP crypto 5G-GUTI storage ⚠ malware can reach this side stolen card ≠ extracted K: tamper-resistance + PIN protect it compromise ceiling: session keys only — re-auth restores security
Purpose: the credential split that gives SIM-swap and malware attacks different ceilings. Everything red is permanent secret; everything blue is replaceable session state.

AMF & SEAF — mobility manager and security anchor

The AMF is the UE’s control-plane front door: it terminates N1 (NAS) and N2, runs registration and mobility, and enforces NAS security. Inside it lives the SEAF — a role, co-located with the AMF — holding the anchor key KSEAF. Compromise the AMF and you hold NAS keys and the anchor for every attached UE in its region.

FIGURE 3.4AMF and the SEAF Anchor Role
AMF SEAF role holds the anchor key K_SEAF KEY SHELF K_AMF · K_NASint · K_NASenc NH / NCC pairs UE security contexts ×100k 📱 UENAS peer N1 — NAS SMC, ciphering + integrity 📡 gNBNGAP peer N2 — delivers K_gNB + UE sec capabilities AUSFauthentication verdicts Nausf SMF · PCFsession & policy
Purpose: SEAF is a function inside the AMF, not a separate product. Note the key shelf: this single NF holds live security state for every attached subscriber in its region.

AUSF, UDM, ARPF, SIDF — the home-network security trio (plus two hidden roles)

💡 Key idea
SEAF, ARPF, and SIDF are functions, not boxes — you will not find them in a product catalog. SEAF lives in the AMF; ARPF and SIDF live in the UDM. 3GPP names them separately so the security responsibilities are specified independently of vendor packaging.
FIGURE 3.5The Home-Network Security Trio — AUSF, UDM, ARPF / SIDF
HOME NETWORK (HPLMN) Serving network SEAF / AMF — any country Nausf_UEAuthentication AUSF verifies RES* · derives K_SEAF anchors K_AUSF (SoR/UPU/AKMA) Nudm UDM — subscription brain ARPF role — the K vault stores K for EVERY subscriber runs MILENAGE/TUAK → AVs SIDF role — identity decryption holds the SUCI PRIVATE key SUCI → SUPI, nobody else can HSM 🔐 UDR
Purpose: map four home-side names onto two deployable products and one HSM. The red box is the most valuable object in the operator’s estate — Chapter 7 explains why losing it means losing everything.

SMF & UPF, and the supporting cast

The SMF controls PDU sessions and — critically — originates the UP security policy (ciphering/integrity required, preferred, or not needed per session), enforced by the gNB; it commands UPFs over N4 (PFCP), a chronically under-protected interface. The UPF forwards all subscriber traffic but holds no subscriber keys — UP encryption terminates at the gNB; its risks are interception points, DDoS, and the internet edge (N6).

The rest: PCF (policy is power — a manipulated PCF silently reroutes or degrades), NSSF (slice selection underpins tenant isolation), NRF (the directory and OAuth authorization server — the single most security-critical NF in the SBA), NEF (the deliberate doorway), AF (trusted internal vs untrusted external, mediated by NEF), SCP (routing fabric — concentrates traffic, concentrates risk), SEPP (the PLMN border guard, Chapter 13).

FIGURE 3.6Security Role of Each NF — the Annotated Architecture
UE / USIMcredential vault — K on card gNBradio crypto endpoint (PDCP) AMF + SEAFNAS security · anchor key SMFUP security policy author UPFall traffic, no keys AUSFhome-side verdict UDM + ARPF + SIDF 👑K vault · SUCI decryption NRF 👑directory + token authority PCFpolicy = power NSSFslice gatekeeper NEFthe controlled doorway AFtrusted inside / untrusted outside SCPconcentrated fabric = concentrated risk SEPPborder guard (N32) UDRsubscription data at rest 👑 = crown jewels: rank patching, monitoring and access control by blast radius, not alphabetically
Purpose: the chapter’s thesis on one page — every box has a security job. The two red-framed crown jewels reappear in every threat chapter.

3.3 Control/User Plane Separation as a Security Property

5G fully separates signaling (everything except UPF) from packet forwarding (UPF only). Security consequences: containment (the internet-facing surface touches the UPF only; keys and identities never transit it), independent placement (UPFs at exposed edge sites while control NFs stay protected — if N4/N9 are protected), and distinct monitoring (registration storms vs volumetric DDoS need different telemetry — Chapter 26 splits its KPIs along exactly this line).

FIGURE 3.7Control Plane / User Plane Separation
CONTROL PLANE — keys · identities · policy AMF SMF AUSF UDM NRF N4 🔒 the ONLY bridge — PFCP session commands (protect it: Ch 14) USER PLANE — packets only UPF Internet N3N6 ! internet attacker reaches UPF only
Purpose: CUPS as a containment boundary. An internet-side attacker touches packets, not keys; a signaling-side attacker never touches the packet path — unless N4 is left open.

3.4 The Interface Map with Security Annotations

InterfaceBetweenCarriesProtection (baseline)
UuUE ↔ gNBradio: RRC + user dataAS security: NEA/NIA in PDCP
N1UE ↔ AMFNAS signalingNAS ciphering + integrity
N2gNB ↔ AMFNGAP signalingNDS/IP (IPsec) or DTLS
N3gNB ↔ UPFGTP-U user dataIPsec (esp. untrusted backhaul)
N4SMF ↔ UPFPFCP session controlNDS/IP — often forgotten
N6UPF ↔ data networkraw user trafficfirewalls, DDoS defense
N9UPF ↔ UPFinter-UPF user dataIPsec where untrusted
SBINF ↔ NFHTTP/2 APIsmTLS + OAuth 2.0
N32SEPP ↔ SEPPinter-PLMN signalingTLS or PRINS
⚠️ Warning
NAS security (N1) and AS security (Uu) protect subscriber traffic — they do nothing for infrastructure links. A gNB whose N2/N3 backhaul runs unencrypted over leased lines exposes NGAP signaling and GTP-U packets regardless of how perfect the air-interface crypto is. Infrastructure links need their own protection (Chapter 14).
FIGURE 3.8The N-Interface Map with Security Annotations
UE gNB transport CORE SITE AMF SMF UPF SEPP SBI inside: mTLS + OAuth Internet partneroperator Uu · AS crypto N2 · IPsec/DTLS — N3 · IPsec N4 · NDS/IP ⚠ forgotten N6 · FW + anti-DDoS N32 · TLS or PRINS N1 · NAS crypto (UE↔AMF) blue tags = subscriber crypto (NAS/AS) · framed tags = infrastructure protection (IPsec/TLS/FW) · red tag = the classic omission
Purpose: one-glance answer to “what protects this link?” In audits, walk this map left to right and demand a packet capture per link — diagrams lie, captures don’t.

3.5 The SBA Security Concept

Inside the core, TS 33.501 mandates a three-layer defense for every service call (full treatment in Chapter 10): 1 — transport: mutual TLS between NFs; 2 — authorization: OAuth 2.0 client-credentials tokens issued by the NRF, validated by the producer (token, scope, audience); 3 — border: the SEPP applies inter-PLMN policy on N32, because your roaming partner’s core is not your trust domain.

FIGURE 3.9SBA Bus Concept — mTLS Everywhere, Tokens From the NRF
OPERATOR A CORE SBI bus — every attachment point is mutually-authenticated TLS AMFconsumer NRF 🎫token authority UDMproducer — validates scope & audience 🔒🔒🔒 ① get token (scope: nudm-sdm) ② mTLS 🔒 + Authorization: Bearer ⟨token: scope · audience=UDM⟩ SEPP border N32 THE SBA SECURITY RULE authenticate (mTLS) → authorize (OAuth token from NRF) → cross borders only via SEPP a valid certificate without a valid token = authenticated but NOT authorized → request refused
Purpose: the entire Chapter-10 model previewed. Steps ① and ② happen for every inter-NF service call in a properly configured core — millions of times per hour.
FIGURE 3.10SEPP at the PLMN Border
OPERATOR A AMF UDM cSEPP gate IPX transit intermediaries — not your trust domain pSEPP gate OPERATOR B AMF UDM pSEPP gate N32-c (policy handshake) + N32-f (protected forwarding) · TLS or PRINS · topology hiding · message filtering NO direct NF-to-NF traffic across PLMNs — ever
Purpose: the roaming security model in one frame: nothing crosses the border except through the SEPPs. Chapter 13 opens this gate and inspects every bolt.
FIGURE 3.11Direct vs Indirect Communication — Where the Token Comes From
Model A/B direct Consumerfetches own token 🎫 Producer mTLS + token Model C indirect Consumerfetches own token 🎫 SCP Producer Model D delegated Consumer SCP 🎫fetches token FOR consumer Producer NRF discovery + token model D concentrates discovery, routing AND token acquisition in the SCP — concentrated convenience, concentrated risk
Purpose: communication models change where security checks happen. Before approving an SCP deployment, ask: who fetches tokens, and who can now impersonate whom?

3.6 Where the Keys Live

The fastest security review of any 5G design: which keys does this element hold?

ElementKeys heldBlast radius if compromised
USIMK, SQN, home public keyone subscriber, permanently — reissue card
UDM/ARPF (+HSM)K for every subscribercatastrophic — total network
AUSFK_AUSF per UESoR/UPU forgery, AKMA keys; per-UE
AMF/SEAFK_SEAF, K_AMF, NAS keys, NHall NAS traffic + keys in its region
gNBK_gNB, AS keysradio traffic of its cells until refresh
UPFnone (subscriber crypto)sees forwarded traffic; no key theft possible
NRFtoken signing capabilityforge authorization for the whole SBA
SEPPN32 session keys, inter-PLMN certsroaming traffic manipulation
FIGURE 3.12Where Keys Live — NF-to-Key Placement Map
USIM 🔑 K one subscriber gNB 🔑 K_gNB + AS keys its cells, until refresh AMF / SEAF 🔑 K_SEAF · K_AMF · NAS its whole region AUSF 🔑 K_AUSF / UE SoR/UPU · AKMA UDM / ARPF 👑 🔐 K × ALL subscribers catastrophic if lost HSM-backed, no export NRF 👑 🎫 token signing power forge any authorization SEPP 📜 N32 keys + inter-PLMN certs UPF ∅ no subscriber keys (but sees all packets) FOLLOW THE KEYS — blast radius grows left to right one subscriber → one cell → one region → every subscriber forever
Purpose: key placement is the skeleton of Chapter 7 — and your asset-criticality ranking. Patch windows, monitoring depth and admin-access rules should follow this map, not an alphabetical NF list.

3.7 The Practical Operator View

Common misconfiguration risks

3.8 Threats and Mitigations

ThreatTargetPrimary mitigationCh.
Long-term key theftUDM/ARPFHSM, no export, strict admin path11, 29
Token forgery / rogue authorizationNRFNRF hardening, mTLS, token validation10–11
NAS key harvestingAMFplatform hardening, region isolation8, 11
Cell-site key extractiongNBsecure boot, key storage, IPsec backhaul15
Traffic interceptionUPF, N3/N9IPsec, edge physical security14, 22
Cross-PLMN signaling abuseSEPP/N32filtering, TLS/PRINS, policy13

3.9 Terminology, Example, Checklist

TermMeaning
NF / SBI / SBANetwork Function · Service-Based Interface · the architecture built from them
SEAF / ARPF / SIDFSecurity roles hosted in AMF (SEAF) and UDM (ARPF, SIDF)
UDRUnified Data Repository backing the UDM
CUPSControl / User Plane Separation
N1…N32 / UuReference points / the radio interface

Real network example. A Southeast Asian operator commissioned a 5G SA core from two vendors (control plane from vendor A, UPFs from vendor B). Integration review found N4 running plain PFCP across a shared MPLS network that also carried enterprise VPN customers — each vendor assumed the other secured the link. One IPsec policy fixed it; only the security view of the architecture caught it, because functionally everything had worked perfectly for weeks.

Chapter Summary

? Review Questions

  1. Name the three security roles that do not exist as standalone products, and their host NFs.
  2. Why does the UPF hold no subscriber keys, and what does that imply about where you fight interception vs DDoS?
  3. An attacker compromises (a) one gNB, (b) one AMF, (c) the UDM/ARPF. Rank the impact and justify with key placement.
  4. Which interface carries PFCP, why is it security-critical, and what protects it?
  5. Explain trusted vs untrusted AF, and which NF mediates the untrusted case.
  6. Why is the NRF called the SBA’s authorization server, and what fails if its token issuance is compromised?
  7. Your vendor’s diagram shows “UDM” with no mention of SIDF. What three questions do you ask?
  8. Give one security argument for deploying an SCP and one against.
🧪 Mini lab — the memory map

On a whiteboard, draw the full architecture from memory: all NFs, the SBA bus, and interfaces Uu, N1–N4, N6, N9, N32. Annotate: (1) a red key everywhere a long-term secret lives, (2) a blue key for session keys, (3) a lock on every protected interface with the mechanism named, (4) red stars on the two crown-jewel NFs. Compare against Figures 3.1, 3.8 and 3.12. Repeat tomorrow — when you can reproduce it cold, every authentication message in Chapters 5–6 will travel a path you can already see.