
Use the -u flag to tell gpg which key to use for signing the encrypted file.Įncrypt the file file.txt for recipient and sign it using the private key of -print-mds key.ascīy short key ID (optionally prefix the key-id with 0x (8 hex digits long)īy long key ID (optionally prefix the key-id with 0x (16 hex digits long)īy fingerprint (optionally prefix with 0x)Į.g. If you have multiple private keys on your keyring, you may want to encrypt a document using a particular key. If someone wanted to check and see that the file was from you, it would no longer appear to be so. If, later down the line, the file you encrypted was altered by a hacker in a "man in the middle" attack, your original signature and the current state of the file would no longer match up. If a file is signed with a private key, you're certifying that it came from you. Your private key is the only one that can provide this unique signature. Since the file lacks a signature, he has no way of knowing who encrypted it using his public key. Your friend, who sees that the message came from your email address, decrypts the file, and is tricked into believing that the file was sent from you. He knows your friend's public key, so he sends a message to your friend with malicious intent, claiming to be you. Imagine there is a hacker, who gains access to your email. This helps add trust to someone when they're decrypting a file. Signatures serve a useful purpose: Since signature is unique, if a file contains your signature, it must be from you. This signature tells gpg to provide a proof of origin, specifying where the file came from. It's important to sign a file with your key when you're encrypting it for your recipient. Tip: If you have multiple private keys, you don't need to specify which one to decrypt a file. Public Key: A key that can be used to encrypt messages that can only be decrypted with the corresponding private key.Private Key: A key that can be used to decrypt any messages previously encrypted with the corresponding public key.Key-Pair: A private key and it's corresponding public key.Key Certificate: An assertion that a certain key belongs to a certain entity.Key ID: A hexadecimal string that identifies a key.



However, version 1 is only required if you're trying to decrypt PGP keys from 20+ years ago. It's currently on version 2, which is not compatible with version 1. With this in mind, technically a "key-pair" is what refers to a public and private key, in the industry it’s common for "key" to mean "key-pair"Īt this point, GPG has been around a long time. The GNU Privacy Guard GPG implements the set of standards outlined in OpenPGP.įor this reason, it is effectively synonymous to say "GPG key" and "PGP key" since they're both "OpenPGP keys". Even though PGP is not open source, OpenPGP is. In 1997, Symantec released OpenPGP, an open source set of standards for encryption software.

Both are compatible with each other, and the reason why is where it gets confusing.
INSTALL GPG MAIL SOFTWARE
Pretty Good Privacy (PGP) is proprietary software written by Symantec, and is another implementation of OpenPGP.
INSTALL GPG MAIL HOW TO
GNU Privacy Guard (GPG) is open source software which implements OpenPGP standard RFC4880, which specifies a protocol for how to encrypt and decrypt files.
