SIM Cards

Random notes about interfacing with SIM cards.

  • ISO 7816-1: Physical characteristics
  • ISO 7816-2: Electrical contacts
  • ISO 7816-3: Electrical interface, Transmission Protocol Data Units (TPDUs)
    • T=0: Byte-oriented protocol
    • T=1: Block-oriented protocol
  • ISO 7816-4: Standard commands, Application Protocol Data Units (APDUs)
  • ISO 14443-4: “T=CL”: APDUs over RFID

At install time, you can specify:

  • Initialization data
  • App parameters
    • STK uses these extensively
      • Privileges
      • Priority
      • Number of menu items
      • Max menu item size

Other fun commands:

  • List AIDs, including both modules and instances
  • Delete AIDs
  • You MUST delete instances before deleting the executable!
  • You MUST delete old AIDs before reusing them!
  • Java Card 2.1.1 Virtual Machine Specification
  • GlobalPlatform card specification 2.1/2.2
  • GSM 03.48 – Secure remote SIM access
  • GSM 03.40 – SMS standard
  • ETSI TS 101 220 – Assigned numbers
  • ETSI TS 102 221 – UICC/(U)SIM spec
  • ETSI TS 102 223 – Card Application Toolkit
  • ETSI TS 102 226 – Remote APDUs
  • ETSI TS 102 241 – UICC/SIM API for JavaCard