Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
0 views

Secure Hash Algorithm Versions (1)

The document outlines the steps involved in the SHA-512 hashing algorithm, including padding the message, initializing the hash buffer, and processing the message in 1024-bit blocks through 80 rounds of operations. It details the compression function and the round function equations used in the algorithm, highlighting the logical operations performed on the input data. Additionally, it provides an example of how a message is padded and processed to create a 1024-bit message block.

Uploaded by

vitc902
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Secure Hash Algorithm Versions (1)

The document outlines the steps involved in the SHA-512 hashing algorithm, including padding the message, initializing the hash buffer, and processing the message in 1024-bit blocks through 80 rounds of operations. It details the compression function and the round function equations used in the algorithm, highlighting the logical operations performed on the input data. Additionally, it provides an example of how a message is padded and processed to create a 1024-bit message block.

Uploaded by

vitc902
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

SECURE HASH

ALGORITHM SHA 512


A SEARIES OF SHA…
SHA 512
The processing consists of the following steps:
• Step 1: Append padding bits, consists of a single 1-bit
followed by the necessary number of 0-bits, so that its
length is congruent to 896 modulo 1024
• Step 2: Append length as 128-bit integer
• Step 3: Initialize hash buffer 8-64-bit registers
(A,B,C,D,E,F,G,H)

• Step 4: Process the message in 1024-bit block, which


forms the heart of the algorithm.
Each round takes as input the 512-bit buffer value Hi, and
updates the contents of that buffer.
expand 16 64-bit words into 80 words by mixing & shifting
80 rounds of operations on message block & buffer
add output to input to form new buffer value

• Step 5: Output the final state value as the resulting hash


SHA-512 Compression
Function
 heart of the algorithm
 processing message in 1024-bit blocks
 consists of 80 rounds
 updating a 512-bit buffer
 using a 64-bit value Wt derived from the

current message block


 and a round constant based on cube root of

first 80 prime numbers


Compression Function
SHA-512 Round Function
SHA-512 Round Function
SHA-512 Round Function
 Let us look in more detail at the logic in each of the 80
steps of the processing of one 512-bit block (Figure). Each
round is defined by the following set of equations:
SHA-512 Round Function
 where
 t =step/round number; 0 t 79
 Ch(e, f, g)= (e AND f) XOR (NOT e AND g)
 Maj(a, b,c)= (a AND b) XOR (a AND c) XOR (b AND c)
the function is true only of the majority (two or three) of the
arguments are true.
 Sum (ai)= RORT (ai By 28 Bit) XOR RORT (ai By 34 Bit)
XOR
RORT (ai By 39 Bit)
 Sum (ei)= RORT (ei By 14 Bit) XOR RORT (ei By 18 Bit)
XOR
RORT (ei By 41 Bit)
 ROTRn(x) = circular right shift (rotation) of the 64-bit
argument x by n bits
 Wt = a 64-bit word derived from the current 512-bit input block
(i.e:- Message Digest)
 Kt = a 64-bit additive constant
Ch(e, f, g)= (e AND f) XOR (NOT e AND g)

1001 , 1010, 1111


Problem
 ASCII characters: “abc
 01100001
 01100010
 01100011
 that the message is padded to a length
congruent to 896 modulo 1024.
 In this case of a single block, the padding
consists of 896 - 24 = 872 bits, consisting
of a “1” bit followed by 871 “0” bits.
 Then a 128-bit length value is appended
to the message, which contains the
length of the original message in bits
(before the padding).
 The original length is 24 bits or a
hexadecimal value of 18.
 00011000
 = 0001 1000
 =18
1024-bit message
Putting this all together, the 1024-bit
message block, in hexadecimal, is
6162638000000000 0000000000000000
0000000000000000 0000000000000000
0000000000000000 0000000000000000
0000000000000000 0000000000000000
0000000000000000 0000000000000000
0000000000000000 0000000000000000
0000000000000000 0000000000000000
0000000000000000 0000000000000018
 This block is assigned to the words W0, . . . ,
W15 of the message schedule, which appears as
follows.
W0 = 6162638000000000 W8 = 0000000000000000
W1 = 0000000000000000 W9 = 0000000000000000
W2 = 0000000000000000 W10 = 0000000000000000
W3 = 0000000000000000 W11 = 0000000000000000
W4 = 0000000000000000 W12 = 0000000000000000
W5 = 0000000000000000 W13 = 0000000000000000
W6 = 0000000000000000 W14 = 0000000000000000
W7 = 0000000000000000 W15 = 0000000000000018
SHA-512 Round Function

You might also like