Wednesday, December 25, 2013

Head structure seeking SIM card EF (CHV) and MF / DF / EF's

Head structure seeking SIM card EF (CHV) and MF / DF / EF's
Reply:
Go to the Linux / Unix ask
Reply:
SIM card development

Reply:
Master File (MF) is the root of the entire file system, which controls all of the EEPROM space, this space can be created DF, EF, SF file.

The main parameters

File identifier: 2 bytes, the value of '3 F00 '.
File Type: 1 byte value is '01 '.
File Size: 2 bytes, the space allocated to the file, in bytes, that space does not include the file header. File size is usually assigned by the COS (fill in this parameter when creating a document '0000 ').


Reply:
Dedicated file (DF)
A dedicated file (DF), including itself and to all the files under the DF constituent documents of functional groups. DF include a file header and file body, the body in the space allocated for the file can be created DF, EF.

The main parameters

File identifier: 2 bytes, the value can not be '3 F00 '.
File Type: 1 byte value is '02 '.
Directory type: 1 byte, '00 ': general catalog; '01': GSM directory; '02 ': TELECOM directory; other values: Reserved.
File Size: 2 bytes, the space allocated to the file, in bytes, that space does not include the file header. File size allocated by COS.


Basic file (EF)
A basic document (EF) consists of a file header and file body composed of two parts. GSM system uses three basic documents.

File header
File body

Figure 4.5-1 basic document structure (EF) of

Transparent file (transparent)
Transparent file consists of a continuous sequence of bytes. Byte sequence operation is in accordance with the relative address (OFFSET) conducted a transparent file relative address of the first byte is '0000 '. When reading or updating the file, the start address of the relative address of the byte sequence. Size of the file with a transparent document described in the file header.



Figure 4.5-2 transparent structure
fileThe main parameters

File identifier: 2 bytes, the value can not be '3 F00 '.
File Type: 1 byte value is '04 '.
File format: 1 byte value is '00 '.
File Size: 2 bytes, the space allocated to the file, in bytes, that space does not include the file header.
The number of bytes 2 bytes, space has been used: the data size.
Read attributes: 4 High said READ, SEEK access conditions; low 4 represents UPDATE access condition.
Failure properties: four high indicates REHABILITATE access conditions; low 4 indicates INVALIDATE access conditions.


Note: If UPDATE access conditions for NEVER, in the case of data size
Linear fixed-length record files (linear fixed)
Linear fixed-length record files (linear fixed) by a fixed-length record consisting of a sequence. Record number of the first record is 1. Record length and the number of records stored in the file header.












Figure 4.5-2 linear structure
fixed-length record files
This type of EF There are several ways to access records:
- Direct access to the record number (does not affect the record pointer)
- When the record pointer is not set, you can use the NEXT or PREVIOUS way into the first record or the last record.
- When the record pointer is set, you can access the next (NEXT) record (unless the record pointer in the last record) (unless the record pointer at the first record) a (PREVIOUS) or on record;
- The use of pattern search method
From the beginning of the file forward (forward) sequence search.
From the record pointer (unless the pointer in the last record) where the records of the search forward.
Search backward from the end of the file (backward).
From the record pointer (unless the pointer in the first record) where the record backwards at reverse search
If the search is unsuccessful activities, the record pointer unchanged.
Not more than 255 records, and each record is 255 bytes.

The main parameters

File identifier: 2 bytes, the value can not be '3 F00 '.
File Type: 1 byte value is '04 '.
File format: 1 byte value is '01 '.
Record Length: 2 bytes, each record length, in bytes.
Number of records: 2 bytes, the number of total records.
Number of records already exists: the number of 1 byte, existing valid records.
Record pointer: 1 byte, the record number of physical locations (the first few records) recorded 1.
Read attributes: 4 High said READ, SEEK access conditions; low 4 represents UPDATE access condition.
Failure properties: four high indicates REHABILITATE access conditions; low 4 indicates INVALIDATE access conditions.

Note: If UPDATE access conditions for NEVER, have the number of records in the presence of

Cycle length record file (cyclic)
Circular file used to store records in chronological order, all records when space is occupied, the new data will overwrite the oldest stored information.
EF loop structure of the fixed-length record consisting of a fixed number of records. In this file structure, there is a pointer to the link between the first record and the last record. When the record pointer at the end of a record then the next record is the first record, and likewise, when the record pointer in a record 1 then it is recorded on a recording N. The latest records include the latest data and record number is a record number of the oldest record is N.










Figure 4.5-2 cycle length record file structure

For an update operation, use only PREVIOUS way.
For read operations, access methods are: NEXT, PREVIOUS, Current AND Record Number three ways.
After you select a loop file (for read or update operation), the record pointer will point to the last update or add records. If the operation fails, the record pointer unchanged.
Recycling paper records up to 255, and the number of bytes in each record is not more than 255.


The main parameters

File identifier: 2 bytes, the value can not be '3 F00 '.
File Type: 1 byte value is '04 '.
File format: 1 byte value is '03 '.
Record Length: 2 bytes, each record length, in bytes.
Number of records: 2 bytes, the number of total records.
Number of records already exists: the number of 1 byte, existing valid records.
Record pointer: 1 byte, the record number of physical locations (the first few records) recorded 1.
Read attributes: 4 High said READ, SEEK access conditions; low 4 represents UPDATE access condition.
Value-added attributes: four high indicates INCREASE access condition; low four reserved.
Failure properties: four high indicates REHABILITATE access conditions; low 4 indicates INVALIDATE access conditions.

Note: If UPDATE access conditions for NEVER, have the number of records in the presence of


Secure File (SF)
GSM security file is used to store applications involved in user authentication key (Ki), cardholder verification code (CHV1, CHV2), cardholder verification code unlock code (PUK1, PUK2, corresponding CHV1, CHV2 ), document management checksum (ADM1 ~ ADM8), document management checksum unlock code (AUK1 ~ AUK8, corresponding ADM1 ~ ADM8). ADM0 not stored in a secure file, which is stored in the system area.
These objects can be stored in secure files, collectively key.

The main parameters

File identifier: 2 bytes, can MF, DF, EF file with the same name as an identifier.
File Type: 1 byte value is '00 '.
File Size: 2 bytes, the space allocated to the file, in bytes, that space does not include the file header.
The number of bytes 2 bytes, space has been used: the data size.

Key storage format

Key type key identifier enabled attempt counter key value

Key Type

Key Type Value Description
00 authentication key (Ki)
01 cardholder verification code (CHV1, CHV2)
02 cardholder verification code unlock code (PUK1, PUK2)
03 Document Management checksum (ADM1 ~ ADM8)
04 Document Management checksum unlock code (AUK1 ~ AUK8)
Other reserves

Key identification
Due to the current SIM card only allows you to set an authentication key (Ki), so the key is to identify forced to '00 '.

Cardholder verification code (CHV1, CHV2) identifies the range of key '01 '- '02', '01 'corresponding CHV1, '02' corresponds CHV2.

Symmetrically, cardholder verification code unlock code (PUK1, PUK2) ranges also identified key '01 '- '02', '01 'corresponds PUK1, '02' corresponds PUK2.

File Management Checksum (ADM1 ~ ADM8) key identifier in the range '01 '- '08', '01 'corresponds ADM1, '02' corresponds ADM2, and so on.

Symmetrically, the file management checksum Unlock Code (AUK1 ~ AUK8) a key identifier is also in the range '01 '- '08', '01 'corresponds AUK1, '02' corresponds AUK2, and so on.

Enabled
Currently enabled only CHV1 work on other key does not work (forced to '00 ').

b8 b7 b6 b5 b4 b3 b2 b1

b8 = 0 ENABLED
b8 = 1 DISABLED

b1 = 0 ASCII encoding
b1 = 1 BCD coded
Reply:
Upstairs hard, but I want is EF (CHV) or key file (structural safety file)
Reply:
Finally, I was not very detailed list of the structure and content of security documents do?
Reply:
Sorry, I just read the next, but also in more detail, but I still do not quite understand some places, to seek advice on the next.
The first question:
For example, the command
11.11VERIFY CHV 20 00 CHV No. 08 S
CHANGE CHV 24 00 CHV No. 10 S
The security document that should be linear file it
The second question:
Head structure that MF / DF / EF can be specified according to the 11.11 come?

If there tabular form sent to me would be great to see you, hey
Reply:
Sorry, I just read the next, but also in more detail, but I still do not quite understand some places, to seek advice on the next.
The first question:
For example, the command
11.11VERIFY CHV 20 00 CHV No. 08 S
CHANGE CHV 24 00 CHV No. 10 S
The security document that should be linear file it
The second question:
Head structure that MF / DF / EF can be specified according to the 11.11 come?

If there tabular form sent to me would be great to see you, hey
Reply:
The security document that should be linear file it
Secure File is a linear variable-length structure.
You can refer to 11.11.
I copied over from the table becomes the case, it points to improvise

No comments:

Post a Comment