|
|
GPG usage for encrytion or signing and mail integration
toucheatout 2006-05-19 19:09 Linux
Cryptography, encryption, digital signatures...Nowadays encryption and digital signature are two cryptographic applications that are bound to be more and more widely used as a replacement of safes and signatures for digital content. While the principles are used since quite some time in protocols like SSH or other VPNs for network trafic and PGP for emails, their use is not as widespread as it "should". We'll show here how to create and use a pair of keys suitable for the use with GnuPG, the open implementation of PGP. A word on securityThe keys that we will be generating can be used under certain legislation as a proof as strong as physical evidence, given the robustness of the algorithm. Given the time/computing power needed to break a GPG keypair, only governemental agencies can afford, so... Pay good attention to keep the private key absolutely secured. Indeed if compromised, the keypair becomes useless for encryption and anyone with it can digitally sign documents with your signature (and it will just look as good as if you made it...). Creating the keypair and getting the cryptographic infrastructure rightCreation of the keypairThis is simply made with Exporting your (public, of course) key
Importing your peers' keysWhen you want to add public keys from your peers, as you could have guessed, use the command: Build your web of trustSo we can sign things now... put a mark that you in person approve of digital stuff. The other way, people can use you public key to encrypt messages only issued for you. Why couldn't the key itself get signed ? If I sign Alice's key, it will appear to anyone knowing me (via my public key) that I signed this key, in a way vouching for Alice to really be a human who really is named Alice. Generally, a key gets signed by good friends, people who know you from a long time, or generally people fairly certain that you are who you claim to be. In signing parties or for friends' friends, an ID is (should be) asked. This is the process of building a web of trust. To sign a key: Using the public keyserversThere is a network of servers keeping the public keys available. One can submit his own, for instance at MIT keyserver web interface. Be aware though that you cannot erase a key from the server if you submitted it. You have to issuie a revocation certificate that you upload to the same server. If you lost the private key, you have no mean of generating it, so it is a good precaution to generate one before submitting the key, and keep it somewhere it can be found in case you key gets compromised or lost. Using GnuPG for encryption/decryptionYou MUST have the public key of the intended recipient in case you want to encrypt. The other way around, decryption: Using GnuPG for signingThere are different ways of signing. Note that best practices recommend to sign any encrypted message. |
|