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

* x86/aes-encrypt.asm (aes_encrypt): Replaced first quarter of the

round function with an invocation of AES_ROUND.

Rev: src/nettle/x86/aes-encrypt.asm:1.10
parent ff3ef3d5
No related branches found
No related tags found
No related merge requests found
...@@ -80,22 +80,23 @@ aes_encrypt: ...@@ -80,22 +80,23 @@ aes_encrypt:
C ^ table[3][B3(%ebx)] C ^ table[3][B3(%ebx)]
C C
C a b c d C a b c d
movl %eax, %esi AES_ROUND(_aes_encrypt_table,a,b,c,d)
andl $0xff, %esi C movl %eax, %esi
shll $2,%esi C index in table C andl $0xff, %esi
movl AES_TABLE0 + _aes_encrypt_table (%esi),%edi C shll $2,%esi C index in table
movl %ebx, %esi C movl AES_TABLE0 + _aes_encrypt_table (%esi),%edi
shrl $6,%esi C movl %ebx, %esi
andl $0x000003fc,%esi C clear all but offset bytes C shrl $6,%esi
xorl AES_TABLE1 + _aes_encrypt_table (%esi),%edi C andl $0x000003fc,%esi C clear all but offset bytes
movl %ecx,%esi C third one C xorl AES_TABLE1 + _aes_encrypt_table (%esi),%edi
shrl $14,%esi C movl %ecx,%esi C third one
andl $0x000003fc,%esi C shrl $14,%esi
xorl AES_TABLE2 + _aes_encrypt_table (%esi),%edi C andl $0x000003fc,%esi
movl %edx,%esi C fourth one C xorl AES_TABLE2 + _aes_encrypt_table (%esi),%edi
shrl $22,%esi C movl %edx,%esi C fourth one
andl $0x000003fc,%esi C shrl $22,%esi
xorl AES_TABLE3 + _aes_encrypt_table (%esi),%edi C andl $0x000003fc,%esi
C xorl AES_TABLE3 + _aes_encrypt_table (%esi),%edi
pushl %edi C save first on stack pushl %edi C save first on stack
C // Second column C // Second column
......
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