Skip to content

Security (Advanced) — A Bird's-Eye View of 5GC Defense in Depth

Difficulty: Intermediate–Advanced / Estimated study time: 25 min / Prerequisites: Authentication (5G-AKA/EAP-AKA'), NAS/AS Security · SUCI

Learning objectives

After reading this chapter, you will be able to do the following.

  • Explain, as a map, that 5GC security is composed of multiple layers — the access layer, NAS layer, SBA layer, and roaming boundary.
  • Explain why SUCI/SUPI concealment is important (countermeasure against IMSI catchers, privacy protection).
  • Take a bird's-eye view of the whole key hierarchy (K → CK/IK → KAUSF → KSEAF → KAMF → NAS keys/AS keys).
  • Explain the purpose of security across the SBA (inter-NF TLS, OAuth 2.0 token authorization by the NRF, mutual TLS with a Service Mesh).
  • Explain that NIA0/NEA0 (Null integrity/Null ciphering) are limited to special cases such as emergency calls.

Prerequisites

The focus of this chapter

Primary authentication (5G-AKA/EAP-AKA'), the formulas of key derivation, and the procedure of SUCI generation are covered in Authentication and NAS/AS Security. Taking those as a premise, this chapter is devoted purely to giving a bird's-eye view of "how 5GC security as a whole is defended in multiple layers."


Why — why defend in multiple layers

5GC security cannot be protected by a single mechanism. That is because what must be protected, and the threats, differ from place to place.

  • In the radio segment, the threats are eavesdropping, tampering, and impersonation (a fake base station = an IMSI catcher). → Defend with ciphering, integrity protection, and concealment of the permanent identifier.
  • In the control signaling (NAS) between the UE and the core (AMF), the location-registration and session-control messages need to be protected. → Defend with NAS Security.
  • In the inter-NF communication inside the core (SBA), the threats are impersonation and eavesdropping by illegitimate NFs. → Defend with TLS and OAuth authorization.
  • At the operator-network boundary (roaming), the signaling that passes through another operator's network needs to be protected. → Defend with SEPP/N32.

Analogy: 5GC security is "the multilayered defense of a castle." The outer moat (radio segment), the pass to enter the castle gate (NAS), the entry permit to each room inside the castle (SBA authorization), and the border checkpoint with the neighboring country (roaming boundary) — each layer defends in a different way. The aim is that even if one of them is breached, it is stopped at the next layer.


What — the four layers and the special cases

5GC security can broadly be grasped in four layers (TS 33.501).

graph TD
    subgraph Access["Access layer — radio segment"]
        A1["AS Security
UE ⇔ gNB
RRC/User Plane ciphering · integrity"] end subgraph NAS["NAS layer — UE⇔core control signaling"] N1["NAS Security
UE ⇔ AMF
NAS ciphering · integrity + SUCI concealment"] end subgraph SBA["SBA layer — inter-NF inside the core"] S1["Inter-NF TLS + OAuth 2.0
NRF issues tokens
mutual TLS (Service Mesh)"] end subgraph Roam["Roaming boundary — between operator networks"] R1["SEPP / N32
PRINS or TLS"] end Access --> NAS --> SBA NAS -. "when roaming" .-> Roam SBA -. "when roaming" .-> Roam

Contrasting the role of each layer.

Layer Segment protected Main mechanism Main NFs Delegated to
Access layer UE ⇔ gNB (radio) AS Security (ciphering · integrity of RRC/UP) gNB NAS/AS Security
NAS layer UE ⇔ AMF (control signaling) NAS Security, SUCI concealment AMF, AUSF Authentication
SBA layer NF ⇔ NF (inside the core) TLS, OAuth 2.0 token authorization NRF This chapter's How
Roaming boundary vPLMN ⇔ hPLMN SEPP / N32 (PRINS or TLS) SEPP roaming.md

What this chapter does 'not chase down'

The details of each layer are left to the delegated pages. The role of this chapter is to show how they connect as a single map.


How — surveying each topic

SUCI/SUPI concealment — privacy protection

SUPI (Subscription Permanent Identifier) is the subscriber's permanent identifier (equivalent to IMSI). If it is sent in cleartext over the radio segment, a fake base station (IMSI catcher) can capture it, making it possible to track an individual.

In 5G, the SUPI is sent as SUCI (Subscription Concealed Identifier), encrypted with the home network's (hPLMN's) public key. Because only the home network (UDM/SIDF) can decrypt it, the SUPI is not visible to anyone in transit. The encryption scheme used is ECIES (Elliptic Curve Integrated Encryption Scheme) (TS 33.501).

Why it matters

SUCI concealment is the linchpin of privacy protection that hides "who is where." It is 5G's structural countermeasure against the problem of IMSI catchers that was recognized before 4G. For the details of SUCI generation and keys, see NAS/AS Security.

Overview of the key hierarchy

When authentication (5G-AKA/EAP-AKA') succeeds, keys for specific purposes are derived hierarchically from a single root key. The lower you go, the narrower the scope of use, so that even if a higher key leaks, not all keys are immediately broken (TS 33.501).

Tier Key Where it is used (overview)
Root K The permanent key stored in the USIM / home network
CK / IK The ciphering key / integrity key derived in authentication
KAUSF An intermediate key held in the AUSF
KSEAF The anchor key for the serving network (SEAF = a function inside the AMF)
KAMF The key for the AMF. The parent of the subsequent NAS/AS keys
NAS keys / AS keys The keys actually used in NAS Security (UE⇔AMF) and AS Security (UE⇔gNB)

Details are delegated

The specific derivation functions (KDF), input parameters, and update conditions of each key are covered in Authentication and NAS/AS Security. Here we only grasp the big picture that "there is a hierarchy, and the lower you go, the narrower the scope."

Security across the SBA — preventing NFs from impersonating each other

Inside the core too, the SBI communication among NFs (AMF, SMF, UDM…) needs to be protected. In the SBA, three mechanisms overlap (TS 33.501).

  • TLS — Ciphers and integrity-protects the inter-NF SBI (HTTP/2) communication. Prevents eavesdropping and tampering.
  • OAuth 2.0 token authorization — When an NF calls a service, it presents an access token issued by the NRF. The called side verifies the token and accepts only legitimately authorized NFs. This prevents "impersonation by an illegitimate NF."
  • Mutual TLS (mTLS) / Service Mesh — Depending on the implementation, a Service Mesh may set up mutual TLS to authenticate NFs in both directions.
Mechanism Purpose Issuance/management
TLS Ciphering · integrity of SBI communication Established between NFs
OAuth 2.0 token Authorization of NF service calls (impersonation prevention) Issued by the NRF
Mutual TLS / Service Mesh Bidirectional NF authentication Implementation-dependent

Authentication and authorization are different things

"Is that NF genuine (authentication = TLS/mTLS)" and "may that NF call this service (authorization = OAuth token)" are separate matters. The SBA overlays both to defend.

Security at the roaming boundary

When roaming, the signaling between the serving network (vPLMN) and the home network (hPLMN) goes not directly but through the SEPP (Security Edge Protection Proxy), and is protected over the N32 interface. The protection schemes are PRINS (application-layer message protection, supporting IPX relay) and TLS (direct connection).

Details go to roaming.md

The details of SEPP/N32 and PRINS/TLS are covered in the same-level Roaming. Here we only confirm the positioning that "the operator-network boundary also has its own independent defense." For the details of the SEPP itself, see SEPP.

NIA0 / NEA0 — the special cases where "no protection" is allowed

  • NEA0 (Null Encryption Algorithm) — An algorithm that performs no ciphering.
  • NIA0 (Null Integrity Algorithm) — An algorithm that performs no integrity protection.

These are normally not used. They are permitted only in special cases where authentication is not possible but communication should still be allowed, such as emergency calls (e.g., an emergency call from an unauthenticated UE) (TS 33.501).

Not used in normal operation

NIA0/NEA0 are the "do not protect" options. Confine them to limited uses such as emergency calls, and do not apply them to normal traffic. For the details of how these are handled in emergency calls, see Emergency calls.


3GPP Specification

Spec Content
TS 33.501 Security architecture and procedures for the 5G System (the entire 5G security architecture; encompasses SUCI/SUPI, the key hierarchy, SBA security/OAuth, and NIA0/NEA0)

Granularity of section numbers

It is certain that TS 33.501 is the main specification for 5G security. However, the specific section numbers for each topic (SUCI/ECIES, the key hierarchy, OAuth tokens, etc.) differ by edition, so when citing precisely they are to be confirmed. The scope of application and operation per operator (which algorithms to enable, etc.) is implementation-dependent.


FAQ

Q. Why send the SUPI as a SUCI instead of directly?

Because if the SUPI is sent in cleartext, a fake base station (IMSI catcher) can capture it, making it possible to track an individual. If it is sent as a SUCI that has been ECIES-encrypted with the home network's public key, the SUPI is not visible to anyone in transit, and only the home network can decrypt it.

Q. If the SBA already has TLS, why is an OAuth token also needed?

Because their roles differ. TLS protects "whether the peer NF is genuine and whether the communication is being eavesdropped (authentication · ciphering)," while the OAuth token protects "whether that NF may call this service (authorization)." By overlaying authentication and authorization, it prevents impersonation by illegitimate NFs and service abuse.


Summary

  • 5GC security is defense in depth across the access layer, NAS layer, SBA layer, and roaming boundary (TS 33.501).
  • SUCI/SUPI concealment is the linchpin of privacy protection. ECIES encryption with the home network's public key neutralizes IMSI catchers.
  • In the key hierarchy (K → CK/IK → KAUSF → KSEAF → KAMF → NAS/AS keys), the lower you go, the narrower the scope.
  • The SBA layer prevents NF impersonation with TLS (ciphering) + OAuth 2.0 tokens (NRF-issued authorization) + mutual TLS.
  • The roaming boundary is protected by SEPP/N32 (PRINS or TLS) (details in roaming.md).
  • NIA0/NEA0 are "no protection," limited to special cases such as emergency calls. Normally not used.

Comprehension check

Q1. List the four layers that make up 5GC security and explain the segment each protects.

Access layer (UE⇔gNB, the radio segment via AS Security), NAS layer (UE⇔AMF, control signaling via NAS Security, plus SUCI concealment), SBA layer (NF⇔NF inside the core via TLS + OAuth authorization), roaming boundary (vPLMN⇔hPLMN via SEPP/N32). Because what is protected and the threats differ from place to place, each layer defends in a different way.

Q2. Distinguish the roles played by TLS and the OAuth 2.0 token in the SBA layer.

TLS provides ciphering · integrity protection of inter-NF SBI communication (= whether the peer is genuine · whether it is being eavesdropped = authentication and confidentiality). The OAuth 2.0 token is issued by the NRF and provides authorization when an NF calls a service (= whether that NF may call this service). Authentication and authorization are different things, and both are overlaid to prevent impersonation.

Q3. Explain what NIA0/NEA0 are and in what cases they are permitted.

NEA0 is Null ciphering (no ciphering) and NIA0 is Null integrity (no integrity protection). They are not used in normal operation and are permitted only in special cases where authentication is not possible but communication should still be allowed, such as emergency calls (e.g., an emergency call from an unauthenticated UE) (details in the emergency-call chapter).


Next Step

  • Return to the details of the prerequisites: confirm key derivation and SUCI generation in NAS/AS Security · SUCI.
  • Dig deeper into the roaming-boundary defense: go to SEPP/N32 · PRINS/TLS in the same-level Roaming.
  • For the handling of NIA0/NEA0 in emergency calls, go to Emergency calls.
  • For term lookup, go to the Security Dictionary.