Data Encryption: Public/Private Keys


This section provided for those who want to know how Encryption Keys work

We are all familiar with the normal locks and keys which are used to secure doors, safe boxes, briefcases, and such. If you want to send a secret document to a colleague, for instance, you put it into a safe box, lock it, and send it off. Your colleague, who must also possess a copy of the same key, receives the safe box, opens it with her key, and reads your document. This technique has been used for centuries, and provides security against all except skilled lock pickers, or a dedicated person with a very large hammer. But there is a problem with this method. How do you get a copy of the safe-box key to your colleague? You must be able to do it over a very secure channel, and if you have such a thing, you may as well use it to transmit the document, and dispense with the safe-box.

It is possible to do an analogous thing with software. Simple encryption-decryption programs exist which will garble a text file on the basis of a ‘software key’ (which can be just a string of text characters). The recipient of such a garbled message can then restore it by passing the message, together with the same ‘software key’, through the same program. But the same security weaknesses are still present. Now, the ‘Skilled Lock Picker’ is a Computer Hacker who is siphoning your transmissions off the phone lines somewhere, and the ‘Dedicated Person with the Hammer’ is a government agency or large corporate entity. Their ‘hammer’ is a computer which they apply to the problem of breaking your code. This is not always all that difficult! There is software available commercially for less than 200$ that will crack the encryption codes built into other packages such as WinZIP®, Excel®, Access®, etc., thereby allowing the users (or anyone else) to retrieve their forgotten passwords. It has been reliably reported that the producers of this code-cracking program have built time-delays into their code to make it seem like the program is working hard!

The Public/Private Key algorithm (first invented by W. Diffie & M. E. Hellman around 1976, and which forms the basis for the software recommended by „ISAaC”. It is an exceedingly secure and reliable arrangement which operates with two software keys. Every person who uses such software generates two keys for him-or-herself. One is a ‘Private Key’ which is kept secret, and the other is a ‘Public Key’ which is given out to anyone who wants it. These two keys possess an almost magical magical property; If a document is ‘lockedֹ with one of the keys, it can be ‘unlocked’ only with the other one! Let’s look at how this works in practice: Klaus wants to send a secure message to Karin. He encrypts the message with Karin’s Public Key (which she has made widely available), and sends it to her. This message can be unlocked only with Karin’s Private Key ... which only she has. One of the benefits of this process is that the very sensitive item, i.e., Karin’s Private Key, is not required to be sent to anyone through any channel, secure or insecure. It stays safely at home. But the real benefit comes if Klaus wants to ‘sign’ his message. This is what he does: He writes his message to Karin, and then ‘signs’ it with his own private key. Then he encrypts the whole shebang with Karin’s public key, and sends it off to her. As before, Karin unlocks the message with her private key, and then unlocks the signature with Klaus’ public key, which Klaus has made widely available, of course. Up comes a message on the screen which says, in effect, “Yes, the public key which unlocked the signature matches the private key which locked it.” Karin now knows that it was really Klaus who sent the message, because only Klaus is in possession of his private key. Such a signature is more reliable than one done by hand, on paper and with a pen, because forging is not possible.

But there’s more to this ‘digital signature’ business. You can sign anything this way; data files, software programs, and plain everyday text messages. If you sign such an unencrypted text message, for instance, the text will be imbedded in a ‘signature block’. Your text will not be affected, and the signature block will be gibberish, but that’s Ok. It will look something like this:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Liebe Brigitte! Kannst du es glauben? Ich habe einen Klavier gekauft!

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use 

iQA/AwUBPP0B5SkF/hH1dhf5EQJasACg6x9G1WQeDJHFbPppRRPF1fFfgJgAn2oK
ouyXsn14PYpuE1hBVb3i49Lw
=V2Co
-----END PGP SIGNATURE-----
You e-mail the whole thing off to Brigitte. She reads it, and then hands the message to the encryption software for verification. This verification comprises two phases:

This is what Brigitte sees:

*** PGP SIGNATURE VERIFICATION ***
*** Status:   Good Signature
*** Signer:   Charles E. Rose <1935.08.21 Escanaba ros5e@ISAaC.com> (0xF57617F9)
*** Signed:   2002.06.04 8:07:33 PM
*** Verified: 2006.12.09 2:09:59 PM
*** BEGIN PGP VERIFIED MESSAGE ***

Liebe Brigitte! Kannst du es glauben? Ich habe einen Klavier gekauft!

*** END PGP VERIFIED MESSAGE ***

Finally, such data encryption is useful for more than information exchange between people. You can encrypt a sensitive computer file using your own public key, and save it in your own computer. It will then be completely safe from people snooping through your machine after hours. This is how you keep the company payroll database safe. And, since you can encrypt a file with the public keys of several individuals simultaneously, you encrypt the database with both your and the company’s president’s public keys as insurance against your being flattened by a truck later in the evening.