GrcardSIM » History » Version 10
laforge, 10/17/2016 03:51 PM
fix conversion errors when importing from trac
1 | 9 | tsaitgaist | {{>toc}} |
---|---|---|---|
2 | 1 | laforge | |
3 | 9 | tsaitgaist | h1. GRcard SIM |
4 | |||
5 | |||
6 | 1 | laforge | The GRcard SIM is a programmable GSM SIM card. |
7 | |||
8 | It uses a mixture of TS11.11 / ISO7816-4 and proprietary commands for programming |
||
9 | 3 | laforge | |
10 | 1 | laforge | There is limited card programming support both in http://cgit.osmocom.org/cgit/pysim/ as well as the more interactive http://cgit.osmocom.org/cgit/cyberflex-shell/ |
11 | |||
12 | |||
13 | 9 | tsaitgaist | h2. Command reference |
14 | |||
15 | |||
16 | 1 | laforge | To understand this reference, it is assumed that you are familiar with basic knowledge on smartcard |
17 | technologies, such as standard ISO 7816-3/-4 APDUs and GSM TS 11.11. |
||
18 | |||
19 | |||
20 | 9 | tsaitgaist | h3. Setting the ICCID |
21 | |||
22 | |||
23 | 1 | laforge | Uses a standard UPDATE BINARY (D6) command on the EF.ICCID (2FE2) |
24 | |||
25 | Security: ADM2 |
||
26 | |||
27 | |||
28 | 9 | tsaitgaist | h3. Setting the IMSI |
29 | |||
30 | |||
31 | 1 | laforge | Uses a standard UPDATE BINARY (D6) command on the EF.IMSI (7F20/6F07) |
32 | |||
33 | Security: ADM2 |
||
34 | |||
35 | |||
36 | 9 | tsaitgaist | h3. Setting the Access Class |
37 | |||
38 | |||
39 | 1 | laforge | Uses a standard UPDATE BINARY (D6) command on the EF.ACC (7F20/6F78) |
40 | |||
41 | Security: ADM2 |
||
42 | |||
43 | |||
44 | 9 | tsaitgaist | h3. Setting the SMS Parameters |
45 | |||
46 | |||
47 | 1 | laforge | Uses a standard UPDATE RECORD (DC) command on the EF.SMS (7F10/6F42) |
48 | |||
49 | Security: ADM2 |
||
50 | |||
51 | |||
52 | 9 | tsaitgaist | h3. Setting the A3/A8 algorithm |
53 | |||
54 | |||
55 | 1 | laforge | Uses a standard UPDATE BINARY (D6) command on the non-standard (2700/6F70) EF |
56 | |||
57 | The record has a size of 1 byte and is defined as follows: |
||
58 | 9 | tsaitgaist | * 01 - COMP128v1 |
59 | * 02 - COMP128v2 |
||
60 | * 03 - COMP128v3 |
||
61 | 1 | laforge | |
62 | Security: ADM2 |
||
63 | |||
64 | |||
65 | 9 | tsaitgaist | h3. Setting the Ki |
66 | 1 | laforge | |
67 | 10 | laforge | Uses a non-standard APDU @80 D4 02 00 10@, followed by 16 bytes of Ki |
68 | 9 | tsaitgaist | |
69 | 1 | laforge | Security: none |
70 | 6 | tsaitgaist | |
71 | 1 | laforge | |
72 | h3. Setting the PIN1 and PUK1 |
||
73 | 9 | tsaitgaist | |
74 | 10 | laforge | Uses a non-standard APDU @80 D4 00 01 10@ followed by 8 bytes of PIN1 and 8 bytes of PUK1 |
75 | 9 | tsaitgaist | |
76 | |||
77 | 1 | laforge | Security: none |
78 | |||
79 | |||
80 | h3. Setting the PIN2 and PUK2 |
||
81 | |||
82 | 9 | tsaitgaist | |
83 | 10 | laforge | Uses a non-standard APDU @80 D4 00 02 10@ followed by 8 bytes of PIN2 and 8 bytes of PUK2 |
84 | 9 | tsaitgaist | |
85 | 1 | laforge | Security: none |
86 | |||
87 | |||
88 | 9 | tsaitgaist | h3. Setting the ADM1 + AUK1 |
89 | 1 | laforge | |
90 | 9 | tsaitgaist | |
91 | 10 | laforge | Uses a non-standard APDU @80 D4 01 04 12 03 00@ followed by 8 bytes of ADM1 and 8 bytes of AUK1 |
92 | 9 | tsaitgaist | |
93 | 1 | laforge | Security: none |
94 | |||
95 | 9 | tsaitgaist | |
96 | 1 | laforge | h3. Setting the ADM2 + AUK2 |
97 | 9 | tsaitgaist | |
98 | 10 | laforge | Uses a non-standard APDU @80 D4 01 05 12 03 00@ followed by 8 bytes of ADM2 and 8 bytes of AUK2 |
99 | 9 | tsaitgaist | |
100 | Security: none |
||
101 | 1 | laforge | |
102 | 9 | tsaitgaist | |
103 | 1 | laforge | h3. Create File |
104 | |||
105 | 10 | laforge | Uses a non-standard APDU @80 CF 00 P2 LEN FID SIZE OPT1 ACC OPT2@, specified as follows: |
106 | 9 | tsaitgaist | |
107 | 1 | laforge | * Parameter P2: |
108 | 9 | tsaitgaist | ** 00: Create DF |
109 | ** 01: Create linear record EF |
||
110 | 1 | laforge | ** 02: Create transparent EF |
111 | 9 | tsaitgaist | ** 03: Create cyclic record EF |
112 | 10 | laforge | ** 04: used to create EF.0001 with size {{{0A20}}} |
113 | 9 | tsaitgaist | * FID: The 2 byte File ID |
114 | * 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 |
||
115 | 10 | laforge | * OPT: Always @0100@ |
116 | 9 | tsaitgaist | * ACC: Access conditions (3 bytes), According to TS 11.11, Section 9.3 |
117 | 10 | laforge | * OPT2: Always @FF@ |
118 | 9 | tsaitgaist | |
119 | 4 | tsaitgaist | Security: ADM0 |
120 | |||
121 | 5 | tsaitgaist | |
122 | 9 | tsaitgaist | h3. Erase Card |
123 | |||
124 | 10 | laforge | Uses a non-standard APDU @80FE000014 31323334353600001301FF0000000000000000EA@ |
125 | 5 | tsaitgaist | |
126 | 1 | laforge | Security: none |
127 | |||
128 | 9 | tsaitgaist | |
129 | h3. Authenticate as ADM0 |
||
130 | |||
131 | 10 | laforge | Uses a non-standard APDU @80 F6 00 00 08 PIN@, where per default PIN is @0000000000000000@ |