2019-10-11 08:02:39 +00:00
|
|
|
% gpg
|
|
|
|
|
|
|
|
# gpg version
|
|
|
|
gpg --version
|
|
|
|
|
|
|
|
# gpg generate key
|
|
|
|
gpg --gen-key
|
|
|
|
|
|
|
|
# list keys
|
|
|
|
gpg --list-keys
|
|
|
|
|
|
|
|
# distribute public key to key server
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --keyserver <key_server> --send-keys <public_key>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# export public key
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --output <filename_gpg> --export <key_name>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# import public key
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --import <filename_gpg>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# encrypt document
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --output <output_filename_gpg> --encrypt --recipient <public_key> <input_filename>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# decrypt document
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --output <filename> --decrypt <filename_gpg>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# make a signature
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --output <filename_sig> --sign <filename>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# verify signature
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --output <filename> <filename> --decrypt <filename_sig>
|
2019-10-11 08:02:39 +00:00
|
|
|
|
|
|
|
# clearsign documents
|
|
|
|
gpg --clearsign <filename>
|
|
|
|
|
|
|
|
# detach signature
|
2019-10-14 14:24:10 +00:00
|
|
|
gpg --output <filename_sig> --detach-sig <filename>
|