2

I have a file encrypted with GPG suite 2 years ago...

I need it now and tried to decrypt it but the resulting zip file is 0 bytes :((

What does that mean ?

I also tried the CLI and Im getting

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

EDIT

If I put --batch the file is decrypted but I cannot find it anywhere

gpg --passphrase "mypassword" -d --batch --ignore-mdc-error myFilePath

gpg: WARNING: message was not integrity protected

  • Questions: (1) What is your operating system? (2) Is gpg the latest version? (3) Or is gpg the same version as encrypted the file? There have been reports about gpg version 2 having problems decrypting gpg version 1.4. – harrymc Nov 17 '18 at 20:01
  • OSX 10.14.1, latest GPG using homebrew, not sure what was my version of the encrypted file; I was using GPG tools at the time 2 years ago – jotyhista Nov 17 '18 at 20:40
1

Try to replace your current homebrew version by GPG 1.4.

One alarming text from the above link:

GnuPG 1.4 is the old, single binary version which still support the unsafe PGP-2 keys.

As the last version 1.4 dates from only 5 months ago, this might explain why your current version doesn't support your keys format, if they are in the PGP-2 format.

(General note: When files are encrypted, one should always take in account the possibility that software changes might make decryption impossible after some years. Encryption is not a long-term solution.)

  • Thank you for the suggestion I'll try I went to the link but this is not a binary... I am not familiar how to compile.. :s is it possible to install with brew ? – jotyhista Nov 17 '18 at 21:03
  • actually I managed to install it and tried to decrypt but no success with the same command as above. gpg (GnuPG) 1.4.23 – jotyhista Nov 17 '18 at 21:11
  • actually it worked but different command using gpg --decrypt file > file.zip – jotyhista Nov 17 '18 at 21:20
  • could I please ask a last advice, now I managed to decrypt; I would like to uninstall the 1,4; how can I do that with files I had to compile myself, brew is saying that v2.21 is already installed so I have a conflict I guess, if I do gpg --version I get 1.4 – jotyhista Nov 17 '18 at 21:35
  • actually I got it brew link --overwrite gnupg – jotyhista Nov 17 '18 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.