xmlns:atom="http://www.w3.org/2005/Atom" xmlns:atom="http://www.w3.org/2005/Atom"

[F1 [F2ANNEX I B U.K. REQUIREMENTS FOR CONSTRUCTION, TESTING, INSTALLATION AND INSPECTION

Appendix 2 TACHOGRAPH CARDS SPECIFICATION

3. HARDWARE AND COMMUNICATION U.K.

3.6. Commands description U.K.
3.6.3. Update Binary 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 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.

[TCS_331] The command can be performed only if the security status satisfies the security attributes defined for the EF for the UPDATE function (If the access control of the UPDATE function includes PRO SM, a secure messaging must be added in the command).

3.6.3.1. Command without secure messaging U.K.

This command enables the IFD to write data into the EF currently selected, without the card verifying the integrity of data received. This plain mode is allowed only if the related file is not marked as Encrypted .

[TCS_332] Command Message
Byte Length Value Description
CLA 1 ′00h′ No secure messaging asked
INS 1 ′D6h′
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.

[TCS_333] Response Message
Byte Length Value Description
SW 2 ′XXXXh′ Status words (SW1, SW2)
3.6.3.2. Command with secure messaging U.K.

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.

[TCS_334] Command Message
Byte Length Value Description
CLA 1 ′0Ch′ Secure messaging. Asked
INS 1 ′D6h′ INS
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′ T PV : tag for plain value data
#7 L ′NNh′ or ′81 NNh′

L PV : length of transmitted data

L is 2 bytes if L PV > 127 bytes

#(7+L)-#(6+L+NN) NN ′XX..XXh′ Plain data value (data to be written)
#(7+L+NN) 1 ′8Eh′ T CC : tag for cryptographic checksum
#(8+L+NN) 1 ′04h′ L CC : Length of following cryptographic checksum
#(9+L+NN)-#(12+L+NN) 4 ′XX..XXh′ Cryptographic checksum (4 most significant bytes)
Le 1 ′00h′ As specified in ISO/IEC 7816-4
[TCS_335] Response message if correct Secure Messaging input format
Byte Length Value Description
#1 1 ′99h′ T SW : tag for status words (to be protected by CC)
#2 1 ′02h′ L SW : length of returned status words
#3-#4 2 ′XXXXh′ Status words (SW1, SW2)
#5 1 ′8Eh′ T CC : tag for cryptographic checksum
#6 1 ′04h′ L CC : Length of following cryptographic checksum
#7-#10 4 ′XX..XXh′ Cryptographic checksum (4 most significant bytes)
SW 2 ′XXXXh′ Status words (SW1, SW2)

The regular processing states, described for the UPDATE BINARY command with no secure messaging (see point 3.6.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:

[TCS_336] Response Message if error in secure messaging
Byte Length Value Description
SW 2 ′XXXXh′ Status Words (SW1, SW2)