Skip to content
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

关于Java调用 PKCS7信封+SM2实现的问题 #202

Open
liuxyv8 opened this issue Feb 26, 2024 · 1 comment
Open

关于Java调用 PKCS7信封+SM2实现的问题 #202

liuxyv8 opened this issue Feb 26, 2024 · 1 comment

Comments

@liuxyv8
Copy link

liuxyv8 commented Feb 26, 2024

你好,在用Java解密 x509.PKCS7EncryptSM2加密的文件时,始终不能正常解密,不知道有没有大佬实现了Java端的代码

@emmansun
Copy link

这个库的PKCS#7应该也是https://github.com/mozilla-services/pkcs7 的一个拷贝国密修改版本。x509.PKCS7EncryptSM2增加了接收者为SM2证书、私钥的支持。而且这里的对称加密也只支持DES-CBC和AES-128-GCM。你可以查看你自己使用的JAVA库的CMS/PKCS7支持哪些算法和标准。

并且这里的实现也不符合《SM2密码算法消息加密签名语法规范》,不知道你在哪个场景下要使用这个方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants