mbedtls_ct_mem_move_to_left() function
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.
Syntax
static void mbedtls_ct_mem_move_to_left(void *start,
size_t total,
size_t offset);
Arguments
start
Pointer to the start of the buffer.
total
Total size of the buffer.
offset
Offset from which to copy \p total - \p offset bytes.