21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter CHAPTER 4 4<br />

Symmetric Cryptography<br />

Fundamentals<br />

Strong cryptography is a critical piece of information security that can be applied at<br />

many levels, from data storage to network communication. One of the most common<br />

classes of security problems people introduce is the misapplication of cryptography.<br />

It’s an area that can look deceptively easy, when in reality there are an<br />

overwhelming number of pitfalls. Moreover, it is likely that many classes of cryptographic<br />

pitfalls are still unknown.<br />

It doesn’t help that cryptography is a huge topic, complete with its own subfields,<br />

such as public key infrastructure (PKI). Many books cover the algorithmic basics;<br />

one example is Bruce Schneier’s classic, Applied Cryptography (John Wiley & Sons).<br />

Even that classic doesn’t quite live up to its name, however, as it focuses on the<br />

implementation of cryptographic primitives from the developer’s point of view and<br />

spends relatively little time discussing how to integrate cryptography into an application<br />

securely. As a result, we have seen numerous examples of developers armed<br />

with a reasonable understanding of cryptographic algorithms that they’ve picked up<br />

from that book, who then go on to build their own cryptographic protocols into their<br />

applications, which are often insecure.<br />

Over the next three chapters, we focus on the basics of symmetric cryptography.<br />

With symmetric cryptography, any parties who wish to communicate securely must<br />

share a piece of secret information. That shared secret (usually an encryption key)<br />

must be communicated over a secure medium. In particular, sending the secret over<br />

the Internet is a bad idea, unless you’re using some sort of channel that is already<br />

secure, such as one properly secured using public key encryption (which can be<br />

tough to do correctly in itself). In many cases, it’s appropriate to use some type of<br />

out-of-band medium for communication, such as a telephone or a piece of paper.<br />

In these three chapters, we’ll cover everything most developers need to use symmetric<br />

cryptography effectively, up to the point when you need to choose an actual network<br />

protocol. Applying cryptography on the network is covered in Chapter 9.<br />

116<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!