From 8381fcb3f9fcab6206556d1410b06246f3de8117 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 11 Oct 2018 12:06:15 +0100 Subject: [PATCH 1/2] aes: xts: Update inaccurate comments It is inaccurate to call a data unit a "sector". A disk sector is a common use case for the data unit, but there exist other types of data units that are not sectors. --- library/aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/aes.c b/library/aes.c index 5c939bba4..ef4b8f9aa 100644 --- a/library/aes.c +++ b/library/aes.c @@ -1142,7 +1142,7 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx, unsigned char prev_tweak[16]; unsigned char tmp[16]; - /* Sectors must be at least 16 bytes. */ + /* Data units must be at least 16 bytes long. */ if( length < 16 ) return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH; From a74faba27a4a490e06d4de48dc606e4f339f41b2 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 11 Oct 2018 12:07:43 +0100 Subject: [PATCH 2/2] aes: xts: Correct NIST 80-38E to 800-38E Correct a typo in an AES XTS implementation comment where the relevant NIST standard was incorrectly referred to as NIST 80-38E instead of NIST 800-38E. --- library/aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/aes.c b/library/aes.c index ef4b8f9aa..fce32ce84 100644 --- a/library/aes.c +++ b/library/aes.c @@ -1146,7 +1146,7 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx, if( length < 16 ) 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 ) return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;