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.

With a valid socket descriptor in hand, you can now use the exchanged key to set up<br />

a secure channel, as discussed in Recipe 9.12. When you are finished communicating,<br />

you may simply close the socket descriptor.<br />

Whether or not the connection succeeds, AX_exchange( ) automatically deallocates<br />

the AX object passed into it. If the exchange does fail, the connection to the server<br />

will need to be reestablished by calling AX_connect( ) a second time.<br />

See Also<br />

• AX home page: http://www.zork.org/ax/<br />

• Recipes 4.10, 9.12, 13.1<br />

8.16 Performing Authenticated Key Exchange<br />

Using RSA<br />

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

Two parties in a network communication want to communicate using symmetric<br />

encryption. At least one party has the RSA public key of the other, which was either<br />

transferred in a secure manner or will be validated by a trusted third party.<br />

You want to do authentication and key exchange without any of the information<br />

leakage generally associated with password-based protocols.<br />

Solution<br />

Depending on your authentication requirements, you can do one-way authenticating<br />

key transport, two-way authenticating key transport, or two-way authenticating<br />

key agreement.<br />

Discussion<br />

Instead of using this recipe to build your own key establishment protocols,<br />

it is much better to use a preexisting network protocol such as<br />

SSL/TLS (see Recipes 9.1 and 9.2) or to use PAX (Recipe 8.15) alongside<br />

the secure channel code from Recipe 9.12.<br />

With key transport, one entity in a system chooses a key and sends it to the entity<br />

with which it wishes to communicate, generally by encrypting it with the RSA public<br />

key of that entity.<br />

Performing Authenticated Key Exchange Using RSA | 429<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!