Description
An Application Protocol Data Unit (APDU) is the fundamental communication packet defined by ISO/IEC 7816-4 and adopted by 3GPP for interactions with smart cards, specifically the Universal Integrated Circuit Card (UICC) hosting the USIM application. It serves as the standardized format for command and response exchanges between a terminal (like a mobile device) and the card. An APDU consists of a mandatory command APDU (C-APDU) sent by the terminal and a corresponding response APDU (R-APDU) returned by the card. The C-APDU structure includes a header (CLA, INS, P1, P2) specifying the class, instruction, and parameters, and a variable-length body containing command data. The R-APDU contains a body with response data and a mandatory two-byte trailer (SW1, SW2) indicating the command processing status (e.g., success, error conditions).
In 3GPP systems, APDUs are primarily used over the interface between the Mobile Equipment (ME) and the UICC, as standardized in TS 31.101. They facilitate a wide range of USIM and card application toolkit (CAT) functions. For example, during network authentication, the ME sends an APDU command to the USIM to run the authentication and key agreement (AKA) algorithm, and the USIM returns an APDU response with the computed authentication vector. APDUs also enable secure OTA (Over-The-Air) updates for subscriber data, application provisioning (e.g., for eSIM management), and execution of value-added services via the SIM Toolkit.
The APDU mechanism operates within a master-slave model where the terminal initiates all commands. The protocol is session-less and stateless at the APDU level, though higher-layer applications may maintain state. APDU exchanges are transported over physical and logical channels on the UICC interface. Security is integral; sensitive commands (e.g., for personalization or key management) are protected by secure messaging, where APDU data is encrypted and integrity-protected using keys stored on the card. This ensures confidentiality and authenticity in operations like profile downloading for eSIM.
APDUs are critical for the modularity and interoperability of smart card systems in telecommunications. They allow diverse applications (from network authentication to payment applets) to coexist on a single UICC by providing a uniform command set. The strict formatting and status reporting enable robust error handling and debugging. In advanced use cases, such as IoT with embedded SIMs (eSIM), APDUs facilitate remote subscription management as defined in GSMA specifications, which build upon 3GPP's APDU framework for profile installation and management.
Purpose & Motivation
The APDU was introduced to standardize communication with smart cards, addressing the need for a universal, interoperable command set across different card vendors and applications. Prior to standardization, proprietary command interfaces hindered compatibility and increased complexity for device manufacturers and network operators. By adopting ISO/IEC 7816-4, 3GPP ensured that UICCs and USIMs from any supplier could work seamlessly with any compliant mobile device, fostering a competitive ecosystem and reducing integration costs.
In the context of 3GPP, APDUs solve the problem of secure and efficient data exchange for subscriber identity management and authentication. They enable the USIM to perform cryptographic computations locally on the secure card, keeping sensitive keys never exposed to the potentially compromised device environment. This is fundamental for network security in GSM, UMTS, and LTE/5G. Furthermore, APDUs support the dynamic nature of modern mobile services by allowing OTA updates, which are essential for provisioning, modifying subscriber data, or deploying new applications without physical card replacement.
The creation and evolution of APDU usage in 3GPP were motivated by the expansion of smart card capabilities beyond simple authentication. As UICCs evolved into multi-application platforms hosting payment, identity, and IoT services, a robust, extensible protocol was necessary. APDUs provide this foundation, allowing new instructions and data structures to be defined within the existing framework. They address limitations of earlier, less structured methods by offering precise control, standardized error reporting, and support for secure messaging, which are critical for trusted service execution and management in an increasingly digital and connected world.
Classification
Detected Changes Across Releases
from 3GPP Change RequestsSpecific changes extracted from the „Change history“ tables of 3GPP specifications (1 CRs across 1 releases). Complements the general historical overview above with the evidence-based evolution of this function.
Studied in Rel-4, normative work from Rel-18.
In Release 18, specific corrections and enhancements were made to the test coverage for the GBAUCipher class within the USIM's GBA-U (Generic Bootstrapping Architecture - UICC) application. This involved updating the associated test cases and sources to ensure proper validation of the Application Protocol Data Unit (APDU) function as it relates to this security feature on the UICC.
- Test cases and sources correction related to coverage of GBAUCipher class from uicc.usim.gba_u TS 31.213CR0053
Explore further
Broader topics and technologies where APDU plays a role.
Defining Specifications
3GPP specifications that define or reference APDU, with the latest known release. Sourced from the 3GPP document catalog — see methodology.
| Specification | Title | Release |
|---|---|---|
| TR 21.905 vj00 | 3GPP Technical Terms and Definitions | Rel-19 |
| TS 23.057 vj00 | Mobile Execution Environment (MExE) Specification | Rel-19 |
| TS 29.078 vj00 | CAMEL Phase 4 CAP Specification | Rel-19 |
| TS 31.131 vj00 | C Language Binding for (U)SIM API | Rel-19 |
| TS 31.213 vi30 | Test specification for (U)SIM | Rel-18 |
| TS 33.835 vg10 | Study on authentication and key management for apps | Rel-16 |
| TS 34.131 vj00 | SIM API C Language Test Specification | Rel-19 |
| TS 51.013 vj00 | SIM API for Java Card Test Specification | Rel-19 |