Mustansiriyah University Class: Third Year
Faculty of Engineering Cryptographic Hash Functions Course name: Data Security
Computer Engineering Dep. SHA-512 Algorithm Lecturer: Fatimah Al-Ubaidy
SHA-512 Overall Structure
Message Preparation (padding and length field):
• The length of the padding field can be calculated as
(|M| + |P| + 128) = 0 mod 1024 → |P| = (− |M| − 128) mod 1024
Where |M| is the length of original message and |P| the length of the padding field. 1
Mustansiriyah University Class: Third Year
Faculty of Engineering Cryptographic Hash Functions Course name: Data Security
Computer Engineering Dep. SHA-512 Algorithm Lecturer: Fatimah Al-Ubaidy
Processing block and its digest as word
Word Expansion:
Wi is the processing word of the current round i 2
Mustansiriyah University Class: Third Year
Faculty of Engineering Cryptographic Hash Functions Course name: Data Security
Computer Engineering Dep. SHA-512 Algorithm Lecturer: Fatimah Al-Ubaidy
SHA-512 Compression Function:
Ki is a constant
variable at round i
where i =0,1…79.
3
Mustansiriyah University Class: Third Year
Faculty of Engineering Cryptographic Hash Functions Course name: Data Security
Computer Engineering Dep. SHA-512 Algorithm Lecturer: Fatimah Al-Ubaidy
Structure of each round in SHA-512:
A = T1 + T 2
B=A
C=B
D=C
E = D + T1
F=E T2 T1
G=F
H=G
T1 = H + conditional(E,F,G) +
rotate(E) + Wi + Ki
T2 = majority(A,B,C) +
rotate(A)
4
Mustansiriyah University Class: Third Year
Faculty of Engineering Cryptographic Hash Functions Course name: Data Security
Computer Engineering Dep. SHA-512 Algorithm Lecturer: Fatimah Al-Ubaidy
The initial values of the buffer registers as 64-bit each
a = 6A09E667F3BCC908 e = 510E527FADE682D1
b = BB67AE8584CAA73B f = 9B05688C2B3E6C1F
c = 3C6EF372FE94F82B g = 1F83D9ABFB41BD6B
d = A54FF53A5F1D36F1 h = 5BE0CD19137E2179
Eighty constants used for the eighty rounds in the SHA-512