Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sm2p256椭圆曲线方程没有使用sm2国密标准规定的"y^2 = x^3 + ax + b"吗? #37

Closed
zhaochuninhefei opened this issue Apr 7, 2022 · 0 comments

Comments

@zhaochuninhefei
Copy link

作者你好,我学习了您的sm2的实现代码,注意到一个细节:您似乎没有使用国密标准"GB/T 32918.5-2017"中规定的椭圆曲线方程:y² = x³ + ax + b,而是沿用了ecdsa的方程:y² = x³ - 3x + b。这是什么原因呢?
比如:

  1. 您在定义sm2p256椭圆曲线参数时,没有指定方程参数a的值,比如"sm2/p256_asm.go"的"initP256"函数。
  2. 在"sm2/util.go"中根据x计算y的函数"calculatePrimeCurveY"中,实际使用的方程是ecdsa的"y² = x³ - 3x + b"
Repository owner locked and limited conversation to collaborators Apr 7, 2022
@emmansun emmansun converted this issue into discussion #38 Apr 7, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant