aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/aesni/data.h
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-05-30 05:13:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-05-30 05:13:44 +0300
commit1109190cc2edd86f12cdd16847f3e80e48dccc50 (patch)
treea688b89f7e4ede0defaeb79ffb8e8a99ece5a395 /include/aesni/data.h
parentsupport AES-{128,192}-cbc (diff)
downloadaes-tools-1109190cc2edd86f12cdd16847f3e80e48dccc50.tar.gz
aes-tools-1109190cc2edd86f12cdd16847f3e80e48dccc50.zip
detach key expansion routines
Block encryption/decryption routines now don't expand key schedules on each call.
Diffstat (limited to '')
-rw-r--r--include/aesni/data.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/aesni/data.h b/include/aesni/data.h
index 49cf5e5..889a9ff 100644
--- a/include/aesni/data.h
+++ b/include/aesni/data.h
@@ -26,6 +26,25 @@ typedef struct
}
AesBlock256;
+typedef struct
+{
+ AesBlock128 keys[11];
+}
+Aes128KeySchedule;
+
+typedef struct
+{
+ AesBlock128 keys[13];
+ char fillers[8];
+}
+Aes192KeySchedule;
+
+typedef struct
+{
+ AesBlock128 keys[15];
+}
+Aes256KeySchedule;
+
AesBlock128 make_aes_block128(int hi3, int hi2, int lo1, int lo0);
AesBlock192 make_aes_block192(int hi5, int hi4, int lo3, int lo2, int lo1, int lo0);
AesBlock256 make_aes_block256(int hi7, int hi6, int hi5, int hi4, int lo3, int lo2, int lo1, int lo0);