aes: xts: Rename iv to data_unit
XTS doesn't have an IV, it has a "Data Unit". Rename iv for parity with the
XTS standard.
diff --git a/library/aes.c b/library/aes.c
index 80447b7..a2d1b6d 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -1131,7 +1131,7 @@
int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
int mode,
size_t length,
- const unsigned char iv[16],
+ const unsigned char data_unit[16],
const unsigned char *input,
unsigned char *output )
{
@@ -1151,7 +1151,8 @@
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
/* Compute the tweak. */
- ret = mbedtls_aes_crypt_ecb( &ctx->tweak, MBEDTLS_AES_ENCRYPT, iv, tweak );
+ ret = mbedtls_aes_crypt_ecb( &ctx->tweak, MBEDTLS_AES_ENCRYPT,
+ data_unit, tweak );
if( ret != 0 )
return( ret );