26.10.2012 Views

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

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.

294 INTERNET SECURITY<br />

opad<br />

160 bits (SHA-1)<br />

128 bits (MD5)<br />

IV<br />

K<br />

Padding<br />

K' = 512 bits M<br />

b = 512 bits<br />

b = 512 bits<br />

b b b<br />

M<br />

b<br />

ipad<br />

Ωi || M<br />

Ωi M0 M1 … ML−1 Ωi = K'⊕ipad ≡ b<br />

b = 512 bits<br />

||<br />

H<br />

IV<br />

b = 512 bits 160 bits (SHA-1) h = 160 bits (SHA-1)<br />

128 bits (MD5) 128 bits (MD5)<br />

HMAC(M)<br />

H<br />

Padding<br />

b = 512 bits<br />

Figure 8.8 Overall operation of HMAC computation using either MD5 or SHA-1 (message length<br />

computation based on �i||M).<br />

Figure 8.8 illustrates the overall operation of HMAC–MD5 or HMAC–SHA-1.<br />

Example 8.1 HMAC–SHA-1 computation using RFC method:<br />

Data :0x 7104f218 a3192e65 1cf7025d 8011bf79 4a19<br />

Key :0x 31fa7062 c45113e3 2679fd13 53b71264<br />

– A B C D E<br />

IV 67452301 efcdab89 98badcfe 10325476 c3d2e1f0<br />

H [(K ⊕ ipad)||M] 8efeef30 f64b360f 77fd8236 273f0784 613bbd4b<br />

H [(K ⊕ opad)||H [(K ⊕<br />

ipad)||M]]<br />

31db10b8 ed346850 d0f0b7dd 50fd71f4 2dacd24c<br />

HMAC–SHA-1 = 0x 31 db10b8 ed346850 d0f0b7dd 50fd71f4 2dacd24c<br />

The alternative operation for computation of either HMAC–MD5 or HMAC–SHA-1<br />

is described in the following:

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

Saved successfully!

Ooh no, something went wrong!