I encounters some memory leak issues with the implementation of ecdsa digital signature with the mbedtls pk.
Mbedtls is implemented on ARM processor and use static memory (Using the mbed TLS Buffer Allocator). The version is mbedtls-2.16.1-apache.
The firmware implements other crypto functions without memory problem.
The problem is in this part of code:
mbedtls_pk_parse_public_key (…) //EC key in DER Curve secp224r1
While the code operates well, around 1,7 KB of memory are not freeing at the end of the sequence.
Current investigation shows that the memory leak in ecdsa_verify_restartable around
MBEDTLS_MPI_CHK( mbedtls_ecp_muladd_restartable( grp,&R, pu1, &grp->G, pu2, Q, ECDSA_RS_ECP ) );
Any idea what to do?
Thanks for your help