黑白 .pkr 和 .key 文件与 PGP 有什么区别?

发布于 2024-12-25 02:48:24 字数 168 浏览 3 评论 0原文

我正在使用“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橙幽之幻 2025-01-01 02:48:24

没有区别 - 这些只是文件扩展名。

.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文