1

[Edited to ask more specific question]

I require to encrypt some files with a strong symmetric encryption algorithm - AES256 seems like a good choice - and use GPG for this. I am only using GPG for this symmetric encryption, and I do not presently need it for any other cryptography tasks.

The version of GPG I have is the one that came with this version of Ubuntu - v1.4.16. But I wonder if there could be any future problems/issues with using GPG v2.x to decrypt an AES256 encrypted file that was created by an older GPG v1.4?

If I did upgrade to a newer GPG version - what would be the best way to do the upgrade, for this version of Ubuntu? Would the old gpg version be kept? And could there be any conflicts between the versions to be aware of?

Many thanks

[Re Closure of my question :- Perhaps it could be moved to another StackExchange forum such as SuperUser or Unix/Linux. On reflection Ask Ubuntu was maybe not the best forum to post it to, as its not specific to Ubuntu, that just happens to be the system I am on. I have changed the title.]

3
  • 2
    You're asking three or four completely unrelated questions at the same time, which hardly fits the Stack Exchange Q&A model. Please consider asking separate questions instead.
    – Jens Erat
    Dec 19, 2017 at 19:26
  • In short: There should be no conflicts. GPG2 is fully backwards compatible with legacy GPG in relation to data exchange and configuration. The latter doesn't support everything the former can produce and it will ignore unsupported configuration file entries. You can install both on the same system without issues. Dec 22, 2017 at 16:23
  • Please see this answer on SuperUser - I think this question is probably better there, although it is indeed applicable to Ubuntu. Dec 22, 2017 at 17:01

2 Answers 2

1

The best way to upgrade gnupg is to upgrade or fresh install the next Long Term Support version of Ubuntu, which is Ubuntu 16.04. Ubuntu 16.04 comes with gnupg2 (new v2.x) installed by default instead of gnupg which is installed by default in Ubuntu 14.04. GnuPG 2.x is the new modularized version of GnuPG supporting OpenPGP and S/MIME.

If you upgrade to Ubuntu 18.04 when it is released, you will have almost the same gnupg2 version, 2.1.15 instead of 2.1.11.

0

Having tested with v14.04.5 LTS and v16.04.3 LTS of Ubuntu, the newer version of GPG (v2.1.11) can successfully decrypt an encrypted file created with the older GPG version (v1.4.16), but for the newer version you use the command gpg2 (the older 1.4 version of GPG is still available on Ubuntu 16.04.5 from the command 'gpg'). Also for the newer version you need to include the option --batch if you want to use the --passphrase option, otherwise it won't work (see man gpg2 page).

Thus if on the older version you AES256 encrypt with :-

sudo gpg --output a1.txt.gpg --passphrase abc123 --cipher-algo AES256 --symmetric a1.txt

then you decrypt on newer version with :-

sudo gpg2 --output a1.txt --batch --passphrase abc123 --decrypt a1.txt.gpg

(The --passphrase option is useful to avoid having to manually type in a very long password).

You must log in to answer this question.