Description
In 3GPP security, the Message Authentication Code (MAC) is a critical element generated during the Authentication and Key Agreement (AKA) procedure. Specifically, it refers to the MAC included within the Authentication Token (AUTN) that the network sends to the User Equipment (UE) for mutual authentication. The MAC is computed by the network's Authentication Centre (AuC) using the cryptographic algorithm f1 (or its variant f1* for 5G AKA) with a secret key K (shared with the UE's USIM), a random challenge RAND, a sequence number SQN, and an Authentication Management Field (AMF) as inputs. The formula is MAC = f1_K(SQN || RAND || AMF).
The architecture involves the Home Subscriber Server (HSS)/AuC in the core network generating the authentication vector, which contains RAND, AUTN (which includes MAC and other fields), XRES, and session keys. The AUTN is sent to the serving network (e.g., MME in 4G, AMF in 5G), which forwards RAND and AUTN to the UE. Upon receipt, the UE's USIM independently computes an expected MAC (XMAC) using the same f1 algorithm, its shared key K, and the received RAND, SQN, and AMF. The USIM then compares the computed XMAC with the MAC value extracted from the received AUTN. If they match, it proves to the UE that the authentication vector was generated by an entity possessing the correct secret key K, thereby authenticating the network. A mismatch indicates a potential security threat, and authentication fails.
How it works is deeply tied to the AKA protocol's mutual authentication goal. The MAC's inclusion in AUTN allows the UE to verify the network's legitimacy before proceeding. It protects against forgery attacks; an attacker cannot construct a valid AUTN without knowledge of K. The MAC computation is one-way and cryptographically strong, ensuring that even if RAND and AUTN are intercepted, the secret key cannot be derived. Its role is foundational for establishing a trusted session, as successful MAC validation is a prerequisite for the UE to compute the session keys (CK, IK) and the network's expected response (RES), completing the mutual authentication handshake. This mechanism is used across 3G (UMTS), 4G (EPS-AKA), and 5G (5G AKA, EAP-AKA').
Purpose & Motivation
The Message Authentication Code within AKA was created to provide explicit network authentication to the user equipment, addressing a security weakness in the earlier 2G (GSM) system. In GSM, only the network authenticated the mobile station (one-way authentication), leaving it vulnerable to false base station attacks ("IMSI catchers") where a rogue network could impersonate a legitimate one. The introduction of mutual authentication in 3GPP UMTS was a fundamental security enhancement, and the MAC is the mechanism that enables the UE to verify the network.
The problem it solves is proving the network's authenticity to the UE in a shared secret key context. Without the MAC, a UE could not distinguish between a legitimate network and an attacker broadcasting a captured RAND. The MAC, derived from the shared secret K and other freshness parameters (SQN, RAND), provides this proof. Its creation was motivated by the need for stronger security as mobile networks evolved to carry sensitive data and transactions. It addresses the limitation of one-way authentication by ensuring that both parties in the communication are verified, forming the basis for secure key derivation and protecting against man-in-the-middle and replay attacks. This established the trusted foundation for all subsequent 3GPP security architectures.
Classification
Detected Changes Across Releases
from 3GPP Change RequestsSpecific changes extracted from the „Change history“ tables of 3GPP specifications (41 CRs across 5 releases). Complements the general historical overview above with the evidence-based evolution of this function.
- EN-DC impacts to LTE MAC TS 36.321CR1196
- MAC functionality for euCA TS 36.321CR1274
- Delay budget report and MAC CE adaptation for NR for TS 38.306 TS 38.306CR0013
- Introduction of support for MAC PDU containing UE contention resolution identity MAC control element without RRC response message in NB-IoT TS 36.306CR1570
- Alignment of MAC CEs between LTE and NR TS 36.321CR1340
- Clarification on Dual Connectivity PHR MAC CE for EN-DC TS 36.321CR1322
+ 15 more changes
- Clarification of the DS-TT MAC address TS 29.521CR0069
- Corrections to MAC for Rel-16 NB-IoT TS 36.321CR1472
- Corrections to MAC for Rel-16 eMTC TS 36.321CR1473
- MAC corrections for PUR TS 36.321CR1503
- Recommended bit rate query handling at MAC Reset TS 36.321CR1521
- MAC clarifications for PUR TS 36.321CR1524
+ 1 more changes
- Introducing IAB MAC CE Configurations in RRC TS 38.331CR3194
- NAS MAC terminology TS 24.301CR3462
- Misc corrections on MAC for IoT NTN TS 36.321CR1559
- MAC correction on TDD support for IoT NTN TS 36.321CR1560
- Miscellaneous MAC corrections for IoT NTN TS 36.321CR1567
- Correction to 36.321 on Koffset handling during MAC reset TS 36.321CR1573
+ 2 more changes
Explore further
Broader topics and technologies where MAC plays a role.
Defining Specifications
3GPP specifications that define or reference MAC, with the latest known release. Sourced from the 3GPP document catalog — see methodology.
| Specification | Title | Release |
|---|---|---|
| TR 21.905 vj20 | 3GPP Terminology and Definitions | Rel-19 |
| TR 22.944 vj00 | UE Functionality Split Scenarios and Requirements | Rel-19 |
| TS 23.050 v1100 | UMTS Network Principles and Architecture | R99 |
| TS 23.060 vj00 | GPRS Stage 2 Service Description | Rel-19 |
| TS 23.146 vj00 | 3G Facsimile Group 3 Technical Realization | Rel-19 |
| TS 24.109 vj00 | HTTP Digest AKA & GAA Stage 3 | Rel-19 |
| TS 24.229 vk00 | IMS Call Control Protocol based on SIP | Rel-20 |
| TS 24.244 vj00 | Wireless LAN Control Plane Protocol | Rel-19 |
| TS 24.301 vk00 | 3GPP TS 24301 vk00: NAS Protocols for EPS | Rel-20 |
| TS 24.369 vk00 | AIoT NAS Protocol for 5G System | Rel-20 |
| TS 24.501 vk00 | 5G System (5GS) Non-Access Stratum (NAS) Protocol | Rel-20 |
| TS 25.201 vj00 | UTRA Physical Layer General Description | Rel-19 |
| TS 25.212 vj00 | UTRA FDD Layer 1 Multiplexing & Channel Coding | Rel-19 |
| TS 25.222 vj00 | UTRA TDD Multiplexing & Channel Coding | Rel-19 |
| TS 25.224 vj00 | UTRA TDD Physical Layer Procedures | Rel-19 |
| TS 25.301 vj00 | UE-UTRAN Radio Interface Protocol Architecture | Rel-19 |
| TS 25.302 vj00 | UTRA Physical Layer Services | Rel-19 |
| TS 25.321 vj00 | MAC Protocol Specification for UTRAN | Rel-19 |
| TS 25.322 vj00 | RLC Protocol Specification | Rel-19 |
| TS 25.324 vj00 | Broadcast/Multicast Control Protocol | Rel-19 |
| TS 25.331 vj01 | RRC Protocol for UE-UTRAN Radio Interface | Rel-19 |
| TS 25.401 vj00 | UTRAN Overall Architecture | Rel-19 |
| TS 25.402 vj00 | UTRAN Synchronisation Mechanisms | Rel-19 |
| TS 25.420 vj00 | Iur Interface Introduction for UTRAN | Rel-19 |
| TS 25.423 vj00 | UTRAN RNSAP Specification | Rel-19 |
| TR 25.912 vj00 | Evolved UTRA and UTRAN Technical Report | Rel-19 |
| TR 25.931 vj00 | UTRAN Signalling Procedures Examples | Rel-19 |
| TS 26.202 vj00 | AMR-WB Speech Codec Mapping Specification | Rel-19 |
| TR 26.902 vj00 | Video Codec Performance for 3GPP Packet Services | Rel-19 |
| TR 26.935 vj00 | Speech Codec Performance for Packet Switched Multimedia | Rel-19 |
| TS 27.060 vj00 | TE-MT Interworking for Packet Domain | Rel-19 |
| TS 29.204 vj00 | SS7 Security Gateway Functional Description | Rel-19 |
| TS 29.509 vk00 | 3GPP TS 29509: Nausf Service Based Interface | Rel-20 |
| TS 29.521 vk00 | BSF Binding Support Management Service | Rel-20 |
| TS 29.890 vg00 | CT3 5G System Technical Report | Rel-16 |
| TS 31.102 vj50 | USIM Application for 3GPP Telecom Networks | Rel-19 |
| TS 31.103 vj00 | ISIM Application Specification | Rel-19 |
| TS 31.113 v1800 | USAT Interpreter Byte Code Specification | Rel-8 |
| TS 31.114 v1800 | USAT Interpreter Transmission Protocol | Rel-8 |
| TR 31.900 vj00 | 3GPP TS 31.900: Security Interworking Guidance | Rel-19 |
| TS 33.102 vj10 | 3G Security Architecture Specification | Rel-19 |
| TS 33.105 vj00 | 3G Security: Cryptographic Algorithm Requirements | Rel-19 |
| TS 33.110 vj00 | UICC-Terminal Key Establishment | Rel-19 |
| TS 33.203 vk00 | IMS Security Features and Mechanisms | Rel-20 |
| TS 33.204 vj00 | TCAP Security (TCAPsec) Stage 2 Specification | Rel-19 |
| TS 33.210 vj30 | Network Domain Security for IP Protocols | Rel-19 |
| TS 33.224 vj00 | Generic Push Layer (GPL) Specification | Rel-19 |
| TS 33.246 vj00 | MBMS Security Specification | Rel-19 |
| TS 33.259 vj00 | Key Establishment between UICC Hosting & Remote Device | Rel-19 |
| TS 33.700 | 3GPP TR 33.700 | R99 |
| TS 33.814 vg01 | Security aspects of enhanced Location Services (eLCS) | Rel-16 |
| TS 33.821 v1900 | LTE/SAE Security Architecture Rationale | Rel-9 |
| TR 33.851 vh10 | Security for Industrial IoT in 5G | Rel-17 |
| TS 35.205 vj00 | MILENAGE Algorithm Set: General Overview | Rel-19 |
| TS 35.234 vj00 | MILENAGE-256 Algorithm Set Specification | Rel-19 |
| TS 35.235 vj00 | MILENAGE-256 Algorithm Set Specification | Rel-19 |
| TS 35.236 vj00 | MILENAGE-256 Algorithm Set Specification | Rel-19 |
| TS 35.249 vj10 | f5** Algorithm for MILENAGE and Tuak | Rel-19 |
| TR 35.909 vj00 | 3GPP MILENAGE Algorithm Design Report | Rel-19 |
| TR 35.934 vj00 | Tuak algorithm set for 3GPP auth & key gen | Rel-19 |
| TR 35.937 vj00 | MILENAGE-256 Algorithm Set Specification | Rel-19 |
| TS 36.133 vj50 | LTE Radio Resource Management Requirements | Rel-19 |
| TS 36.201 vj00 | LTE Physical Layer General Description | Rel-19 |
| TS 36.300 vj20 | E-UTRAN Radio Interface Protocol Architecture | Rel-19 |
| TS 36.302 vj00 | E-UTRA Physical Layer Services | Rel-19 |
| TS 36.305 vj00 | UE Positioning in E-UTRAN Stage 2 | Rel-19 |
| TS 36.306 vj30 | E-UTRA UE Radio Access Capability Parameters | Rel-19 |
| TS 36.321 vj30 | E-UTRA MAC Protocol Specification | Rel-19 |
| TS 36.322 vj00 | E-UTRA Radio Link Control Protocol Specification | Rel-19 |
| TS 36.323 vj00 | PDCP Protocol Specification | Rel-19 |
| TS 36.331 vj30 | E-UTRA RRC Protocol Specification | Rel-19 |
| TS 36.509 vh40 | EPC Special UE Conformance Testing Functions | Rel-17 |
| TR 36.938 v1900 | Mobility between E-UTRAN and 3GPP2/WiMAX | Rel-9 |
| TS 37.320 vj30 | Minimization of Drive Tests Overview | Rel-19 |
| TS 37.355 vj30 | LTE Positioning Protocol (LPP) | Rel-19 |
| TR 37.901 vf10 | UE Application Layer Data Throughput Performance | Rel-15 |
| TS 38.133 vk00 | NR RRM Requirements | Rel-20 |
| TS 38.201 vj00 | NR Physical Layer General Description | Rel-19 |
| TS 38.202 vj00 | 5G NR Physical Layer Services | Rel-19 |
| TS 38.305 vj20 | NG-RAN UE Positioning Architecture and Functionalities | Rel-19 |
| TS 38.306 vj30 | NR UE Radio Access Capability Parameters | Rel-19 |
| TS 38.323 vj10 | PDCP Protocol Specification | Rel-19 |
| TS 38.331 vj30 | NR Radio Resource Control Protocol Specification | Rel-19 |
| TS 38.522 vj40 | 3GPP TS 38522 vj40: UE Conformance Test Applicability | Rel-19 |
| TS 43.051 vj00 | GERAN Stage 2 Service Description | Rel-19 |
| TS 43.064 vj00 | GPRS Radio Interface Lower-Layer Functions | Rel-19 |
| TS 43.129 vj00 | PS Handover in GERAN A/Gb and GAN Modes | Rel-19 |
| TS 43.318 vj00 | Generic Access Network (GAN) Stage 2 | Rel-19 |
| TR 43.901 vj00 | Generic Access to A/Gb Interface Feasibility Study | Rel-19 |
| TR 43.902 vj00 | GAN Enhancements Feasibility Study | Rel-19 |
| TS 44.060 vj00 | GERAN RLC/MAC Protocol Specification | Rel-19 |
| TS 44.160 vg00 | GERAN Iu Mode RLC/MAC Protocol Specification | Rel-16 |
| TS 44.318 vj00 | Generic Access Network (GAN) Interface Procedures | Rel-19 |
| TS 45.820 vd10 | CIoT for Internet of Things | Rel-13 |
| TR 45.902 vj00 | Flexible Layer One (FLO) for GERAN | Rel-19 |
| TS 48.016 vj00 | Gb Interface Network Service Specification | Rel-19 |
| TS 55.241 vj00 | 3GPP Integrity Algorithm GIA4 Specification | Rel-19 |
| TS 55.251 vj00 | GEA5 and GIA5 Encryption Algorithm Specification | Rel-19 |