Home > Web hosting - Linux. > Using GPG on the Linux webhosting platform.

Using GPG on the Linux webhosting platform.

GPG (or GNU privacy guard) is an application that allows you to sign/encrypt your data for transmission, by email, across the internet.

In order to use GPG you will need to have secure keys, which you can generate on our server or elsewhere and import it.

To generate a key, use the ‘–gen-key’ flag:

$ gpg –gen-key (and follow the instructions. In most cases choosing the default answers will be sufficient)

Import the public key of the person you are sending email to:-

$ gpg –import <keyfile name>

To encrypt a text file, with a key you hold, use:

$ gpg –out <encrypted file name> –recipient <uid> –armour –encrypt <original file name>

There are numerous options for connecting to GPG using Perl so we would recommend an internet search to find something that suites your programming style (e.g. http://www.perlmonks.org/?node_id=152489)

GPG is also supported by PHP as detailed at http://www.php.net/manual/en/book.gnupg.php

For more info on GPG see the documentation section at www.gnupg.org.