From 6cee26db16bffee669dd1d748870045eb4d9321b Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Wed, 17 May 2023 12:16:29 +0100 Subject: [PATCH] Remove old interface for mem_move_to_left Signed-off-by: Dave Rodgman --- library/constant_time.c | 2 +- library/constant_time_internal.h | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/library/constant_time.c b/library/constant_time.c index af385cd59..32c0e5a20 100644 --- a/library/constant_time.c +++ b/library/constant_time.c @@ -327,7 +327,7 @@ void mbedtls_ct_mpi_uint_cond_assign(size_t n, #if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_RSA_ALT) -void mbedtls_ct_mem_move_to_left(void *start, +void mbedtls_ct_memmove_left(void *start, size_t total, size_t offset) { diff --git a/library/constant_time_internal.h b/library/constant_time_internal.h index d1e3755d2..5e0d9c45f 100644 --- a/library/constant_time_internal.h +++ b/library/constant_time_internal.h @@ -236,26 +236,6 @@ void mbedtls_ct_memcpy_offset(unsigned char *dest, */ unsigned mbedtls_ct_size_gt(size_t x, size_t y); -/** Shift some data towards the left inside a buffer. - * - * `mbedtls_ct_mem_move_to_left(start, total, offset)` is functionally - * equivalent to - * ``` - * memmove(start, start + offset, total - offset); - * memset(start + offset, 0, total - offset); - * ``` - * but it strives to use a memory access pattern (and thus total timing) - * that does not depend on \p offset. This timing independence comes at - * the expense of performance. - * - * \param start Pointer to the start of the buffer. - * \param total Total size of the buffer. - * \param offset Offset from which to copy \p total - \p offset bytes. - */ -void mbedtls_ct_mem_move_to_left(void *start, - size_t total, - size_t offset); - #endif /* defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_RSA_ALT) */