Public Key Cryptography Overview |
IntroductionFor virtually as long as people have communicated with each other, there has been a desire to ensure the privacy of their communications. In times of war, for instance, messages dispatched to the field must be protected from interception. The ancient Greeks developed a system, called a scytale, which rendered messages unreadable by the enemy. The technique used two cylinders of equal diameters, a long ribbon to be wrapped around each cylinder and a message written lengthwise along the ribbon/cylinder. When unwrapped from the cylinder, the ribbon displayed a seemingly unreadable series of characters. When wrapped around the matching cylinder by the recipient, however, the message was revealed. This is an early example of a cipher. Technically, a cipher is a methodological transformation by which characters are rearranged or transformed to scramble information. An extremely simple cipher replaces a character in a message by the character three positions later in the alphabet. For example, the message Good Morning would be enciphered to read Jrrg Pruqlqj. (Figure 1)
To read the original message, the recipient would simply replace each letter with the letter 3 positions before it in the alphabet. (Figure 2)
This transformation is simple to perform, and without specific knowledge of the transformation the message is effectively unreadable. (Unfortunately, this cipher is relatively easy to break by applying well-known rules and techniques regarding the composition of languages.) A code, on the other hand, is a semantic or lexical substitution in which characters or groups of characters are replaced with other characters or symbols that represent them. Morse code, for example, where dots and dashes represent letters, is a code. The common trait to both ciphers and codes is that they rely upon a shared secret; a method in the case of a cipher, or a codebook, in the case of a code. The secret must be known by both parties in order to be effective; the requirement to communicate the secret makes this a weak system. As literacy increased, a need developed for ciphers or codes that could offer better security. The resulting solutions are known collectively as cryptographic systems, and the art and science of hiding information is called cryptography. To transform a message so as to hide or scramble its content is to encrypt it. The recipient must then decrypt the message before it can be read. Symmetric Encryption AlgorithmsThe previous examples represent symmetric encryption algorithms. Symmetric algorithms use the same secret, or key, to both encrypt and decrypt the message. For instance, in the Good Morning cipher, the key is the knowledge that each character has been replaced by the character three positions later. In Morse code, the key is the codebook that tells what dots and dashes represent what letter. Disseminating the key poses the primary threat to symmetric algorithms; it must somehow be communicated between the sender and the receiver in a secure fashion, and then it must be kept a secret. If the key is compromised it becomes worthless as a means of cryptographic security. This burden has rendered symmetric encryption technologies cumbersome and unpopular. Asymmetric EncryptionA significantly more recent advancement in the field of cryptography was the development of asymmetric encryption algorithms; asymmetric algorithms use a pair of keys to encrypt and decrypt data. What is encrypted with one key can only be decrypted with the other.
Public / Private Key Pairs Anyone who wants to communicate securely must possess a public/private key pair of his/her own. This key pair corresponds only to that individual and the private key is (or at least should be) kept absolutely secret. The private key is never shared, which eliminates the need to disseminate it and significantly reduces the potential for compromise. Eliminating the need for a shared secret is the key benefit of an asymmetric cryptographic algorithm, and is what makes systems of this sort significantly more accepted in actual use than traditional symmetric-algorithm based cryptographic systems.
Data Encryption For instance, Alice wishes to communicate securely with Bob. She writes a message to Bob and encrypts it with Bobs public key. She then sends this message to Bob, who decrypts it with his private key. If the message is intercepted while in transit, it cannot be read. (Figure 3)
The process is reversed when Bob responds to Alice. (Figure 4)
This model of data encryption ensures the privacy of communications while eliminating the need for shared keys.
Digital Signatures A digital signature is a digest, or hash, of the message encrypted with the senders private key. A hash is a unique, algorithmically derived representation of the message content. Every message will produce a (reasonably) unique hash that differs from the hash produced by another message. This little message represents the contents of the big message, but does not reveal the content of the big message, meaning you cannot recreate the message from the hash. The hash is calculated using a standard algorithm. Once produced, it is encrypted with the senders private key and appended to the message this is the digital signature. If Alice wishes to digitally sign a message that she sends to Bob, the program she is using first creates a hash of the message and encrypts it with her private key. This is the digital signature, which is then attached to the message itself; the message with signature attached is sent to Bob. (Figure 5)
When he gets the message, Bob decrypts the digital signature with the Alices public key, recalculates the hash of the message itself, and compares the two. If the results match, Bob is assured that the message is in fact from Alice and not from an imposter, and he is also assured that the message has not been tampered with in transit. (When you are shopping on the web, this authentication and the data encryption described previously is what the Secure-Socket-Layer (SSL) protocol uses to identify the seller to you and to protect your credit card information in transit.) (Figure 6)
If an imposter has sent the message or if as little as one character of the message has been changed in transit, the two hashes will not verify and the communication will be known to be unreliable. Unlike traditional signatures, digital signatures cannot be forged. Once the identity of a key pair holder has been established, it can be stated with certainty that messages bearing that digital signature are from that individual assuming that the private key has not been compromised.
Private, Authenticated and Tamper-Proof
Public/private key pairs enable the use of data encryption and digital signatures to ensure private, authenticated, tamper-proof communications without the burden and volatility associated with shared secret models. In the next section we discuss matters associated with the distribution of public keys and the authentication of the identity of the holder of the corresponding private key. Public Key Distribution and Digital IDsWhile public/private key solutions provide the basis for secure communications, one additional problem must be addressed: How can public keys be trusted? While not secret, they must be distributed in a way that guarantees both the source and the integrity of the key otherwise a sender wouldnt know to whom they are encrypting messages or whose signature is on the messages they receive. It is necessary in all cryptographic systems to establish a trust relationship of some kind before secure communication starts. In the simple symmetric examples given earlier, the trust relationship is the fact that two parties have trusted each other with a shared secret. In an asymmetric model, the trust relationship is the knowledge of the source and the integrity of the public key. A digital signature applied to the public key will achieve this, but who will sign it? The purpose of the signature is to verify the public keys association with a given private key holder in order to establish a trust relationship, so it is useless to have the private key holder sign the public key. The solution: A third party to certify the integrity of the public key and package it for easy distribution.
Digital IDs and WildID A WildID provides the identifying connection between an individual and their public key. If, for instance, Alice has a copy of Bobs WildID that she has independently verified to be his, she has his public key, which she may use to encrypt messages sent to Bob and to authenticate messages that she has received from him. (Figure 8)
One of the items contained in a WildID is a digital signature created by WildIDs private key. This signature may be cryptographically verified with WildIDs public key to validate both the integrity and the source of the digital ID. WildIDs public key is contained in WildIDs digital ID, which is a self-signed digital ID known as a root certificate. (Figure 9)
There is no secret information in a WildID. In fact its best to disseminate the WildID as widely as possible to facilitate secure communications with a number of people (and other entities.) The private key that is associated with the WildID however, is a secret that should never be shared.
Certificate Authorities Traditionally, certificate authorities have demanded personal information before issuing a digital ID to a user, such as credit card information, social security numbers, or drivers licenses. WildID, however, is the certificate authority that issues digital IDs without invading ones privacy. A user may provide as much or as little personal information as desired to be contained in a WildID. For instance, Alice may obtain a WildID containing only her Hotmail address for use in secure communications with people she meets in a newsgroup, but with whom she does not wish to exchange personal information. Or, Bob and Alice obtain WildIDs containing their identities and exchange them. They then independently verify, by phone or other means, the exchange. These WildIDs may then be used for secure communications between them.
Certificate Validity ConclusionWhile cryptography itself has been around for centuries, the development of the asymmetric algorithms for public key cryptography is fairly recent. The benefits of public key cryptography are only beginning to be explored and new applications are developed every day. Public key cryptography provides an extremely convenient and widely available means of securing electronic communications. Copyright (c) 2000-2001 WildID LLC All Rights Reserved |