Secure Hash Algorithm Review
Secure Hash Algorithm Review
SHA
Message Authentication
Code (MAC)
is a technique that involves the use of a secret
key to generate a small block of data, known as a
message authentication code , that is appended
to the message.
It used to verify data integrity and authenticity of
a message
A MAC requires two inputs: a message and
a secret key known only to the originator of the
message and its intended recipient.
MAC (Continue….)
Part of Hashing
Hashing is used to check Integrity of the given message
Limitations
Message input size<256 bits in length
Hash code received is of size 160 bits
Properties
One Way Property Uniqueness
MESSAG
MESSAGE
E
MESSAG
E
H H H
HASH
H
DIFFERENT
CODE H HASH
CODES
H
STEPS INVOLVED IN SHA-1
ORIGINAL PADDIN
MESSAGE
G
100 bits+472
bits=1472bits
APPEND LENGTH
1000+472=1472 bits
64 bits
1536 bits
STEP 3(Message Division into Blocks
of 512 bits)
ORIGINAL MESSAGE( )
Is SHA-1 broken?
Not quite – The resources needed to break it is enormous
Considered the same amount of time to factor 760-bit RSA modulus
Only well-funded intelligence agencies can do it within a reasonable
amount of time
SHA-2
The first one attacks SHA-256 41/64 rounds in 2 253.5 time with a space
complexity of 216 - SHA-512 46/80 rounds in 2511.5 time and space
complexity of 23
The second one attacks SHA-256 42/64 in 2251.7 time and 212 space
complexity – SHA-512 42/80 in 2502 time and space 222
Comparison of the SHA functions
Version Output Input Block Max Word Rounds Collisions
(bits) (bits) Size Size/ size ?
(bits) Message
SHA-0 160 160 512 264-1 32 80 Yes