Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/crypto/aes/arch/arm aesarmv8: Fix aesarmv8_cbc_dec...



details:   https://anonhg.NetBSD.org/src-all/rev/255a1946cd47
branches:  trunk
changeset: 938478:255a1946cd47
user:      Taylor R Campbell <riastradh%NetBSD.org@localhost>
date:      Tue Sep 08 23:18:37 2020 +0000

description:
aesarmv8: Fix aesarmv8_cbc_dec1 on big-endian.

diffstat:

 sys/crypto/aes/arch/arm/aes_armv8_64.S |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 9f70ead4319f -r 255a1946cd47 sys/crypto/aes/arch/arm/aes_armv8_64.S
--- a/sys/crypto/aes/arch/arm/aes_armv8_64.S    Tue Sep 08 21:37:12 2020 +0000
+++ b/sys/crypto/aes/arch/arm/aes_armv8_64.S    Tue Sep 08 23:18:37 2020 +0000
@@ -543,9 +543,11 @@
        st1     {v0.16b}, [x4]          /* update iv */
        b       2f
        _ALIGN_TEXT
-1:     ldr     q31, [x1, #-0x10]!      /* q31 := chaining value */
+1:     sub     x1, x1, #0x10
+       ld1     {v31.16b}, [x1]         /* q31 := chaining value */
+       sub     x2, x2, #0x10
        eor     v0.16b, v0.16b, v31.16b /* q0 := plaintext block */
-       str     q0, [x2, #-0x10]!       /* store plaintext block */
+       st1     {v0.16b}, [x2]          /* store plaintext block */
        mov     v0.16b, v31.16b         /* move cv = ciphertext block */
 2:     mov     x0, x9                  /* x0 := enckey */
        mov     x3, x5                  /* x3 := nrounds */



Home | Main Index | Thread Index | Old Index