What is the difference b/w .pkr and .key file with respect to PGP?

大兔子大兔子 提交于 2020-01-05 09:07:33

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/8763685/what-is-the-difference-b-w-pkr-and-key-file-with-respect-to-pgp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!