mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 11:36:18 +08:00
Updated SM2 WWMM (2) (markdown)
parent
48c3f48b81
commit
76ec508774
@ -99,6 +99,8 @@ $t_0=t_0 - a_1$
|
|||||||
|
|
||||||
**减法显然是安全的(因为第四步的结果显然是>=0的,而且为零的情况仅限于 $t_0==0$ 的情况 ),所以调整为先做减法,再做加法,确保第四步加法不会产生进位**。
|
**减法显然是安全的(因为第四步的结果显然是>=0的,而且为零的情况仅限于 $t_0==0$ 的情况 ),所以调整为先做减法,再做加法,确保第四步加法不会产生进位**。
|
||||||
|
|
||||||
|
$T_3=t_7 \ast 2^{448} + t_6 \ast 2^{384} + t_5 \ast 2^{320} + (t_4+t_0-t0>>32) \ast 2^{256}+(t_3 - t_0<<32) \ast 2^{192} + (t_2 - t0>>32) \ast 2^{128} + (t_1 + t_0 - t_0<<32) \ast 2^{64} $
|
||||||
|
|
||||||
伪代码:
|
伪代码:
|
||||||
```asm
|
```asm
|
||||||
\ // First reduction step, [p3, p2, p1, p0] = [1, -0x100000000, 0, (1 - 0x100000000), -1]
|
\ // First reduction step, [p3, p2, p1, p0] = [1, -0x100000000, 0, (1 - 0x100000000), -1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user