gpg --symmetric meu_texto.txt
gpg --output meu_texto.txt --decrypt meu_texto.txt.gpg
gpg --full-generate-key
gpg -r myrecipient@domain.com.br -e file_i_want_to_encrypt
gpg -d file.gpg
gpg --list-keys
gpg --delete-secret-keys "keyname" (delete secret key)
gpg --delete-key "keyname" (delete public key)
gpg-agent
gpg --export -a contato@domain.com.br > contato@your_gpg.pub
- First way
gpg --export-secret-keys --armor key_name > /path/to/secret-key-backup.asc
- Second way
gpg -o private.gpg --export-options backup --export-secret-keys contato@domain.com.br
- OBS: This invocation places the key in the file private.gpg in the current directory. The export option backup exports all necessary data for GnuPG to restore the key.
- Import the private key.
gpg --import-options restore --import private.gpg
This invocation imports the key from the file private.gpg in the current directory. The import option restore imports all necessary data for GnuPG to fully restore the key. The import option keep-ownertrust keeps the owner trust of the key instead of clearing it’s trust value. This saves having to manually set the trust value for the key later.
- Enter the private key’s passphrase in the [Import Passphrase Prompt] to import the key
- Now, edit the freshly imported key.
gpg --edit-key contato@domain.com.br
gpg> trust
Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
gpg> quit