cancel
Showing results for 
Search instead for 
Did you mean: 

ECDSA Signature Failure

rrooyen
Associate III

Reference: STM32CubeExpansion_Crypto_V4..1.0, MCU: STM32G474RE

The cmox_ecdsa_verify(...) function is failing with a fault code of 0x6c706, which is not contained within cmox_ecc_retvals.h header file. All arguments to the cmox_ecdsa_verify(...) function have been verified and the generated signature has been verified on the development platform. Perhaps the fault code definition in the source code (not available) will provide some insight into the problem? Are there any additional steps I can take to debug this issue?

2 REPLIES 2
Jocelyn RICARD
ST Employee

Hello @rrooyen ,

This looks strange. Your return code is very close to the success error (1 bit difference)

#define CMOX_ECC_AUTH_SUCCESS ((cmox_ecc_retval_t)0x0006C726)

Did you start from example provided in the package ?

STM32CubeExpansion_Crypto_V4.1.0\Projects\NUCLEO-G474RE\Applications\ECC\ECDSA_SignVerify\

Best regards

Jocelyn

CMYL
ST Employee

hello @rrooyen 

In cmox_ecdsa.h file line 258 there is a note that mention the following:

" P_pFaultCheck code MUST be checked only if the main result is successful, and has no relevance if the main result is not successful. "

Also, according to the provided example, be sure that you pass K-1 to cmox_ecdsa_sign API, not the random K parameter of your initial test vector. 

 

Best regards,

Younes