GNU Privacy Guard

From LinuxReviews
Jump to navigationJump to search

The GNU Privacy Guard (GnuPG or GPG) is the standard for encrypting e-mail messages, instant messaging conversations and files on the Internet. It works by encrypting messages using asymmetric keypairs individually generated by GnuPG users. You generate a key-pair, give the public key to your friends and keep for yourself - and decrypt with - a private key which is protected by a passphrase.

Finding peoples keys

This little shell script will check a number of known nameservers for a persons public GnuPG/PGP key. Keys are identified by a number such as 0x79E48D63A1A23194.

File: fetachkey
# Thanks to George Shaffer
if [ "$1" == "" ];then
  echo "Enter a key as argument!"
  exit 1

echo ''|while read keyserver;do

if gpg --keyserver $keyserver --recv-key $1
   echo Found key at $keyserver