Search Legislation

Commission Implementing Regulation (EU) 2016/799Show full title

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)

 Help about what version

What Version

  • Latest available (Revised)
  • Original (As adopted by EU)
 Help about advanced features

Advanced Features

Close

This is a legislation item that originated from the EU

After exit day there will be three versions of this legislation to consult for different purposes. The legislation.gov.uk version is the version that applies in the UK. The EU Version currently on EUR-lex is the version that currently applies in the EU i.e you may need this if you operate a business in the EU.

The web archive version is the official version of this legislation item as it stood on exit day before being published to legislation.gov.uk and any subsequent UK changes and effects applied. The web archive also captured associated case law and other language formats from EUR-Lex.

Changes to legislation:

There are outstanding changes not yet made to Commission Implementing Regulation (EU) 2016/799. Any changes that have already been made to the legislation appear in the content and are referenced with annotations. Help about Changes to Legislation

Close

Changes to Legislation

Revised legislation carried on this site may not be fully up to date. Changes and effects are recorded by our editorial team in lists which can be found in the ‘Changes to Legislation’ area. Where those effects have yet to be applied to the text of the legislation by the editorial team they are also listed alongside the legislation in the affected provisions. Use the ‘more’ link to open the changes and effects relevant to the provision you are viewing.

View outstanding changes

Changes and effects yet to be applied to the whole legislation item and associated provisions

10.5.2 Secure Message Structure U.K.
CSM_188Secure Messaging shall make use only of the Secure Messaging data objects (see [ISO 7816-4]) listed in Table 5. In any message, these data objects shall be used in the order specified in this table.U.K.
Table 5
Secure Messaging Data Objects
Data Object NameTagPresence (M)andatory, (C)onditional or (F)orbidden in
CommandsResponses
Plain value not encoded in BER-TLV‘81’CC
Plain value encoded in BER-TLV, but not including SM DOs‘B3’CC
Padding-content indicator followed by cryptogram, plain value not encoded in BER-TLV‘87’CC
Protected Le‘97’CF
Processing Status‘99’FM
Cryptographic Checksum‘8E’MM

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.

CSM_189All SM data objects shall be encoded in DER TLV as specified in [ISO 8825-1]. This encoding results in a Tag-Length-Value (TLV) structure as follows:U.K.
Tag

:

The tag is encoded in one or two octets and indicates the content.

Length

:

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.

Value

:

The value is encoded in zero or more octets

CSM_190APDUs protected by Secure Messaging shall be created as follows:U.K.
  • 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.

[F1CSM_191 Any data object to be encrypted shall be padded according to [ISO 7816-4] using padding-content indicator 01. For the calculation of the MAC, data objects in the APDU shall be padded according to [ISO 7816-4]. U.K.

Note: Padding for Secure Messaging is always performed by the secure messaging layer, not by the CMAC or CBC algorithms. U.K.

Summary and Examples U.K.

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):

Case 1

:

CLA INS P1 P2 || Lc' || DO 8E || Le

Case 2

:

CLA INS P1 P2 || Lc' || DO 97 || DO 8E || Le

Case 3 (even INS byte)

:

CLA INS P1 P2 || Lc' || DO 81 || DO 8E || Le

Case 3 (odd INS byte)

:

CLA INS P1 P2 || Lc' || DO B3 || DO 8E || Le

Case 4 (even INS byte)

:

CLA INS P1 P2 || Lc' || DO 81 || DO 97 || DO 8E || Le

Case 4 (odd INS byte)

:

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:

Case 1 or 3

:

DO 99 || DO 8E || SW1SW2

Case 2 or 4 (even INS byte) without encryption

:

DO 81 || DO 99 || DO 8E || SW1SW2

Case 2 or 4 (even INS byte) with encryption

:

DO 87 || DO 99 || DO 8E || SW1SW2

Case 2 or 4 (odd INS byte) without encryption

:

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.

Figure 8

Transformation of an authenticated Case 4 Command APDU

Figure 9

Transformation of an authenticated Case 1 / Case 3 Response APDU

Figure 10 Transformation of an encrypted and authenticated Case 2/Case 4 Response APDU U.K.

]

Back to top

Options/Help

Print Options

You have chosen to open the Whole Regulation

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?

You have chosen to open Schedules only

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?

Close

Legislation is available in different versions:

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.

Close

See additional information alongside the content

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.

Close

Opening Options

Different options to open legislation in order to view more content on screen at once

Close

More Resources

Access essential accompanying documents and information for this legislation item from this tab. Dependent on the legislation item being viewed this may include:

  • the original print PDF of the as adopted version that was used for the EU Official Journal
  • lists of changes made by and/or affecting this legislation item
  • all formats of all associated documents
  • correction slips
  • links to related legislation and further information resources
Close

Timeline of Changes

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.

Close

More Resources

Use this menu to access essential accompanying documents and information for this legislation item. Dependent on the legislation item being viewed this may include:

  • the original print PDF of the as adopted version that was used for the print copy
  • correction slips

Click 'View More' or select 'More Resources' tab for additional information including:

  • lists of changes made by and/or affecting this legislation item
  • confers power and blanket amendment details
  • all formats of all associated documents
  • links to related legislation and further information resources