aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/buffer.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
commit0651133db30c0932877780c2f98901e4ca1072e1 (patch)
tree2b87823b4b9f4b5a75affa4b1606abb06a598c97 /src/buffer.c
parentfactor out 128-bit XORing (diff)
downloadaes-tools-0651133db30c0932877780c2f98901e4ca1072e1.tar.gz
aes-tools-0651133db30c0932877780c2f98901e4ca1072e1.zip
refactoring
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index a4aed96..983c5cf 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -18,7 +18,7 @@ AesNI_StatusCode aesni_encrypt_buffer_ecb128(
size_t src_size,
void* dest,
size_t* dest_size,
- AesNI_KeySchedule128* key_schedule,
+ AesNI_Aes128_RoundKeys* key_schedule,
AesNI_ErrorDetails* err_details)
{
if (dest_size == NULL)
@@ -40,7 +40,7 @@ AesNI_StatusCode aesni_encrypt_buffer_ecb128(
for (size_t i = 0; i < src_len; ++i, (char*) src += 16, (char*) dest += 16)
{
AesNI_Block128 plaintext = aesni_load_block128(src);
- AesNI_Block128 ciphertext = aesni_encrypt_block_ecb128(plaintext, key_schedule);
+ AesNI_Block128 ciphertext = aesni_aes128_encrypt_block_ecb(plaintext, key_schedule);
aesni_store_block128(dest, ciphertext);
}
@@ -57,7 +57,7 @@ AesNI_StatusCode aesni_encrypt_buffer_ecb128(
}
AesNI_Block128 plaintext = aesni_load_block128(padding);
- AesNI_Block128 ciphertext = aesni_encrypt_block_ecb128(plaintext, key_schedule);
+ AesNI_Block128 ciphertext = aesni_aes128_encrypt_block_ecb(plaintext, key_schedule);
aesni_store_block128(dest, ciphertext);
return AESNI_SUCCESS;
@@ -80,7 +80,7 @@ AesNI_StatusCode aesni_decrypt_buffer_ecb128(
size_t src_size,
void* dest,
size_t* dest_size,
- AesNI_KeySchedule128* inverted_schedule,
+ AesNI_Aes128_RoundKeys* inverted_schedule,
AesNI_ErrorDetails* err_details)
{
if (dest_size == NULL)
@@ -100,12 +100,12 @@ AesNI_StatusCode aesni_decrypt_buffer_ecb128(
for (size_t i = 0; i < src_len - 1; ++i, (char*) src += 16, (char*) dest += 16)
{
AesNI_Block128 ciphertext = aesni_load_block128(src);
- AesNI_Block128 plaintext = aesni_decrypt_block_ecb128(ciphertext, inverted_schedule);
+ AesNI_Block128 plaintext = aesni_aes128_decrypt_block_ecb(ciphertext, inverted_schedule);
aesni_store_block128(dest, plaintext);
}
AesNI_Block128 ciphertext = aesni_load_block128(src);
- AesNI_Block128 plaintext = aesni_decrypt_block_ecb128(ciphertext, inverted_schedule);
+ AesNI_Block128 plaintext = aesni_aes128_decrypt_block_ecb(ciphertext, inverted_schedule);
unsigned char padding[16];
aesni_store_block128(padding, plaintext);