-
Notifications
You must be signed in to change notification settings - Fork 61
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
导出sm2.PublicKey #33
Comments
不是很理解你的问题,这个包没有定义自己的公钥数据结构啊。感觉你的两个case可以合并成一个:
|
是的,先前依赖的 没有定义自己的公钥数据结构,代码可读性会显得有点怪
|
SM2曲线和NIST P-256只是参数不同而已,所以数据结构是一样的,就象NIST P-224 P-256 P-384 P-512,SM2曲线无需扩展此结构也没有SM2曲线特殊的方法需要实现。还有就是考虑SM2-256曲线理论上是和SM2加解密、签名验签算法分开的,其实无需深度绑定。你的ToPub方法,如果加上curve参数,其实是适用所有NIST P系列和SM2 256曲线的。 |
了解,感谢您的答复 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问可以添加导出
sm2.PublicKey
吗?在实现协商密钥的时候需要单独用到
sm2.PublicKey
,需要和crypto
包保持兼容。The text was updated successfully, but these errors were encountered: