Swap out CRC calculation in AES in favour of a simple hash
XOR the key bytes upon setting and re-check hash during each use.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
diff --git a/include/mbedtls/aes.h b/include/mbedtls/aes.h
index 5fb020f..b410b5a 100644
--- a/include/mbedtls/aes.h
+++ b/include/mbedtls/aes.h
@@ -91,7 +91,7 @@
uint32_t frk[8]; /*!< Fake AES round keys. */
#endif
#if defined(MBEDTLS_VALIDATE_AES_KEYS_INTEGRITY)
- uint16_t crc; /*!< CRC-16 of the set key */
+ uint32_t hash; /*!< hash of the set key */
#endif
#if defined(MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH) && !defined(MBEDTLS_PADLOCK_C)
uint32_t buf[44]; /*!< Unaligned data buffer */