Commit 069047c3 authored by Niels Möller's avatar Niels Möller

* x86/aes-encrypt-internal.asm: Updated for AES_FINAL_ROUND. Only

three times through the substitution loop.
* x86/aes-decrypt-internal.asm: Likewise.

Rev: nettle/x86/aes-decrypt-internal.asm:1.4
Rev: nettle/x86/aes-encrypt-internal.asm:1.4
parent 075afd79
......@@ -122,16 +122,16 @@ PROLOGUE(_nettle_aes_decrypt)
C last round
AES_FINAL_ROUND(SA,SD,SC,SB, TMP, KEY)
AES_FINAL_ROUND(SA,SD,SC,SB,T, TMP, KEY)
pushl TMP
AES_FINAL_ROUND(SB,SA,SD,SC, TMP, KEY)
AES_FINAL_ROUND(SB,SA,SD,SC,T, TMP, KEY)
pushl TMP
AES_FINAL_ROUND(SC,SB,SA,SD, TMP, KEY)
AES_FINAL_ROUND(SC,SB,SA,SD,T, TMP, KEY)
pushl TMP
AES_FINAL_ROUND(SD,SC,SB,SA, TMP, KEY)
AES_FINAL_ROUND(SD,SC,SB,SA,T, TMP, KEY)
movl TMP,SD
popl SC
......@@ -139,7 +139,7 @@ PROLOGUE(_nettle_aes_decrypt)
popl SA
C Inverse S-box substitution
mov $4,TMP
mov $3,TMP
.Lsubst:
AES_SUBST_BYTE(SA,SB,SC,SD,T, KEY)
......
......@@ -121,16 +121,16 @@ PROLOGUE(_nettle_aes_encrypt)
C last round
AES_FINAL_ROUND(SA,SB,SC,SD, TMP, KEY)
AES_FINAL_ROUND(SA,SB,SC,SD, T, TMP, KEY)
pushl TMP
AES_FINAL_ROUND(SB,SC,SD,SA, TMP, KEY)
AES_FINAL_ROUND(SB,SC,SD,SA, T, TMP, KEY)
pushl TMP
AES_FINAL_ROUND(SC,SD,SA,SB, TMP, KEY)
AES_FINAL_ROUND(SC,SD,SA,SB, T, TMP, KEY)
pushl TMP
AES_FINAL_ROUND(SD,SA,SB,SC, TMP, KEY)
AES_FINAL_ROUND(SD,SA,SB,SC, T, TMP, KEY)
movl TMP,SD
popl SC
......@@ -138,7 +138,7 @@ PROLOGUE(_nettle_aes_encrypt)
popl SA
C S-box substitution
mov $4,TMP
mov $3,TMP
.Lsubst:
AES_SUBST_BYTE(SA,SB,SC,SD, T, KEY)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment