- 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.).
This is the original version as it was originally adopted in the EU.
This legislation may since have been updated - see the latest available (revised) version
The following references are used in this Appendix:
National Institute of Standards and Technology (NIST). FIPS Publication 180-1: Secure Hash Standard. April 1995.
RSA Laboratories. PKCS # 1: RSA Encryption Standard. Version 2.0. October 1998.
National Institute of Standards and Technology (NIST). FIPS Publication 46-3: Data Encryption Standard. Draft 1999.
ANSI X9.52, Triple Data Encryption Algorithm Modes of Operation. 1998.
Information Technology — Identification cards — Integrated circuit(s) cards with contacts — Part 4: Interindustry commands for interexchange. First edition: 1995 + Amendment 1: 1997.
Information Technology — Identification cards — Integrated circuit(s) cards with contacts — Part 6: Interindustry data elements. First edition: 1996 + Cor 1: 1998.
Information Technology — Identification cards — Integrated circuit(s) cards with contacts — Part 8: Security related interindustry commands. First edition 1999.
Information Technology — Security techniques — Digital signature schemes giving message recovery — Part 2: Mechanisms using a hash function. First edition: 1997.
Information Technology — Security techniques — Entity authentication mechanisms — Part 3: Entity authentication using a public key algorithm. Second edition 1998.
Road vehicles — Tachograph systems — Part 3: Motion sensor interface.
The following notations and abbreviated terms are used in this Appendix:
a key bundle for use by the Triple Data Encryption Algorithm,
Certification Authority,
Certification Authority Reference,
Cryptographic Checksum,
Cryptogram,
Command Header,
Certificate Holder Authorisation,
Certificate Holder Reference,
Decryption with DES,
Data Element,
Data Object,
RSA private key, private exponent,
RSA public key, public exponent,
Encryption with DES,
Equipment,
hash value, an output of Hash,
hash function,
Key Identifier,
TDES key. Master Key defined in ISO 16844-3.
TDES key inserted in vehicle units.
TDES key inserted in workshop cards.
message representative, an integer between 0 and n-1,
RSA keys, modulus,
Padding Bytes,
Padding Indicator byte (for use in Cryptogram for confidentiality DO),
Plain Value,
signature representative, an integer between 0 and n-1,
Send Sequence Counter,
Secure Messaging,
TDEA Cipher Block Chaining Mode of Operation
Triple Data Encryption Algorithm,
Tag Length Value,
Vehicle Unit,
the certificate of user X issued by a certification authority,
a certification authority of user X,
the operation of unwrapping a certificate to extract a public key. It is an infix operator, whose left operand is the public key of a certification authority, and whose right operand is the certificate issued by that certification authority. The outcome is the public key of the user X whose certificate is the right operand,
RSA public key of a user X,
RSA encipherment of some information I, using the public key of user X,
RSA private key of a user X,
RSA encipherment of some information I, using the private key of user X,
an Hexadecimal value,
concatenation operator.
authentication between vehicle units and cards,
transport of Triple-DES session keys between vehicle units and tachograph cards,
digital signature of data downloaded from vehicle units or tachograph cards to external media.
X.SK[m] = s = md mod n
X.PK[s] = m = se mod n
A more comprehensive description of the RSA function can be found in reference [PKCS1]. Public exponent, e, for RSA calculations is an integer between 3 and n-1 satisfying gcd(e, lcm(p-1, q-1))=1.
European level,
Member State level,
Equipment level.
The following picture summarises the data flow of this process:
The confidentiality of the three Triple DES keys described below shall be appropriately maintained during generation, transport (if any) and storage.
In order to support tachograph components compliant with ISO 16844, the European Certification Authority and the Member State Certification Authorities shall, in addition, ensure the following:
use Km to encrypt motion sensor data requested by motion sensor manufacturers (data to be encrypted with Km is defined in ISO 16844-3),
forward KmVU to vehicle unit manufacturers, under appropriately secured procedures, for insertion in vehicle units,
ensure that KmWC will be inserted in all workshop cards ( in
elementary file) during card personalisation.
Data | Format | Bytes | Obs |
---|---|---|---|
CPI | INTEGER | 1 | Certificate Profile Identifier (‘01’ for this version) |
CAR | OCTET STRING | 8 | Certification Authority Reference |
CHA | OCTET STRING | 7 | Certificate Holder Authorisation |
EOV | TimeReal | 4 | Certificate end of validity. Optional, ‘FF’ padded if not used. |
CHR | OCTET STRING | 8 | Certificate Holder Reference |
n | OCTET STRING | 128 | Public key (modulus) |
e | OCTET STRING | 8 | Public Key (public exponent) |
164 |
The headerlist associated with this certificate content is as follows:
‘4D’ | ‘16’ | ‘5F 29’ | ‘01’ | ‘42’ | ‘08’ | ‘5F 4B’ | ‘07’ | ‘5F 24’ | ‘04’ | ‘5F 20’ | ‘08’ | ‘7F 49’ | ‘05’ | ‘81’ | ‘81 80’ | ‘82’ | ‘08’ |
Extended Headerlist Tag | Length of header list | CPI Tag | CPI Length | CAR Tag | CAR Length | CHA Tag | CHA Length | EOV Tag | EOV Length | CHR Tag | CHR Length | Public Key Tag (Constructed) | Length of subsequent DOs | modulus Tag | modulus length | public exponent Tag | public exponent length |
Equipment (VU or Card):
Data | Equipment serial number | Date | Type | Manufacturer |
---|---|---|---|---|
Length | 4 Bytes | 2 Bytes | 1 Byte | 1 Byte |
Value | Integer | mm yy BCD coding | Manufacturer specific | Manufacturer code |
In the case of a VU, the manufacturer, when requesting certificates, may or may not know the identification of the equipment in which the keys will be inserted.
In the first case, the manufacturer will send the equipment identification with the public key to its Member State authority for certification. The certificate will then contain the equipment identification, and the manufacturer must ensure that keys and certificate are inserted in the intended equipment. The Key identifier has the form shown above.
In the later case, the manufacturer must uniquely identify each certificate request and send this identification with the public key to its Member State authority for certification. The certificate will contain the request identification. The manufacturer must feed back its Member State authority with the assignment of key to equipment (i.e. certificate request identification, equipment identification) after key installation in the equipment. The key identifier has the following form:
Data | Certificate request serial number | Date | Type | Manufacturer |
---|---|---|---|---|
Length | 4 Bytes | 2 Bytes | 1 Byte | 1 Byte |
Value | Integer | mm yy BCD coding | ‘FF’ | Manufacturer code |
Certification Authority:
Data | Authority Identification | Key serial number | Additional info | Identifier |
---|---|---|---|---|
Length | 4 Bytes | 1 Byte | 2 Bytes | 1 Byte |
Value | 1 Byte nation numerical code 3 Bytes nation alphanumerical code | Integer | additional coding (CA specific) ‘FF FF’ if not used | ‘01’ |
The key serial number is used to distinguish the different keys of a Member State, in the case the key is changed.
X.C = X.CA.SK[‘6A’ || Cr || Hash(Cc) || ‘BC’] || Cn || X.CAR
With certificate content = Cc = | Cr | || | Cn |
106 bytes | 58 bytes |
‘7F 21’ | ‘09’ | ‘5F 37’ | ‘81 80’ | ‘5F 38’ | ‘3A’ | ‘42’ | ‘08’ |
CV Certificate Tag (Constructed) | Length of subsequent DOs | Signature Tag | Signature Length | Remainder Tag | Remainder Length | CAR Tag | CAR Length |
Certificate verification and unwrapping consists in verifying the signature in accordance with ISO/IEC 9796-2, retrieving the certificate content and the public key contained: X.PK = X.CA.PK o X.C, and verifying the validity of the certificate.
Verify signature and retrieve content:
from CAR' select appropriate Certification Authority Public Key (if not done before through other means)
open Sign with CA Public Key: Sr'= X.CA.PK [Sign],
check Sr' starts with ‘6A’ and ends with ‘BC’
Recover certificate content C' = Cr' || Cn',
check Hash(C') = H'
If the checks are OK the certificate is a genuine one, its content is C'.
Verify validity. From C':
if applicable, check End of validity date,
Retrieve and store public key, Key Identifier, Certificate Holder Authorisation and Certificate End of Validity from C':
X.PK = n || e
X.KID = CHR
X.CHA = CHA
X.EOV = EOV
Mutual authentication between cards and VUs is based on the following principle:
Each party shall demonstrate to the other that it owns a valid key pair, the public key of which has been certified by a Member State certification authority, itself being certified by the European certification authority.
Demonstration is made by signing with the private key a random number sent by the other party, who must recover the random number sent when verifying this signature.
The mechanism is triggered at card insertion by the VU. It starts with the exchange of certificates and unwrapping of public keys, and ends with the setting of a session key.
The structure of commands and responses when using secure messaging is therefore the following:
The DOs used are a partial set of the Secure Messaging DOs described in ISO/IEC 7816-4:
Tag | Mnemonic | Meaning |
---|---|---|
‘81’ | TPV | Plain Value not BER-TLV coded data (to be protected by CC) |
‘97’ | TLE | Value of Le in the unsecured command (to be protected by CC) |
‘99’ | TSW | Status-Info (to be protected by CC) |
‘8E’ | TCC | Cryptographic Checksum |
‘87’ | TPI CG | Padding Indicator Byte || Cryptogram (Plain Value not coded in BER-TLV) |
Given an unsecured command response pair:
Command header | Command body | |||||
---|---|---|---|---|---|---|
CLA | INS | P1 | P2 | [Lc field] | [Data field] | [Le field] |
four bytes | L bytes, denoted as B1 to BL |
Response body | Response trailer | |
---|---|---|
[Data field] | SW1 | SW2 |
Lr data bytes | two bytes |
The corresponding secured command response pair is:
Secured command:
Command header (CH) | Command body | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CLA | INS | P1 | P2 | [New Lc field] | [New Data field] | [New Le field] | ||||||||
‘OC’ | Length of New Data field | TPV | LPV | PV | TLE | LLE | Le | TCC | LCC | CC | ‘00’ | |||
‘81’ | Lc | Data field | ‘97’ | ‘01’ | Le | ‘8E’ | ‘04’ | CC |
Data to be integrated in checksum = CH || PB || TPV || LPV || PV || TLE || LLE || Le || PB
PB = Padding Bytes (80 .. 00) in accordance with ISO-IEC 7816-4 and ISO 9797 method 2.
DOs PV and LE are present only when there is some corresponding data in the unsecured command.
Secured response:
Case where response data field is not empty and needs not to be protected for confidentiality:
Response body | Response trailer | |||||
---|---|---|---|---|---|---|
[New Data field] | new SW1 SW2 | |||||
TPV | LPV | PV | TCC | LCC | CC | |
‘81’ | Lr | Data field | ‘8E’ | ‘04’ | CC |
Data to be integrated in checksum = TPV || LPV || PV || PB
Case where response data field is not empty and needs to be protected for confidentiality:
Response body | Response trailer | |||||
---|---|---|---|---|---|---|
[New Data field] | new SW1 SW2 | |||||
TPI CG | LPI CG | PI CG | TCC | LCC | CC | |
‘87’ | PI || CG | ‘8E’ | ‘04’ | CC |
Data to be carried by CG: non BER-TLV coded data and padding bytes.
Data to be integrated in checksum = TPI CG || LPI CG || PI CG || PB
Case where response data field is empty:
Response body | Response trailer | |||||
---|---|---|---|---|---|---|
[New Data field] | new SW1 SW2 | |||||
TSW | LSW | SW | TCC | LCC | CC | |
‘99’ | ‘02’ | New SW1 SW2 | ‘8E’ | ‘04’ | CC |
Data to be integrated in checksum = TSW || LSW || SW || PB
:
Verification of Cryptographic Checksum failed,
:
Expected SM Data Objects missing,
:
SM Data Objects incorrect.
Initial stage: The initial check block y0 is E(Ka, SSC).
Sequential stage: The check blocks y1, .., yn are calculated using Ka.
Final stage: The cryptographic checksum is calculated from the last check block yn as follows: E(Ka, D(Kb, yn)).
where E() means encryption with DES, and D() means decryption with DES.
The four most significant bytes of the cryptographic checksum are transferred
Initial SSC: Rnd3 (4 least significant bytes) || Rnd1 (4 least significant bytes).
The following figure shows the calculation of the retail MAC:
The following figure shows the application of keys in TDES:
Signature = EQT.SK[‘00’ || ‘01’ || PS || ‘00’ || DER(SHA-1(Data))]
PS = Padding string of octets with value ‘FF’ such that length is 128.
DER(SHA-1(M)) is the encoding of the algorithm ID for the hash function and the hash value into an ASN.1 value of type DigestInfo (distinguished encoding rules):
‘30’||‘21’||‘30’||‘09’||‘06’||‘05’||‘2B’||‘0E’||‘03’||‘02’||‘1A’||‘05’||‘00’||‘04’||‘14’||Hash Value.
The European public key EUR.PK needs to be known independently (and trusted) by the verifier.
The following table illustrates the protocol an IDE carrying a Control card can follow to verify the integrity of data downloaded and stored on the ESM (External Storage media). The control card is used to perform the decipherement of digital signatures. This function may in this case not be implemented in the IDE.
The equipment that has downloaded and signed the data to be analysed is denoted EQT.
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.
Access essential accompanying documents and information for this legislation item from this tab. Dependent on the legislation item being viewed this may include:
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: