mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
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.
This commit is contained in:
parent
9366feb504
commit
5162b932a2
3 changed files with 7 additions and 6 deletions
|
|
@ -1130,7 +1130,7 @@ static void mbedtls_gf128mul_x_ble( unsigned char r[16],
|
|||
*/
|
||||
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 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
|
|||
union xts_buf128 *inbuf;
|
||||
union xts_buf128 *outbuf;
|
||||
|
||||
size_t length = bits_length / 8;
|
||||
size_t nblk = length / 16;
|
||||
size_t remn = length % 16;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue