aes: Use length instead of bits_length in XTS
mbedtls_aes_crypt_xts() currently takes a `bits_length` parameter, unlike
the other block modes. Change the parameter to accept a bytes length
instead, as the `bits_length` parameter is not actually ever used in the
current implementation.
diff --git a/library/aes.c b/library/aes.c
index ed260a9..2dc600c 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -1130,7 +1130,7 @@
*/
int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
int mode,
- size_t bits_length,
+ size_t length,
const unsigned char iv[16],
const unsigned char *input,
unsigned char *output )
@@ -1147,7 +1147,6 @@
union xts_buf128 *inbuf;
union xts_buf128 *outbuf;
- size_t length = bits_length / 8;
size_t nblk = length / 16;
size_t remn = length % 16;