mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Rename constant-time functions to have mbedtls_ct prefix
Rename functions to better suite with the module name. Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
@ -1492,7 +1492,7 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
|
||||
if( ret != 0 )
|
||||
goto cleanup;
|
||||
|
||||
ret = mbedtls_cf_rsaes_pkcs1_v15_unpadding( buf, ilen,
|
||||
ret = mbedtls_ct_rsaes_pkcs1_v15_unpadding( buf, ilen,
|
||||
output, output_max_len, olen );
|
||||
|
||||
cleanup:
|
||||
@ -1887,7 +1887,7 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
|
||||
MBEDTLS_MPI_CHK( mbedtls_rsa_private( ctx, f_rng, p_rng, sig, sig_try ) );
|
||||
MBEDTLS_MPI_CHK( mbedtls_rsa_public( ctx, sig_try, verif ) );
|
||||
|
||||
if( mbedtls_cf_memcmp( verif, sig, ctx->len ) != 0 )
|
||||
if( mbedtls_ct_memcmp( verif, sig, ctx->len ) != 0 )
|
||||
{
|
||||
ret = MBEDTLS_ERR_RSA_PRIVATE_FAILED;
|
||||
goto cleanup;
|
||||
@ -2159,7 +2159,7 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
|
||||
* Compare
|
||||
*/
|
||||
|
||||
if( ( ret = mbedtls_cf_memcmp( encoded, encoded_expected,
|
||||
if( ( ret = mbedtls_ct_memcmp( encoded, encoded_expected,
|
||||
sig_len ) ) != 0 )
|
||||
{
|
||||
ret = MBEDTLS_ERR_RSA_VERIFY_FAILED;
|
||||
|
Reference in New Issue
Block a user