Skip to content
Snippets Groups Projects
Commit 5578a0d2 authored by Niels Möller's avatar Niels Möller
Browse files

* x86/aes-encrypt.asm (aes_encrypt): Use AES_SUBST_BYTE.

* x86/aes-decrypt.asm (aes_decrypt): Likewise.

Rev: src/nettle/x86/aes-decrypt.asm:1.10
parent 09afcaa3
No related branches found
No related tags found
No related merge requests found
......@@ -107,28 +107,10 @@ aes_decrypt:
popl %eax
xchgl %ebx,%edx
C // inverse S-box substitution
C inverse S-box substitution
mov $4,%edi
.Lisubst:
movl %eax,%ebp
andl $0x000000ff,%ebp
movb AES_SBOX + _aes_decrypt_table (%ebp),%al
roll $8,%eax
movl %ebx,%ebp
andl $0x000000ff,%ebp
movb AES_SBOX + _aes_decrypt_table (%ebp),%bl
roll $8,%ebx
movl %ecx,%ebp
andl $0x000000ff,%ebp
movb AES_SBOX + _aes_decrypt_table (%ebp),%cl
roll $8,%ecx
movl %edx,%ebp
andl $0x000000ff,%ebp
movb AES_SBOX + _aes_decrypt_table (%ebp),%dl
roll $8,%edx
AES_SUBST_BYTE(_aes_decrypt_table)
decl %edi
jnz .Lisubst
......@@ -155,5 +137,5 @@ aes_decrypt:
popl %ebp
popl %ebx
ret
.eord:
.size aes_decrypt,.eord-aes_decrypt
.Leord:
.size aes_decrypt,.Leord-aes_decrypt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment