GRcard SIM¶
- Table of contents
- GRcard SIM
The GRcard SIM is a programmable GSM SIM card.
It uses a mixture of TS11.11 / ISO7816-4 and proprietary commands for programming
There is limited card programming support both in https://git.osmocom.org/pysim/ as well as the more interactive https://git.osmocom.org/cyberflex-shell/.
Command reference¶
To understand this reference, it is assumed that you are familiar with basic knowledge on smartcard
technologies, such as standard ISO 7816-3/-4 APDUs and GSM TS 11.11.
Setting the ICCID¶
Uses a standard UPDATE BINARY (D6) command on the EF.ICCID (2FE2)
Security: ADM2
Setting the IMSI¶
Uses a standard UPDATE BINARY (D6) command on the EF.IMSI (7F20/6F07)
Security: ADM2
Setting the Access Class¶
Uses a standard UPDATE BINARY (D6) command on the EF.ACC (7F20/6F78)
Security: ADM2
Setting the SMS Parameters¶
Uses a standard UPDATE RECORD (DC) command on the EF.SMS (7F10/6F42)
Security: ADM2
Setting the A3/A8 algorithm¶
Uses a standard UPDATE BINARY (D6) command on the non-standard (2700/6F70) EF
The record has a size of 1 byte and is defined as follows:- 01 - COMP128v1
- 02 - COMP128v2
- 03 - COMP128v3
Security: ADM2
Setting the Ki¶
Uses a non-standard APDU 80 D4 02 00 10
, followed by 16 bytes of Ki
Security: none
Setting the PIN1 and PUK1¶
Uses a non-standard APDU 80 D4 00 01 10
followed by 8 bytes of PIN1 and 8 bytes of PUK1
Security: none
Setting the PIN2 and PUK2¶
Uses a non-standard APDU 80 D4 00 02 10
followed by 8 bytes of PIN2 and 8 bytes of PUK2
Security: none
Setting the ADM1 + AUK1¶
Uses a non-standard APDU 80 D4 01 04 12 03 00
followed by 8 bytes of ADM1 and 8 bytes of AUK1
Security: none
Setting the ADM2 + AUK2¶
Uses a non-standard APDU 80 D4 01 05 12 03 00
followed by 8 bytes of ADM2 and 8 bytes of AUK2
Security: none
Create File¶
Uses a non-standard APDU 80 CF 00 P2 LEN FID SIZE OPT1 ACC OPT2
, specified as follows:
- Parameter P2:
- 00: Create DF
- 01: Create linear record EF
- 02: Create transparent EF
- 03: Create cyclic record EF
- 04: used to create EF.0001 with size {{{0A20}}}
- FID: The 2 byte File ID
- SIZE: 2 bytes for the transparent EF size; or 1 byte for the number of records, and 1 byte for the record size for linear or cyclic EF
- OPT: Always
0100
- ACC: Access conditions (3 bytes), According to TS 11.11, Section 9.3
- OPT2: Always
FF
Security: ADM0
Erase Card¶
Uses a non-standard APDU 80FE000014 31323334353600001301FF0000000000000000EA
Security: none
Authenticate as ADM0¶
Uses a non-standard APDU 80 F6 00 00 08 PIN
, where per default PIN is 0000000000000000
Updated by fixeria almost 3 years ago · 12 revisions