Professional Documents
Culture Documents
InfSec-5-Hash Functions
InfSec-5-Hash Functions
Chapter 05
Information Authentication
2
Information authentication techniques
3
Authentication using cryptography
4
Authentication using cryptography
5
Authentication using MAC
7
Authentication using secure hash functions
8
One-way hash function
9
Operations of hash function
10
Simple hash function
The original information is the sequence of
characters in the Latin alphabet: A, B, C, …, Z
The letters are numbered from 1…26
Representation of original information:
M={m1, m2, …, mn}
Hash function:
H(M)=1 + (m1 + m2 +…+mn) mod 26
11
Simple hash function
12
Requirements for the H hash function
13
Attributes of the hash function
14
Attack hash functions
15
Secure Hash Algorithm (SHA)
16
Operations in SHA_1
SHA-1 accepts information blocks with a maximum
size of 264 bits to generate a 160-bit fixed-length
hash. The entire information block is processed in
512-bit blocks, through 5 stages as follows:
Append padding bits: make the original
information = 448 modulo 512 bits. That is, all
previous blocks are of equal length 512 bits, except
the last block is 448 bits. The principle of padding
is to add a 1_bit to the end of the bit string, then
attach an enough bit sequence of 0s to form a
block of 448 bits.
17
Operations in SHA_1
Append length: A 64-bit string is appended to the
information block, indicating the length of the
original information block, in bits. Result:
information block is a multiple of 512, divided into
groups. Each group of 16 registers 32bit:
16*32=512bit
18
Operations in SHA_1
Initialize MD buffer: MD (message digest)
buffer is a 160-bit memory used to hold the
intermediate and final results of the hash. This
memory is organized into five 32-bit registers
and is initialized to the following values (Hex):
A = 67452301
B = EFCDAB89
C = 98BADCFE
D = 10325476
E = C3D2E1F0
19
Operations in SHA_1
Process information in blocks:
➢is the central stage of the hash function,
also known as the compression function,
consisting of 4 rounds, 20 steps each.
➢All four rounds have the same structure, but
each round uses a different logic function f1,
f2, f3 and f4
20
Processing
information
in SHA_1
21
Output: After all 512-bit blocks
have been processed, the output
of the last step is the value of the
hash code.
22
MD5 Hash Algorithm
23
Exercise
24
Exercise
25