- Latest available (Revised)
- Original (As adopted by EU)
Commission Implementing Regulation (EU) 2016/799 of 18 March 2016 implementing Regulation (EU) No 165/2014 of the European Parliament and of the Council laying down the requirements for the construction, testing, installation, operation and repair of tachographs and their components (Text with EEA relevance)
When the UK left the EU, legislation.gov.uk published EU legislation that had been published by the EU up to IP completion day (31 December 2020 11.00 p.m.). On legislation.gov.uk, these items of legislation are kept up-to-date with any amendments made by the UK since then.
Legislation.gov.uk publishes the UK version. EUR-Lex publishes the EU version. The EU Exit Web Archive holds a snapshot of EUR-Lex’s version from IP completion day (31 December 2020 11.00 p.m.).
There are currently no known outstanding effects by UK legislation for Commission Implementing Regulation (EU) 2016/799, TACHOGRAPH CARDS SPECIFICATION.
Revised legislation carried on this site may not be fully up to date. At the current time any known changes or effects made by subsequent legislation have been applied to the text of the legislation you are viewing by the editorial team. Please see ‘Frequently Asked Questions’ for details regarding the timescales for which new effects are identified and recorded on this site.
For the purpose of this appendix, the following abbreviations apply.
Access conditions
Advanced Encryption Standard
Application Identifier
Always
Application Protocol Data Unit (structure of a command)
Answer To Reset
Authenticated.
Contacts No 6 and 7 of the card as described in ISO/IEC 7816-2
clock cycles
Certificate Holder Authorisation]
Card holder Verification Information
Class byte of an APDU command
Data Object]
Dedicated Short Range Communication
Dedicated File. A DF can contain other files (EF or DF)
Elliptic Curve Cryptography
Elementary File
elementary time unit
Generation 1
Generation 2
Integrated Circuit
Integrated Circuit Card
Identifier
Interface Device
Information Field Size
Information Field Size for the card
Information Field Size Device (for the Terminal)
Instruction byte of an APDU command
Length of the input data for a APDU command
Length of the expected data (output data for a command)
Master File (root DF)
Node Address used in T=1 protocol
Never
Parameter bytes
Personal Identification Number
Protected with secure messaging
Protocol Transmission Selection
Reserved for Future Use
Reset (of the card)
Short EF Identifier
Secure Messaging
Status bytes
Initial ATR character
Programming Voltage
Vehicle Unit
Value XX in hexadecimal notation
Value XX in hexadecimal notation
Concatenation symbol 03||04=0304
Textual Amendments
The following references are used in this Appendix:
Identification cards — Integrated circuit cards — Part 2: Dimensions and location of the contacts. ISO/IEC 7816-2:2007.
Identification cards — Integrated circuit cards — Part 3: Electrical interface and transmission protocols. ISO/IEC 7816-3:2006.
Identification cards — Integrated circuit cards — Part 4: Organization, security and commands for interchange. ISO/IEC 7816-4:2013 + Cor 1: 2014.
Identification cards — Integrated circuit cards — Part 6: Interindustry data elements for interchange. ISO/IEC 7816-6:2004 + Cor 1: 2006.
Identification cards — Integrated circuit cards — Part 8: Commands for security operations. ISO/IEC 7816-8:2004.
Information technology — Security techniques — Message Authentication Codes (MACs) — Part 2: Mechanisms using a dedicated hash-function. ISO/IEC 9797-2:2011
Voltage selection shall be performed according to ISO/IEC 7816-3.
Low | High | ||
---|---|---|---|
Bit 3 | Bit 2 | Bit 1 | |
0 | 0 | 1 | Clockstop allowed, no preferred level |
0 | 1 | 1 | Clockstop allowed, high level preferred |
1 | 0 | 1 | Clockstop allowed, low level preferred |
0 | 0 | 0 | Clockstop not allowed |
0 | 1 | 0 | Clockstop only allowed on high level |
1 | 0 | 0 | Clockstop only allowed on low level |
Bits 4 to 8 are not used.
Operation state while executing commands or interfacing with Digital Unit,
Idle state at all other times; in this state all data shall be retained by the card.
This paragraph describes the minimum functionality required by Tachograph cards and VUs to ensure correct operation and interoperability.
Tachograph cards are as compliant as possible with the available ISO/IEC applicable norms (especially ISO/IEC 7816). However, commands and protocols are fully described in order to specify some restricted usage or some differences if they exist. The commands specified are fully compliant with the referred norms except where indicated.
The following restrictions apply to the protocols:
The interface device shall support an answer on I/O after the rising edge of the signal on RST from 400 cc.
The interface device shall be able to read characters separated with 12 etu.
The interface device shall read an erroneous character and its repetition if separated with 13 etu. If an erroneous character is detected, the Error signal on I/O can occur between 1 etu and 2 etu. The device shall support a 1 etu delay.
The interface device shall accept a 33 bytes ATR (TS+32)
If TC1 is present in the ATR, the Extra Guard Time shall be present for characters sent by the interface device although characters sent by the card can still be separated with 12 etu. This is also true for the ACK character sent by the card after a P3 character emitted by the interface device.
The interface device shall take into account a NUL character emitted by the card.
The interface device shall accept the complementary mode for ACK.
The get-response command cannot be used in chaining mode to get a data which length could exceed 255 bytes.
NAD byte: not used (NAD shall be set to ‘00’).
S-block ABORT: not used.
S-block VPP state error: not used.
The total chaining length for a data field will not exceed 255 bytes (to be ensured by the IFD).
The Information Field Size Device (IFSD) shall be indicated by the IFD immediately after the ATR: the IFD shall transmit the S-Block IFS request after the ATR and the card shall send back S-Block IFS. The recommended value for IFSD is 254 bytes.
The card will not ask for an IFS readjustment.
Example of Basic Biprotocol ATR according to ISO/IEC 7816-3
Character | Value | Remarks |
---|---|---|
TS | ‘3Bh’ | Indicates direct convention. |
T0 | ‘85h’ | TD1 present; 5 historical bytes are presents. |
TD1 | ‘80h’ | TD2 present; T=0 to be used |
TD2 | ‘11h’ | TA3 present; T=1 to be used |
TA3 | ‘XXh’ (at least ‘F0h’) | Information Field Size Card ( IFSC) |
TH1 to TH5 | ‘XXh’ | Historical characters |
TCK | ‘XXh’ | Check Character (exclusive OR) |
The PTS can be used, as indicated in ISO/IEC 7816-3, to switch to higher baud rates than the default one proposed by the card in the ATR if any (TA(1) byte).
Higher baud rates are optional for the card.
Examples of basic PTS for protocol selection are the following:
Character | Value | Remarks |
---|---|---|
PPSS | ‘FFh’ | The Initiate Character. |
PPS0 | ‘00h’ or ‘01h’ | PPS1 to PPS3 are not present; ‘00h’ to select T0, ‘01h’ to select T1. |
PK | ‘XXh’ | Check Character : ‘XXh’ = ‘FFh’ if PPS0 = ‘00h’, ‘XXh’ = ‘FEh’ if PPS0 = ‘01h’. |
Abbreviation | Meaning |
---|---|
ALW | The action is always possible and can be executed without any restriction. Command and response APDU are sent in plain text, i.e. without secure messaging. |
NEV | The action is never possible. |
PLAIN-C | The command APDU is sent in plain, i.e. without secure messaging. |
PWD | The action may only be executed if the workshop card PIN has been successfully verified, i.e. if the card internal security status ‘PIN_Verified’ is set. The command must be sent without secure messaging. |
EXT-AUT-G1 | The action may only be executed if the External Authenticate command for the generation 1 authentication (see also Appendix 11 Part A) has been successfully performed. |
SM-MAC-G1 | The APDU (command and response) must be applied with generation 1 secure messaging in authentication-only mode (see Appendix 11 Part A). |
SM-C-MAC-G1 | The command APDU must be applied with generation 1 secure messaging in authentication only mode (see Appendix 11 Part A). |
SM-R-ENC-G1 | The response APDU must be applied with generation 1 secure messaging in encryption mode (see Appendix 11 Part A), i.e. no message authentication code is returned. |
SM-R-ENC-MAC-G1 | The response APDU must be applied with generation 1 secure messaging in encrypt-then-authenticate mode (see Appendix 11 Part A). |
SM-MAC-G2 | The APDU (command and response) must be applied with generation 2 secure messaging in authentication-only mode (see Appendix 11 Part B). |
SM-C-MAC-G2 | The command APDU must be applied with generation 2 secure messaging in authentication only mode (see Appendix 11 Part B). |
SM-R-ENC-MAC-G2 | The response APDU must be applied with generation 2 secure messaging in encrypt-then-authenticate mode (see Appendix 11 Part B). |
:
All security conditions must be fulfilled
:
At least one security condition must be fulfilled
The access rules for the file system, i.e. the SELECT, READ BINARY and UPDATE BINARY command, are specified in chapter 4. The access rules for the remaining commands are specified in the following tables. The term ‘not applicable’ is used if there is no requirement to support the command. In this case the command may or may not be supported, but the access condition is out of scope.]
Textual Amendments
[F2Command | Driver Card | Workshop Card | Control Card | Company Card |
---|---|---|---|---|
External Authenticate | ||||
—For generation 1 authentication | ALW | ALW | ALW | ALW |
—For generation 2 authentication | ALW | PWD | ALW | ALW |
Internal Authenticate | ALW | PWD | ALW | ALW |
General Authenticate | ALW | ALW | ALW | ALW |
Get Challenge | ALW | ALW | ALW | ALW |
MSE:SET AT | ALW | ALW | ALW | ALW |
MSE:SET DST | ALW | ALW | ALW | ALW |
Process DSRC Message | Not applicable | Not applicable | Not applicable | Not applicable |
PSO: Compute Digital Signature | ALW OR SM-MAC-G2 | ALW OR SM-MAC-G2 | Not applicable | Not applicable |
PSO: Hash | Not applicable | Not applicable | ALW | Not applicable |
PERFORM HASH of FILE | ALW OR SM-MAC-G2 | ALW OR SM-MAC-G2 | Not applicable | Not applicable |
PSO: Verify Certificate | ALW | ALW | ALW | ALW |
PSO: Verify Digital Signature | Not applicable | Not applicable | ALW | Not applicable |
Verify | Not applicable | ALW | Not applicable | Not applicable] |
[F2Command | Driver Card | Workshop Card | Control Card | Company Card |
---|---|---|---|---|
External Authenticate | ||||
—For generation 1 authentication | Not applicable | Not applicable | Not applicable | Not applicable |
—For generation 2 authentication | ALW | PWD | ALW | ALW |
Internal Authenticate | Not applicable | Not applicable | Not applicable | Not applicable |
General Authenticate | ALW | ALW | ALW | ALW |
Get Challenge | ALW | ALW | ALW | ALW |
MSE:SET AT | ALW | ALW | ALW | ALW |
MSE:SET DST | ALW | ALW | ALW | ALW |
Process DSRC Message | Not applicable | ALW | ALW | Not applicable |
PSO: Compute Digital Signature | ALW OR SM-MAC-G2 | ALW OR SM-MAC-G2 | Not applicable | Not applicable |
PSO: Hash | Not applicable | Not applicable | ALW | Not applicable |
PERFORM HASH of FILE | ALW OR SM-MAC-G2 | ALW OR SM-MAC-G2 | Not applicable | Not applicable |
PSO: Verify Certificate | ALW | ALW | ALW | ALW |
PSO: Verify Digital Signature | Not applicable | Not applicable | ALW | Not applicable |
Verify | Not applicable | ALW | Not applicable | Not applicable] |
[F2Command | Driver Card | Workshop Card | Control Card | Company Card |
---|---|---|---|---|
External Authenticate | ||||
—For generation 1 authentication | Not applicable | Not applicable | Not applicable | Not applicable |
—For generation 2 authentication | ALW | PWD | ALW | ALW |
Internal Authenticate | Not applicable | Not applicable | Not applicable | Not applicable |
General Authenticate | ALW | ALW | ALW | ALW |
Get Challenge | ALW | ALW | ALW | ALW |
MSE:SET AT | ALW | ALW | ALW | ALW |
MSE:SET DST | ALW | ALW | ALW | ALW |
Process DSRC Message | Not applicable | Not applicable | Not applicable | Not applicable |
PSO: Compute Digital Signature | Not applicable | Not applicable | Not applicable | Not applicable |
PSO: Hash | Not applicable | Not applicable | Not applicable | Not applicable |
PERFORM HASH of FILE | Not applicable | Not applicable | Not applicable | Not applicable |
PSO: Verify Certificate | ALW | ALW | ALW | ALW |
PSO: Verify Digital Signature | Not applicable | Not applicable | Not applicable | Not applicable |
Verify | Not applicable | ALW | Not applicable | Not applicable] |
Note: The command descriptions provide more information on the support of the commands for the different tachograph card types and the different DFs.U.K.
Commands and file organisation are deduced from and complies with ISO/IEC 7816-4.
This section describes the following APDU command-response pairs. The command variants which are supported by a generation 1 and 2 application are specified in the corresponding command descriptions.
Additional status words as defined in ISO/IEC 7816-4 can be returned, if their behaviour is not explicitly mentioned in this appendix.
For example the following status words can be optionally returned:
6881: Logical channel not supported
6882: Secure messaging not supported]
The mandatory commands for the Tachograph cards are described in this chapter.
Additional relevant details, related to cryptographic operations involved, are given in Appendix 11 Common security mechanisms for Tachograph Generation 1 and Generation 2.
All commands are described independently of the used protocol (T=0 or T=1). The APDU bytes CLA, INS, P1, P2, Lc and Le are always indicated. If Lc or Le is not needed for the described command, the associated length, value and description are empty.
When using protocol T=1, the card shall answer to Le=0 by sending all available output data.
When using protocol T=0, the IFD shall send the first command with P3=Lc + data, the card shall answer (to this implicit Le=0) by the Status bytes ‘61La’, where La is the number of response bytes available. The IFD shall then generate a GET RESPONSE command with P3 = La to read the data.
Indicate the extended length field support in the ATR
Provide the supported buffer sizes by means of the extended length information in the EF ATR/INFO see TCS_146.
Indicate whether it supports extended length fields for T = 1 and / or T = 0 in the EF Extended Length, see TCS_147.
Support extended length fields for the tachograph application generation 1 and 2.
All commands are specified for short length fields. The usage of extended length APDUs is clear from ISO/IEC 7816-4.U.K.
In general the commands are specified for the plain mode, i.e. without secure messaging, as the secure messaging layer is specified in Appendix 11. It is clear from the access rules for a command whether the command shall support secure messaging or not and whether the command shall support generation 1 and / or generation 2 secure messaging. Some command variants are described with secure messaging to illustrate the usage of secure messaging.U.K.
This command is compliant with ISO/IEC 7816-4, but has a restricted usage compared to the command defined in the norm.
The SELECT command is used:
to select an application DF (selection by name must be used)
to select an elementary file corresponding to the submitted file ID
This command allows selecting an application DF in the card.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘A4h’ | |
P1 | 1 | ‘04h’ | Selection by name (AID) |
P2 | 1 | ‘0Ch’ | No response expected |
Lc | 1 | ‘NNh’ | Number of bytes sent to the card (length of the AID): ‘06h’ for the Tachograph application |
#6-#(5+NN) | NN | ‘XX..XXh’ | AID: ‘FF 54 41 43 48 4F’ for the Generation 1 tachograph application AID: ‘FF 53 4D 52 44 54’ for the Generation 2 tachograph application |
No response to the SELECT command is needed (Le absent in T=1, or no response asked in T=0).
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the application corresponding with the AID is not found, the processing state returned is ‘6A82’.
In T=1, if the byte Le is present, the state returned is ‘6700’.
In T=0, if a response is asked after the SELECT command, the state returned is ‘6900’.
[F2If the selected application is considered to be corrupted (integrity error is detected within the file attributes), the processing state returned is ‘ 6400 ’ or ‘ 6500 ’.]
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘A4h’ | |
P1 | 1 | ‘02h’ | Selection of an EF under the current DF |
P2 | 1 | ‘0Ch’ | No response expected |
Lc | 1 | ‘02h’ | Number of bytes sent to the card |
#6-#7 | 2 | ‘XXXXh’ | File Identifier |
No response to the SELECT command is needed (Le absent in T=1, or no response asked in T=0).
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the file corresponding with the file identifier is not found, the processing state returned is ‘6A82’.
In T=1, if the byte Le is present, the state returned is ‘6700’.
In T=0, if a response is asked after the SELECT command, the state returned is ‘6900’.
[F2If the selected file is considered to be corrupted (integrity error is detected within the file attributes), the processing state returned is ‘ 6400 ’ or ‘ 6500 ’.]
This command is compliant with ISO/IEC 7816-4, but has a restricted usage compared to the command defined in the norm.
The READ BINARY command is used to read data from a transparent file.
The response of the card consists of returning the data read, optionally encapsulated in a secure messaging structure.
This command enables the IFD to read data from the EF currently selected, without secure messaging.
Note: This command without secure messaging can only be used to read a file that supports the ALW security condition for the Read access mode.U.K.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘B0h’ | Read Binary |
P1 | 1 | ‘XXh’ | Offset in bytes from the beginning of the file: Most Significant Byte |
P2 | 1 | ‘XXh’ | Offset in bytes from the beginning of the file: Least Significant Byte |
Le | 1 | ‘XXh’ | Length of data expected. Number of Bytes to be read. |
Note: bit 8 of P1 must be set to 0.U.K.
Byte | Length | Value | Description |
---|---|---|---|
#1-#X | X | ‘XX..XXh’ | Data read |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If no EF is selected, the processing state returned is ‘6986’.
If the security conditions of the selected file are not satisfied, the command is interrupted with ‘6982’.
If the Offset is not compatible with the size of the EF (Offset > EF size), the processing state returned is ‘6B00’.
If the size of the data to be read is not compatible with the size of the EF (Offset + Le > EF size) the processing state returned is ‘6700’ or ‘6Cxx’ where ‘xx’ indicates the exact length.
[F2If an integrity error is detected within the file attributes, the card shall consider the file as corrupted and unrecoverable, the processing state returned is ‘ 6400 ’ or ‘ 6500 ’.]
If an integrity error is detected within the stored data, the card shall return the demanded data, and the processing state returned is ‘6281’.
This command enables the IFD to read data from the EF currently selected with secure messaging, in order to verify the integrity of the data received and to protect the confidentiality of the data if the security condition SM-R-ENC-MAC-G1 (generation 1) or SM-R-ENC-MAC-G2 (generation 2) is applied.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘0Ch’ | Secure Messaging asked |
INS | 1 | ‘B0h’ | Read Binary |
P1 | 1 | ‘XXh’ | P1 ( offset in bytes from the beginning of the file): Most Significant Byte |
P2 | 1 | ‘XXh’ | P2 ( offset in bytes from the beginning of the file): Least Significant Byte |
Lc | 1 | ‘XXh’ | Length of input data for secure messaging |
#6 | 1 | ‘97h’ | TLE: Tag for expected length specification. |
#7 | 1 | ‘01h’ | LLE: Length of expected length |
#8 | 1 | ‘NNh’ | Expected length specification (original Le): Number of Bytes to be read |
#9 | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#10 | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum
|
#11-#(10+L) | L | ‘XX..XXh’ | Cryptographic checksum |
Le | 1 | ‘00h’ | As specified in ISO/IEC 7816-4 |
[F2Byte | Length | Value | Description |
---|---|---|---|
#1 | 1 | ‘ 81h ’ | T PV : Tag for plain value data |
#2 | L | ‘NNh’ or ‘81 NNh’ | L PV : length of returned data (=original Le). L is 2 bytes if L PV >127 bytes. |
#(2+L) - #(1+L+NN) | NN | ‘ XX..XXh ’ | Plain Data value |
#(2+L+NN) | 1 | ‘ 99h ’ | Tag for Processing Status (SW1-SW2) – optional for generation 1 secure messaging |
#(3+L+NN) | 1 | ‘ 02h ’ | Length of Processing Status – optional for generation 1 secure messaging |
#(4+L+NN) - #(5+L+NN) | 2 | ‘ XX XXh ’ | Processing Status of the unprotected response APDU – optional for generation 1 secure messaging |
#(6+L+NN) | 1 | ‘ 8Eh ’ | TCC: Tag for cryptographic checksum |
#(7+L+NN) | 1 | ‘ XXh ’ | LCC: Length of following cryptographic checksum
|
#(8+L+NN)-#(7+M+L+NN) | M | ‘ XX..XXh ’ | Cryptographic checksum |
SW | 2 | ‘ XXXXh ’ | Status Words (SW1,SW2)] |
[F2Byte | Length | Value | Description |
---|---|---|---|
#1 | 1 | ‘ 87h ’ | T PI CG : Tag for encrypted data (cryptogram) |
#2 | L | ‘MMh’ or ‘81 MMh’ | L PI CG : length of returned encrypted data (different of original Le of the command due to padding). L is 2 bytes if LPI CG > 127 bytes. |
#(2+L)-#(1+L+MM) | MM | ‘ 01XX..XXh ’ | Encrypted Data: Padding Indicator and cryptogram |
#(2+L+MM) | 1 | ‘ 99h ’ | Tag for Processing Status (SW1-SW2) – optional for generation 1 secure messaging |
#(3+L+MM) | 1 | ‘ 02h ’ | Length of Processing Status – optional for generation 1 secure messaging |
#(4+L+MM) - #(5+L+MM) | 2 | ‘ XX XXh ’ | Processing Status of the unprotected response APDU – optional for generation 1 secure messaging |
#(6+L+MM) | 1 | ‘ 8Eh ’ | TCC: Tag for cryptographic checksum |
#(7+L+MM) | 1 | ‘ XXh ’ | LCC: Length of following cryptographic checksum
|
#(8+L+MM)-#(7+N+L+MM) | N | ‘ XX..XXh ’ | Cryptographic checksum |
SW | 2 | ‘ XXXXh ’ | Status Words (SW1,SW2)] |
The READ BINARY command may return regular processing states listed in TCS_43 under Tag ‘99h’ as described in TCS_59 using the secure messaging response structure.
Additionally, some errors specifically related to secure messaging can happen. In that case, the processing state is simply returned, with no secure messaging structure involved:
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If no current session key is available, the processing state ‘6A88’ is returned. It happens either if the session key has not already been generated or if the session key validity has expired (in this case the IFD must re-run a mutual authentication process to set a new session key).
If some expected data objects (as specified above) are missing in the secure messaging format, the processing state ‘6987’ is returned: this error happens if an expected tag is missing or if the command body is not properly constructed.
If some data objects are incorrect, the processing state returned is ‘6988’: this error happens if all the required tags are present but some lengths are different from the ones expected.
If the verification of the cryptographic checksum fails, the processing state returned is ‘6688’.
This command variant enables the IFD to select an EF by means of a short EF identifier and read data from this EF.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘B0h’ | Read Binary |
P1 | 1 | ‘XXh’ | Bit 8 is set to 1 Bit 7 and 6 are set to 00 Bit 5 — 1 encode the short EF identifier of the corresponding EF |
P2 | 1 | ‘XXh’ | Encodes an offset from 0 to 255 bytes in the EF referenced by P1 |
Le | 1 | ‘XXh’ | Length of data expected. Number of Bytes to be read. |
Note: The short EF identifiers used for the Generation 2 tachograph application are specified in chapter 4.U.K.
If P1 encodes a short EF identifier and the command is successful, the identified EF becomes the currently selected EF (current EF).
Byte | Length | Value | Description |
---|---|---|---|
#1-#L | L | ‘XX..XXh’ | Data read |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the file corresponding with the short EF identifier is not found, the processing state returned is ‘6A82’.
If the security conditions of the selected file are not satisfied, the command is interrupted with ‘6982’.
If the Offset is not compatible with the size of the EF (Offset > EF size), the processing state returned is ‘6B00’.
If the size of the data to be read is not compatible with the size of the EF (Offset + Le > EF size) the processing state returned is ‘6700’ or ‘6Cxx’ where ‘xx’ indicates the exact length.
[F2If an integrity error is detected within the file attributes, the card shall consider the file as corrupted and unrecoverable, the processing state returned is ‘ 6400 ’ or ‘ 6500 ’.]
If an integrity error is detected within the stored data, the card shall return the demanded data, and the processing state returned is ‘6281’.
This command variant enables the IFD to read data from an EF with 32 768 bytes or more.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘B1h’ | Read Binary |
P1 | 1 | ‘00h’ | Current EF |
P2 | 1 | ‘00h’ | |
Lc | 1 | ‘NNh’ | Lc Length of offset data object. |
#6-#(5+NN) | NN | ‘XX..XXh’ | Offset data object: Tag ‘54h’ Length ‘01h’ or ‘02h’ Value offset |
[F2Le | 1 | 'XXh' | As specified in ISO/IEC 7816-4] |
The IFD shall encode the offset data object's length with a minimum possible number of octets, i.e. using the length byte ‘01h’ the IFD shall encode an offset from 0 to 255 and using the length byte ‘02h’ an offset from ‘256’ up to ‘65 535’ bytes.
[F1In case of T = 0 the card assumes the value Le = ‘00h’ if no secure messaging is applied.
In case of T = 1 the processing state returned is ‘6700’ if Le=‘01h’.]
Byte | Length | Value | Description |
---|---|---|---|
#1-#L | L | ‘XX..XXh’ | Data read encapsulated in a discretionary data object with tag ‘53h’. |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If no EF is selected, the processing state returned is ‘6986’.
If the security conditions of the selected file are not satisfied, the command is interrupted with ‘6982’.
If the Offset is not compatible with the size of the EF (Offset > EF size), the processing state returned is ‘6B00’.
If the size of the data to be read is not compatible with the size of the EF (Offset + Le > EF size) the processing state returned is ‘6700’ or ‘6Cxx’ where ‘xx’ indicates the exact length.
[F2If an integrity error is detected within the file attributes, the card shall consider the file as corrupted and unrecoverable, the processing state returned is ‘ 6400 ’ or ‘ 6500 ’.]
If an integrity error is detected within the stored data, the card shall return the demanded data, and the processing state returned is ‘6281’.
The following example illustrates the usage of secure messaging if the security condition SM-MAC-G2 applies.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘0Ch’ | Secure Messaging asked |
INS | 1 | ‘B1h’ | Read Binary |
P1 | 1 | ‘00h’ | Current EF |
P2 | 1 | ‘00h’ | |
Lc | 1 | ‘XXh’ | Length of the secured data field |
#6 | 1 | ‘B3h’ | Tag for plain value data encoded in BER-TLV |
#7 | 1 | ‘NNh’ | LPV: length of transmitted data |
#(8)-#(7+NN) | NN | ‘XX..XXh’ | Plain Data encoded in BER-TLV, i.e. the offset data object with tag ‘54’ |
#(8+NN) | 1 | ‘97h’ | TLE: Tag for expected length specification. |
#(9+NN) | 1 | ‘01h’ | LLE: Length of expected length |
#(10+NN) | 1 | ‘XXh’ | Expected length specification (original Le): Number of bytes to be read |
#(11+NN) | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#(12+NN) | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum ‘08h’, ‘0Ch’ or ‘10h’ depending on AES key length for Generation 2 secure messaging (see Appendix 11 Part B) |
#(13+NN)-#(12+M+NN) | M | ‘XX..XXh’ | Cryptographic checksum |
Le | 1 | ‘00h’ | As specified in ISO/IEC 7816-4 |
Byte | Length | Value | Description |
---|---|---|---|
#1 | 1 | ‘B3h’ | Plain Data encoded in BER-TLV |
#2 | L | ‘NNh’ or ‘81 NNh’ | LPV: length of returned data (=original Le). L is 2 bytes if LPV>127 bytes. |
#(2+L)-#(1+L+NN) | NN | ‘XX..XXh’ | Plain Data value encoded in BER-TLV, i.e. data read encapsulated in a discretionary data object with tag ‘53h’. |
#(2+L+NN) | 1 | ‘99h’ | Processing Status of the unprotected response APDU |
#(3+L+NN) | 1 | ‘02h’ | Length of Processing Status |
#(4+L+NN) — #(5+L+NN) | 2 | ‘XX XXh’ | Processing Status of the unprotected response APDU |
#(6+L+NN) | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#(7+L+NN) | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum ‘08h’, ‘0Ch’ or ‘10h’ depending on AES key length for Generation 2 secure messaging (see Appendix 11 Part B) |
#(8+L+NN)-#(7+M+L+NN) | M | ‘XX..XXh’ | Cryptographic checksum |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
This command is compliant with ISO/IEC 7816-4, but has a restricted usage compared to the command defined in the norm.
The UPDATE BINARY command message initiates the update (erase + write) of the bits already present in an EF binary with the bits given in the command APDU.
This command enables the IFD to write data into the EF currently selected, without the card verifying the integrity of data received.
Note: This command without secure messaging can only be used to update a file that supports the ALW security condition for the Update access mode.U.K.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘D6h’ | Update Binary |
P1 | 1 | ‘XXh’ | Offset in bytes from the beginning of the file: Most Significant Byte |
P2 | 1 | ‘XXh’ | Offset in bytes from the beginning of the file: Least Significant Byte |
Lc | 1 | ‘NNh’ | Lc Length of data to Update. Number of bytes to be written. |
#6-#(5+NN) | NN | ‘XX..XXh’ | Data to be written |
Note: bit 8 of P1 must be set to 0.U.K.
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If no EF is selected, the processing state returned is ‘6986’.
If the security conditions of the selected file are not satisfied, the command is interrupted with ‘6982’.
If the Offset is not compatible with the size of the EF (Offset > EF size), the processing state returned is ‘6B00’.
If the size of the data to be written is not compatible with the size of the EF (Offset + Lc > EF size) the processing state returned is ‘6700’.
If an integrity error is detected within the file attributes, the card shall consider the file as corrupted and unrecoverable, the processing state returned is ‘6400’ or ‘6500’.
If writing is unsuccessful, the processing state returned is ‘6581’.
This command enables the IFD to write data into the EF currently selected, with the card verifying the integrity of data received. As no confidentiality is required, the data are not encrypted.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘0Ch’ | Secure Messaging asked |
INS | 1 | ‘D6h’ | Update Binary |
P1 | 1 | ‘XXh’ | Offset in bytes from the beginning of the file: Most Significant Byte |
P2 | 1 | ‘XXh’ | Offset in bytes from the beginning of the file: Least Significant Byte |
Lc | 1 | ‘XXh’ | Length of the secured data field |
#6 | 1 | ‘81h’ | TPV: Tag for plain value data |
#7 | L | ‘NNh’ or ‘81 NNh’ | LPV: length of transmitted data. L is 2 bytes if LPV > 127 bytes. |
#(7+L)-#(6+L+NN) | NN | ‘XX..XXh’ | Plain Data value (Data to be written) |
#(7+L+NN) | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#(8+L+NN) | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum‘04h’ for Generation 1 secure messaging (see Appendix 11 Part A) ‘08h’, ‘0Ch’ or ‘10h’ depending on AES key length for Generation 2 secure messaging (see Appendix 11 Part B) |
#(9+L+NN)-#(8+M+L+NN) | M | ‘XX..XXh’ | Cryptographic checksum |
Le | 1 | ‘00h’ | As specified in ISO/IEC 7816-4 |
Byte | Length | Value | Description |
---|---|---|---|
#1 | 1 | ‘99h’ | TSW: Tag for Status Words (to be protected by CC) |
#2 | 1 | ‘02h’ | LSW: length of returned Status Words |
#3-#4 | 2 | ‘XXXXh’ | Processing Status of the unprotected response APDU |
#5 | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#6 | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum
|
#7-#(6+L) | L | ‘XX..XXh’ | Cryptographic checksum |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
The ‘regular’ processing states, described for the UPDATE BINARY command with no secure messaging (see §3.5.3.1), can be returned using the response message structure described above.
Additionally, some errors specifically related to secure messaging can happen. In that case, the processing state is simply returned, with no secure messaging structure involved:
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If no current session key is available, the processing state ‘6A88’ is returned.
If some expected data objects (as specified above) are missing in the secure messaging format, the processing state ‘6987’ is returned: this error happens if an expected tag is missing or if the command body is not properly constructed.
If some data objects are incorrect, the processing state returned is ‘6988’: this error happens if all the required tags are present but some lengths are different from the ones expected.
If the verification of the cryptographic checksum fails, the processing state returned is ‘6688’.
This command variant enables the IFD to select an EF by means of a short EF identifier and write data from this EF.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘D6h’ | Update Binary |
P1 | 1 | ‘XXh’ | Bit 8 is set to 1 Bit 7 and 6 are set to 00 Bit 5 — 1 encode the short EF identifier of the corresponding EF |
P2 | 1 | ‘XXh’ | Encodes an offset from 0 to 255 bytes in the EF referenced by P1 |
Lc | 1 | ‘NNh’ | Lc Length of data to Update. Number of bytes to be written. |
#6-#(5+NN) | NN | ‘XX..XXh’ | Data to be written |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
Note: The short EF identifiers used for the generation 2 tachograph application are specified in chapter 4.U.K.
If P1 encodes a short EF identifier and the command is successful, the identified EF becomes the currently selected EF (current EF).
If the command is successful, the card returns ‘9000’.
If the file corresponding with the short EF identifier is not found, the processing state returned is ‘6A82’.
If the security conditions of the selected file are not satisfied, the command is interrupted with ‘6982’.
If the Offset is not compatible with the size of the EF (Offset > EF size), the processing state returned is ‘6B00’.
If the size of the data to be written is not compatible with the size of the EF (Offset + Lc > EF size) the processing state returned is ‘6700’.
[F2If an integrity error is detected within the file attributes, the card shall consider the file as corrupted and unrecoverable, the processing state returned is ‘ 6400 ’ or ‘ 6500 ’.]
If writing is unsuccessful, the processing state returned is ‘6581’.
This command variant enables the IFD to write data to an EF with 32 768 bytes or more.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘D7h’ | Update Binary |
P1 | 1 | ‘00h’ | Current EF |
P2 | 1 | ‘00h’ | |
Lc | 1 | ‘NNh’ | Lc Length of data in the command data field |
#6-#(5+NN) | NN | ‘XX..XXh’ | Offset data object with tag ‘54h’ || Discretionary data object with tag ‘53h’ that encapsulates the data to be written |
The IFD shall encode the offset data object's and the discretionary data object's length with the minimum possible number of octets, i.e. using the length byte ‘01h’ the IFD shall encode an offset / length from 0 to 255 and using the length byte ‘02h’ an offset / length from ‘256’ up to ‘65 535’ bytes.
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If no EF is selected, the processing state returned is ‘6986’.
If the security conditions of the selected file are not satisfied, the command is interrupted with ‘6982’.
If the Offset is not compatible with the size of the EF (Offset > EF size), the processing state returned is ‘6B00’.
If the size of the data to be written is not compatible with the size of the EF (Offset + Lc > EF size) the processing state returned is ‘6700’.
If an integrity error is detected within the file attributes, the card shall consider the file as corrupted and unrecoverable, the processing state returned is ‘6400’ or ‘6500’.
If writing is unsuccessful, the processing state returned is ‘6581’.
The following example illustrates the usage of secure messaging if the security condition SM-MAC-G2 applies.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘0Ch’ | Secure Messaging asked |
INS | 1 | ‘D7h’ | Update Binary |
P1 | 1 | ‘00h’ | Current EF |
P2 | 1 | ‘00h’ | |
Lc | 1 | ‘XXh’ | Length of the secured data field |
#6 | 1 | ‘B3h’ | Tag for plain value data encoded in BER-TLV |
#7 | L | ‘NNh’ or ‘81 NNh’ | LPV: length of transmitted data. L is 2 bytes if LPV > 127 bytes. |
#(7+L)-#(6+L+NN) | NN | ‘XX..XXh’ | Plain Data encoded in BER-TLV, i.e. offset data object with tag ‘54h’ || Discretionary data object with tag ‘53h’ that encapsulates the data to be written |
#(7+L+NN) | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#(8+L+NN) | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum ‘08h’, ‘0Ch’ or ‘10h’ depending on AES key length for Generation 2 secure messaging (see Appendix 11 Part B) |
#(9+L+NN)-#(8+M+L+NN) | M | ‘XX..XXh’ | Cryptographic checksum |
Le | 1 | ‘00h’ | As specified in ISO/IEC 7816-4 |
Byte | Length | Value | Description |
---|---|---|---|
#1 | 1 | ‘99h’ | TSW: Tag for Status Words (to be protected by CC) |
#2 | 1 | ‘02h’ | LSW: length of returned Status Words |
#3-#4 | 2 | ‘XXXXh’ | Processing Status of the unprotected response APDU |
#5 | 1 | ‘8Eh’ | TCC: Tag for cryptographic checksum |
#6 | 1 | ‘XXh’ | LCC: Length of following cryptographic checksum ‘08h’, ‘0Ch’ or ‘10h’ depending on AES key length for Generation 2 secure messaging (see Appendix 11 Part B) |
#7-#(6+L) | L | ‘XX..XXh’ | Cryptographic checksum |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
This command is compliant with ISO/IEC 7816-4, but has a restricted usage compared to the command defined in the norm.
The GET CHALLENGE command asks the card to issue a challenge in order to use it in a security related procedure in which a cryptogram or some ciphered data are sent to the card.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘84h’ | INS |
P1 | 1 | ‘00h’ | P1 |
P2 | 1 | ‘00h’ | P2 |
Le | 1 | ‘08h’ | Le (Length of Challenge expected). |
Byte | Length | Value | Description |
---|---|---|---|
#1-#8 | 8 | ‘XX..XXh’ | Challenge |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If Le is different from ‘08h’, the processing state is ‘6700’.
If parameters P1-P2 are incorrect, the processing state is ‘6A86’.
This command is compliant with ISO/IEC 7816-4, but has a restricted usage compared to the command defined in the norm.
Only the workshop card is required to support this command.
Other types of tachograph cards may or may not implement this command, but for these cards no reference CHV is personalized. Therefore these cards cannot perform this commend successfully. For other types of tachograph cards than workshop cards the behavior, i.e. the error code returned, is out of the scope of this specification, if this command is sent.
The Verify command initiates the comparison in the card of the CHV (PIN) data sent from the command with the reference CHV stored in the card.
Note: Using the same reference CHV and a global security status prevents that a workshop employee must re-enter the PIN after a selection of another tachograph application DF.U.K.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘20h’ | INS |
P1 | 1 | ‘00h’ | P1 |
P2 | 1 | ‘00h’ | P2 (the verified CHV is implicitly known) |
Lc | 1 | ‘08h’ | Length of CHV code transmitted |
#6-#13 | 8 | ‘XX..XXh’ | CHV |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the reference CHV is not found, the processing state returned is ‘6A88’.
If the CHV is blocked, (the remaining attempt counter of the CHV is null), the processing state returned is ‘6983’. Once in that state, the CHV can never be successfully presented anymore.
If the comparison is unsuccessful, the remaining attempt Counter is decreased and the status ‘63CX’ is returned (X>0 and X equals the remaining CHV attempts counter.
If the reference CHV is considered corrupted, the processing state returned is ‘6400’ or ‘6581’.
If Lc is different from ‘08h’, the processing state is ‘6700’.
This command is compliant with ISO/IEC 7816-4.
This command (only necessary and available for T=0 Protocol) is used to transmit prepared data from the card to the interface device (case where a command had included both Lc and Le).
The GET RESPONSE command has to be issued immediately after the command preparing the data, otherwise, the data are lost. After the execution of the GET RESPONSE command (except if the error ‘61xx’ or ‘6Cxx’ occur, see below), the previously prepared data are no longer available.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘C0h’ | |
P1 | 1 | ‘00h’ | |
P2 | 1 | ‘00h’ | |
Le | 1 | ‘XXh’ | Number of bytes expected |
Byte | Length | Value | Description |
---|---|---|---|
#1-#X | X | ‘XX..XXh’ | Data |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If no data have been prepared by the card, the processing state returned is ‘6900’ or ‘6F00’.
If Le exceeds the number of available bytes or if Le is null, the processing state returned is ‘6Cxx’, where xx denotes the exact number of available bytes. In that case, the prepared data are still available for a subsequent GET RESPONSE command.
If Le is not null and is smaller than the number of available bytes, the required data are sent normally by the card, and the processing state returned is ‘61xx’, where ‘xx’ indicates a number of extra bytes still available by a subsequent GET RESPONSE command.
If the command is not supported (protocol T=1), the card returns ‘6D00’.
This command is compliant with ISO/IEC 7816-8, but has a restricted usage compared to the command defined in the norm.
The VERIFY CERTIFICATE command is used by the card to obtain a Public Key from the outside and to check its validity.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘2Ah’ | Perform Security Operation |
P1 | 1 | ‘00h’ | P1 |
P2 | 1 | ‘AEh’ | P2: non BER-TLV coded data (concatenation of data elements) |
Lc | 1 | ‘C2h’ | Lc: Length of the certificate, 194 bytes |
#6-#199 | 194 | ‘XX..XXh’ | Certificate: concatenation of data elements (as described in Appendix 11) |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the certificate verification fails, the processing state returned is ‘6688’. The verification and unwrapping process of the certificate is described in Appendix 11 for G1 and G2.
If no Public Key is present in the Security Environment, ‘6A88’ is returned.
If the selected public key (used to unwrap the certificate) is considered corrupted, the processing state returned is ‘6400’ or ‘6581’.
Generation 1 only: If the selected public key (used to unwrap the certificate) has a CHA.LSB () different from ‘00’ (i.e. is not the one of a Member State or of Europe), the processing state returned is ‘6985’.
Depending on the curve size ECC certificates may be so long that they cannot be transmitted in a single APDU. In this case command chaining according to ISO/IEC 7816-4 must be applied and the certificate transmitted in two consecutive PSO: Verify Certificate APDUs.
The certificate structure and the domain parameters are defined in Appendix 11.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘X0h’ | CLA byte indicating command chaining:
|
INS | 1 | ‘2Ah’ | Perform Security Operation |
P1 | 1 | ‘00h’ | |
P2 | 1 | ‘BEh’ | Verify self-descriptive certificate |
Lc | 1 | ‘XXh’ | Length of the command data field, see TCS_88 and TCS_89. |
#6-#5+L | L | ‘XX..XXh’ | DER-TLV encoded data: ECC Certificate Body data object as first data object concatenated with the ECC Certificate Signature data object as second data object or a part of this concatenation. The tag ‘7F21’ and the corresponding length shall not be transmitted. The order of these data objects is fixed. |
Note: According to Appendix 11 the card stores the certificate or the relevant contents of the certificate and updates its currentAuthenticatedTime.U.K.
The response message structure and status words are as defined in TCS_85.
If the selected public key (used to unwrap the certificate) has a CHA.LSB (CertificateHolderAuthorisation.equipmentType) that is not suitable for the certificate verification according to Appendix 11, the processing state returned is ‘6985’.
If the currentAuthenticatedTime of the card is later than the Certificate Expiration Date, the processing state returned is ‘6985’.
If the last command of the chain is expected, the card returns ‘6883’.
If incorrect parameters are sent in the command data field, the card returns ‘6A80’ (also used in case the data objects are not sent in the specified order).
This command is compliant with ISO/IEC 7816-4.
Using the INTERNAL AUTHENTICATE command, the IFD can authenticate the card. The authentication process is described in Appendix 11. It includes the following statements:
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | CLA |
INS | 1 | ‘88h’ | INS |
P1 | 1 | ‘00h’ | P1 |
P2 | 1 | ‘00h’ | P2 |
Lc | 1 | ‘10h’ | Length of data sent to the card |
#6 — #13 | 8 | ‘XX..XXh’ | Challenge used to authenticate the card |
#14 -#21 | 8 | ‘XX..XXh’ | VU.CHR (see Appendix 11) |
Le | 1 | ‘80h’ | Length of the data expected from the card |
Byte | Length | Value | Description |
---|---|---|---|
#1-#128 | 128 | ‘XX..XXh’ | Card authentication token (see Appendix 11) |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If no Public Key is present in the Security Environment, the processing state returned is ‘6A88’.
If no Private Key is present in the Security Environment, the processing state returned is ‘6A88’.
If VU.CHR does not match the current public key identifier, the processing state returned is ‘6A88’.
If the selected private key is considered corrupted, the processing state returned is ‘6400’ or ‘6581’.
This command is compliant with ISO/IEC 7816-4.
Using the EXTERNAL AUTHENTICATE command, the card can authenticate the IFD. The authentication process is described in Appendix 11 for Tachograph G1 and G2 (VU authentication).
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | CLA |
INS | 1 | ‘82h’ | INS |
P1 | 1 | ‘00h’ | Keys and algorithms implicitly known |
P2 | 1 | ‘00h’ | |
Lc | 1 | ‘XXh’ | Lc (Length of the data sent to the card ) |
#6-#(5+L) | L | ‘XX..XXh’ | Generation 1 authentication: Cryptogram (see Appendix 11 Part A) Generation 2 authentication: Signature generated by the IFD (see Appendix 11 Part B) |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the CHA of the currently set public key is not the concatenation of the Tachograph application AID and of a VU equipment Type, the processing state returned is ‘6F00’.
If the command is not immediately preceded with a GET CHALLENGE command, the processing state returned is ‘6985’.
The Generation 1 Tachograph application may return the following additional error codes:
If no Public Key is present in the Security Environment, ‘6A88’ is returned.
If no Private Key is present in the Security Environment, the processing state returned is ‘6A88’.
If the verification of the cryptogram is wrong, the processing state returned is ‘6688’.
If the selected private key is considered corrupted, the processing state returned is ‘6400’ or ‘6581’.
The command variant for the Generation 2 authentication may return the following additional error code:
If signature verification failed, the card returns ‘6300’.
This command is used for the generation 2 chip authentication protocol specified in Appendix 11 Part B and is compliant with ISO/IEC 7816-4.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘86h’ | |
P1 | 1 | ‘00h’ | Keys and protocol implicitly known |
P2 | 1 | ‘00h’ | |
Lc | 1 | ‘NNh’ | Lc: length of subsequent data field |
#6-#(5+L) | L | ‘7Ch’ + L7C + ‘80h’ + L80 + ‘XX..XXh’ | DER-TLV encoded ephemeral public key value (see Appendix 11) The VU shall send the data objects in this order. |
[F15 + L + 1 | 1 | ‘ 00h ’ | As specified in ISO/IEC 7816-4] |
Byte | Length | Value | Description |
---|---|---|---|
#1-#L | L | ‘7Ch’ + L7C + ‘81h’ + ‘08h’ + ‘XX..XXh’ + ‘82h’ + L82 + ‘XX..XXh’ | DER-TLV encoded Dynamic Authentication Data: nonce and authentication token (see Appendix 11) |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
The card returns ‘6A80’ to indicate incorrect parameters in data field.
The card returns ‘6982’ if the External Authenticate command has not been performed successfully
The response Dynamic Authentication Data object ‘7Ch’
must be present if the operation is successful, i.e. the Status Words are ‘9000’,
must be absent in case of an execution error or checking error, i.e. if the Status Words are in the range ‘6400’ — ‘6FFF’, and
may be absent in case of a warning, i.e. if the Status Words are in the range ‘6200’ — ‘63FF’.
This command is used to set a public key for authentication purpose.
This command is compliant with ISO/IEC 7816-4. The use of this command is restricted regarding the related standard.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | CLA |
INS | 1 | ‘22h’ | INS |
P1 | 1 | ‘C1h’ | P1: referenced key valid for all cryptographic operations |
P2 | 1 | ‘B6h’ | P2 (referenced data concerning Digital Signature) |
Lc | 1 | ‘0Ah’ | Lc: length of subsequent data field |
#6 | 1 | ‘83h’ | Tag for referencing a public key in asymmetric cases |
#7 | 1 | ‘08h’ | Length of the key reference (key identifier) |
#8-#15 | 8 | ‘XX..XXh’ | Key identifier as specified in Appendix 11 |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the referenced key is not present into the card, the processing state returned is ‘6A88’.
If some expected data objects are missing in the secure messaging format, the processing state ‘6987’ is returned. This can happen if the tag ‘83h’ is missing.
If some data objects are incorrect, the processing state returned is ‘6988’. This can happen if the length of the key identifier is not ‘08h’.
If the selected key is considered corrupted, the processing state returned is ‘6400’ or ‘6581’.
For the Generation 2 authentication the tachograph card supports the following MSE: Set command versions which are compliant with ISO/IEC 7816-4. These command versions are not supported for the Generation 1 authentication.
The following MSE:SET AT command is used to select the parameters for the Chip Authentication that is performed by a subsequent General Authenticate command.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘22h’ | |
P1 | 1 | ‘41h’ | Set for internal authentication |
P2 | 1 | ‘A4h’ | Authentication |
Lc | 1 | ‘NNh’ | Lc: length of subsequent data field |
#6-#(5+L) | L | ‘80h’ + ‘0Ah’ + ‘XX..XXh’ | DER-TLV encoded cryptographic mechanism reference: Object Identifier of Chip Authentication (value only, Tag ‘06h’ is omitted). See Appendix 1 for the values of object identifiers; the byte notation shall be used. See Appendix 11 for guidance on how to select one of these object identifiers. |
The following MSE:SET AT command is used to select the parameters and keys for the VU Authentication that is performed by a subsequent External Authenticate command.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘22h’ | |
P1 | 1 | ‘81h’ | Set for external authentication |
P2 | 1 | ‘A4h’ | Authentication |
Lc | 1 | ‘NNh’ | Lc: length of subsequent data field |
#6-#(5+L) | L | ‘80h’ + ‘0Ah’ + ‘XX..XXh’ | DER-TLV encoded cryptographic mechanism reference: Object Identifier of VU Authentication (value only, Tag ‘06h’ is omitted). See Appendix 1 for the values of object identifiers; the byte notation shall be used. See Appendix 11 for guidance on how to select one of these object identifiers. |
‘83h’ + ‘08h’ + ‘XX..XXh’ | DER-TLV encoded reference of the VU public key by the Certificate Holder Reference mentioned in its certificate. | ||
‘91h’ + L91 + ‘XX..XXh’ | DER-TLV encoded compressed representation of the ephemeral public key of the VU that will be used during Chip Authentication (see Appendix 11) |
The following MSE:SET DST command is used to set a public key either
for the verification of a signature that is provided in a subsequent PSO: Verify Digital Signature command or
for the signature verification of a certificate that is provided in a subsequent PSO: Verify Certificate command
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | |
INS | 1 | ‘22h’ | |
P1 | 1 | ‘81h’ | Set for verification |
P2 | 1 | ‘B6h’ | Digital Signature |
Lc | 1 | ‘NNh’ | Lc: length of subsequent data field |
#6-#(5+L) | L | ‘83h’ + ‘08h’ + ‘XX...XXh’ | DER-TLV encoded reference of a public key, i.e. the Certificate Holder Reference in the certificate of the public key (see Appendix 11) |
For all command versions the response message structure and status words are given by:
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’. The protocol has been selected and initialised.
‘6A80’ indicates incorrect parameters in the command data field.
‘6A88’ indicates that referenced data (i.e. a referenced key) is not available.
[F1If the currentAuthenticatedTime of the card is later than the Expiration Date of the selected public key, the processing state returned is ‘ 6A88 ’ .
Similarly, in case an MSE: SET DST command referencing an EQT (i.e. a VU or a card) is sent to a control card, according to CSM_234 the referenced key is always an EQT_Sign key that has to be used for the verification of a digital signature. According to Figure 13 in Appendix 11, the control card will always have stored the relevant EQT_Sign public key. In some cases, the control card may have stored the corresponding EQT_MA public key. The control card shall always set the EQT_Sign public key for use when it receives an MSE: SET DST command.]
This command is used to transfer to the card the result of a hash calculation on some data. This command is used for the verification of digital signatures. The hash value is stored temporarily for the subsequent command PSO: Verify Digital Signature
This command is compliant with ISO/IEC 7816-8. The use of this command is restricted regarding the related standard.
Only the control card is required to support this command in the DF Tachograph and DF Tachograph_G2.
Other types of tachograph cards may or may not implement this command. The command may or may not be accessible in the MF.
The control card application generation 1 supports only SHA-1.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | CLA |
INS | 1 | ‘2Ah’ | Perform Security Operation |
P1 | 1 | ‘90h’ | Return Hash code |
P2 | 1 | ‘A0h’ | Tag: data field contains DOs relevant for hashing |
Lc | 1 | ‘XXh’ | Length Lc of the subsequent data field |
#6 | 1 | ‘90h’ | Tag for the hash code |
#7 | 1 | ‘XXh’ | Length L of the hash code:
|
#8-#(7+L) | L | ‘XX..XXh’ | Hash code |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If some expected data objects (as specified above) are missing, the processing state ‘6987’ is returned. This can happen if one of the tag ‘90h’ is missing.
If some data objects are incorrect, the processing state returned is ‘6988’. This error happens if the required tag is present but with a length different from ‘14h’ for SHA-1, ‘20h’ for SHA-256, ‘30h’ for SHA-384, ‘40h’ for SHA-512 (Generation 2 application).
This command is not compliant with ISO/IEC 7816-8. Thus the CLA byte of this command indicates that there is a proprietary use of the PERFORM SECURITY OPERATION / HASH.
Only the driver card and the workshop card are required to support this command in the DF Tachograph and DF Tachograph_G2.
Other types of tachograph cards may or may not implement this command. If a company or control card implements this command, the command shall be implemented as specified in this chapter.
The command may or may not be accessible in the MF. If so, the command shall be implemented as specified in this chapter, i.e. shall not allow the calculation of a hash value, but terminate with a suitable error code.
[F2Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘ 80h ’ | CLA |
INS | 1 | ‘ 2Ah ’ | Perform Security Operation |
P1 | 1 | ‘ 90h ’ | Tag: Hash |
P2 | 1 | ‘ 00h ’ | Algorithm implicitly known For the Tachograph Generation 1 application: SHA-1 For the Tachograph Generation 2 application: SHA-2 algorithm (SHA-256, SHA-384 or SHA-512) defined by the cipher suite in Appendix 11 Part B for the card signature key Card_Sign] |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the current EF does not allow this command (EF Sensor_Installation_Data in DF Tachograph_G2), the processing state ‘6985’ is returned.
If the selected EF is considered corrupted (file attributes or stored data integrity errors), the processing state returned is ‘6400’ or ‘6581’.
If the selected file is not a transparent file or if there is no current EF, the processing state returned is ‘6986’.
[F2This command is used to compute the digital signature of previously computed hash code (see PERFORM HASH of FILE, §3.5.13).
Only the driver card and the workshop card are required to support this command in the DF Tachograph and DF Tachograph_G2.
Other types of tachograph cards may or may not implement this command. In case of the Generation 2 tachograph application, only the driver card and the workshop card have a generation 2 signature key, other cards are not able to successfully perform the command and terminate with a suitable error code.
The command may or may not be accessible in the MF. If the command is not accessible in the MF, it shall terminate with a suitable error code.
This command is compliant with ISO/IEC 7816-8. The use of this command is restricted regarding the related standard.]
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘00h’ | CLA |
INS | 1 | ‘2Ah’ | Perform Security Operation |
P1 | 1 | ‘9Eh’ | Digital signature to be returned |
P2 | 1 | ‘9Ah’ | Tag: data field contains data to be signed. As no data field is included, the data are supposed to be already present in the card (hash of file) |
Le | 1 | ‘NNh’ | Length of the expected signature |
Byte | Length | Value | Description |
---|---|---|---|
#1-#L | L | ‘XX..XXh’ | Signature of the previously computed hash |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the implicitly selected private key is considered as corrupted, the processing state returned is ‘6400’ or ‘6581’.
If the hash which was computed in a previous Perform Hash of File command is not available, the processing state returned is ‘6985’.
This command is used to verify the digital signature, provided as an input, whose hash is known to the card. The signature algorithm is implicitly known by the card.
This command is compliant with ISO/IEC 7816-8. The use of this command is restricted regarding the related standard.
Only the control card is required to support this command in the DF Tachograph and DF Tachograph_G2.
Other types of tachograph cards may or may not implement this command. The command may or may not be accessible in the MF.
[F2Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘ 00h ’ | CLA |
INS | 1 | ‘ 2Ah ’ | Perform Security Operation |
P1 | 1 | ‘ 00h ’ | |
P2 | 1 | ‘ A8h ’ | Tag: data field contains DOs relevant for verification |
Lc | 1 | ‘ XXh ’ | Length Lc of the subsequent data field |
#6 | 1 | ‘ 9Eh ’ | Tag for Digital Signature |
#7 or #7-#8 | L | ‘NNh’ or ‘81 NNh’ | Length of digital signature (L is 2 bytes if the digital signature is longer than 127 bytes):
|
#(7+L)-#(6+L+NN) | NN | ‘ XX..XXh ’ | Digital signature content] |
Byte | Length | Value | Description |
---|---|---|---|
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
If the verification of the signature fails, the processing state returned is ‘6688’. The verification process is described in Appendix 11.
If no public key is selected, the processing state returned is ‘6A88’.
If some expected data objects (as specified above) are missing, the processing state ‘6987’ is returned. This can happen if one of the required tag is missing.
If no hash code is available to process the command (as a result of a previous PSO: Hash command), the processing state returned is ‘6985’.
If some data objects are incorrect, the processing state returned is ‘6988’. This can happen if one of the required data objects length is incorrect.
If the selected public key is considered corrupted, the processing state returned is ‘6400’ or ‘6581’.
[F1If the selected public key (used to verify the digital signature) has a CHA.LSB (CertificateHolderAuthorisation.equipmentType) that is not suitable for the digital signature verification according to Appendix 11, the processing state returned is ‘ 6985 ’.]
This command is used to verify the integrity and authenticity of the DSRC message and to decipher the data communicated from a VU to a control authority or a workshop over the DSRC link. The card derives the encryption key and the MAC key used to secure the DSRC message as described in Appendix 11 Part B chapter 13.
Only the control card and the workshop card are required to support this command in the DF Tachograph_G2.
Other types of tachograph cards may or may not implement this command, but shall not have a DSRC master key. Therefore these cards cannot perform the command successfully, but terminate with a suitable error code.
The command may or may not be accessible in the MF and / or the DF Tachograph. If so, the command shall terminate with a suitable error code.
Byte | Length | Value | Description |
---|---|---|---|
CLA | 1 | ‘80h’ | Proprietary CLA |
INS | 1 | ‘2Ah’ | Perform Security Operation |
P1 | 1 | ‘80h’ | Response data: plain value |
P2 | 1 | ‘B0h’ | Command data: plain value encoded in BER-TLV and including SM DOs |
Lc | 1 | ‘NNh’ | Length Lc of the subsequent data field |
#6-#(5+L) | L | ‘87h’ + L87 + ‘XX..XXh’ | DER-TLV encoded padding-content indicator byte followed by encrypted tachograph payload. For the padding-content indicator byte the value ‘00h’ (‘no further indication’ according to ISO/IEC 7816-4:2013 Table 52) shall be used. For the encryption mechanism see Appendix 11, Part B chapter 13. Allowed values for the length L87 are the multiples of the AES block length plus 1 for the padding-content indicator byte, i.e. from 17 bytes up to and including 193 bytes. Note: See ISO/IEC 7816-4:2013 Table 49 for the SM data object with tag ‘87h’. |
‘81h’ + ‘10h’ | DER-TLV encoded Control Reference Template for Confidentiality nesting the concatenation of the following data elements (see Appendix 1 DSRCSecurityData and Appendix 11 Part B chapter 13):
Note: See ISO/IEC 7816-4:2013 Table 49 for the SM data object with tag ‘81h’. | ||
‘8Eh’ + L8E + ‘XX..XXh’ | DER-TLV encoded MAC over the DSRC message. For the MAC algorithm and calculation see Appendix 11, Part B chapter 13. Note: See ISO/IEC 7816-4:2013 Table 49 for the SM data object with tag ‘8Eh’. | ||
[F15 + L + 1 | 1 | ‘ 00h ’ | As specified in ISO/IEC 7816-4] |
Byte | Length | Value | Description |
---|---|---|---|
#1-#L | L | ‘XX..XXh’ | Absent (in case of an error) or deciphered data (padding removed) |
SW | 2 | ‘XXXXh’ | Status Words (SW1,SW2) |
If the command is successful, the card returns ‘9000’.
‘6A80’ indicates incorrect parameters in the command data field (also used in case the data objects are not sent in the specified order).
‘6A88’ indicates that referenced data is not available, i.e. the referenced DSRC master key is not available.
‘6900’ indicates that the verification of the cryptographic checksum or the decryption of the data failed.
‘ [F16985 ’ indicates that the 4-byte time stamp provided in the command data field is earlier than cardValidityBegin or later than cardExpiryDate.]
This paragraph specifies the file structures of the Tachograph cards for storage of accessible data.
It does not specify card manufacturer dependent internal structures, such as e.g. file headers, nor storage and handling of data elements needed for internal use only such as ,, or.
The maximum and minimum numbers of records are specified in this chapter for the different applications.
For the security conditions used in the access rules throughout this chapter please refer to chapter 3.3. In general the access mode ‘read’ denotes the READ BINARY command with even and if supported odd INS byte with the exception of the EF Sensor_Installation_Data on the workshop card, see TCS_156 and TCS_160. The access mode ‘update’ denotes the Update Binary command with even and if supported odd INS byte and the access mode ‘select’ the SELECT command.
Note: The short EF identifier SFID is given as decimal number, e.g. the value 30 corresponds to 11110 in binary.U.K.
The following abbreviation for the security condition is used in this table:
ALW OR SM-MAC-G2
The value ‘01’ indicates extended length field support for the T = 1 protocol.
The value ‘10’ indicates extended length field support for the T = 0 protocol.
The value ‘11’ indicates extended length field support for the T = 1 and the T = 0 protocol.
The following abbreviations for the security conditions are used in this table:
ALW OR SM-MAC-G2
ALW OR SM-MAC-G1 OR SM-MAC-G2
SM-MAC-G1 OR SM-MAC-G2
Note: The short EF identifier SFID is given as decimal number, e.g. the value 30 corresponds to 11110 in binary.U.K.
The following abbreviation for the security condition is used in this table:
ALW OR SM-MAC-G2
The following abbreviations for the security conditions are used in this table:
ALW OR SM-MAC-G2
ALW OR SM-MAC-G1 OR SM-MAC-G2
SM-MAC-G1 OR SM-MAC-G2
For the READ BINARY command with even INS byte:
(SM-C-MAC-G1 AND SM-R-ENC-MAC-G1) OR
(SM-C-MAC-G2 AND SM-R-ENC-MAC-G2)
For the READ BINARY command with odd INS byte (if supported): NEV]
Note: The short EF identifier SFID is given as decimal number, e.g. the value 30 corresponds to 11110 in binary.U.K.
The following abbreviations for the security conditions are used in this table:
ALW OR SM-MAC-G2
For the Read Binary command with even INS byte: SM-C-MAC-G2 AND SM-R-ENC-MAC-G2
For the Read Binary command with odd INS byte (if supported): NEV
The following abbreviations for the security conditions are used in this table:
ALW OR SM-MAC-G2
ALW OR SM-MAC-G1 OR SM-MAC-G2
SM-MAC-G1 OR SM-MAC-G2
EXT-AUT-G1 OR SM-MAC-G1 OR SM-MAC-G2
Note: The short EF identifier SFID is given as decimal number, e.g. the value 30 corresponds to 11110 in binary.U.K.
The following abbreviation for the security condition is used in this table:
ALW OR SM-MAC-G2
The following abbreviations for the security conditions are used in this table:
ALW OR SM-MAC-G2
ALW OR SM-MAC-G1 OR SM-MAC-G2
SM-MAC-G1 OR SM-MAC-G2
EXT-AUT-G1 OR SM-MAC-G1 OR SM-MAC-G2
Note: The short EF identifier SFID is given as decimal number, e.g. the value 30 corresponds to 11110 in binary.U.K.
The following abbreviation for the security condition is used in this table:
ALW OR SM-MAC-G2
The Whole Regulation you have selected contains over 200 provisions and might take some time to download. You may also experience some issues with your browser, such as an alert box that a script is taking a long time to run.
Would you like to continue?
The Schedules you have selected contains over 200 provisions and might take some time to download. You may also experience some issues with your browser, such as an alert box that a script is taking a long time to run.
Would you like to continue?
Latest Available (revised):The latest available updated version of the legislation incorporating changes made by subsequent legislation and applied by our editorial team. Changes we have not yet applied to the text, can be found in the ‘Changes to Legislation’ area.
Original (As adopted by EU): The original version of the legislation as it stood when it was first adopted in the EU. No changes have been applied to the text.
Geographical Extent: Indicates the geographical area that this provision applies to. For further information see ‘Frequently Asked Questions’.
Show Timeline of Changes: See how this legislation has or could change over time. Turning this feature on will show extra navigation options to go to these specific points in time. Return to the latest available version by using the controls above in the What Version box.
Access essential accompanying documents and information for this legislation item from this tab. Dependent on the legislation item being viewed this may include:
This timeline shows the different versions taken from EUR-Lex before exit day and during the implementation period as well as any subsequent versions created after the implementation period as a result of changes made by UK legislation.
The dates for the EU versions are taken from the document dates on EUR-Lex and may not always coincide with when the changes came into force for the document.
For any versions created after the implementation period as a result of changes made by UK legislation the date will coincide with the earliest date on which the change (e.g an insertion, a repeal or a substitution) that was applied came into force. For further information see our guide to revised legislation on Understanding Legislation.
Use this menu to access essential accompanying documents and information for this legislation item. Dependent on the legislation item being viewed this may include:
Click 'View More' or select 'More Resources' tab for additional information including: