Request for STSAFE-A110 and X-CUBE-STSE01 Host Session Example (host session provisioning use cases)
-
I am integrating the STSAFE-A110 as a secure element with the STM32H523 as the host MCU. I am using the latest version of the X-CUBE-STSE01 middleware and want to establish and use a secure channel between the secure element and the host.
-
Using the Host Key Provisioning example provided in X-CUBE-STSE01, I provisioned the Host MAC and Host Cipher keys into the secure element.
-
I want to store 12 bytes of data in data partition index 2 during provisioning and read the data back during runtime in the host environment.
-
Currently, I can successfully store and read the data using the following APIs with
STSE_NO_PROT:
stse_data_storage_update_data_zone()
stse_data_storage_read_data_zone()
-
However, I want to perform these operations using
STSE_HOST_C_MAC_R_MAC, as this is the Host Session protection mode supported by X-CUBE-STSE01. -
On one board, I receive the
STSE_INVALID_C_MACerror. I provisioned the keys on another board, but on that board, I receive theSTSE_KEY_BLOCKEDerror. -
Before performing the read/write operations, I execute the following initialization functions:
SAFEA1_Init()
stse_set_default_handler_value()
stse_init()
I also open the Host Session using:
stsafea_open_host_session()
- During Host Key provisioning, the example calls:
stsafea_put_attribute_host_key()
During the protected read/write operation, the execution flow is:
stsafea_read_data_zone()
-> stsafea_frame_transfer()
-> stsafea_session_authenticated_transfer()
-> stsafea_frame_raw_transfer()
-> stsafea_frame_receive()
The stsafea_frame_receive() function returns STSE_INVALID_C_MAC.
-
Please confirm whether my current approach to secure-channel establishment and protected data-zone access is correct.
-
Please provide an example demonstrating how to use the Host Session with
STSE_HOST_C_MAC_R_MAC, including how the Host MAC key and Host Cipher key should be used during runtime. -
Any reference example demonstrating protected data-zone read and write operations in the host environment would be highly appreciated.
