Tech-invite3GPPspaceIETF RFCsSIP
Quick21222324252627282931323334353637384‑5x

Content for  ETSI TS 102 221   PDF version:  17.1.0

Top   Top   Up   Prev   Next
0…   4…   5…   6…   7…   7.3…   8…   9…   10…   10.2…   11…   11.1.2…   11.1.9…   11.1.14…   11.1.19…   11.1.20…   11.1.21…   11.2…   11.3…   12…   13…   14…   15   A   B   C…   D   E…   F…   G…   H…   I   J…   K…   L…   M…

 

11  Commandsp. 85

11.1  Generic commandsp. 85

11.1.0  Introductionp. 85

Clause 11.1 lists the basic command and response APDU formats that are used by applications residing on a UICC. It is up to each application to determine which commands it uses. If an application does not support a command, it shall return the appropriate status word, see clause 10.2.

11.1.1  SELECTp. 85

11.1.1.1  Functional descriptionp. 85

This function selects a file according to the methods described in clause 8.4. After a successful selection the record pointer and the current tag pointer are undefined.
Input:
  • File ID, application ID, path or empty.
Output:
  • If the selected file is the MF, a DF or an ADF:
    • File ID, total file size, PIN status and other application specific data.
  • If the selected file is an EF:
    • File ID, file size, total file size, access conditions, invalidated/not invalidated indicator, structure of EF, length of the records in case of linear fixed structure or cyclic structure and reserved and maximum file size in case of BER-TLV structure.
Up

11.1.1.2  Command parameters and datap. 85

Code Value
CLAAs specified in clause 10.1.1
INSAs specified in clause 10.1.2
P1 Selection control, see Table 11.1
P2 Selection control, see Table 11.2
LcLength of subsequent data field or empty
DataFile ID, DF name, or path to file, according to P1
LeEmpty, '00', or maximum length of data expected in response
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
00000000Select DF, EF or MF by file id
00000001Select child DF of the current DF
00000011Select parent DF of the current DF
00000100Selection by DF name (see note)
00001000Select by path from MF
00001001Select by path from current DF
NOTE:
This is selection by AID.
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
-XX-----Application session control (see note 2)
-00------ Activation/Reset
-10------ Termination
0--001--Return FCP template
0--011--No data returned
------XXSelection by AID control
------00- First or only occurrence
------01- Last occurrence
------10- Next occurrence
------11- Previous occurrence
NOTE 1:
Whether the FCP information is returned or not depends on the type of APDU.
NOTE 2:
This only applies when P1 indicates SELECT by DF name.
If P1 = '00' and the data field is empty, then P2 shall be set to '0C' ('No data returned'). Then the MF is set as the Current Directory.
To avoid ambiguities when P1 = '00', the following search order applies when selecting a file with a File ID (FID) as a parameter:
  • immediate children of the current DF;
  • the parent DF;
  • the immediate children of the parent DF.
When P1 ≠ '04', bits b2 and b1 of P2 have no meaning and shall be set to 0.
When P1 = '04' (i.e. for selection by AID), a right truncated AID can be specified in the data field.
Up

11.1.1.3  Response Datap. 86

11.1.1.3.0  Base codingp. 86
Byte(s) Description Length
1FCP template tag = '62'1
2 (to 3)Length of FCP template1 or 2
3 to X+2 (or 4 to X+3)FCP templateX
The response data contains the File Control Parameters (FCP) template of the selected file. The contents of the FCP depend on the selected file. See below for the list of TLV that are returned in each case.
In order to retrieve the entire FCP template, Le should be set to '00'.
The value part of the FCP template data object consists of data objects, as shown in clause 11.1.1.3.1. It is mandatory for data objects to be provided in the order given in the description of each response. New data objects can be added to the end of the response data. The terminal shall ignore data objects with tags it does not support.
Up
11.1.1.3.1  Response for MF, DF or ADFp. 87
This clause lists the TLVs in the order returned when an MF, DF or ADF is selected.
Description Tag Clause Status
File Descriptor'82' 11.1.1.4.3M
File Identifier'83' 11.1.1.4.4C1
DF name (AID)'84' 11.1.1.4.5C2
Proprietary information'A5' 11.1.1.4.6C3
Life Cycle Status Integer'8A' 11.1.1.4.9M
Security attributes'8B', '8C' or 'AB' 11.1.1.4.7C4
PIN Status Template DO'C6' 11.1.1.4.10M
Total file size'81' 11.1.1.4.2O
M:
Mandatory.
O:
Optional.
C1:
The File identifier is mandatory for a DF or the MF. For an ADF the File identifier is optional.
C2:
DF name is mandatory for only ADF.
C3:
Proprietary information is mandatory for the MF. For a DF/ADF the Proprietary information is optional.
C4:
Exactly one shall be present.
Up
11.1.1.3.2  Response for an EFp. 87
This clause lists the TLVs in the order returned when an EF is selected.
Description Tag Clause Status
File Descriptor'82' 11.1.1.4.3M
File Identifier'83' 11.1.1.4.4M
Proprietary information'A5' 11.1.1.4.6O
Life Cycle Status Integer'8A' 11.1.1.4.9M
Security attributes'8B', '8C' or 'AB' 11.1.1.4.7C1
File size'80' 11.1.1.4.1M
Total file size'81' 11.1.1.4.2O
Short File Identifier (SFI)'88' 11.1.1.4.8C2
M:
Mandatory.
O:
Optional.
C1:
Exactly one shall be present.
C2:
See clause 11.1.1.4.8 for the coding and presence of tag '88'.
Up

11.1.1.4  File control parametersp. 87

11.1.1.4.1  File sizep. 87
Byte(s) Description Value Length
1Tag'80'1
2LengthX, X ≥ 21
3 to X+2Number of allocated data bytes in the file, excluding structural informationX
The most significant byte comes first in the value field.
For transparent EF, file size is the length of the body part of the EF, and for linear fixed or cyclic EF, it is the record length multiplied by the number of records of the EF. For a BER-TLV structure EF, file size is the memory used by the allocated data objects.
Up
11.1.1.4.2  Total file sizep. 88
Byte(s) Description Value Length
1Tag'81'1
2LengthX, X ≥ 21
3 to X+2Number of allocated data bytes in the file, including structural information if anyX
The most significant byte comes first in the value field.
For an EF, the "total file size" represents the allocated memory for the content and the structural information (if any) of this EF.
For a BER-TLV structure EF, the structural information shall include any administrative overhead that is required to store the TLV objects in the file. If a reserved file size according to clause 11.1.1.4.6.6 is defined for the file, any memory space, that is allocated for the file accordingly, but is currently not used, shall be included in the total file size.
For a DF, the "total file size" represents the sum of the "total file sizes" of all the EFs and DFs contained in this DF plus the amount of available memory in this DF. The size of the structural information of the selected DF itself is not included.
Up
11.1.1.4.3  File Descriptorp. 88
Byte(s) Description Status Value Length
1TagM'82'1
2LengthM'02' or '05'1
3 File descriptor byte (see Table 11.5)M1
4Data coding byteM'21'1
5 to 6Record lengthC'0001' to '00FF'2
7Number of recordsC'01' to 'FE'1
M:
Mandatory.
C:
These bytes are mandatory for linear fixed and cyclic files, otherwise they are not applicable.
File descriptor
Contents:
File descriptor specifies the file accessibility, and the file type and structure.
Coding:
See Table 11.5.
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
0X------File accessibility
00------Not shareable file
01------Shareable file
0-XXX---File type
0-000---Working EF
0-001---Internal EF
0-010---RFU
0-011---
0-100---
0-101---
0-110---
0-111000DF or ADF
0----XXXEF structure
0-Not all set to 1000No information given
0----001Transparent structure
0----010Linear fixed structure
0----011RFU
0----100
0----101
0----110Cyclic structure
0----111RFU
0-111001BER-TLV structure
1XXXXXXXRFU
Data coding byte
Coding:
The data coding byte is coded according to ISO/IEC 7816-4 [12]. The actual value shall not be checked nor used by the terminal.
Record length
Contents:
Record length specifies the length of a record when a record structured file has been selected.
Coding:
The record length shall be present if a record structured file (i.e. for linear fixed or cyclic files) is selected. In this case it indicates the length the records on 2 bytes. Most significant byte comes first in the value field.
Number of records
Contents:
Number of records specifies the number of records in a record structured file.
Coding:
The number of records shall be present if a record structured file (i.e. for linear fixed or cyclic files) is selected. In this case it indicates the number of records on 1 byte.
Up
11.1.1.4.4  File identifierp. 89
Byte(s) Description Value Length
1Tag'83'1
2Length'02'1
3 to 4File identifier2
Up
11.1.1.4.5  DF namep. 89
Byte(s) Description Value Length
1Tag'84'1
2Length1 ≤ X ≤ 161
3 to 2+XDF nameX
DF name is a string of bytes, the AID, which is used to uniquely identify an application dedicated file in the card.
Up
11.1.1.4.6  Proprietary informationp. 89
11.1.1.4.6.0  Data object structurep. 89
This is a constructed TLV object.
Byte(s) Description Length
1Proprietary information constructed Tag = 'A5'1
2Length1
3 to 2+XProprietary data, constructedX
The following TLV objects are defined for the proprietary template (tag 'A5'). Additional private TLV objects (bits b7 and b8 of the first byte of the tag set to '1') may be present after the TLV objects defined in clause 11.1.1.4.6. For example, a manufacturer, issuer, or application provider specific TLV object may be present. If more than one TLV object with the same tag is indicated in this constructed TLV they shall be grouped together as the order in which they appear is used to specify the usage.
Description Tag Status Clause
UICC characteristics'80'C1 11.1.1.4.6.1
Application power consumption'81'C2 11.1.1.4.6.2
Minimum application clock frequency'82'C3 11.1.1.4.6.3
Amount of available memory'83'C4 11.1.1.4.6.4
File details'84'C5 11.1.1.4.6.5
Reserved file size'85'C5 11.1.1.4.6.6
Maximum file size'86'C6 11.1.1.4.6.7
Supported system commands'87'C7 11.1.1.4.6.8
Specific UICC environmental conditions'88'C8 11.1.1.4.6.9
Platform to Platform CAT Secured APDU'89'C9 11.1.1.4.6.10
C1:
The UICC characteristics are mandatory for the MF.
C2:
Application power consumption, is optional for ADFs. This TLV object shall not be present for the MF, an EF or DF.
C3:
This TLV object shall not be present for the MF, DF or an EF. For an ADF, it is optional.
C4:
This TLV object shall not be present for a transparent, linear fixed or cyclic EF. It is mandatory for BER-TLV structured EFs. For an ADF, DF or the MF, it is optional.
C5:
This TLV object shall only be present for BER-TLV structured EFs, for which it is mandatory.
C6:
This TLV object shall only be present for BER-TLV structured EFs, for which it is optional.
C7:
This TLV object is mandatory for the MF and optional for any other DF.
C8:
This TLV object shall be present for the MF only if the UICC supports specific UICC environmental conditions. It shall not be present for an ADF, DF or an EF.
C9:
This TLV object shall not be present for a DF, an ADF or an EF. For the MF, it is optional.
An application may supply more than one application power consumption or minimum application clock frequency Data Object (DO).
Up
11.1.1.4.6.1  UICC characteristicsp. 90
Byte(s) Description Value Length
1Tag'80'1
2Length'01'1
3 UICC characteristics byte (see Table 11.6)1
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
----XX-1Clock stop allowed
----00-1No preferred level
----01-1High level preferred
----10-1Low level preferred
----11-1RFU
----XX-0Clock stop not allowed
----00-0Never
----01-0Unless at high level
----10-0Unless at low level
----11-0RFU
---X----Supply voltage class A
--X-----Supply voltage class B
-X------Supply voltage class C
X-------Supply voltage class D
------X-RFU (shall be set to 0)
If bit b1 is coded '1', stopping the clock is allowed at high or low level. In this case bit b3 and b4 give information about the preferred level (high or low, respectively) at which the clock may be stopped.
If b1 is coded '0', the clock may be stopped only if the mandatory condition b3 = '1' (i.e. stop at high level) or b4 = '1' (i.e. stop at low level) is fulfilled. If all 3 bits are coded '0', then the clock shall not be stopped.
A supply voltage class, as defined in clause 6.2.1, is supported if the bit is coded as a '1'. If the voltage class is not supported the bit is coded as '0'.
Up
11.1.1.4.6.2  Application power consumptionp. 91
The application power consumption is indicated by tag '81' within the constructed TLV object. The first byte indicates the supply voltage at which the power consumption is measured. The coding of this byte is the same as for the supply voltage class indication in the ATR, see Table 6.1. Unused bits are set to RFU. The second byte indicates the power consumption in mA. Bits b8 to b7 are RFU. Bits b6 to b1 indicates the power consumption of the application in mA. The power consumption is measured at the frequency indicated in the "Power consumption reference frequency" field for the application, averaged over 1 ms or at the maximum clock frequency supported by the UICC if no indication is given. The terminal shall ignore the application power consumption values '00' and 'FF'. A value higher than 3C shall not be interpreted by the terminal and is not to be used. The terminal may still accept the application.
The terminal shall evaluate the power consumption value given in the response. If the power supply class indicated in the response is not the currently used the terminal shall recalculate the value to the currently used supply voltage class. The terminal shall accept the application if the recalculated value is within the specification limits set for the currently used supply voltage class. The terminal may accept an application that exceeds the specified value if it can support the power consumption indicated by the application.
Byte(s) Description Value Length
1Tag'81'1
2Length'03'1
3Supply voltage class at which the power consumption is measured1
4Application power consumption'01' to '3C'1
5Power consumption reference frequency'0A' to 'FF'1
The power consumption reference frequency is coded in Hexadecimal format. The resolution is 0,1 MHz, i.e. '0A' is 1 MHz and 'FE' is 25,4 MHz. The value 'FF' indicates that no reference frequency is indicated.
Up
11.1.1.4.6.3  Minimum application clock frequencyp. 91
The application minimum clock frequency is indicated by tag '82' within the constructed TLV object. This TLV object indicates to the terminal the minimum clock frequency required by the application. It is up to the application to specify a value that is required for commands or procedures to be executed within the required time. An application may indicate one or more application minimum clock frequencies if required. In case that more than one TLV object is indicated it is up to the application to specify for what purpose the different values are used, i.e. the order of the TLV objects within the constructed TLV is relevant.
Byte(s) Description Value Length
1Tag'82'1
2Length'01'1
3Application minimum clock frequency'0A' to 'FF'1
The minimum clock frequency is coded in Hexadecimal format. The resolution is 0,1 MHz, i.e. '0A' is 1 MHz and 'FE' is 25,4 MHz. If this TLV object is not present or the value is 'FF', no minimum application clock frequency is indicated.
Up
11.1.1.4.6.4  Amount of available memoryp. 91
Amount of memory which is available for DFs or EFs creation under the selected DF (and ADFs under the MF) or for creation of TLV objects in a BER-TLV structured EF.
Byte(s) Description Value Length
1Tag'83'1
2LengthX, X ≥ 21
3 to 2+XNumber of data bytesX
The most significant byte comes first in the value field.
For BER-TLV structured EF this value shall be the maximum amount of bytes that is available in the EF for the next TLV object to be created. This shall include the space required for the tag and the length field. If a maximum file size is defined for the file, it shall not be exceeded, if an object is created with the indicated available size.
For example, if the amount of available memory is 100 bytes, it means that the terminal can store a TLV object with a 2 byte tag, 1 byte length and 97 bytes of data.
Up
11.1.1.4.6.5  File detailsp. 92
Indicator of the TLV coding supported by a BER TLV structured EF.
Byte(s) Description Value Length
1Tag'84'1
2Length11
3File details value1
Coding of file access details value:
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
-------1DER coding only is supported
XXXXXXX-RFU
Additional bytes may be added to the value field in the future.
Up
11.1.1.4.6.6  Reserved File sizep. 92
Memory size which is reserved for this file and cannot be allocated by any other entity.
Byte(s) Description Value Length
1Tag'85'1
2LengthX, X ≥ 21
3 to 2+XNumber of data bytesX
The most significant byte comes first in the value field.
The value shall include administrative overhead (if any) that is required to store TLV objects, but not the structural information for the file itself. Thus the actually usable file size calculated according to clause 11.1.1.4.1 may be smaller.
If no memory is reserved for the file, the value of the "Reserved File size" object is set to zero.
Up
11.1.1.4.6.7  Maximum file sizep. 92
File size that shall not be exceeded.
Byte(s) Description Value Length
1Tag'86'1
2LengthX, X ≥ 21
3 to 2+XNumber of data bytesX
The most significant byte comes first in the value field.
The value shall include administrative overhead (if any) that is required to store TLV objects, but not the structural information for the file itself. Thus the actually usable file size calculated according to clause 11.1.1.4.1 may be smaller.
If no maximum file size is defined for the file, the maximum file size object is not present for a file, and all available memory of the UICC may be allocated to that file.
Up
11.1.1.4.6.8  Supported system commandsp. 92
Byte(s) Description Value Length
1Tag'87'1
2Length11
3Supported commands1
Coding of Supported commands field:
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
-------1TERMINAL CAPABILITY is supported
-------0TERMINAL CAPABILITY not supported
XXXXXXX-RFU
Additional bytes may be added to the value field in the future.
The UICC shall set the indication "TERMINAL CAPABILITY is supported" to request the terminal to indicate its capabilities with respect to support of additional power consumption using the TERMINAL CAPABILITY command.
Up
11.1.1.4.6.9  Specific UICC environmental conditionsp. 93
This TLV object indicates to the terminal the specific environmental conditions that the UICC supports. This TLV object is mandatory if the UICC supports specific UICC environmental conditions. It is up to the terminal whether to evaluate this object and how to behave.
Byte(s) Description Value Length
1Tag'88'1
2Length'01'1
3 Specific UICC environmental conditions byte (see Table 11.7a)1
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
-----XXXTemperature Class
000Standard temperature range
-----001Temperature class A
-----010Temperature class B
----011Temperature class C
1XXRFU
----X---High humidity
----0---High humidity not supported
----1---High humidity supported
XXXX----RFU
Up
11.1.1.4.6.10  Platform to Platform CAT Secured APDUp. 93
This TLV indicates to the terminal that the usage of a Platform to Platform CAT APDU secure channel is requested.
Byte(s) Description Value Length
1Tag'89'1
2Length'01'1
3Platform to Platform CAT Secured APDU'01'1
Up
11.1.1.4.7  Security attributesp. 93
11.1.1.4.7.1  Compact formatp. 93
Byte(s) Description Value Length
1Tag'8C'1
2LengthX1
3AM byte1
4 to (X+2)SC bytesX-1
The value of the AM byte is defined in ISO/IEC 7816-4 [12]. The amount of SC bytes depends upon the value of the AM byte. There shall be a SC byte present for each bit set to '1' in the AM byte except for b8. The value of the SC byte is defined in ISO/IEC 7816-4 [12].
Up
11.1.1.4.7.2  Expanded formatp. 94
Byte(s) Description Value Length Comment
1Tag'AB'1
2LengthVm1
3AM DO tag'8X' (see note 1)1Security Rule #1
4LengthX1
5 to (4+X)AM_DO(see note 2)X
5+XSC_DO tag(see note 2)1
6+XLengthY1
(7+X) to (6+X+Y)SC_DO(see note 2)Y
V+2-(4+W+Z)AM DO tag'8X' (see note 1)1Security Rule #N
V+2-(3+W+Z)LengthW1
V+2-(2+W+Z) to V+2-(2+Z)AM_DO(see note 2)W
V+2-(1+Z)SC_DO tag(see note 2)1
V+2-ZLengthZ1
V+2-(Z-1) to V+2SC_DO(see note 2)Z
NOTE 1:
The value of 'X' is dependent on the usage of the AM_DO see ISO/IEC 7816-4 [12].
NOTE 2:
The value of the AM_DO and the SC_DO is defined in ISO/IEC 7816-4 [12].
Up
11.1.1.4.7.3  Referenced to expanded formatp. 94
If the length of the data following tag '8B' = '03' the following definition applies.
Byte(s) Description Value Length
1Tag'8B'1
2Length31
3 to 4EFARR File ID2
5EFARR Record number1
If the length of the data following tag '8B' is '02' + X × '02' the following definition applies.
Byte(s) Description Value Length
1Tag'8B'1
2Length'02' + X × '02'1
3 to 4EFARR File ID2
X+4SEID1
X+5EFARR Record number
NOTE:
For each increment of X a new set of SEID and an EFARR Record numbers are introduced.
Up
11.1.1.4.8  Short file identifierp. 95
Byte(s) Description Value Length
1Tag'88'1
2Length'00' or '01'1
3Short file identifier0 or 1
If the TLV is not present, the SFI value is the 5 least significant bits (bits b5 to b1) of the file identifier.
If the TLV is present but empty (i.e. length is 0), the SFI is not supported for the selected file.
If the length of the TLV is 1, the SFI value is indicated in the 5 most significant bits (bits b8 to b4) of the TLV value field. In this case, bits b3 to b1 shall be set to 0.
Up
11.1.1.4.9  Life cycle status integerp. 95
Byte(s) Description Value Length
1Tag'8A'1
2Length11
3 Life Cycle Status Integer, see Table 11.7b1
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
00000000No information given
00000001Creation state
00000011Initialization state
000001-1Operational state - activated
000001-0Operational state - deactivated
000011--Termination state
≠ 0XXXXProprietary
Any other valueRFU
Up
11.1.1.4.10  PIN status template DOp. 95
This TLV object contains the PIN status information for a DF/ADF and which PINs are used for access to the DF/ADF and its children. PIN is indicated in this data object using the key reference tag '83' as defined in ISO/IEC 7816-4 [12]. The content of the constructed PIN status TLV Data Object tag 'C6' depends on the length (see below).
Byte(s) Description Value Length
1Tag'C6'1
2Length1
3PS_DO tag'90'1
4LengthX1
X+4PS_DOX
X+5Usage qualifier DO tag (see note 2)'95'1
X+6Length'01'1
X+7Usage qualifier, see clause 9.5.21
X+8Key reference tag'83'1
X+9Key reference length'01'1
X+10Key reference value(PIN) see Table 9.31
NOTE 1:
There may be one or more key reference data objects, each possibly preceded by a usage qualifier DO, following the PS_DO.
NOTE 2:
This TLV DO is mandatory if the Key reference DO value is '11' indicating the Universal PIN, otherwise it is optional.
The usage qualifier DO indicates if the key reference data object (PIN) following it is to be used for verification or not. If this data object is present it shall precede the key reference data object it is associated with.
For the PS_DO coding see clause 9.5.2. For each bit set to '1' in the PS byte, the corresponding key reference in the PS Template, DO is enabled. The number of key reference tags (tag '83') indicates how many different PINs are used for access in the selected DF and its children.
Up

Up   Top   ToC