APDU

Embed This Widget

Theme


      
    

Widget powered by . Free, no account required.

โพรโทคอล

Application Protocol Data Unit -- the communication unit between a smart card and a reader defined by ISO 7816-4.

Also known as: Application Protocol Data Unit

APDU

An APDU (Application Protocol Data Unit) is the fundamental communication frame exchanged between a smart card and a card reader (or host application). Every interaction with a smart card — selecting an application, reading a file, verifying a PIN, signing data — is expressed as a pair of command and response APDUs defined by ISO 7816 Part 4.

Command APDU Structure

A command APDU consists of a mandatory 4-byte header followed by optional data:

Field Length Description
CLA 1 byte Instruction class (e.g., 00 for interindustry, 80/84 for proprietary)
INS 1 byte Instruction code (e.g., A4 = SELECT, B0 = READ BINARY, 20 = VERIFY)
P1 1 byte Parameter 1 — context-dependent
P2 1 byte Parameter 2 — context-dependent
Lc 0-3 bytes Length of command data field
Data Lc bytes Command payload
Le 0-3 bytes Maximum expected response data length

ISO 7816-4 defines four APDU cases based on the presence of Lc and Le: Case 1 (no data, no response), Case 2 (response only), Case 3 (data only), and Case 4 (data and response).

Response APDU and Status Words

Every response APDU ends with a two-byte status word (SW1-SW2). The card uses these bytes to signal success, warnings, or errors. The most common status words include:

  • 90 00 — Command executed successfully
  • 6A 82 — File or application not found
  • 69 82 — Security status not satisfied
  • 63 Cx — PIN verification failed, x retries remaining

See APDU Response Codes for a comprehensive status word reference.

Transport Protocols

APDUs are carried over two transport protocols. T=0 is a byte-oriented protocol that interleaves the command header and data with procedure bytes from the card. T=1 wraps entire APDUs in blocks with error-detection codes, making it better suited for high-throughput and contactless applications. The protocol is negotiated during the ATR / PPS exchange.

Secure Messaging

When confidentiality or integrity of the APDU payload is required, Secure Messaging wraps the data field with cryptographic MACs and optional encryption. SCP03 builds on this mechanism to establish a full session-level secure channel using AES.

Smart Card Fundamentals

เริ่มต้นใช้งาน

…Parser . After negotiation (PPS exchange), the host sends APDU command messages; the card returns APDU responses. Every…

Contact vs Contactless vs Dual-Interface

เริ่มต้นใช้งาน

…uses ISO 7816 parts 1–4: physical, electrical, and APDU command encoding. The reader must make galvanic contact…

Smart Card Form Factors Explained

เริ่มต้นใช้งาน

…credentials. On a JavaCard -capable SIM, additional APDU -addressed applets can be post-loaded over the air. eSIM —…

Smart Card Reader Setup Guide

เริ่มต้นใช้งาน

…correctly configured is the first step before any APDU exchange can take place. This guide covers contact and…

Understanding ISO 7816

มาตรฐานและโพรโทคอล

…programmes all build on this foundation. Use the APDU Builder to construct and test ISO 7816-4 commands…

ISO 14443 Deep Dive

มาตรฐานและโพรโทคอล

…response support the full ISO 14443-4 command transport. APDU over Contactless ISO 14443-4 wraps APDU messages in…

EMV Payment Card Architecture

มาตรฐานและโพรโทคอล

…verification onto the card's secure element . Use the APDU Builder to construct and inspect EMV command sequences for…

GlobalPlatform Card Management

มาตรฐานและโพรโทคอล

…defines the application management layer on top. Use the APDU Builder to construct GlobalPlatform STORE DATA, INSTALL,…

Frequently Asked Questions

The smart card glossary is a comprehensive reference of technical terms, acronyms, and concepts used in smart card technology. It covers protocols (APDU, T=0, T=1), security (Common Criteria, EAL, HSM), hardware (SE, EEPROM, contact pad), and applications (EMV, ePassport, eSIM). It serves developers, product managers, and engineers.

Yes. SmartCardFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai.