1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +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:
Gabor Mezei
2021-10-20 11:59:27 +02:00
parent f127a0e2b1
commit 18a44949d0
13 changed files with 91 additions and 91 deletions

View File

@@ -1518,7 +1518,7 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
if( ret != 0 )
goto cleanup;
ret = mbedtls_cf_rsaes_pkcs1_v15_unpadding( mode, buf, ilen,
ret = mbedtls_ct_rsaes_pkcs1_v15_unpadding( mode, buf, ilen,
output, output_max_len, olen );
cleanup:
@@ -1933,7 +1933,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;
@@ -2231,7 +2231,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;