21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Discussion<br />

One of the big motivators behind public key cryptography is that there is some hope<br />

for securely exchanging encryption keys in an insecure medium. However, that is not<br />

as easy as it sounds. If used in a naïve manner, the basic public key methods for communication<br />

are susceptible to a man-in-the-middle attack, in which the two parties<br />

end up talking to an attacker who relays messages, instead of to each other (we discuss<br />

this attack in Recipe 7.1).<br />

Man-in-the-middle attacks are possible because public key cryptography in and of<br />

itself provides no means of establishing trust. PKI provides the means to establish<br />

trust by binding public keys and identities together in a way that gives reasonable<br />

assurance that you are communicating securely with the expected entity.<br />

Using public key cryptography, * you can be sure that if you encrypt data with a public<br />

key, only someone with the corresponding private key can decrypt it. If you simply<br />

exchange public keys over an insecure medium, there is no easy way to be sure<br />

that the public keys you receive belong to the people you think they do. In other<br />

words, traditional public key cryptography does not establish trust between entities.<br />

That is where PKI comes in.<br />

One solution to the trust problem is to exchange public keys over a secure medium<br />

(or to authenticate them in a secure medium by comparing cryptographic hashes of<br />

the key, often called a fingerprint). The problem with this solution is that it is not<br />

very scalable. If parties need to exchange public keys offline to communicate<br />

securely, they might as well exchange symmetric keys and save themselves the computational<br />

effort.<br />

The basic idea behind public key infrastructure is to introduce a trusted third party<br />

to the mix. The idea is that we somehow acquire the public key of the trusted third<br />

party over a secure medium. In addition, each entity registers its public key with that<br />

trusted party, along with information about that entity. Basically, the trusted party is<br />

expected to ensure that the public key really does belong to the registrant and all of<br />

the associated data is accurate. If the authority approves, it signs your certificate,<br />

which is a piece of data containing your public key along with other identifying<br />

information.<br />

Once your certificate has been signed, you can hand that certificate to anyone, and as<br />

long as that person has securely obtained the authority’s public key, he can take your<br />

certificate and validate it by checking the authority’s signature. As a result, a client<br />

can authenticate a server, even when the server’s public key is obtained over an insecure<br />

medium (see Figure 10-1).<br />

* Specifically, RSA. Not all public key algorithms are capable of performing encryption. RSA supports encryption,<br />

key agreement, and digital signatures; DSA supports only digital signatures; and Diffie-Hellman supports<br />

only key agreement.<br />

Understanding Public Key Infrastructure (PKI) | 503<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!