i am trying to decrypt a text with a valid private key that is imported into my instance and is in working condition. the key decrypts any other text but this particular one results in this error message.

gpg: decrypt_message failed: Unexpected error

i did a --list-packets to ensure that what I have is in fact the key that text was encrypted for. i tried the same steps in two different fresh distros (fedora and ubuntu) and it resulted in the same error. i am not sure where to go from here. would anyone have any ideas what might be wrong here?


  • Assuming encrypted data in file.gpg, check output of gpg -vvv --decrypt file.gpg Commented Nov 21, 2021 at 1:30

1 Answer 1


I get that error message when I try decrypting something that is not encrypted. For example, an exported public or private key. --list-packets works perfectly and identifies the public key as such, and helpfully provides the keyid, but it is not the keyid of the recipient that the message is keyed to, it is the actual unencrypted keyid of the key that is the object and the only content of the file.

Hope this helps.

You must log in to answer this question.

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