5G Security Context Update Procedure Explained
Introduction
In 5G networks, the Security Context Update procedure ensures that the security keys and protection mechanisms between the User Equipment (UE) and the network remain valid and secure.
Over time, security keys may need to be refreshed due to:
- mobility events
- handovers
- security policy updates
The security context update mechanism helps maintain secure communication across different network functions and radio nodes.
The procedure is defined by the 3rd Generation Partnership Project in:
- 3GPP TS 33.501 - 5G Security Architecture
- 3GPP TS 23.502 - 5G System Procedures
- 3GPP TS 38.331 - NR RRC Protocol
Why Security Context Update Is Needed
The security context contains important information used for protecting signaling and data traffic.
These include:
- security keys
- encryption algorithms
- integrity protection parameters
Updating the security context ensures that:
- keys remain secure
- communication remains protected
- mobility events do not compromise security
Network Functions Involved
UE (User Equipment)
Applies updated security parameters and keys.
gNB (Next Generation NodeB)
Maintains the access stratum security context for the UE.
AMF (Access and Mobility Management Function)
Manages NAS security context and coordinates updates.
Interfaces Used
| Interface | Description |
|---|---|
| NR-Uu | Radio interface between UE and gNB |
| N1 | NAS signaling between UE and AMF |
| N2 | Interface between gNB and AMF |
Security Context Update Call Flow
Below is the simplified signaling sequence.
UE gNB AMF
| | |
|<--Security Context Update--|
| | |
|--Update Complete---------->| After this step, new security parameters become active.
Step-by-Step Explanation
Step 1: Trigger for Security Context Update
A security context update may be triggered by several events such as:
- handover between gNBs
- mobility between network areas
- security policy updates
- key lifetime expiration
Important parameters to check
Engineers should verify:
- key lifetime timers
- security policy configuration
- mobility event triggers
Step 2: New Key Derivation
The network derives new security keys from the existing security anchor key.
These keys may include:
| Key | Purpose |
|---|---|
| K_AMF | NAS security key |
| K_gNB | Access stratum key |
| K_RRCenc | RRC encryption |
| K_UPenc | User plane encryption |
Important parameters to check
Check:
- key derivation parameters
- serving cell identity
- security anchor key validity
Step 3: Security Context Update Message
The network sends updated security configuration to the UE.
This may include:
- new encryption keys
- updated integrity protection parameters
- refreshed security context identifiers
Important parameters to check
Verify:
- algorithm compatibility
- correct key identifiers
- security context version
Step 4: UE Applies Updated Security Context
The UE applies the new security configuration and updates its security context.
This ensures that future signaling and data messages are protected using the updated keys.
Important parameters to check
Check:
- correct key activation
- synchronization with network
- integrity verification
Security Context Components
| Component | Description |
|---|---|
| NAS Security Context | Protects NAS signaling |
| AS Security Context | Protects radio communication |
| Encryption Keys | Protect signaling and user data |
| Integrity Keys | Ensure message authenticity |
When Security Context Updates Occur
| Event | Reason |
|---|---|
| Handover | New base station requires new AS keys |
| AMF relocation | New NAS security context |
| Key lifetime expiration | Security refresh |
| Security policy changes | Algorithm update |
Troubleshooting Security Context Issues
Security Context Mismatch
Possible causes:
- incorrect key derivation
- synchronization errors
- handover configuration issues
Encryption Failure
Possible reasons:
- unsupported algorithms
- incorrect key activation
- UE capability limitations
Integrity Protection Failure
Possible causes:
- incorrect integrity keys
- message corruption
- signaling errors
Relevant 3GPP Specifications
The Security Context Update procedure is defined by the 3rd Generation Partnership Project in:
- 3GPP TS 33.501 - Security Architecture
- 3GPP TS 23.502 - System Procedures
- 3GPP TS 38.331 - NR RRC Protocol
Summary
The Security Context Update procedure ensures that security keys and protection parameters remain valid during mobility and network changes.
The process includes:
- detecting a trigger for security update
- deriving new security keys
- sending updated security parameters
- UE applying the updated security context
This mechanism ensures continuous secure communication in dynamic 5G networks.