From 0b742fe1b1148ee361cc0c5e5074ffa6ed595fcd Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 9 Oct 2025 11:08:13 +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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sm2_z256_loong64.S-代码分析.md b/sm2_z256_loong64.S-代码分析.md index d89c041..f3d050c 100644 --- a/sm2_z256_loong64.S-代码分析.md +++ b/sm2_z256_loong64.S-代码分析.md @@ -81,3 +81,6 @@ $T_3=T + T_2=(t_4+t_0-t_0>>32) \ast 2^{256}+(t_3 - t_0<<32) \ast 2^{192} + (t_2 ## __sm2_z256_modp_mont_sqr 计算 `(t0, t1, t2, t3) = (t0, t1, t2, t3)^2`。 +**总体实现思路**: +1. 先完整计算出平方结果,用8个64位字表示,算完后再进行蒙哥马利约简计算。 +1. 最后,依然使用加`1`来实现`mod P`,这里的`1`为 $2^{256} - P$ 。 \ No newline at end of file