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.

8.15 Performing Password-Based<br />

Authentication and Key Exchange<br />

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

You want to establish a secure channel without using public key cryptography at all.<br />

You want to avoid tunneling a traditional authentication protocol over a protocol<br />

like SSL, instead preferring to build your own secure channel with a good protocol.<br />

Solution<br />

SAX (Symmetric Authenticated eXchange) is a protocol for creating a secure channel<br />

that does not use public key cryptography.<br />

PAX (Public key Authenticated eXchange) is similar to SAX, but it uses public key<br />

cryptography to prevent against client spoofing if the attacker manages to get the<br />

server-side authentication database. The public key cryptography also makes PAX a<br />

bit slower.<br />

Discussion<br />

The SAX and PAX protocols both perform authentication and key exchange. The<br />

protocols are generic, so they work in any environment. However, in this recipe we’ll<br />

show you how to use SAX and PAX in the context of the Authenticated eXchange<br />

(AX) library, available from http://www.zork.org/ax/. This library implements SAX<br />

and PAX over TCP/IP using a single API.<br />

Let’s take a look at how these protocols are supposed to work from the user’s point<br />

of view. The server needs to have authentication information associated with the<br />

user. The account setup must be done over a preexisting secure channel. Perhaps the<br />

user sits down at a console, or the system administrator might do the setup on behalf<br />

of the user while they are talking over the phone.<br />

Account setup requires the user’s password for that server. The password is used to<br />

compute some secret information stored on the server; then the actual password is<br />

thrown away.<br />

At account creation time, the server picks a salt value that is used to thwart a number<br />

of attacks. The server can choose to do one of two things with this salt:<br />

• Tell it to the user, and have the user type it in the first time she logs in from any<br />

new machine (the machine can then cache the salt value for subsequent connections).<br />

This solution prevents attackers from learning anything significant by<br />

guessing a password, because the attacker has to guess the salt as well. The salt<br />

effectively becomes part of the password.<br />

422 | Chapter 8: Authentication and Key Exchange<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!