Henry Dalziel | General Hacking Posts | October 26, 2012
It looks like this:
—–BEGIN PGP PUBLIC KEY BLOCK—–
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
—–END PGP PUBLIC KEY BLOCK—–
For those that don’t know – the basic idea is that the sender generates two exact matched keys. One of these security keys is referred to as a “Public” key whilst the other is set as “Private”. You give the Public key to anyone who asks for it; you can even publish it on your web site. The private security key you keep secret, locked up on your own computer. A document (a text or binary file) can be encrypted using either key, and is decrypted with the other. The choice of which key to use to encrypt depends upon your purpose.
A working example:
Say if you sent me something, you would encrypt it using my public key. No one else can decrypt it; only my private key will work. On the other hand, I might be worried that it really is you sending me the email. In that case, you’d encrypt your message using your private key (this is called “signing”). If I can decrypt it with your public key (presumably I somehow obtained that key and trust that it really is yours), I know that the message really came from you.