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