From f429e6285a150f585658723ca44e7e921c900177 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Wed, 20 Sep 2023 08:14:57 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20SM3=E6=80=A7=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SM3性能优化.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SM3性能优化.md b/SM3性能优化.md index aa1e618..49b108b 100644 --- a/SM3性能优化.md +++ b/SM3性能优化.md @@ -221,7 +221,7 @@ SM3的第一版,比SHA256复杂,不知道有没有继续优化的空间。 // Prepare P1 parameters VPALIGNR $4, XDWORD3, XTMP2, XTMP3; \ // XTMP3 = {W[0], w15, w14, w13} VPSLLD $15, XTMP3, XTMP4; \ - VPSRLD $(32-15), XTMP4, XTMP4; \ + VPSRLD $(32-15), XTMP3, XTMP3; \ VPOR XTMP3, XTMP4, XTMP4; \ // XTMP4 = W[-3] rol 15 {DCBA} VPXOR XTMP1, XTMP4, XTMP4; \ // XTMP4 = W[-9] XOR W[-16] XOR (W[-3] rol 15) {DCBA} @@ -273,7 +273,7 @@ SM3的第一版,比SHA256复杂,不知道有没有继续优化的空间。 // Prepare P1 parameters VPALIGNR $4, XDWORD3, XTMP2, XTMP3; \ // XTMP3 = {W[0], w15, w14, w13} VPSLLD $15, XTMP3, XTMP4; \ - VPSRLD $(32-15), XTMP4, XTMP4; \ + VPSRLD $(32-15), XTMP3, XTMP3; \ VPOR XTMP3, XTMP4, XTMP4; \ // XTMP4 = W[-3] rol 15 {DCBA} VPXOR XTMP1, XTMP4, XTMP4; \ // XTMP4 = W[-9] XOR W[-16] XOR (W[-3] rol 15) {DCBA}