1
votes

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

1 Answers

2
votes

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.