From 6d68c38177fe20e3c9af90ff0d6266c0cc2f584a Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 9 Oct 2025 09:27:43 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20sm2=5Fz256=5Floong64.S=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=88=86=E6=9E=90=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sm2_z256_loong64.S-代码分析.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sm2_z256_loong64.S-代码分析.md b/sm2_z256_loong64.S-代码分析.md index 32a2960..932618f 100644 --- a/sm2_z256_loong64.S-代码分析.md +++ b/sm2_z256_loong64.S-代码分析.md @@ -67,6 +67,12 @@ or $a2, $a2, $a1 **实现思路**: 1. 可参考https://github.com/emmansun/gmsm/wiki/SM2-WWMM-(2) +$T_2=T_1 \ast P=t_0 \ast P= t_0 \ast (2^{256}-(2^{32} \ast 2^{192} + 0 \ast 2^{128} + (2^{32} - 1) \ast 2^{64} + 1))$ +$T_2=t_0 \ast 2^{256} - t_0 \ast 2^{32} \ast 2^{192} - t_0 \ast (2^{32} - 1) \ast 2^{64} - t_0$ + +$T_3=T + T_2=t_4 \ast 2^{256} + t_3 \ast 2^{192} + t_2 \ast 2^{128} + t_1 \ast 2^{64} + t_0 \ast 2^{256} - t_0 \ast 2^{32} \ast 2^{192} - t_0 \ast (2^{32} - 1) \ast 2^{64} $ +$T_3=(t_4+t_0) \ast 2^{256}+(t_3 - t_0 \ast 2^{32}) \ast 2^{192} + t_2 \ast 2^{128} + (t_1 + t_0 - t_0 \ast 2^{32}) \ast 2^{64} $ +$T_3=(t_4+t_0-t_0>>32) \ast 2^{256}+(t_3 - t_0<<32) \ast 2^{192} + (t_2 - t_0>>32) \ast 2^{128} + (t_1 + t_0 - t_0<<32) \ast 2^{64} $