0

I am trying to decrypt pgp encrypted files. I had both public and private keys and I created two files like pub.key and sec.key and imported them using

gpg --import pub.key
gpg --import sec.key

and I am trying to decrypt the files but I am facing the issue

gpg: decryption failed: No secret key

Please help me with this and if possible with a sample how the keys should be imported.

put on hold as unclear what you're asking by Tobi Nary, Steffen Ullrich, Stephane, schroeder Feb 14 at 10:00

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    What command are you using to try to decrypt a file? Also, what is the output of "gpg --list-secret-keys"? – hft Feb 12 at 0:15