duanhongyi / gmssl

a python crypto for sm2/sm3/sm4
MIT License
479 stars 140 forks source link

SM2的加解密和签名验签需要做ASN.1编码 #40

Open shanehou opened 3 years ago

shanehou commented 3 years ago

参照OSCCA Extensions For OpenPGP信息安全技术 SM2密码算法使用规范的要求,SM2的加解密和签名验签都需要做ASN.1编解码。

Arnie97 commented 2 years ago

感谢提醒,看了你这一帖终于知道为啥这个库生成的结果和 sm-crypto 无法互操作了,前者格式是 C1C3C2,而后者格式是符合规范要求的 ASN.1。

peanut-cc commented 2 years ago

信息安全技术 SM2密码算法使用规范

你好,那是需要怎么处理一下么,我也碰到了这个问题

peanut-cc commented 2 years ago

提了一个pr来修复这个问题 #52