cancel
Showing results for 
Search instead for 
Did you mean: 

Please, where can I find a "key_pair_generation" example code for the Discovery Kit B-L4S5_IOT01A? (STSAFE)

CMura.2
Associate II

I tried porting the example code has been done for the Nucleo board to the B-L4S5_IOT01A but I get STSAFEA_COMMUNICATION_ERROR as result. SEE BELOW

Key pair generation demonstration:

 

 1. Generate key pair through STSAFE-A's private key slot 1

 

 => Use StSafeA_GenerateKeyPair API

 

 StatusCode = STSAFEA_INVALID_PARAMETER 48.

 

 /* Check null pointers */

 

 IS_STSAFEA_HANDLER_VALID_PTR(pStSafeA) 1.

 

 IS_STSAFEA_CONDITIONAL_LVBUFFER_VALID_PTR(pOutPubX) 1.

 

 IS_STSAFEA_CONDITIONAL_LVBUFFER_VALID_PTR(pOutPubY) 1.

 

 pOutPointReprensentationId 48.

 

 /* Check parameters */

 

 **Inside StSafeA_TransmitCommand **

 

 StatusCode StSafeA_TransmitCommand 0.

 

 **Inside StSafeA_Transmit **

 

 StatusCode StSafeA_Transmit 0.

 

 **Inside StSafeA_TransmitCommand **

 

 StatusCode StSafeA_TransmitCommand 0.

 

 **Inside StSafeA_Transmit **

 

 StatusCode StSafeA_Transmit 0.

 

 /* Transmit */

 

 StatusCode = STSAFEA_INVALID_PARAMETER 0.

 

 /* after StSafeA_ReceiveResponse */

 

 StatusCode StSafeA_ReceiveResponse 1.

 

 StatusCode StSafeA_GenerateKeyPair 1.

 

 2. Signature verification result (0 means success): 1

 

**key_pair_generation(&stsafea_handle) != 0 **

 

STSAFEA_COMMUNICATION_ERROR

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @CMura.2​ and welcome to the STM32 Community =)

You can download the software package for STSAFE-A from ST website: X-CUBE-SAFEA1.

When your question is answered, please close this topic by choosing "Select as Best". This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

1 REPLY 1
Imen.D
ST Employee

Hello @CMura.2​ and welcome to the STM32 Community =)

You can download the software package for STSAFE-A from ST website: X-CUBE-SAFEA1.

When your question is answered, please close this topic by choosing "Select as Best". This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen