diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-30 00:38:19 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-30 00:38:19 +0300 |
commit | b08c0e5b32c625215bee0ae96a023733d34e9357 (patch) | |
tree | 8f809b7f483ba11d2e4e2a235f3e7c9bc9b78ccb /src/aes128.asm | |
parent | merge aes256{ecb,cbc}.asm (diff) | |
download | aes-tools-b08c0e5b32c625215bee0ae96a023733d34e9357.tar.gz aes-tools-b08c0e5b32c625215bee0ae96a023733d34e9357.zip |
support AES-{128,192}-cbc
Diffstat (limited to 'src/aes128.asm')
-rw-r--r-- | src/aes128.asm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/aes128.asm b/src/aes128.asm index 06a0275..5d62621 100644 --- a/src/aes128.asm +++ b/src/aes128.asm @@ -32,6 +32,11 @@ inverted_key_schedule oword 11 dup(0) ret @raw_aes128ecb_encrypt@32 endp +@raw_aes128cbc_encrypt@36 proc + pxor xmm0, [ecx] + jmp @raw_aes128ecb_encrypt@32 +@raw_aes128cbc_encrypt@36 endp + @raw_aes128ecb_decrypt@32 proc call expand_keys128 pxor xmm0, [inverted_key_schedule] @@ -48,6 +53,14 @@ inverted_key_schedule oword 11 dup(0) ret @raw_aes128ecb_decrypt@32 endp +@raw_aes128cbc_decrypt@36 proc + push ecx + call @raw_aes128ecb_decrypt@32 + pop ecx + pxor xmm0, [ecx] + ret +@raw_aes128cbc_decrypt@36 endp + expand_keys128 proc ; A "word" (in terms of the FIPS 187 standard) is a 32-bit block. ; Words are denoted by `w[N]`. |