PGP and GnuPG GPG General Hints, Notes, Howtos


These are my currently collected notes on how to do common things in both pgp and gnupg

encrypt some.file

    pgp -e [-a] some.file "their key name #1" [..."their key name #2"...]
    gpg --encrypt --armor                   "--recipient their key #1"                   [..."--recipient their key name #2" \...]
                  some.file

decrypt some.file.pgp

    pgp -d [+force] -o some.file  some.file.pgp
    gpg --decrypt   -o some.file  some.file.gpg 

generate keypair

    pgp -kg
    gpg --gen-key

add key to keyring

    pgp -ka some.keyfile
    gpg --import some.keyfile

extract key from keyring

    pgp -kx[a]
    pgp -kx[a] "userid" output.file .pgp/secring.skr
    gpg --export [--armor] somekey >some.pub.key

sign a key

    pgp -ks
    gpg --sign-key

list keys

    pgp -kv[v]
    gpg --list-keys

    pgp -kvc
    gpg --fingerprint

    pgp -kc
    gpg --list-sigs

convert pgp to gnupg

    pgp -ka "useridN" userN.pub  #each public key
    pgp -kx "userid" output.file .pgp/secring.skr
    gpg --import output.file
    gpg --import output.file     #do twice if new gnupg user
    gpg --import userN.pub       #each public key
    gpg --list-keys

help

    pgp -[?|k]
    gpg -?

websites

    http://web.mit.edu/network/pgp.html    free (non-commercial use)
    http://www.pgp.com/                    pgp corp (commercial use)
    http://www.gnupg.org/                  GNU Privacy guard


date: 12/07/2007