GrcardSIM » History » Version 9
tsaitgaist, 02/19/2016 10:48 PM
A3/A8 algorithm file type fixed
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 | 9 | tsaitgaist | |
68 | <pre> |
||
69 | |||
70 | 1 | laforge | Security: none |
71 | 6 | tsaitgaist | |
72 | 1 | laforge | |
73 | 9 | tsaitgaist | h3. Setting the PIN1 and PUK1 |
74 | 1 | laforge | |
75 | 9 | tsaitgaist | |
76 | <pre> |
||
77 | |||
78 | 1 | laforge | Security: none |
79 | |||
80 | |||
81 | 9 | tsaitgaist | h3. Setting the PIN2 and PUK2 |
82 | 1 | laforge | |
83 | 9 | tsaitgaist | |
84 | <pre> |
||
85 | |||
86 | 1 | laforge | Security: none |
87 | |||
88 | |||
89 | 9 | tsaitgaist | h3. Setting the ADM1 + AUK1 |
90 | 1 | laforge | |
91 | 9 | tsaitgaist | |
92 | <pre> |
||
93 | |||
94 | 1 | laforge | Security: none |
95 | |||
96 | |||
97 | 9 | tsaitgaist | h3. Setting the ADM2 + AUK2 |
98 | 1 | laforge | |
99 | 9 | tsaitgaist | |
100 | <pre> |
||
101 | |||
102 | 6 | tsaitgaist | Security: none |
103 | |||
104 | 1 | laforge | |
105 | 9 | tsaitgaist | h3. Create File |
106 | 1 | laforge | |
107 | |||
108 | 9 | tsaitgaist | <pre> |
109 | 1 | laforge | |
110 | 9 | tsaitgaist | * Parameter P2: |
111 | ** 00: Create DF |
||
112 | ** 01: Create linear record EF |
||
113 | ** 02: Create transparent EF |
||
114 | ** 03: Create cyclic record EF |
||
115 | <pre> |
||
116 | * FID: The 2 byte File ID |
||
117 | * 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 |
||
118 | <pre> |
||
119 | * ACC: Access conditions (3 bytes), According to TS 11.11, Section 9.3 |
||
120 | <pre> |
||
121 | |||
122 | <pre> |
||
123 | |||
124 | 4 | tsaitgaist | Security: ADM0 |
125 | |||
126 | 1 | laforge | |
127 | 9 | tsaitgaist | h3. Erase Card |
128 | 5 | tsaitgaist | |
129 | 9 | tsaitgaist | |
130 | <pre> |
||
131 | |||
132 | 5 | tsaitgaist | Security: none |
133 | 1 | laforge | |
134 | |||
135 | 9 | tsaitgaist | h3. Authenticate as ADM0 |
136 | |||
137 | |||
138 | <pre> |