GNUPG

Tools to sign data and encrypt data.

Save your secrets, encripted.

Protect encripted data with password

Desencrypt your secrets only when needed.

gpg --full-generate-key

Follow instructions:

  1. Add the email you are going to use for email
  2. Use RSA key
  3. Set a password

Create revocation certificate if you want to remove old gpg-key.

gpg --output ~/revocation.crt --gen-revoke yourEmail
# 
chmod 600 ~/revocation.crt

See your gpg keys:

gpg --list-keys

Share Public key:

gpg --output ~/username.key --armor --export user@email 

Set your public key access in public server

gpg --send-keys --keyserver pgp.mit.edu YOURKEY

Encript files:

gpg --encrypt --sign --armor -r user@mail file.txt

Deincript files

gpg --decrypt file.asc > plain.txt
  • For email proposes:
    • You can only open a file encrypted by someone else if you are that contact in the trust list
    • Both need to have both public keys
gpg --import new-contact.key