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.

maintenance. Adding or removing services becomes an issue of turning the service<br />

on or off—no changes to firewalls or tunneling configurations are required. Once<br />

the VPN is up and running, it essentially takes care of itself.<br />

Although we do suggest the possibility of using a VPN when the other solutions<br />

we’ve provided here aren’t feasible for your situation, a complete discussion of VPN<br />

solutions is well beyond the scope of this book. Entire volumes have been dedicated<br />

to the topic, and we recommend that you consult one or more of those books if you<br />

want to pursue the use of VPNs. A good launch point for VPN information is Building<br />

& Managing Virtual Private Networks by Dave Kosiur (John Wiley & Sons).<br />

9.12 Building an Authenticated Secure Channel<br />

Without SSL<br />

<strong>Problem</strong><br />

You want to encrypt communications between two peers without using SSLand the<br />

overhead that it incurs. Because it is normally a bad idea to encrypt without integrity<br />

checking (to avoid attacks such as man-in-the-middle, capture replay, and bit-flipping<br />

in stream ciphers), you also want to employ some kind of integrity checking so<br />

you’ll be able to determine whether the data has been tampered with in transit.<br />

We also assume here that you’d like to stay away from a full-fledged PKI, instead<br />

using a more traditional model of user accounts managed on a per-machine basis.<br />

Solution<br />

Use an authenticating key exchange mechanism from Chapter 8, and use the resulting<br />

session key with a solution for authenticated encryption, while performing<br />

proper key and nonce management.<br />

In this recipe, we provide an infrastructure for the simple secure channel, for use<br />

once authentication and key exchange is performed.<br />

Discussion<br />

Given the tools we’ve discussed in previous recipes for authentication, key exchange,<br />

and the creation of secure channels, producing an end-to-end solution isn’t drastically<br />

difficult. Nonetheless, there are some potential “gotchas” that we still need to<br />

address.<br />

In protocols such as SSL/TLS, connection establishment is a bit more complex than<br />

simply authenticating and exchanging a key. In particular, such protocols tend to<br />

Building an Authenticated Secure Channel Without SSL | 491<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!