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: ...@@ -107,28 +107,10 @@ aes_decrypt:
popl %eax popl %eax
xchgl %ebx,%edx xchgl %ebx,%edx
C // inverse S-box substitution C inverse S-box substitution
mov $4,%edi mov $4,%edi
.Lisubst: .Lisubst:
movl %eax,%ebp AES_SUBST_BYTE(_aes_decrypt_table)
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
decl %edi decl %edi
jnz .Lisubst jnz .Lisubst
...@@ -155,5 +137,5 @@ aes_decrypt: ...@@ -155,5 +137,5 @@ aes_decrypt:
popl %ebp popl %ebp
popl %ebx popl %ebx
ret ret
.eord: .Leord:
.size aes_decrypt,.eord-aes_decrypt .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