]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(aes_encrypt): Use AES_SUBST_BYTE.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 15 May 2002 09:42:05 +0000 (11:42 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 15 May 2002 09:42:05 +0000 (11:42 +0200)
Rev: src/nettle/x86/aes-encrypt.asm:1.16

x86/aes-encrypt.asm

index f8487c31ee10bc96c444e9f0f5e94e304e067c65..32b266ad9c0026f7ce4e0a38bf0ad9fe46d881fc 100644 (file)
@@ -114,25 +114,7 @@ aes_encrypt:
        C S-box substitution
        mov     $4,%edi
 .Lsubst:       
-       movl    %eax,%ebp
-       andl    $0x000000ff,%ebp
-       movb    AES_SBOX + _aes_encrypt_table (%ebp),%al
-       roll    $8,%eax
-
-       movl    %ebx,%ebp
-       andl    $0x000000ff,%ebp
-       movb    AES_SBOX + _aes_encrypt_table (%ebp),%bl
-       roll    $8,%ebx
-
-       movl    %ecx,%ebp
-       andl    $0x000000ff,%ebp
-       movb    AES_SBOX + _aes_encrypt_table (%ebp),%cl
-       roll    $8,%ecx
-
-       movl    %edx,%ebp
-       andl    $0x000000ff,%ebp
-       movb    AES_SBOX + _aes_encrypt_table (%ebp),%dl
-       roll    $8,%edx
+       AES_SUBST_BYTE(_aes_encrypt_table)
 
        decl    %edi
        jnz     .Lsubst