dada


GPG/PGP

A small cheat sheet for using gpg (when prompted for “user ID”, it means the email address):

$ gpg -e file                         # encrypt the file "file"
$ gpg file                            # decrypt the file "file"

$ gpg --gen-key                       # create a keypair

$ gpg --list-keys                     # list public keys
$ gpg --list-private-keys             # list private keys

$ gpg --import file                   # import keys from "file"

$ gpg --export -a "user_id"           # export a key (private/public):
$ gpg --export > file                 # export all public keys to "file"
$ gpg --export-secret-keys > file2    # export all private keys to "file2"

$ gpg --edit-key -a "user_id"         # to sign a key, select 'sign'