-
Notifications
You must be signed in to change notification settings - Fork 159
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
大数在转化为byte数组时会溢出一位 #10
Comments
正确。有好几处都要处理。 |
现在有2012国密规范了,sm2加密部分与2010版的略微不同。网上的部分大部分是2010规定写的。 |
另外注意一下国密推荐参数的问题 |
2012规范和2010规范能相互加解密吗? |
不能 |
c1c2c3顺序不一样 |
需要调整c1c2c3的顺序 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BigInteger 在转化为byte数组时会会出现一个补位
BigInteger 在转化为byte数组时会会出现一个补位,导致最后的sm3-Hash的计算作物,ZA计算错误
需要在计算sm3杂凑值时,做如下处理
SM2.java中的byte[] ZA(String IDA,Ecpoint aPublicKey)中处理
链接
BigInteger to byte[]
IDA
USERID说明
请参阅SM2椭圆曲线公钥密码算法-P54 用户其他信息一栏。
USERID非IDa
https://github.com/hyfree/SM2_SM3_SM4Encrypt/tree/add_pdf/pdf
#9
The text was updated successfully, but these errors were encountered: