navi: Add GPG cheatsheet
This commit is contained in:
parent
120e4bbc37
commit
bab8f8b6dd
42
navi/gpg.cheat
Normal file
42
navi/gpg.cheat
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
% gpg
|
||||||
|
|
||||||
|
# GPG version
|
||||||
|
gpg --version
|
||||||
|
|
||||||
|
# GPG generate key
|
||||||
|
gpg --gen-key
|
||||||
|
|
||||||
|
# List keys
|
||||||
|
gpg --list-keys
|
||||||
|
|
||||||
|
# Export public key
|
||||||
|
gpg --output <filename> --export <gpg_public_keys>
|
||||||
|
|
||||||
|
# Export public key as ASCII
|
||||||
|
gpg --output <filename> --export --armor <gpg_public_keys>
|
||||||
|
|
||||||
|
# Import public key
|
||||||
|
gpg --import <gpg_files>
|
||||||
|
|
||||||
|
# Encrypt document
|
||||||
|
gpg --output <filename> --encrypt --recipient <gpg_public_keys> <files>
|
||||||
|
|
||||||
|
# Decrypt document
|
||||||
|
gpg --output <filename> --decrypt <files>
|
||||||
|
|
||||||
|
# Make a signature
|
||||||
|
gpg --output <signature_file> --sign <files>
|
||||||
|
|
||||||
|
# Verify signature
|
||||||
|
gpg --verify <files>
|
||||||
|
|
||||||
|
# Clearsign documents
|
||||||
|
gpg --clearsign <filename>
|
||||||
|
|
||||||
|
# Detach signature
|
||||||
|
gpg --output <filename_sig> --detach-sig <filename>
|
||||||
|
|
||||||
|
$ files: ls * | awk '{print $1}'
|
||||||
|
$ gpg_files: ls *.gpg | awk '{print $1}'
|
||||||
|
$ gpg_public_keys: gpg --list-keys | grep uid | sed 's/.*<\(.*\)>.*/\1/' | awk '{print $1}'
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user