GPG cheatsheet
Getting Started
Creating your secret key will start with:gpg --gen-keyYou should probably use the default settings, except it doesn't hurt to make the key size as large as allowed (4096 bits currently.) The larger the key size, the longer it will take to initially generate your key (and encryption/decryption will be slightly slower. That is a Good Thing, as anyone attempting to break your encryption will also need to spend more time too.)
to export a public key into file public.key:
gpg --export -a "User Name" > public.keylist your key :
gpg --list-keys your@email.addressto export a public key into file public.key :
gpg --export -a "User Name" > public.keyto export a private key :
gpg --export-secret-key -a "User Name" > private.keyTo encrypt data, use :
gpg -e -u "Sender User Name" -r "Receiver User Name" somefileor
gpg -s -a -r "User Name" -e somefile # the output file ""somefile.asc""or
gpg --encrypt somefile # the output file ""somefile.gpg""To decrypt data, use :
gpg -d somefile.gpg
Comments
Post a Comment