Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 951 Bytes

gpg.md

File metadata and controls

53 lines (36 loc) · 951 Bytes

GPG

Keys

Create a key

gpg --full-generate-key

List keys

gpg --list-secret-keys

Import public key

gpg --import yourfriends.key

Export public key

gpg --export -a "Your Name" > your.key

Export/import private key

gpg --export-secret-keys $KEY_ID > my-private-key.asc
gpg --import my-private-key.asc

Encrypt and decrypt

# Encrypt
gpg -e text.txt

# Decrypt
gpg -d text.txt.gpg > text.txt

# Decrypt to terminal
gpg -d text.txt.gpg 2>/dev/null

Links