I have data which I encrypted using gpg -ac --cipher-algo AES256 data and a passphrase. I moved that file onto a different machine with gpg as well, but unlike the system it was encrypted on (TrueOS), it doesn't have a GUI installed. When I try to decrypt the file using gpg -d -o data.d data I get these errors:

  • gpg: AES256 encrypted data
  • gpg: problem with the agent: End of file
  • gpg:encrypted with 1 passphrase
  • gpg: decryption failed: No secret key

My file looks like this:

-----BEGIN PGP MESSAGE----- data in here -----END PGP MESSAGE-----

I tried the opposite: encrypting a file. I made one and added random text, and tried to encrypt it using gpg -a --symmetric --cipher-algo AES256 data1 and got this output:

  • gpg: problem with the agent: End of file
  • gpg: error creating passphrase: Operation cancelled
  • gpg: symmetric encryption of '' failed: Operation cancelled This is quite strange. I suspect it has something to do with pinentry; I had appended this line to my ~/.gnupg/gpg-agent.conf : pinentry-program /usr/bin/pinentry-tty
  • I'm assuming the last bits you tried ("the opposite") was on the Tru64 system? Do you have pinentry installed in the configured location there? – Kusalananda Jul 3 '17 at 14:36
  • No, it wasn't, it was on the same ArchLinux system that I tried to decrypt it on. – Distant Graphics Jul 3 '17 at 14:39
  • The encryption command writes to data.asc. Did you rename it to data? From your description it looks like you're trying to decrypt the original plaintext file. – Gilles Jul 3 '17 at 23:16

Your Answer

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

Browse other questions tagged or ask your own question.