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.

compromise. If our system has such a property, it is said to have perfect forward<br />

secrecy.<br />

Solution<br />

Use a separate base secret for each entity in the system. For any given client, derive a<br />

new key called K1 from the base secret key, as described in Recipe 4.11. Then, after<br />

you’re sure that communicating parties have correctly agreed upon a key, derive<br />

another key from K1 in the exact same manner, calling it K2. Erase the base secret<br />

(on both the client and the server), replacing it with K1. Use K2 as the session key.<br />

Discussion<br />

In Recipe 4.11, we commented on how knowledge of a properly created derived key<br />

would give no information about any parent keys. We can take advantage of that fact<br />

to ensure that previous sessions are not affected if throwing away the base secret<br />

somehow compromises the current key, so that old session keys cannot be regenerated.<br />

The security depends on the cryptographically strong one-way property of the<br />

hash function used to generate the derived keys.<br />

See Also<br />

Recipe 4.11<br />

Remember that when deriving keys, every key derivation needs to<br />

include some kind of unique value that is never repeated (see Recipe 4.11<br />

for a detailed discussion).<br />

8.21 Ensuring Forward Secrecy in a Public Key<br />

System<br />

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

In a system using public key cryptography, you want to ensure that a compromise of<br />

one of the entities in your system won’t compromise old communications that took<br />

place with different session keys (symmetric keys).<br />

Solution<br />

When using RSA, generate new public keys for each key agreement, ensuring that<br />

the new key belongs to the right entity by checking the digital signature using a longterm<br />

public key. Alternatively, use Diffie-Hellman, being sure to generate new ran-<br />

Ensuring Forward Secrecy in a Public Key System | 445<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!