黑白 .pkr 和 .key 文件与 PGP 有什么区别?
我正在使用“bouncycastle”进行 PGP 加密/解密。加密我知道我需要公钥。我有一个文本文件,它应该是公钥。应该将其重命名为 .pkr 或 .key 文件吗?这两个扩展名代表什么不同? 'bouncycastle' api 是否支持解密的两种扩展? 另外,为了解密我需要哪个文件,.skr 还是 .key 文件?
I am working on PGP encryption/decryption using 'bouncycastle'. Do encrypt I understand that i need a public key. I have a text file which is supposed to be the public key. Should this be rename as .pkr or .key file? What different the 2 extentions represent? Does 'bouncycastle' api support both extention for decrypting?
Also, for decryption which file do i need, .skr or .key file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有区别 - 这些只是文件扩展名。
.pkr扩展名代表“公钥环”,而.skr代表“秘密密钥环”,即包含私钥的密钥环(在PGP中称为秘密)。 .key 可以包含任何内容,但很可能它是一个公钥或私钥。
正确的代码(我不知道 bouncycastle)应该以相同的方式读取 .pkr 和 .key_with_public_key (该示例适用于秘密密钥)。
您需要密钥来解密数据。
No difference - these are just file extensions.
.pkr extension stands for "public key ring", while .skr stands for "secret key ring", i.e. the keyring which contains private keys (called secret in PGP) . .key can contain anything, but most likely it will be one public or private key.
Correct code (I don't know about bouncycastle) should read both .pkr and .key_with_public_key in the same way (the sample applies to secret key).
You need secret key for decryption of data.