问题
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