sm2 point scalar multiple ASM implementation issue: final p256PointAddAsm's input maybe equal #127
emmansun
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
目前p256ScalarMult实现使用了NIST-P256一样的实现,window=5,按照https://github.com/google/boringssl/blob/master/crypto/fipsmodule/ec/util.c 的说明:
,SM2曲线N = ...00100011,所以,选择w = 5 必然会导致这个问题。
以下是w=5,NIST P256 和SM2的测试及结果:
结果:
w = 6
结果:
所以有两个方案:
Beta Was this translation helpful? Give feedback.
All reactions