All pages
Powered by GitBook
1 of 1

Loading...

0xEF09 - Encrypt User Data

The host uses this command to request that the device encrypt a block of user data embedded in the command string. The SRED ID 2 Key will be used for encryption. The TLVs of KSN and Encryption Type will be provided at the end of the string for decryption.

1

Host request and device processing

The sequence of events is as follows:

  • The host composes a command request in the format below and sends it to the device.

  • The device will fetch the Real-Time Clock Date/Timestamp, retrieve the device's Serial Number, extract the data within 0xA3 TLV in the command string. And then concatenate all the collected TLVs as follows: + + <User Data TLV(s)>. The format of the encrypted data string is shown in the Response Data below.

  • If the command is invalid or encryption fails, then a response of failure will be sent to the host.

Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default
Tag
Len
Value / Description
Typ
Req
Default

EF09 = Encrypt User Data - Command 0xEF09

A3

var

User data parameters for item #0 to item #3. The maximum total size of 0xA3 TLV is 4,000 bytes.

B

R

/81

var

User data item #0, required, minimum 1 byte.

B

R

/82

var

User data item #1, optional

B

O

/83

var

User data item #2, optional

B

O

/84

var

User data Item #3, optional

B

O

End of any wrappers, at minimum including Request Message

EF09 = Encrypt User Data - Command 0xEF09

F8

var

Container for Encrypted Data

T

R

/DFDF59

var

Encrypted Data Primitive ( length includes padding) Decrypt the value of this TLV data object using the algorithm and variant specified in the Encrypted Data KSN parameter and the Encryption Type parameter below to read its contents.

B

R

/DFDF56

var

Encrypted Data KSN

B

R

/DFDF57

01

Encrypted Data Encryption Type See Encryption Type for a list of valid values.

B

R

End of any wrappers, at minimum including Response Message

EF09 = Encrypt User Data - Command 0xEF09

F8

var

Container for Encrypted Data

T

R

/DFDF59

var

Encrypted Data Primitive, length includes padding

T

R

//FC

var

Decrypted Data Container, length excludes padding

T

R

///81

04

Real Time Clock, Epoch Time in seconds, unsigned 32 bits. The date and time shall be Universal Time Coordinated (UTC).

B

R

///82

04

Device Serial Number

B

R

///A3

var

User data parameters for item #0 to item #3. The maximum total size of 0xA3 TLV is 4,000 bytes.

B

R

////81

var

User data item #0, required, minimum 1 byte

B

R

////82

var

User data item #1, optional

B

O

////83

var

User data item #2, optional

B

O

////84

var

User data item #3, optional

B

O

PKCS7 padding, maximum 16 bytes, minimum 1 byte

/DFDF56

var

Encrypted Data KSN

B

R

/DFDF57

01

Encrypted Data Encryption Type See section 4.4 Encryption Type for a list of valid values.

B

R

End of any wrappers, at minimum including Response Message

Beginning of any wrappers, at minimum including Request Message

Beginning of any wrappers, at minimum including Response Message

Beginning of any wrappers, at minimum including Response Message

Request Data for Command 0xEF09 - Encrypt User Data

Response Data for Command 0xEF09 – Encrypt User Data

Response Data for Encrypt User Data (after decryption) - Command 0xEF09

Request Example - Command 0xEF09

Response Example - Command 0xEF09

Example (hex)
AA-00 81-04-01-03-EF-09 // P1, Message Info, 0xEF09 Command
84-3E-EF-09 // P4, Request Payload
A3-3A // User data parameters, total 58 bytes
81-20 // User data item #0, 32 bytes
00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F
10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F
82-06 // User data item #1, 6 bytes
00-01-02-03-04-05
83-06 // User data item #2, 6 bytes
06-07-08-09-0A-0B
84-06 // User data item #3, 6 bytes
0C-0D-0E-0F-10-11
Example (hex)
AA-00
81-04-82-03-EF-09 // P1, Message Info, 0xEF09 Response
82-04-00-00-00-00 // P2, Response Status
84-82-00-6F-EF-09 // P4, Response payload
F8-82-00-69 // Encrypted Data Container
DF-DF-59-82-00-50 // Encrypted Data Primitive
31-4D-0E-4B-52-EB-96-33-FD-D4-D6-9D-C9-D8-12-56
2C-09-CF-2A-E6-09-34-F9-55-AF-57-42-EB-AE-F4-B3
7B-2D-94-DF-E5-35-6F-4F-9D-36-5F-D1-F7-9F-40-F2
B6-1D-B6-97-C8-0E-2F-E2-1B-04-62-E8-3D-0A-EF-87
77-06-F6-07-0F-8C-9C-0A-51-76-E8-D3-78-05-AF-13
DF-DF-56-0A // Encryption KSN
FF-FF-98-76-54-32-10-20-00-02
DF-DF-57-01 // Encryption Type