Secure Hash Algorithm Versions
Secure Hash Algorithm Versions
ALGORITHM
A SEARIES OF SHA…
Secure Hash Algorithm
SHA originally designed by NIST & NSA in 1993
was revised in 1995 as SHA-1
US standard for use with DSA signature scheme
standard is FIPS 180-1 1995, also Internet RFC3174
nb. the algorithm is SHA, the standard is SHS
based on design of MD5 with key differences
produces 160-bit hash values
recent 2005 results on security of SHA-1 have
raised concerns on its use in future applications
How SHA Works?
Digest Length=160 bit
I/P Text=512 bit
Sub Block size=32bit
512/32=16 total Sub blocks
No. Of Rounds=4
Iteration per round=20
Chaining Variable = 5*32=160
K[t] constant= Where t=0 to 79
O/P-> four 32 bit blocks
SHA Overview
1. Padding: Length of the message is 64 bits
short of multiple of 512 after padding.
2. Append a 64-bit length value of original
message is taken.
3. Divide the input into 512-bit blocks
4. Initialise CV 5-word (160-bit) buffer
(A,B,C,D,E) to
(A=01 23 45 67,
B=89 AB CD EF,
C=FE DC BA 98,
D=76 54 32 10,
Continue…
5. Process Blocks now the actual algorithm
begins. message in 16-word (512-bit)
chunks:
Copy CV into single register for storing temporary
intermediate as well as the final results.
Divide the current 512-bit blocks into 16 sub-blocks,
each consisting of 32 bits.
Has No. Of Rounds=4, each round consisting of 20
bit /step iteration operations on message block &
buffer
expand 16 words into 80 words(20*4) by mixing &
shifting.K[t] constant= Where t=0 to 79
Form new buffer value by adding output to input.
6. output hash value is the final buffer value
SHA-1 Compression Function