xmlns:atom="http://www.w3.org/2005/Atom" xmlns:atom="http://www.w3.org/2005/Atom"
Please note that the date you requested in the address for this web page is not an actual date upon which a change occurred to this item of legislation. You are being shown the legislation from , which is the first date before then upon which a change was made.
Table 5 | |||
Secure Messaging Data Objects | |||
Data Object Name | Tag | Presence (M)andatory, (C)onditional or (F)orbidden in | |
---|---|---|---|
Commands | Responses | ||
Plain value not encoded in BER-TLV | ‘81’ | C | C |
Plain value encoded in BER-TLV, but not including SM DOs | ‘B3’ | C | C |
Padding-content indicator followed by cryptogram, plain value not encoded in BER-TLV | ‘87’ | C | C |
Protected Le | ‘97’ | C | F |
Processing Status | ‘99’ | F | M |
Cryptographic Checksum | ‘8E’ | M | M |
Note: As specified in Appendix 2, tachograph cards may support the READ BINARY and UPDATE BINARY command with an odd INS byte (‘B1’ resp. ‘D7’). These command variants are required to read and update files with more than 32 768 bytes or more. In case such a variant is used, a data object with tag ‘B3’ shall be used instead of an object with tag ‘81’. See Appendix 2 for more information.U.K.
:
The tag is encoded in one or two octets and indicates the content.
:
The length is encoded as an unsigned integer in one, two, or three octets, resulting in a maximum length of 65 535 octets. The minimum number of octets shall be used.
:
The value is encoded in zero or more octets
The command header shall be included in the MAC calculation, therefore value ‘0C’shall be used for the class byte CLA.
As specified in Appendix 2, all INS bytes shall be even, with the possible exception of odd INS bytes for the READ BINARY and UPDATE BINARY commands.
The actual value of Lc will be modified to Lc' after application of secure messaging.
The Data field shall consist of SM data objects.
In the protected command APDU the new Le byte shall be set to ‘00’. If required, a data object ‘97’ shall be included in the Data field in order to convey the original value of Le.
Note: Padding for Secure Messaging is always performed by the secure messaging layer, not by the CMAC or CBC algorithms. U.K.
Textual Amendments
A command APDU with applied Secure Messaging will have the following structure, depending on the case of the respective unsecured command (DO is data object):
:
CLA INS P1 P2 || Lc' || DO ‘ 8E ’ || Le
:
CLA INS P1 P2 || Lc' || DO ‘ 97 ’ || DO ‘ 8E ’ || Le
:
CLA INS P1 P2 || Lc' || DO ‘ 81 ’ || DO ‘ 8E ’ || Le
:
CLA INS P1 P2 || Lc' || DO ‘ B3 ’ || DO ‘ 8E ’ || Le
:
CLA INS P1 P2 || Lc' || DO ‘ 81 ’ || DO ‘ 97 ’ || DO ‘ 8E ’ || Le
:
CLA INS P1 P2 || Lc' || DO ‘ B3 ’ || DO ‘ 97 ’ || DO ‘ 8E ’ || Le
where Le = ‘ 00’ or ‘00 00 ’ depending on whether short length fields or extended length fields are used; see [ISO 7816-4].
A response APDU with applied Secure Messaging will have the following structure, depending on the case of the respective unsecured response:
:
DO ‘ 99 ’ || DO ‘ 8E ’ || SW1SW2
:
DO ‘ 81 ’ || DO ‘ 99 ’ || DO ‘ 8E ’ || SW1SW2
:
DO ‘ 87 ’ || DO ‘ 99 ’ || DO ‘ 8E ’ || SW1SW2
:
DO ‘ B3 ’ || DO ‘ 99 ’ || DO ‘ 8E ’ || SW1SW2
Note: Case 2 or 4 (odd INS byte) with encryption is never used in the communication between a VU and a card. U.K.
Below are three example APDU transformations for commands with even INS code. Figure 8 shows an authenticated Case 4 command APDU, Figure 9 shows an authenticated Case 1/Case 3 response APDU, and Figure 10 shows an encrypted and authenticated Case 2/Case 4 response APDU.
it receives a plain response APDU,
it detects a Secure Messaging error in a response APDU:
An expected Secure Messaging data object is missing, the order of data objects is incorrect, or an unknown data object is included.
A Secure Messaging data object is incorrect, e.g. the MAC value is incorrect, the TLV structure is incorrect or the padding indicator in tag ‘87’ is not equal to ‘01’.
the card sends a status byte indicating it detected an SM error (see CSM_194),
the limit for the number of commands and associated responses within the current session is reached. For a given VU, this limit shall be defined by its manufacturer, taking into account the security requirements of the hardware used, with a maximum value of 240 SM commands and associated responses per session.
it receives a plain command APDU,
it detects a Secure Messaging error in a command APDU:
An expected Secure Messaging data object is missing, the order of data objects is incorrect, or an unknown data object is included.
A Secure Messaging data object is incorrect, e.g. the MAC value is incorrect or the TLV structure is incorrect.
it is depowered or reset,
the VU starts the VU Authentication process,
the limit for the number of commands and associated responses within the current session is reached. For a given card, this limit shall be defined by its manufacturer, taking into account the security requirements of the hardware used, with a maximum value of 240 SM commands and associated responses per session.]
If in a command APDU some expected Secure Messaging data objects are missing, the order of data objects is incorrect or unknown data objects are included, a tachograph card shall respond with status bytes ‘69 87’.
If a Secure Messaging data object in a command APDU is incorrect, a tachograph card shall respond with status bytes ‘69 88’.
In such a case, the status bytes shall be returned without using SM.
securely destroy the stored session keys
immediately establish a new Secure Messaging session, as described in sections 10.2 — 10.5.