Hi @s_hdl
ECDSA verification consists of several arithmetic and elliptic-curve operations, so it does not map to a single CASPER primitive.
In the MCUXpresso SDK, the integration is already implemented in the CASPER PSA Crypto port. The casper_mbedtls_ecdsa_verify() function performs the standard ECDSA verification flow, including the calculation of u1 and u2. It then calls:
casper_mbedtls_ecp_muladd(grp, &R, u1, &grp->G, u2, Q);
to calculate:
R = u1 × G + u2 × Q
The ECP adaptation layer converts the mbedTLS MPI values and elliptic-curve points into the format required by CASPER and maps this operation to CASPER_ECC_SECP256R1_MulAdd().
Similarly, casper_mbedtls_ecp_mul() maps a single scalar multiplication to CASPER_ECC_SECP256R1_Mul().
Therefore, rather than modifying mbedtls_ecdsa_verify() directly, we recommend reusing the complete CASPER integration provided by the SDK under:
component/psa_crypto_driver/casper_driver
In particular, please refer to:
mcux_psa_casper_ecdsa_port.c
mcux_psa_casper_ecp_port.c
Since you built mbedTLS separately, please also make sure that your mbedTLS version is compatible with the MCUXpresso SDK CASPER port.
You can refer to the lpcxpresso55s06_psa_crypto_examples.
Harry_Zhang_0-1788493275769.png
BR
Harry