We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SM3文档示例1
输入消息为“abc”,其ASCII码表示为616263 ... 杂凑值 66c7f0f4 62eeedd9 d1f2d46b dc10e4e2 4167c487 5cf2f7a2 297da02b 8f4ba8e0
在linux下编译输出结果为
Message: abc Hash: 37bc43d1 1cab393d 7899ef62 24f568ec 18a8fd85 1d165c50 0c375402 0f466a04
代码粗略看了下, 至少位移的宏看起来有问题
#define SHL(x,n) (((x) & 0xFFFFFFFF) << n) #define ROTL(x,n) (SHL((x),n) | ((x) >> (32 - n)))
GMSSL里面的SM3代码, 位移宏为
#define ROTL(x,n) (((x)<<(n)) | ((x)>>(32-(n))))
GMSSL SM3输出没有问题。
The text was updated successfully, but these errors were encountered:
1.问题:64的linux系统下编译会出现SM3计算结果和pdf文档不一致 解决方案:在编译的时候加 -m32 即可
2.衍生问题:添加 -m32 后ubuntu下报错/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory 解决方案:sudo apt-get install libc6-dev-i386
Sorry, something went wrong.
sm2那边有个sm3,输出是正常的
fixed. Thanks for your attentions!
No branches or pull requests
SM3文档示例1
在linux下编译输出结果为
代码粗略看了下, 至少位移的宏看起来有问题
GMSSL里面的SM3代码, 位移宏为
GMSSL SM3输出没有问题。
The text was updated successfully, but these errors were encountered: