Project

General

Profile

GrcardSIM2 » History » Version 3

laforge, 10/17/2016 03:55 PM

1 2 tsaitgaist
{{>toc}}
2 1 tsaitgaist
3 2 tsaitgaist
h1. GRcard SIM 2
4
5
6 1 tsaitgaist
The GRcard SIM version 2 is a programmable GSM SIM card.
7
They are used by sysmocom for the sysmoSIM-GR2.
8
These are different from the previous [[GrcardSIM|sysmoSIM-GR1]]
9
10
There is limited card programming support in ​http://cgit.osmocom.org/cgit/pysim/
11
12
13 2 tsaitgaist
h2. ADM & SUPER ADM
14 1 tsaitgaist
15 3 laforge
* ADM is access level @05@
16
* SUPER ADM is access level @0b@, and the default PIN is 88888888 (encoded @3838383838383838@) 
17 2 tsaitgaist
18
h2. Command reference
19
20
21 1 tsaitgaist
To understand this reference, it is assumed that you are familiar with basic knowledge on smartcard
22
technologies, such as standard ISO 7816-3/-4 APDUs and ETSI TS 51.011 (previously GSM TS 11.11).
23
24
25 2 tsaitgaist
h3. Writing files
26
27
28 1 tsaitgaist
Files (ICCID, IMSI, …) can be written using the standard SIM commands (UPDATE BINARY/RECORD).
29
30
Security: ADM
31
32
33
h3. Set PIN
34
35 3 laforge
Uses a non-standard APDU @A0 D4 P1 P2 08 PIN@
36 2 tsaitgaist
37 3 laforge
* P1: @#a@ for PIN, @3B@ for PUK
38 2 tsaitgaist
* P2: CHV number, as in VERIFY CHV for PIN (01 for PIN1, 02 for PIN2, 05 for ADM, 0b for SUPER ADM), and as in UNBLOCK CHV for PUK (00 for PUK1, 02 for PUK2)
39
* PIN: 8 byte PIN/PUK, encoded as in VERIFY CHV
40 1 tsaitgaist
41 2 tsaitgaist
Security: ADM
42 1 tsaitgaist
43
44
h3. Ki & algo
45
46 2 tsaitgaist
47 3 laforge
Ki & the A3A8 algorithm are store in the transparent file EF.WEKI (id @0001@) under DF.GSM (id @7F20@)
48 1 tsaitgaist
49 3 laforge
binary value: @0010 ALGO Ki@
50 1 tsaitgaist
51 2 tsaitgaist
* ALGO is the A3A8 algorithm used:
52 3 laforge
** COMP128V1: @00@
53
** COMP128V2: @01@
54
** COMP128V3: @03@
55 2 tsaitgaist
* Ki: 16 byte secret key
56 1 tsaitgaist
57
Security: SUPER ADM
Add picture from clipboard (Maximum size: 48.8 MB)