GNU Privacy Guard (GnuPG or GPG) is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP.
You can find GPG here
GENERATE NEW KEY:
gpg --gen-key
Now you have to choose between :
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
After you have to choose the lenght of the key. More long more security vs. bruteforce attack.
Now you have to choose the expiration date.
Now insert real name, email, comment and the passphrase.
To generate revocation certificate type:
gpg --output filename.asc --gen-revoke email
To show the list of keys type:
gpg --list-keys
To export the public key type:
gpg --output filename.gpg --export email
Now send the public key to the others.
To import the public key type:
gpg --import filename.gpg
To encrypt a document type:
gpg --output doc.gpg --encrypt --recipient email doc
To decrypt a document type:
gpg --output doc --decrypt doc.gpg
If you have the public key you can encrypt a doc and send to some that have the private key to decrypt the document.
To sign a document type:
gpg --output doc.sig --sign doc
We use the sign to ensure the that no one has changed the document!
To verify the sign use the --verify option.
To verify the sign and decrypt the document use --decrypt
If you have a problem or you need some explanations just write under this post!
No comments:
Post a Comment