0
gpg: AES256 encrypted data                      
gpg: encrypted with 1 passphrase                                                   
gpg: decryption failed: Bad session key

I am doing decryption by following command:

gpg --passphrase-file /path/to/key --output /path/to/output --decrypt /path/to/file

It again asks for the passphrase and results in above mentioned error.

When I fed this error to a search engine, I encountered many questions which mentioned the last line 'Bad session key' and most of their answers said it may be because encryption was done by GnuPG version 1 and decryption is done by GnuPG version 2. However, in this case both the version are 2, and also I didn't find this exact same error in any question.

I am doing this on Termux on android.

New contributor
user573082 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 1
    Was the data encrypted with an older version of GnuPG? – Kusalananda Jan 12 at 8:21
  • @Kusalananda i don't know the exact release but passphrase file mentioned version: GnuPG2 – user573082 Jan 12 at 17:03

Your Answer

user573082 is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.