[[.|[up]]] ====== gpg ====== ===== keys ===== First, create a key pair to identify yourself: gpg --full-generate-key This will ask for a user name and e-mail address, and the keys will be coupled to that e-mail address. Now, export the public key so you can publish it. gpg --armor --export EMAIL-ADDRESS > public-key.gpg Anyone who wants to encrypt something for you needs to import your public key: gpg --import public-key.gpg ===== encryption ===== Now people with your key can encrypt data for you: gpg -r EMAIL-ADDRESS -e FILE-TO-ENCRYPT This will create an encrypted file FILE-TO-ENCRYPT.gpg that they can send you. ===== decryption ===== The data can be decrypted by whoever owns your private key (hopefully only yourself; just in case, make sure to use a non-empty passphrase when you create your keys): gpg FILE-TO-DECRYPT.gpg