mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-30 17:41:11 +03:00
Merge remote-tracking branch 'public/pr/2085' into development-restricted-proposed
This commit is contained in:
@@ -1142,11 +1142,11 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
|
|||||||
unsigned char prev_tweak[16];
|
unsigned char prev_tweak[16];
|
||||||
unsigned char tmp[16];
|
unsigned char tmp[16];
|
||||||
|
|
||||||
/* Sectors must be at least 16 bytes. */
|
/* Data units must be at least 16 bytes long. */
|
||||||
if( length < 16 )
|
if( length < 16 )
|
||||||
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
|
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
|
||||||
|
|
||||||
/* NIST SP 80-38E disallows data units larger than 2**20 blocks. */
|
/* NIST SP 800-38E disallows data units larger than 2**20 blocks. */
|
||||||
if( length > ( 1 << 20 ) * 16 )
|
if( length > ( 1 << 20 ) * 16 )
|
||||||
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
|
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user