09.07.2015 Views

Hash函数 - 北京大学计算机科学技术研究所

Hash函数 - 北京大学计算机科学技术研究所

Hash函数 - 北京大学计算机科学技术研究所

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.

4.3.2 SHashŽ{SHA-1OŽL§£Y¤µfor i ← 1 to n`²µ±e)ÒÜ©ƒucompress(Z i−1 ||M i ), Z i−1 = H 0 ||H 1 || . . . ||H 4⎧⎪⎨do⎪⎩- M i = W 0 ||W 1 || . . . ||W 15 §Ù¥z‡W i´˜‡ifor i ← 16 to 79 do W i ← ROTL 1 (W t−3 ⊕ W t−8 ⊕ W t−14 ⊕ W t−16 )A ← H 0 , B ← H 1 , C ← H 2 , D ← H 3 , E ← H 4for i ← 0 to 79⎧⎪⎨do⎪⎩temp ← ROLT 5 (A) + f t (B, C, D) + E + W t + K tE ← DD ← CC ← ROLT 30 (B)B ← AA ← tempH 0 ← H 0 + A, H 1 ← H 1 + B, H 2 ← H 2 + CH 3 ← H 3 + D, H 4 ← H 4 + EÑѵ(H 0 ||H 1 ||H 2 ||H 3 ||H 4 )

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

Saved successfully!

Ooh no, something went wrong!