-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
问题 关于公钥的 X, Y 如何生成 pem文件的字符串 #16
Comments
1、SM2签名算法,就算每次使用的私钥和源数据都一样,签名结果也不相同,因为签名过程有随机数参与,所以不用比较两个签名函数返回的结果是否相同。而应该去验证两端之间是否能互相验签成功。 |
谢谢你的帮助。我明白了。只能验签,不能对比。我之前搞rsa 都是对比的
…------------------ 原始邮件 ------------------
发件人: ZZMarquis ***@***.***>
发送时间: 2021年6月10日 17:28
收件人: ZZMarquis/gm ***@***.***>
抄送: ZRothschild ***@***.***>, Author ***@***.***>
主题: 回复:[ZZMarquis/gm] 问题 关于公钥的 X, Y 如何生成 pem文件的字符串 (#16)
1、SM2签名算法,就算你每次使用的私钥和源数据都一样,签名结果也不相同,因为签名过程有随机数参与,所以不用比较两个签名函数返回的结果是否相同。而应该去验证你们之间是否能互相验签成功。
2、目前这个项目没有做压缩公钥的验签,你需要先把公钥转换成非压缩。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
谢谢明白了
…------------------ 原始邮件 ------------------
发件人: ZZMarquis ***@***.***>
发送时间: 2021年6月10日 17:28
收件人: ZZMarquis/gm ***@***.***>
抄送: ZRothschild ***@***.***>, Author ***@***.***>
主题: 回复:[ZZMarquis/gm] 问题 关于公钥的 X, Y 如何生成 pem文件的字符串 (#16)
1、SM2签名算法,就算你每次使用的私钥和源数据都一样,签名结果也不相同,因为签名过程有随机数参与,所以不用比较两个签名函数返回的结果是否相同。而应该去验证你们之间是否能互相验签成功。
2、目前这个项目没有做压缩公钥的验签,你需要先把公钥转换成非压缩。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我现在有这样的一个任务。就是用对方生成的sm2 公私钥。私钥是压缩格式,base64 .
第一个问题我使用 您的包 sign 函数签名,返回的签名信息与我调用支付宝的签名函数返回的签名信息不一致。不管用与不用 ASN.1 都不应不上。
如果我使用的时候压缩的公钥,你这边使用什么验签函数去,验签呢?当然我可以转换再验签
The text was updated successfully, but these errors were encountered: