diff options
| author | Egor Tensin <egor@tensin.name> | 2026-07-22 18:31:50 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-07-22 21:07:53 +0200 |
| commit | 4720b5ac21163936fb47f524037a6f12ce6e6ce2 (patch) | |
| tree | 7b1f3f7f0e4047134048bb9b9967498b6f8ead12 /aes/src/c | |
| parent | minor refactoring (diff) | |
| download | aes-tools-4720b5ac21163936fb47f524037a6f12ce6e6ce2.tar.gz aes-tools-4720b5ac21163936fb47f524037a6f12ce6e6ce2.zip | |
rewrite: the beginning
This a giant fuck-you to myself while I have nothing (actually, tons of
things) to do in a hospital.
* The giant screens of preprocessor code are gone, they always sucked,
fuck them.
* Switched everything to the "boxes" interface as the only one
remaining.
* Restuctured things in aes/ so that the files they're in make at least
a little bit of sense.
* Removed a bunch of cruft and prematurely generic code.
* This is half-baked at best: I just made sure that the tests pass. A
lot of cleanup awaits.
Diffstat (limited to 'aes/src/c')
| -rw-r--r-- | aes/src/c/aes128.c | 8 | ||||
| -rw-r--r-- | aes/src/c/aes192.c | 8 | ||||
| -rw-r--r-- | aes/src/c/aes256.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/aes/src/c/aes128.c b/aes/src/c/aes128.c index 909b208..115c55e 100644 --- a/aes/src/c/aes128.c +++ b/aes/src/c/aes128.c @@ -10,7 +10,7 @@ #include <emmintrin.h> #include <wmmintrin.h> -AES_Block __fastcall aes128_encrypt_block_( +AES_Block __fastcall aes128_encrypt_block_internal( AES_Block plaintext, const AES128_RoundKeys* encryption_keys ) { @@ -27,7 +27,7 @@ AES_Block __fastcall aes128_encrypt_block_( return _mm_aesenclast_si128(plaintext, encryption_keys->keys[10]); } -AES_Block __fastcall aes128_decrypt_block_( +AES_Block __fastcall aes128_decrypt_block_internal( AES_Block ciphertext, const AES128_RoundKeys* decryption_keys ) { @@ -60,7 +60,7 @@ static AES_Block __fastcall aes128_expand_key_assist(AES_Block prev, AES_Block h return prev; } -void __fastcall aes128_expand_key_(AES_Block key, AES128_RoundKeys* encryption_keys) { +void __fastcall aes128_expand_key_internal(AES_Block key, AES128_RoundKeys* encryption_keys) { AES_Block prev = encryption_keys->keys[0] = key; prev = encryption_keys->keys[1] = aes128_expand_key_assist(prev, _mm_aeskeygenassist_si128(prev, 0x01)); @@ -84,7 +84,7 @@ void __fastcall aes128_expand_key_(AES_Block key, AES128_RoundKeys* encryption_k aes128_expand_key_assist(prev, _mm_aeskeygenassist_si128(prev, 0x36)); } -void __fastcall aes128_derive_decryption_keys_( +void __fastcall aes128_derive_decryption_keys_internal( const AES128_RoundKeys* encryption_keys, AES128_RoundKeys* decryption_keys ) { diff --git a/aes/src/c/aes192.c b/aes/src/c/aes192.c index b5f1103..ba72107 100644 --- a/aes/src/c/aes192.c +++ b/aes/src/c/aes192.c @@ -10,7 +10,7 @@ #include <emmintrin.h> #include <wmmintrin.h> -AES_Block __fastcall aes192_encrypt_block_( +AES_Block __fastcall aes192_encrypt_block_internal( AES_Block plaintext, const AES192_RoundKeys* encryption_keys ) { @@ -29,7 +29,7 @@ AES_Block __fastcall aes192_encrypt_block_( return _mm_aesenclast_si128(plaintext, encryption_keys->keys[12]); } -AES_Block __fastcall aes192_decrypt_block_( +AES_Block __fastcall aes192_decrypt_block_internal( AES_Block ciphertext, const AES192_RoundKeys* decryption_keys ) { @@ -73,7 +73,7 @@ static void __fastcall aes192_expand_key_assist( *prev_hi = _mm_xor_si128(*prev_hi, tmp); } -void __fastcall aes192_expand_key_( +void __fastcall aes192_expand_key_internal( AES_Block key_lo, AES_Block key_hi, AES192_RoundKeys* encryption_keys @@ -125,7 +125,7 @@ void __fastcall aes192_expand_key_( encryption_keys->keys[12] = key_lo; } -void __fastcall aes192_derive_decryption_keys_( +void __fastcall aes192_derive_decryption_keys_internal( const AES192_RoundKeys* encryption_keys, AES192_RoundKeys* decryption_keys ) { diff --git a/aes/src/c/aes256.c b/aes/src/c/aes256.c index cc5e13e..bc86965 100644 --- a/aes/src/c/aes256.c +++ b/aes/src/c/aes256.c @@ -10,7 +10,7 @@ #include <emmintrin.h> #include <wmmintrin.h> -AES_Block __fastcall aes256_encrypt_block_( +AES_Block __fastcall aes256_encrypt_block_internal( AES_Block plaintext, const AES256_RoundKeys* encryption_keys ) { @@ -31,7 +31,7 @@ AES_Block __fastcall aes256_encrypt_block_( return _mm_aesenclast_si128(plaintext, encryption_keys->keys[14]); } -AES_Block __fastcall aes256_decrypt_block_( +AES_Block __fastcall aes256_decrypt_block_internal( AES_Block ciphertext, const AES256_RoundKeys* decryption_keys ) { @@ -75,7 +75,7 @@ static AES_Block __fastcall aes256_expand_key_assist( return *prev_hi; } -void __fastcall aes256_expand_key_( +void __fastcall aes256_expand_key_internal( AES_Block key_lo, AES_Block key_hi, AES256_RoundKeys* encryption_keys @@ -139,7 +139,7 @@ void __fastcall aes256_expand_key_( encryption_keys->keys[14] = aes256_expand_key_assist(&prev_lo, &prev_hi, hwgen); } -void __fastcall aes256_derive_decryption_keys_( +void __fastcall aes256_derive_decryption_keys_internal( const AES256_RoundKeys* encryption_keys, AES256_RoundKeys* decryption_keys ) { |
