1

I have 2 servers that will be passing data between them, one is Ubuntu and the other is Red Hat. Using the already installed versions on each, Ubuntu is 12.04 with gnuPG 1.4.x and Red Hat is Enterprise 6.1 with gnuPG 2.0.x, I can't decrypt going from Ubuntu to Red Hat.

I'll be using PHP to encrypt/decrypt using the gnuPG extension on the Ubuntu server. The Red Hat server will be accessing gnuPG through shell out of CGI scripts.

I created public/private keys on Red Hat, exported the public key. Imported it into Ubuntu and signed it. I then encrypted a file on Ubuntu, copied it to the Red Hat server and attempted to decrypt it.

I'm getting this response

gpg -d tocyn.gpg
gpg: no valid OpenPGP data found.
gpg: decrypt_message failed: Unknown system error

Not sure where to go with this as I haven't been able to find much info on what this response means. Is it not possible to do this between the 2 different versions? I may have misunderstood, but I thought they were virtually the same.

  • Are you 100% sure you have Ubuntu 1.4.x because that does not seem right. What version of gnuPG is installed on each system? – Ramhound Jul 29 '14 at 13:13
  • Those are the gnuPG versions, not the OS versions. I'll add the OS versions to the question. – Bill Jul 29 '14 at 13:13
0

Both recent versions of GnuPG 2.0.x and 1.4.x are fully compatible. This should not be the problem, verify that the data was transferred correctly (eg. using checksums).

Anyway: Debian-derivatives like Ubuntu install both GnuPG 1 and 2, where gpg is GnuPG 1.4.x and gpg2 GnuPG 2.0.x.

From GnuPG 2's man page:

gpg2 is the OpenPGP part of the GNU Privacy Guard (GnuPG/MacGPG2). It is a tool to provide digital encryption and signing services using the OpenPGP standard. gpg2 features complete key management and all bells and whistles you can expect from a decent OpenPGP implementation.

In contrast to the standalone version gpg, which is more suited for server and embedded platforms, this version is commonly installed under the name gpg2 and more targeted to the desktop as it requires several other modules to be installed. The standalone version will be kept maintained and it is possible to install both versions on the same system. If you need to use different configuration files, you should make use of something like gpg.conf-2' instead of justgpg.conf'.

  • Thank you for that answer, which is what I had thought. I have determined there was a problem with the file. Checksums didn't match (which I probably should have checked in the first place). Once I re-posted the file, it worked. The error response through me a bit. – Bill Jul 29 '14 at 13:40
  • I get "gpg: no valid OpenPGP data found." too with apt-key add fileWithKeys, just installed also gnupg2 but nothing changed – Aquarius Power Feb 22 '15 at 18:15
  • This is a unrelated question, please post it as one. And if possible, include the output of gpg --list-packets < fileWIthKeys. – Jens Erat Feb 22 '15 at 18:25

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.