Gpg: decryption error: invalid session key

I am trying to decrypt a file using gpg and get this error:

$ gpg --no-tty --batch --verbose --decrypt --passphrase foo file.enc
Version: GnuPG v1.4.11 (GNU/Linux)
gpg: armor header: 
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: Bad session key

      

I tried to restart the gpg agent with no luck:

$ gpgconf --reload gpg-agent

      

How to solve this?

+3


source to share


1 answer


For the record, in case anyone comes across this issue, also:

The problem was that the encryption was done using gpg version 1.4.11 and the decryption was using gpg version 2.0.22.



After upgrading encryption to gpg2 (2.0.17), everything worked fine.

+8


source







All Articles