Lab 2 - Message Authentication-Lecture
Lab 2 - Message Authentication-Lecture
• Authentication √
• Integrity √
MAC is vulnerable to attacks
• Encryption in MAC
– Dependent on length of the key
– Brute force attacks: 2K-1 combinations of K bit
key
Unkeyed hash functions
MD5 – Message Digest 5
• Step 1: Appending padding bits
– All block size are of 512bits
– Padding bits: 1000…512 th(0)
– (Msg + pad bits + 64 bit for length) = n X 512
• Step 2: Append length
• Step 3: Initialize MD Buffer
• Step 4: Process message in 512 bit blocks
• Step 5: output 128 bit checksum
MD5 – Hands-on
• Refer to student lab manual for hands-on
Secure Hashing Algorithm (SHA)
• Secure Hashing Algorithm
• MD5 -Dead
• SHA -1
• SHA -2
• SHA -3
Secure Hashing Algorithm (2)
SHA based algorithms are used for
authentication.
• Iterative one way hashing algorithm that process a
message to produce a condensed representation
called a “Message Digest”
• Message digest ensures integrity:
• That means if a message changes, the message
digest will also change.
Secure Hashing Algorithm (3)
Why different versions of SHA?
Based on the Algorithm that is applied to the
text/file the block size of the message digest
will change.
– Example if SHA-1 is applied the message digest will
result in a 512 block OR 160 Bit
– SHA-2: A family of two similar hash functions, with
different block sizes, known as SHA-256 and SHA-
512. They differ in the word size; SHA-256 uses 32-
bit words where SHA-512 uses 64-bit words.
– SHA-3: A hash function formerly called Keccak, It
supports the same hash lengths as SHA-2, and its
internal structure differs significantly from the rest of
the SHA family.
How SHA Works?
• Step 1 - Preprocessing
• A Two step procedure
• Authentication X
• Integrity √