ISO/IEC 7816-4
Identification cards — Integrated circuit cards — Part 4: Organization, security and commands for interchange
Cartes d’identification — Cartes à circuit intégré — Partie 4: Organisation, sécurité et commandes pour les échanges

ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.

International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.

The main task of the joint technical committee is to prepare International Standards. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote.

ISO/IEC 7816-4 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 17, Cards and personal identification.

This second edition cancels and replaces the first edition (ISO/IEC 7816-4:1995), and incorporates material extracted from ISO/IEC 7816-5:1994, ISO/IEC 7816-6:1996, ISO/IEC 7816-8:1999 and ISO/IEC 7816-9:2000. It also incorporates the Amendment ISO/IEC 7816-4:1995/Amd.1:1997.

In addition, material has been extracted from the first edition and moved to the third edition of ISO/IEC 7816-3, so that the transmission protocols T=0 and T=1 are now present only in ISO/IEC 7816-3, no longer in ISO/IEC 7816-4.

ISO/IEC 7816 consists of the following parts, under the general title Identification cards — Integrated circuit cards:

Part 1: Cards with contacts: Physical characteristics

Part 2: Cards with contacts: Dimensions and location of the contacts

Part 3: Cards with contacts: Electrical interface and transmission protocols

Part 4: Organization, security and commands for interchange

Part 5: Registration of application providers

Part 6: Interindustry data elements for interchange

Part 7: Interindustry commands for Structured Card Query Language (SCQL)

Part 8: Commands for security operations

Part 9: Commands for card management

Part 10: Cards with contacts: Electronic signals and answer to reset for synchronous cards

Part 11: Personal verification through biometric methods

Part 12: Cards with contacts: USB electrical interface and operating procedures

Part 15: Cryptographic information application

Identification cards — Integrated circuit cards — Part 4: Organization, security and commands for interchange

This part of ISO/IEC 7816 specifies
–contents of command-response pairs exchanged at the interface,
–means of retrieval of data elements and data objects in the card,
–structures and contents of historical bytes to describe operating characteristics of the card,
–structures for applications and data in the card, as seen at the interface when processing commands,
–access methods to files and data in the card,
–a security architecture defining access rights to files and data in the card,
–means and mechanisms for identifying and addressing applications in the card,
–methods for secure messaging,
–access methods to the algorithms processed by the card. It does not describe these algorithms.
It does not cover the internal implementation within the card or the outside world.
This part of ISO/IEC 7816 is independent from the physical interface technology. It applies to cards accessed by one or more of the following methods: contacts, close coupling and radio frequency.

by one or more of the following methods: contacts, close coupling and radio frequency.

 Normative references

The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

ISO/IEC 7816-3, Identification cards — Integrated circuit cards — Part 3: Cards with contacts: Electrical interface and transmission protocols

ISO/IEC 7816-6, Identification cards — Integrated circuit cards — Part 6: Interindustry data elements for interchange

ISO/IEC 8825-1:2002, Information technology — ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)

 

Terms and definitions
For the purposes of this document, the following terms and definitions apply.

access rule
data element containing an access mode referring to an action and security conditions to fulfil before acting

Answer-to-Reset file
optional EF indicating operating characteristics of the card

application
structures, data elements and program modules needed for performing a specific functionality

application DF
structure hosting an application in a card

application identifier
data element (up to sixteen bytes) that identifies an application

application label
data element for use at the man-machine interface

application provider
entity providing the components that make up an application in the card

application template
set of application-relevant data objects including one application identifier data object

asymmetric cryptographic technique
cryptographic technique that uses two related operations: a public operation defined by public numbers or by a public key and a private operation defined by

private numbers or by a private key (the two operations have the property that, given the public operation, it is computationally infeasible to derive the

private operation)

certificate
digital signature binding a particular person or object and its associated public key (the entity issuing the certificate also acts as tag allocation

authority with respect to the data elements in the certificate)

command-response pair
set of two messages at the interface: a command APDU followed by a response APDU in the opposite
direction

data element
item of information seen at the interface for which are specified a name, a description of logical content, a format and a coding

data object
information seen at the interface consisting of the concatenation of a mandatory tag field, a mandatory length
field and a conditional value field

data unit
the smallest set of bits that can be unambiguously referenced within an EF supporting data units

dedicated file
structure containing file control information and, optionally, memory available for allocation

DF name
data element (up to sixteen bytes) that uniquely identifies a DF in the card

digital signature
data appended to, or cryptographic transformation of, a data string that proves the origin and the integrity of the data string and protects against forgery,

e.g., by the recipient of the data string

directory file
optional EF containing a list of applications supported by the card and optional related data elements

elementary file
set of data units or records or data objects sharing the same file identifier and the same security attribute(s)

file
structure for application and / or data in the card, as seen at the interface when processing commands

file identifier
data element (two bytes) used to address a file

header list
concatenation of pairs of tag field and length field without delimitation

identification card
card identifying its holder and issuer, which may carry data required as input for the intended use of the card and for transactions based thereon
[ISO/IEC 7810[2]]

internal elementary file
EF for storing data interpreted by the card

key
sequence of symbols controlling a cryptographic operation (e.g., encipherment, decipherment, a private or a public operation in a dynamic authentication,

signature production, signature verification)

master file
unique DF representing the root in a card using a hierarchy of DFs

offset
number sequentially referencing a data unit in an EF supporting data units, or a byte in a record

parent file
DF immediately preceding a given file within a hierarchy of DFs

password
data that may be required by the application to be presented to the card by its user for authentication purpose

path
concatenation of file identifiers without delimitation

private key
that key of an entity’s asymmetric key pair that should only be used by that entity [ISO/IEC 9798-1[8]]

provider
authority who has or who obtained the right to create a DF in the card

public key
that key of an entity’s asymmetric key pair that can be made public [ISO/IEC 9798-1[8]]

record
string of bytes referenced and handled by the card within an EF supporting records

record identifier
number used to reference one or more records within an EF supporting records

record number
sequential number that uniquely identifies each record within an EF supporting records

registered application provider identifier
data element (five bytes) that uniquely identifies an application provider

secret key
key used with symmetric cryptographic techniques by a set of specified entities [ISO/IEC 11770-3[14]]

secure messaging
set of means for cryptographic protection of [parts of] command-response pairs

security attribute
condition of use of objects in the card including stored data and data processing functions, expressed as a data element containing one or more access rules

security environment
set of components required by an application in the card for secure messaging or for security operations

symmetric cryptographic technique
cryptographic technique using the same secret key for both the originator’s and the recipient’s operation (without the secret key, it is computationally

infeasible to compute either operation)

tag list
concatenation of tag fields without delimitation

template
set of BER-TLV data objects forming the value field of a constructed BER-TLV data object

working elementary file
EF for storing data not interpreted by the card

Symbols and abbreviated terms
AID       application identifier
APDU      application protocol data unit
ARR       access rule reference
ASN.1     abstract syntax notation one (see ISO/IEC 8825-1)
AT        control reference template for authentication
ATR       Answer-to-Reset
BER       basic encoding rules of ASN.1 (see ISO/IEC 8825-1)
CCT       control reference template for cryptographic checksum
CLA       class byte
CRT       control reference template
CT        control reference template for confidentiality
DF        dedicated file
DIR       directory
DST       control reference template for digital signature
EF        elementary file
EF.ARR    access rule reference file
EF.ATR    Answer-to-Reset file
EF.DIR    directory file
FCI       file control information
FCP       file control parameter
FMD       file management data
HT        control reference template for hash-code
INS       instruction byte
KAT       control reference template for key agreement
Lc        field length field for coding the number Nc
LCS       byte life cycle status byte
Le        field length field for coding the number Ne
MF        master file
Nc        number of bytes in the command data field
Ne        maximum number of bytes expected in the response data field
Nr        number of bytes in the response data field
PIX       proprietary application identifier extension
P1-P2     parameter bytes (inserted for clarity, the dash is not significant)
RFU       reserved for future use
RID       registered application provider identifier
SC        security condition
SCQL      structured card query language
SE        security environment
SEID      byte security environment identifier byte
SM        secure messaging
SW1-SW2   status bytes (inserted for clarity, the dash is not significant)
(SW1-SW2) value of the concatenation of the bytes SW1 and SW2 (the first byte is the most significant byte)
TLV       tag, length, value
{T-L-V}   data object (inserted for clarity, the dashes and curly brackets are not significant)
‘XX’      notation using the hexadecimal digits ’0′ to ’9′ and ‘A’ to ‘F’, equal to XX to the base 16