The PGP "How'd You Do That?" Page
Part IA: What Does "Signing" Something Mean?
Part IB: What Is A Time-Stamp?
Part IA: What Does "Signing" Something Mean?
Ah, good question. In the non-cyber world, "signing" usually means that you've put your name in your handwriting onto some document. You are generally certifying that you created the document or agree to its contents. Your signature on a letter or a contract, for example, is pretty good PROOF that you created it or at least know of the contents.
On really important stuff, sometimes you have to sign by leaving a fingerprint or thumbprint - it is unique to you, very difficult forge, and you can't say later that it wasn't really you that left it there.
In the cyber world, things are not so simple. Forging my handwriting and/or signature and/or fingerprint may be very difficult, but typing my name into an electronic document is no problem. After all, "Jim Willingham" looks pretty much the same whether I actually keyboarded it in or someone else did.
What's more, even if I actually DID type it in, what's to keep someone from changing the electronic document? Anyone can add or delete anything they want, and it still has my name at the bottom of it. That's pretty hard to do with an original document in the non-cyber world, but a piece of cake on a computer.
With the advent of two-key cryptography, signing electronic documents and files became a reality. Without getting into a bunch of detail, two-key cryptography was originally designed to encrypt stuff so that only a specific person could decrypt and read the document. The "two keys" are a "public" key and a "secret" key. They are absolutely unique in the universe, and they only work together.
Again, without getting too technical, the idea is that a public key is just that -- public. You can publish it, give it away, put it on a billboard, or whatever, because the only thing in the world that it's good for is to encrypt stuff that can ONLY be decrypted by the secret key. That means that anyone having your "public" key can encrypt stuff. Once it's encrypted, the only human on earth that can decrypt it is whoever has the "secret" key - presumably you.
-
Quick example: You have a letter you want to send to me, but you want to make sure that I'm the only one who reads it. You get my public key (which I've made available to everyone), and use it to encrypt the letter. At this point, the only way to decrypt the letter (make it readable) is to have the secret key. Once you've encrypted it using my public key, even YOU can't decrypt it.
-
Since I'm the only one that has the "secret" key, that means that I'm the only one that can decrypt the letter. It is absolutely secure from interception or reading by anyone else.
Now, what is not immediately apparent (or well known) is that the "secret" key can also encrypt stuff. The difference is that it can be decrypted by anyone who has the "public" key. Not very secure (anyone can decrypt the message -- all they need is the public key, which anyone can get), but it can be used to "sign" documents.
How? Well, if you have my public key and it will decrypt a file or document, that means the file or document HAS to have been encrypted with my secret key. Since I'm the only one with access to the secret key, that pretty much means beyond question that I'm the one who encrypted it in the first place.
So, how do we keep anyone from changing the contents of the signed document? Simple. There are a number of very complex, sophisticated programs out there that "hash" documents using universal standards. What that means is that the entire document, from top to bottom is read by the program and turned into a mathematical expression which is called a "hash" or "hash digest".
No matter how many times you "hash" the document, it will always produce the same number. If you exactly duplicate the document, the duplicate will have the same "hash" number. On the other hand, if you change ANYTHING in the document, even as small as adding or deleting a single space in a thousand-page document, it will NOT produce the same number. In fact, it won't even be close. So, if I have two documents and they both produce the same "hash" number, they are exact duplicates. If the "hash" numbers are different, so are the documents.
PGP combines these two ideas. First it goes through the document and "hashes" it, producing a unique number. Second, it uses my secret key to encrypt that unique number and attach it to the document. Anyone with my public key can decrypt the "hash" number. Since my public key will decrypt it, that means without question that I'm the one who encrypted it in the first place. If the document is then "hashed", the hash number should match the one decrypted by my public key. If it does, the document hasn't been tampered with.
Voila, a signature - I definitely produced it, and it definitely hasn't been changed, which is pretty much the purpose for signing stuff in the first place.
This is the basis for certifiable electronic documents, which are now being accepted as "legal" in a number of states. It is now possible to "sign" a contract using a method that's considerably more secure than using your fingerprints. After all, a skillful forger can use a high-resolution scanner, some clever software and talent, and put your fingerprints on any document.
It doesn't matter how skillful he is, however, when it comes to two-key signatures. If the document doesn't match exactly, the "hash" won't match. (If it DOES match, he's produced a duplicate document, which kinda defeats the purpose of forging, if you get my drift...) If he "re-hashes" the new version to get a valid "hash" number, he can't use my secret key to encrypt the number, so the keys won't match. Either way, PGP shows it as a "bad signature". When "Bad Signature" shows up, that means either the purported signer didn't sign it, or the document was changed since he signed it.
Simple, yes?
Part IB: What Is A Timestamp?
Before you continue, please note that you must have a pretty good handle on what "signing" something means. If not, this won't make a diddly's worth of sense to you. If you don't know what's behind PGP/electronic signatures, click HERE to go back to the "What Does Signing Something Mean?" part of this page. Once you understand that, come on back.
A "TimeStamp" is simply a PGP signature applied to a message, document, or file. The difference is that the PGP signature is applied by a disinterested third party, and includes the date and time that the signature was applied.
Since the signature includes the date and time as part of the total package being signed, the date, time or body of the message/document cannot be altered without invalidating the signature. Assuming that the signing authority is trusted, this is absolute proof that a document existed at that date and time - a useful feature for copyrights, patents, legal filings, and other time-dependent sorts of things.
Probably the best-known date/time signature authority is Matthew Richardson of I.T. Consultancy (Jersey, Channel Islands, UK). Their public key is widely distributed (available to anyone).
Here's how it works:
1. Send them an email which consists of the document or message you want stamped.
2. They add the current date and time to the document/message, along with instructions on how to verify it.
3. They then sign the whole thing (including the date/time stamp) with their secret key and email it back to you.
4. You cut and paste, save, or otherwise retrieve the document with the signature and store it or whatever it was you wanted to do with it.
5. From that time, anyone wishing to confirm that the document in fact existed at that date and time simply checks the signature using their (widely available) public key.
They have a number of publicly accessible safeguards in place to assure anyone who wants to check that the date/time stamp and signature are completely valid and cannot be forged, even by them. See their web-site for details of their verification and security routines.
Now, if you're following this so far, your next question should be "Can they timestamp something I've already signed without invalidating my signature?" If a way could be found for you to electronically sign the document, and for them to ALSO timestamp it, if would not only prove that it existed at a given date and time, but that you wrote it.
The short answer: Yes, they can. Since their timestamp is simply another signature, what they wind up signing is the whole package INCLUDING YOUR SIGNATURE. Basically, they "wrap" your signed document in THEIR signature. This is called a compound signature, and PGP handles it just fine, thanks. More on that in the next sections of this tutorial.
If you're new to this encryption thing and you'd like to see what a public key looks like, or if you want my public key, click here. Remember to close the new window that will open up when you're done.
Go To Part I (What Does "Signing" Something Mean?)
Go To Part II (How Do I Check A Web-Page Signature?)
Go To Part III (How Do I Sign A Web-Page?)
©2000, 2001 All Rights Reserved