Max. shear stress theory-Maximum Shear Stress Theory Maximum Distortional ...
2.15 Message Authentication Code and Hash Functions.pptx
1. SRI KRISHNA COLLEGE OF ENGINEERING AND TECHNOLOGY
Kuniamuthur, Coimbatore, Tamilnadu, India
An Autonomous Institution, Affiliated to Anna University,
Accredited by NAAC with “A” Grade & Accredited by NBA (CSE, ECE, IT, MECH ,EEE, CIVIL& MCT)
COURSE MATERIALMATERIAL
Course : 20EC603 – Fundamentals of Network Security
Module - 2: Public Key Cryptography and authentication
requirements
Topics : Message authentication code and Hash
functions
www.skcet.ac.in
2. 2
Outline
Cryptographic Hash Functions
Applications
Simple hash functions
Requirements and security
Hash functions based on Cipher Block Chaining
Secure Hash Algorithm (SHA)
3. 3
Hash Function
A hash function H accepts a
variable-length block of data M
as input and produces a fixed-
size hash value h = H(M).
A “good” hash function has the
property that the results of
applying a change to any bit or
bits in M results, with high
probability, in a change to the
hash code.
4. 4
Input-Output behaviour of hash functions
Alice was beginning to get very tired of
sitting by her sister on the bank, and have
nothing to do.
I am not a crook
I am not a cook H
H
H DFDC349A
FB93E283
A3F4439B
Message Message
digest
5. 5
Requirements for hash functions
1. Can be applied to any length of message M.
2. Produces fixed-length output h.
3. It is easy to compute h=H(M) for any message M.
4. Given hash value h is infeasible to find y such that (H(y) = h)
• One-way property (In other words, given a fingerprint, we
cannot derive a matching message).
5. For given block x, it is computationally infeasible to find
y ≠ x with H(y) = H(x)
• Weak collision resistance
6. It is computationally infeasible to find messages m1 and m2 with
H(m1) = H(m2)
• Strong collision resistance
6. 6
Simple Hash Function
The input (message, file, etc.) is viewed as a sequence of n-bit
blocks.
The input is processed one block at a time in an iterative fashion
to produce an n-bit hash function.
One of the simplest hash functions is the bit-by-bit exclusive-OR
(XOR) of every block.
𝑪𝒊 = 𝒃𝒊𝟏 ⊕ 𝒃𝒊𝟐 ⊕ … ⊕ 𝒃𝒊𝒎
Where,
𝐶𝑖 = ith bit of the hash code 1 ≤ i ≤ n
m = number of n-bit blocks in the input
𝑏𝑖𝑗 = ith bit in jth block
Editor's Notes
X.800 and RFC 2828
International Telecommunication Union (ITU)