First create a key:
gpg --gen-key
For generation I use the default of RSA and RSA, and I use 4096 bits, and i usually let the keys live for 1y.
Create a Revocation Certificate so you can Revoke you key on a keyserver
gpg --gen-revoke --armor --output=GPGRevocationCertificate.asc your@email.address
Create your ASCII public key so other people can encrypt to you.
gpg --armor --output pubkey.txt --export 'Your Name'
Post it to a key server
gpg --send-keys 'Your Name' --keyserver http://pgp..mit.edu
To encrypt you need to add your self as a recipiant.
gpg --encrypt --recipient 'Your Name' secret.txt
To decrypt a file.
gpg --output secret.txt --decrypt secret.txt.gpg
If you want to add a user to your keyring.
gpg --import key.asc
Recent Comments