0xF017 - Establish Ephemeral KBPK
The host uses this command to complete the ECDHE-ECDSA Key Exchange protocol, which enables the host and the device to generate the same TEMP KBPK key to use with Command 0xEF01 - Load Key Using TR-31 to load the Master Transport Key (MTK).
The sequence of events is as follows:
The host uses Get Challenge - Command 0xE001 to establish a secure session with the device.
The host constructs Establish Ephemeral KBPK - Command 0xF017 per the request table below.
The host constructs Command 0xEEEE - Send Secured Command to Device using the previously constructed command request as the payload, and sends that command request to the device as a Request Message.
Because this command is secured using a signature, read Key Type - Property 2.1.2.2.2.6 to determine which fixed key to use to generate the signature.
Build the Security Parameters Type portion of the wrapper with:
The device does the following:
Validates the secure wrapper around the command, and terminates if the signature is invalid.
Determines if the Master Transport Key (MTK) has already been loaded. If it has, the device rejects the command request.
The device sends a Response Message to the host to indicate the result. The response message includes Device Random Token and Device Public Key.
The host calculates a matching TEMP KBPK as defined in NIST SP800-56A, using the Host Private Key, Host Random Token, Device Public Key, and Device Random Token. It can then use this key to perform encryption operations on secret data in the Master Transport Key (MTK).
The device uses its copy of the matching TEMP KBPK to decrypt the secret information encrypted by the host using the same key. On successful MTK load, the device erases the TEMP KBPK. It also erases the TEMP KBPK if the device is power cycled or reset, and the host would need to restart the process with a new TEMP KBPK.