1

We had a process that ran for almost 3 years with no problems until last week.

We tried to generate an encrypted file and it successfully made it, but on decryption, it gave us this error:

It's not possible to decrypt this message because your keyring does not contain usable private key(s) corresponding to any of the above public key(s).

How can I fix this problem?

Also, After this error, we're trying now to add some Integrity Check for the encrypted files, so, is there any thing that I can do with pgp's .exe file(s) to do so? Or what else should I do with my code to make this thing work?

1
  • Please be a little bit more careful with punctuation (no reason to use more than one ! or ? at once), it makes your question horrible to read.
    – Jens Erat
    May 19, 2013 at 12:20

1 Answer 1

0

OpenPGP uses Public-Key-Encryption. This means you're handing out your public key (thus it's named public) for others to encrypt information targeted to you and only the holder of the private key (here: you) can decrypt it.

The error message is quite clear: You encrypted the file using a public key for which you haven't got the private key in your keyring. You will need to import it; if you haven't got it (any more), you cannot decrypt the file.

If you're using Symantec PGP, you can do it using

pgp --import <keyname.asc>

For GnuPG, just replace the pgp by gpg.

Your encrypted file will be probably allright, PGP could read it, otherwise it would have echoed another error message.

4
  • Thank you for the answer. So, If I have 10 .asc files for example, I will only have the 10 different public keys in these files, am I right? we are facing this issue in the encrypted files of one client, while things are ok the remaining clients.
    – Anas Mousa
    May 19, 2013 at 15:03
  • One more thing, I'm using PGP Freeware for Windows. Is there any integrity tool that is associated with pgp.exe file?
    – Anas Mousa
    May 19, 2013 at 15:06
  • These 10 files could be anything, private keys, public keys, signatures, encrypted data. Have a look inside them (the first and second line of the data block tell you what it is). If it's only with one client you're probably using different keys and you - or the client - either used a wrong public key or the correct one but you're missing the private key.
    – Jens Erat
    May 19, 2013 at 15:07
  • I can't help you with that software, haven't even got a Windows installation around right now.
    – Jens Erat
    May 19, 2013 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .