Documente Academic
Documente Profesional
Documente Cultură
BY
YESHWANTH KUMAR.B
EC (104223)
ADVANCED COMMUNICATION SYSTEMS
M. TECH
CONTENTS
o
o
o
o
o
History of SHA
Algorithm
WORKING EXAMPLE
Applications
Comparison between SHAs
History of SHA
C D E
wt
F G H
Ch
kt
M
a
0
A B C D E F
Hash Functions:
Map messages of variable length to fixed length outputs
Algorithm consist
3 stages
Message Expansion
Message Compression
+ 1
Given data
+ 0000
64 bits
Given data
0000
+ Len(x)
Given data
0000
Len(x)
512 bits
00011000
l = 24
Given data
Given data
64
512 bits
Message Expansion
.
M(i)
512 bits
M1(i)
M(n)
512 bits
M2(i)
..
M15(i)
32 bit
0 t 15
16 t 63
Wt =
0{256}(x)
1{256}( x)
A, B, C, D, E, F, G, H
H=G
G=F
F=E
E = D + T1
D=C
C:= B
B=A
A:= T1 + T2
T1= H + {256 }1 (E) + Ch(E, F, G) +K{256 }t + W t
T2= H + {256 }0 (A) + Maj(A, B, C)
for 0 t 63
64 iterations of
compression function
Kt
o sixty-four constant 32-bit words.
o first thirty-two bits of the fractional parts of cube roots of the first sixty
four prime numbers.
k[0..63] :=
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
ROUND FUNCTION
A_H
B
A
0
T1+T2
Maj (A,B,C)
Ch(E,F,G)
Wt+Kt
T1
Block Contents:
W[0] = 61626380
W[1] = 00000000
W[2] = 00000000
W[3] = 00000000
W[4] = 00000000
W[5] = 00000000
W[6] = 00000000
W[7] = 00000000
W[8] = 00000000
W[9] = 00000000
W[10] = 00000000
W[11] = 00000000
W[12] = 00000000
W[13] = 00000000
W[14] = 00000000
W[15] = 00000018
FFC00B31
68581511
64F98FA7
55489EE6 7E730E00
13DFB889
Message Digest
23097D22
3405D822
8642A477
BDA255B3
Applications
oMessage Integrity/Authentication
oPassword Protection (UNIX)
oDigital Signature (DSS)
oInternet Protocol Security (IPSec)
oTransport Layer Security (TLS)
oRandom Number Generation Algorithms
oMessage Integrity/Authentication
Internal state
size (bits)
SHA-0
160
160
512
264 1
32
SHA-1
160
160
512
264 1
SHA-256/224
256/224
256
512
SHA-512/384
512/384
512
1024
Algorithm
Block size
(bits)
Max message
size (bits)
Word size
(bits)
Rounds
Operations
Collision
80
+,and,or,xor,rotl
Yes
32
80
+,and,or,xor,rotl
2^63
attack
264 1
32
64
+,and,or,xor,shr,ro
tr
None yet
2128 1
64
80
+,and,or,xor,shr,ro
tr
None yet
References
o NIST, Federal Information Processing Standards Publication 180-2,
Secure Hash Standards (SHS), August 2001.
o NIST Special Publication (SP) 800-57, Part 1, Recommendation for
Key Management: General, August 2005.
o NIST Special Publication (SP) 800-107, Recommendation for
Applications Using Approved Hash Algorithms, (Draft) July 2008.