After installing everything and configuring everything in the way we want, we can start on encrypting and decrypting.
When encrypting or decrypting it is possible to have more than
one private key in use. If this occurs you need to select the
active key. This can be done by using the option -u
UID
or by using the option --local-user UID
.
This causes the default key to use to be replaced by wanted
key.
If you want to change recipient this can be done by the option
-r
or by the option --recipient
.
The command to encrypt is
orgpg -e Recipient [Data]
To avoid the risk that somebody else claims to be you, it is very useful to sign everything you encrypt, see signatures.gpg --encrypt Recipient [Data]
The command for decrypting is:
orgpg [-d] [Data]
Also heregpg [--decrypt] [Data]
stdout
is preset, but with the
-o
option you can redirect the output to a file.