diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-30 05:13:44 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-30 05:13:44 +0300 |
commit | 1109190cc2edd86f12cdd16847f3e80e48dccc50 (patch) | |
tree | a688b89f7e4ede0defaeb79ffb8e8a99ece5a395 /include/aesni/data.h | |
parent | support AES-{128,192}-cbc (diff) | |
download | aes-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 'include/aesni/data.h')
-rw-r--r-- | include/aesni/data.h | 19 |
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); |