aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/aes/src/c/aes192.c
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-07-20 21:32:29 +0200
committerEgor Tensin <egor@tensin.name>2026-07-20 21:32:29 +0200
commitf2c9b2934b9be0f93105c411f5dbea564800fc3f (patch)
tree1fd5b3d68904e44768273ee52598acd09dc04b14 /aes/src/c/aes192.c
parentget rid of outdated __inline (diff)
downloadaes-tools-f2c9b2934b9be0f93105c411f5dbea564800fc3f.tar.gz
aes-tools-f2c9b2934b9be0f93105c411f5dbea564800fc3f.zip
remove a few levels of stupid indirection
Diffstat (limited to 'aes/src/c/aes192.c')
-rw-r--r--aes/src/c/aes192.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/aes/src/c/aes192.c b/aes/src/c/aes192.c
index 901b548..d257df7 100644
--- a/aes/src/c/aes192.c
+++ b/aes/src/c/aes192.c
@@ -10,9 +10,9 @@
#include <emmintrin.h>
#include <wmmintrin.h>
-AES_AES_Block __fastcall aes_AES192_encrypt_block_(
- AES_AES_Block plaintext,
- const AES_AES192_RoundKeys* encryption_keys
+AES_Block __fastcall aes192_encrypt_block_(
+ AES_Block plaintext,
+ const AES192_RoundKeys* encryption_keys
) {
plaintext = _mm_xor_si128(plaintext, encryption_keys->keys[0]);
plaintext = _mm_aesenc_si128(plaintext, encryption_keys->keys[1]);
@@ -29,9 +29,9 @@ AES_AES_Block __fastcall aes_AES192_encrypt_block_(
return _mm_aesenclast_si128(plaintext, encryption_keys->keys[12]);
}
-AES_AES_Block __fastcall aes_AES192_decrypt_block_(
- AES_AES_Block ciphertext,
- const AES_AES192_RoundKeys* decryption_keys
+AES_Block __fastcall aes192_decrypt_block_(
+ AES_Block ciphertext,
+ const AES192_RoundKeys* decryption_keys
) {
ciphertext = _mm_xor_si128(ciphertext, decryption_keys->keys[0]);
ciphertext = _mm_aesdec_si128(ciphertext, decryption_keys->keys[1]);
@@ -49,11 +49,11 @@ AES_AES_Block __fastcall aes_AES192_decrypt_block_(
}
static void __fastcall aes_aes192_expand_key_assist(
- AES_AES_Block* prev_lo,
- AES_AES_Block* prev_hi,
- AES_AES_Block hwgen
+ AES_Block* prev_lo,
+ AES_Block* prev_hi,
+ AES_Block hwgen
) {
- AES_AES_Block tmp = *prev_lo;
+ AES_Block tmp = *prev_lo;
tmp = _mm_slli_si128(tmp, 4);
*prev_lo = _mm_xor_si128(*prev_lo, tmp);
@@ -73,10 +73,10 @@ static void __fastcall aes_aes192_expand_key_assist(
*prev_hi = _mm_xor_si128(*prev_hi, tmp);
}
-void __fastcall aes_AES192_expand_key_(
- AES_AES_Block key_lo,
- AES_AES_Block key_hi,
- AES_AES192_RoundKeys* encryption_keys
+void __fastcall aes192_expand_key_(
+ AES_Block key_lo,
+ AES_Block key_hi,
+ AES192_RoundKeys* encryption_keys
) {
encryption_keys->keys[0] = key_lo;
encryption_keys->keys[1] = key_hi;
@@ -125,9 +125,9 @@ void __fastcall aes_AES192_expand_key_(
encryption_keys->keys[12] = key_lo;
}
-void __fastcall aes_AES192_derive_decryption_keys_(
- const AES_AES192_RoundKeys* encryption_keys,
- AES_AES192_RoundKeys* decryption_keys
+void __fastcall aes192_derive_decryption_keys_(
+ const AES192_RoundKeys* encryption_keys,
+ AES192_RoundKeys* decryption_keys
) {
decryption_keys->keys[0] = encryption_keys->keys[12];
decryption_keys->keys[1] = _mm_aesimc_si128(encryption_keys->keys[11]);