签名证书和加密证书有什么区别?
签名证书和加密证书有什么区别?
我发现签名证书不能用于加密仅数据加密证书。技术上有什么区别?两者都有公钥和私钥还是只有加密证书才会有 PP 密钥?
What is the difference between between signing certificate and encryption certificate?
I see that signing certificate cannot be used for encrypting the data only encryption certificate. What is the technical difference? Does both have public key and private or only encryption cert will have PP key?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
即使这是一个旧线程,我一直在努力解决这些证书、加密/解密概念,对此我要花两分,简短的一点:
长的一个:
Even this is an old thread, I've just been struggling with those certificate,encryt/decrypt concepts, put two my cents on this, the short one:
The long one:
唯一的区别是证书中目的字段的值。证书的颁发者选择创建证书的目的。
The only difference is the value of the purpose field in the certificate. The issuer of the certificate chooses for what purpose the certificate is created.
证书仅包含公共证书。没有什么可以阻止您使用私有密钥来做任何您想做的事情。
如前所述,证书是供另一方处理的 - 在您签署或加密某些内容后,另一方需要做出是否满意的决定。然后,它检查证书及其标志,以确保它可以根据为另一方设置的策略用于操作。
A certificate contains only the public certificate. Nothing can stop you from using the private key for whatever things you want to do with it.
As said before, a certificate is for the other party to deal with - after you have signed or encrypted something, the other party needs to make the decision if it is happy with it. It then checks the certificate and its flags to make sure it could be used for the operation, under the policy set for the other party.
除了证书中的“密钥使用”字段之外,某些密钥对使用只能进行签名或加密(密钥交换)的算法。例如,DH 和 DSA。 RSA 对两者都有好处,所以从技术上讲你可以做任何你想做的事。但正如其他答案指出的那样,验证签名的代码可能会拒绝它,因为证书被用于错误的目的。
Besides the "key usage" fields in the certificates, some key pairs use algorithms that can only do signing or encryption (key exchange). For example, DH and DSA. RSA is good for both so technically you can do whatever you want. But as other answers pointed out, the code that verifies your signature will probably reject it because the certificate was used for wrong purpose.