From 069e7f462a426795301aaaa79e811721427447df Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Thu, 24 Nov 2022 19:37:26 +0000 Subject: [PATCH] Correct mixed up comments Signed-off-by: Dave Rodgman --- library/aes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/aes.c b/library/aes.c index 4f7c888599..6e1bcd2be8 100644 --- a/library/aes.c +++ b/library/aes.c @@ -1140,14 +1140,14 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx, size_t i; unsigned char *prev_output = output - 16; - /* Copy the remainder of the input for this final round. */ + /* Copy ciphertext bytes from the previous block to our output for each + * byte of ciphertext we won't steal. */ for( i = 0; i < leftover; i++ ) { output[i] = prev_output[i]; } - /* Copy ciphertext bytes from the previous block to our output for each - * byte of ciphertext we won't steal. */ + /* Copy the remainder of the input for this final round. */ mbedtls_xor( tmp, input, t, leftover ); /* Copy ciphertext bytes from the previous block for input in this