summaryrefslogtreecommitdiffstats
path: root/thirdparty/mbedtls/library/aes.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-04-08 15:03:09 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-04-08 15:03:09 +0200
commitd3e8b6c6b8a366d7cd98fe3b999e450105f9290a (patch)
tree8f3396cb39dad90fee02ee647418d801489f26f1 /thirdparty/mbedtls/library/aes.c
parent0e50807c55d4cb24a796e7ec2901cb78698e288b (diff)
parent915ca4dd456f959e4d4fd4e385715f3f0d48e77d (diff)
downloadredot-engine-d3e8b6c6b8a366d7cd98fe3b999e450105f9290a.tar.gz
Merge pull request #90209 from akien-mga/mbedtls-2.28.8
mbedtls: Update to upstream version 2.28.8
Diffstat (limited to 'thirdparty/mbedtls/library/aes.c')
-rw-r--r--thirdparty/mbedtls/library/aes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/thirdparty/mbedtls/library/aes.c b/thirdparty/mbedtls/library/aes.c
index 24d7ab92fb..836367cea7 100644
--- a/thirdparty/mbedtls/library/aes.c
+++ b/thirdparty/mbedtls/library/aes.c
@@ -322,7 +322,7 @@ static const uint32_t RT3[256] = { RT };
/*
* Round constants
*/
-static const uint32_t RCON[10] =
+static const uint32_t round_constants[10] =
{
0x00000001, 0x00000002, 0x00000004, 0x00000008,
0x00000010, 0x00000020, 0x00000040, 0x00000080,
@@ -369,7 +369,7 @@ static uint32_t RT3[256];
/*
* Round constants
*/
-static uint32_t RCON[10];
+static uint32_t round_constants[10];
/*
* Tables generation code
@@ -399,7 +399,7 @@ static void aes_gen_tables(void)
* calculate the round constants
*/
for (i = 0, x = 1; i < 10; i++) {
- RCON[i] = (uint32_t) x;
+ round_constants[i] = (uint32_t) x;
x = MBEDTLS_BYTE_0(XTIME(x));
}
@@ -625,7 +625,7 @@ int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key,
case 10:
for (i = 0; i < 10; i++, RK += 4) {
- RK[4] = RK[0] ^ RCON[i] ^
+ RK[4] = RK[0] ^ round_constants[i] ^
((uint32_t) FSb[MBEDTLS_BYTE_1(RK[3])]) ^
((uint32_t) FSb[MBEDTLS_BYTE_2(RK[3])] << 8) ^
((uint32_t) FSb[MBEDTLS_BYTE_3(RK[3])] << 16) ^
@@ -640,7 +640,7 @@ int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key,
case 12:
for (i = 0; i < 8; i++, RK += 6) {
- RK[6] = RK[0] ^ RCON[i] ^
+ RK[6] = RK[0] ^ round_constants[i] ^
((uint32_t) FSb[MBEDTLS_BYTE_1(RK[5])]) ^
((uint32_t) FSb[MBEDTLS_BYTE_2(RK[5])] << 8) ^
((uint32_t) FSb[MBEDTLS_BYTE_3(RK[5])] << 16) ^
@@ -657,7 +657,7 @@ int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key,
case 14:
for (i = 0; i < 7; i++, RK += 8) {
- RK[8] = RK[0] ^ RCON[i] ^
+ RK[8] = RK[0] ^ round_constants[i] ^
((uint32_t) FSb[MBEDTLS_BYTE_1(RK[7])]) ^
((uint32_t) FSb[MBEDTLS_BYTE_2(RK[7])] << 8) ^
((uint32_t) FSb[MBEDTLS_BYTE_3(RK[7])] << 16) ^