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.

Chapter 7 CHAPTER 7<br />

Public Key Cryptography<br />

Many of the recipes in this chapter are too low-level for general-purpose<br />

use. We recommend that you first try to find what you need in<br />

Chapter 9 before resorting to building solutions yourself. If you do use<br />

this chapter, please be careful, read all of our warnings, and do consider<br />

the higher-level constructs we suggest.<br />

Public key cryptography offers a number of important advantages over traditional, or<br />

symmetric, cryptography:<br />

Key agreement<br />

Traditional cryptography is done with a single shared key. There are obvious<br />

limitations to that kind of cryptography, though. The biggest one is the key<br />

agreement problem: how do two parties that wish to communicate do so<br />

securely? One option is to use a more secure out-of-band medium for transport,<br />

such as telephone or postal mail. Such a solution is rarely practical, however,<br />

considering that we might want to do business securely with an online merchant<br />

we’ve never previously encountered. Public key cryptography can help solve the<br />

key agreement problem, although doing so is not as easy as one might hope. We<br />

touch upon this issue throughout this chapter and expand upon it in Chapter 8.<br />

Digital signatures<br />

Another useful service that public key cryptography can provide is digital signatures,<br />

which allow for message integrity checks without a shared secret. In a<br />

symmetric environment with message authentication codes (MACs) for message<br />

authentication, a user can determine that someone with the MAC key sent a particular<br />

message, but it isn’t possible to provide third parties any assurance as to<br />

who signed a message (this ability is called non-repudiation). That is, if Alice and<br />

Bob exchange messages using a MAC, and somehow Charlie has been given a<br />

copy of the message and the MAC key, Charlie will be able to determine only<br />

that someone who had the MAC key at some point before him generated the<br />

message. Using only symmetric cryptography, he cannot distinguish between<br />

messages created by Alice and messages created by Bob in a secure manner.<br />

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

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.<br />

307

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

Saved successfully!

Ooh no, something went wrong!