Some handy usage information on how to use Gnu Privacy Guard (GPG) - an open source implementation of PGP:

gpg --gen-key gpg --output revoke.asc --gen-revoke toms_key gpg --list-keys gpg --output public_key.gpg --export test_user@nowhere.com (binary) gpg --armor --output tom.gpg --export test_user@nowhere.com gpg --import another_users_public_key.gpggpg --output doc gpg --encrypt --recipient another_user@somewhere.net doc.txt gpg --output doc.txt --decrypt doc.gpg

I've also been playing with the python-gnupginterface python module, again looks pretty easy to implement - the following code simply encrypts a file with a passphrase:

import GnuPGInterface... #Run file through gpg passphrase = "This is the passphrase" input = open("filename","r") output = open("filename.gpg", "w") gnupg = GnuPGInterface.GnuPG() gnupg.options.armor = 1 gnupg.options.meta_interactive = 0 gnupg.options.extra_args.append('--no-secmem-warning') p1 = gnupg.run(['--symmetric'], create_fhs=['passphrase'], attach_fhs={'stdin': input, 'stdout': output}) p1.handles['passphrase'].write(passphrase) p1.handles['passphrase'].close() p1.wait() print "File has been encrypted (gpg)"