| Key Distribution for Public Key Cryptography | ||
| Introduction
|
An important advantage of public key cryptography is the method of key
distribution. In a symmetric key
system, it is difficult to
distribute keys because the keys must be kept confidential. Exposing
the keys would leave the system open to attacks.
But, public key cryptography has an advantage in key distribution. One of the keys is public, so it can be published. The entire world can have access to this key. Therefore, a very simple key distribution protocol is described below:
Most of the time, the sender can just read the public key out of a database instead of having the receiver send it. The last two steps confirm that the sender has received the public key. The message may be some known piece of data like the current date. Therefore, the receiver can decrypt the message and compare it to its known value. If the messages match, then the receiver knows that the sender has its public key. The public key distribution system also gives a method to exchange symmetric keys. Consider the following protocol:
There is now a session key that can be shared between the sender and the receiver. The session key is encrypted as it is passed from the sender to the receiver, so that it cannot be decrypted by an attacker. Only the receiver's private key can decrypt the session key. Since this application uses public key cryptography to generate a symmetric key, it is known as a hybrid cryptosystem. Typically, session keys will only be used for a short period of time so that hackers have a limited amount of time to try and crack the key. Surprisingly, the above protocol is vulnerable to the man in the middle attack. Consider the following scenario:
At this point, the man in the middle has simply substituting his own key for the one that the receiver is attempting to send. The sender receives the attacker's public key and does all of its encryption with this key. Clearly, the attacker can then decrypt any data that the sender attempts to send. Now, let's assume the sender wants to generate a session key with the receiver and the attacker is still monitoring communications.
The attacker has the session key! He has established a session with the sender. However, the attacker may now be worried that the receiver will detect an error since it did not get a session key. The attacker is smart, so he takes the following action:
The receiver now thinks it has a secret session key with the sender. But, it really has a session key with the attacker and the sender. The attacker can now monitor any communication between the sender and the receiver. One method to solve this problem is to split the message.
The message cannot be interpreted until both parts are received. The parts can be calculated in several ways. These methods include:
The man in the middle would have trouble defeating this protocol because he does not know how the message is broken up. While he could swap keys, he could not easily interpret the message. For example, the man in the middle could do the following.
At this point, the sender has the wrong public key. Let us now assume that it wants to establish a session.
Everything is still progressing fine for the attacker. He has a message and so does the receiver. However, the last few steps show the power of splitting the message.
The attacker cannot interpret messages between the sender and the receiver. If the message was not "Happy Birthday", but a session key, the attacker would not have decoded the session key value correctly. Therefore, it would not be able to interpret any data that was encrypted with this session key. For more information:
|