Bouncy Castle从签名和X509Certificate获取内容

时间:2023-01-11 23:14:50

I am very new to Bouncy Castle.I want to know is there any way using Bouncy Castle API that i can get original content if i only have signature using X509Certificate with public key.I am not finding any way as we have only public key.We don't have private key which is used to sign the message.

我是Bouncy Castle的新手。我想知道有没有办法使用Bouncy Castle API我可以获得原始内容如果我只使用X509Certificate与公钥签名。我找不到任何方式,因为我们只有公钥。我们没有用于签名邮件的私钥。

1 个解决方案

#1


0  

If one has created a detached signature and you have only that signature (and no original data) then you are out of luck.

如果一个人创建了一个分离的签名而你只有那个签名(并且没有原始数据),那么你就不走运了。

If the signature is wrapping, then surely you can get original data back. Signed data doesn't require a private key to be verified and extracted. Public key (actually the certificate with the key) can be included in the wrapping signature in which case you don't even need the certificate separately.

如果签名是包装,那么你肯定可以获得原始数据。签名数据不需要验证和提取私钥。公钥(实际上是带密钥的证书)可以包含在包装签名中,在这种情况下,您甚至不需要单独使用证书。

#1


0  

If one has created a detached signature and you have only that signature (and no original data) then you are out of luck.

如果一个人创建了一个分离的签名而你只有那个签名(并且没有原始数据),那么你就不走运了。

If the signature is wrapping, then surely you can get original data back. Signed data doesn't require a private key to be verified and extracted. Public key (actually the certificate with the key) can be included in the wrapping signature in which case you don't even need the certificate separately.

如果签名是包装,那么你肯定可以获得原始数据。签名数据不需要验证和提取私钥。公钥(实际上是带密钥的证书)可以包含在包装签名中,在这种情况下,您甚至不需要单独使用证书。