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