25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

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.

Generating the keys (phase 2)<br />

Using the nonces, public Diffie-Hellman values, SPIs, protocol code points<br />

exchanged in messages 1 <strong>and</strong> 2 of phase 2, <strong>and</strong> the SKEYID value from phase<br />

1, each host now has enough information to derive two sets of keying material:<br />

► When PFS is used:<br />

– For data generated by Host-A <strong>and</strong> received by Host-B, the keying material<br />

is:<br />

844 <strong>TCP</strong>/<strong>IP</strong> <strong>Tutorial</strong> <strong>and</strong> <strong>Technical</strong> <strong>Overview</strong><br />

KEYMAT AB = prf(SKEYID_d, g qm xy , protocol, SPIB , N qmi , N qmr )<br />

– For data generated by Host-B <strong>and</strong> received by Host-A, the keying material<br />

is:<br />

KEYMAT BA = prf(SKEYID_d, g qm xy , protocol, SPIA, N qmi, N qmr)<br />

► When PFS is not used:<br />

– For data generated by Host-A <strong>and</strong> received by Host-B, the keying material<br />

is:<br />

KEYMAT AB = prf(SKEYID_d, protocol, SPI B, N qmi, N qmr)<br />

– For data generated by Host-B <strong>and</strong> received by Host-A, the keying material<br />

is:<br />

KEYMAT BA = prf(SKEYID_d, protocol, SPI A , N qmi , N qmr )<br />

Note: Depending on the particular case, Host-A might need to derive multiple<br />

keys for the following purposes:<br />

► Generating the integrity check value for transmitted datagrams<br />

► Validating the integrity check value of received datagrams<br />

► Encrypting transmitted datagrams<br />

► Decrypting received datagrams<br />

Likewise, Host-B needs to derive the mirror image of the same keys. For<br />

example, the key that Host-B uses to encrypt its outbound messages is the<br />

same key that Host-A uses to decrypt its inbound messages, <strong>and</strong> so on.<br />

IKE phase 2, message 3<br />

At this point, Host-A <strong>and</strong> Host-B have exchanged all the information necessary<br />

for them to derive the necessary keying material. The third message in the Quick<br />

Mode exchange is used by Host-A to prove its alive state, which it does by<br />

producing a hash function that covers the message ID <strong>and</strong> both nonces that<br />

were exchanged in messages 1 <strong>and</strong> 2. Message 3 consists only of the ISAKMP<br />

header <strong>and</strong> a hash payload that carries:<br />

HASH_3 = prf(SKEYID_a, 0, M-ID, N qmi , N qmr )

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!