PN7642 mbedtls_demo – Crash on APP_ECDSA() (mbedtls_ecdsa_sign)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7642 mbedtls_demo – Crash on APP_ECDSA() (mbedtls_ecdsa_sign)

872 Views
pberveiller
Contributor II

Hello,

I'm encountering an issue with the mbedtls_demo project. The program crashes when calling the APP_ECDSA() function, specifically during the mbedtls_ecdsa_sign call.

I am not using the key store, and I'm calling APP_InitMbedCrypto() at the begin (cf FAQ AN13936)

All other functions in the demo are working perfectly.

Do you have any idea what could be causing this?

Best regards,

0 Kudos
Reply
4 Replies

784 Views
pberveiller
Contributor II

Hello, thank you for you reply.  

I just want to run the example from the PN7642 SDK.

In second time, I will use the keystore .

I share you the init function.

pberveiller_0-1746774911786.png

 

0 Kudos
Reply

831 Views
jimmychan
NXP TechSupport
NXP TechSupport

What key you are using for ECDSA signing?

0 Kudos
Reply

822 Views
pberveiller
Contributor II

Hello, I user the demo project included in the SDK of PN7642.

The program crashes  for all keys: 

static const struct

{

mbedtls_ecp_group_id id;

const char *name;

uint16_t keySize;

} ecpInfo[] = {

{

MBEDTLS_ECP_DP_SECP256R1,

"SECP256R1",

256 / 8,

},

{

MBEDTLS_ECP_DP_SECP384R1,

"SECP384R1",

384 / 8,

},

{

MBEDTLS_ECP_DP_BP256R1,

"BP256R1",

256 / 8,

},

{

MBEDTLS_ECP_DP_BP384R1,

"BP384R1",

384 / 8,

}

};

 

Regards.

Tags (2)
0 Kudos
Reply

788 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please try the key store first.  If you want to use cryptographic operations with the key store you have to initialize it first. Please have a look at PN76_Sys_KeyStore_Init in our mbedTls demo application.

0 Kudos
Reply