SHA-1 Message Digest Algorithm
SHA-1 Message Digest Algorithm
Introduction
Purpose
SHA-1 Framework
SHA-1Pseudo Code
Cryptanalysis and Limitation
Introduction
Signing the message digest rather than the message often improves
the efficiency of the process because the message digest is usually
much smaller than the actual message.
Purpose: Authentication Not Encryption
Authentication Requirements:
Masquerade – Insertion of message from fraudulent source
Content Modification – Changing the message content
Sequence Modification – Insertion, deletion and reordering sequence
Timing Modification – Replaying valid sessions
Background Theory
f
SHA-1: Algorithm Framework
Pseudo Code….
For loop on k = 1 to L
(W(0),W(1),...,W(15)) = M[k] /* Divide M[k] into 16 words */
For t = 16 to 79 do: /* Extending 16 words into 80 words */
W(t) = (W(t-3) XOR W(t-8) XOR W(t-14) XOR W(t-16)) <<< 1
A = H0, B = H1, C = H2, D = H3, E = H4
For t = 0 to 79 do:
TEMP = A<<<5 + f(t;B,C,D) + E + W(t) + K(t) E = D, D = C,
C = B<<<30, B = A, A = TEMP
End of for loop
H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4 + E
End of for loop
Output:
H0, H1, H2, H3, H4, H5: Word buffers with final message digest
SHA-1 Message Digest
Example:
The message digest of the string:
4480afca4407400b035d9debeb88bfc402db514f
https://slideplayer.com/slide/7635005/
Cryptanalysis and Limitation