0% found this document useful (0 votes)
121 views

The Secure Hash Function (SHA) : Network Security

The document discusses the Secure Hash Algorithm (SHA), which was developed by the National Institute of Standards and Technology to generate digests of messages. SHA-512 is currently the most widely used version. It takes a message of any size and length and outputs a 512-bit digest. The algorithm processes the message in 1024-bit blocks, padding the last block as needed and appending the original message length. It then initializes registers and processes each block through 80 rounds to update the registers, outputting the final registers as the message digest.

Uploaded by

ali ijaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

The Secure Hash Function (SHA) : Network Security

The document discusses the Secure Hash Algorithm (SHA), which was developed by the National Institute of Standards and Technology to generate digests of messages. SHA-512 is currently the most widely used version. It takes a message of any size and length and outputs a 512-bit digest. The algorithm processes the message in 1024-bit blocks, padding the last block as needed and appending the original message length. It then initializes registers and processes each block through 80 rounds to update the registers, outputting the final registers as the message digest.

Uploaded by

ali ijaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

THE SECURE

HASH
FUNCTION
(SHA)
Network Security

1
Objectives of the Topic
After completing this topic, a student will be able to
 explain working of the secure hash algorithm (SHA).

THE SECURE HASH


FUNCTION (SHA)

2
Figures and material in this topic have been adapted
from
“Network Security Essentials : Applications and
Standards”, 2014, by William Stallings.

THE SECURE HASH


FUNCTION (SHA)
3
THE SECURE
HASH
FUNCTION
(SHA)

Secure Hash Algorithm


(SHA)
Is the most widely used hash
function in recent years.
Developed by the National
Institute of Standards and
Technology (NIST)
FIPS 180 in 1993.

4
THE SECURE HASH
FUNCTION (SHA)

The actual standards document is entitled


“Secure Hash Standard.”
SHA is based on the hash function (Message-
Digest) MD4, and its design closely models
MD4.

5
When weaknesses were discovered in SHA (now known
as SHA-0), a revised version was issued as FIPS 180-1 in
1995 and is referred to as SHA-1.

THE SECURE HASH


FUNCTION (SHA)

6
THE SECURE HASH
FUNCTION (SHA)
In 2002, NIST produced FIPS 180-2.
Three new versions of SHA with hash value lengths of
256, 384, and 512 bits known as SHA-256, SHA-384,
and SHA-512 were defined.
Collectively, these are known as SHA-2.

7
THE SECURE HASH Comparison of SHA

FUNCTION (SHA) Parameters

8
THE SECURE HASH
FUNCTION (SHA)
In 2005 NIST announced the intention to phase out
approval of SHA-1 and move to a reliance on SHA-2 by
2010.
We focus on SHA-512.

9
SHA-512 Logic:
The algorithm takes as input a message with a maximum
length of less than 2128 bits and produces as output a 512-
bit message digest.
The input is processed in 1024-bit blocks.

THE SECURE HASH


FUNCTION (SHA)

10
THE SECURE HASH
FUNCTION (SHA)
Step 1: Append padding bits
Padding is added, even if the message is already of the
desired length. No. of Padding bits = [1 1024]
Padding consists of a single 1 bit followed by the
necessary number of 0 bits.

11
Step 2: Append length
A block of 128 bits is appended to the message.
This block is treated as an unsigned 128-bit integer and
contains the length of the original message (before the
padding).

THE SECURE HASH


FUNCTION (SHA)

12
THE SECURE HASH
FUNCTION (SHA)
Outcome of first two steps yields a message an integer
multiple of 1024 bits in length.
Total length of the expanded message is N × 1024 bits as
the expanded message is a sequence of 1024-bit blocks
M1, M2, . . ., MN.

13
THE SECURE HASH Message Digest
Generation of SHA-
FUNCTION (SHA) 512

14
THE SECURE HASH
FUNCTION (SHA)
15
THE SECURE HASH
FUNCTION (SHA)
Step 3: Initialize hash buffer
A 512-bit buffer is used to hold intermediate and final
results of the hash function.
The buffer can be represented as eight 64-bit registers
(a, b, c, d, e, f, g, h).

16
THE SECURE HASH
FUNCTION (SHA)
Initialize these registers by taking the first sixty-four bits
of the fractional parts of the square roots of the first
eight prime numbers.

17
THE SECURE HASH Initialization of the

FUNCTION (SHA) registers

18
THE SECURE HASH
FUNCTION (SHA)
Step 4: Process message in 1024-bit (128-word) blocks
The module labeled F consists of 80 rounds.
Each round takes as input the 512-bit buffer value
abcdefgh and updates the contents of the buffer.

19
THE SECURE HASH
FUNCTION (SHA)
At input to the first round, the buffer has the value of the
intermediate hash value, Hi-1.
Each round t makes use of a 64-bit value Wt derived
from the current 1024-bit block being processed (Mi).

20
THE SECURE HASH
FUNCTION (SHA)
Each round also makes use of an additive constant Kt,
where t = 0 … … 79.
The constants eliminate any regularities in the input
data.

21
THE SECURE HASH FUNCTION (SHA)
The output of the 80th round is
added to the input to the first
round (Hi-1) to produce Hi .

22
THE SECURE
HASH
FUNCTION
(SHA)

Processing of a Single
1024-Bit Block

23
THE SECURE HASH FUNCTION (SHA)
Step 5 Output:
After all N 1024-bit blocks have
been processed, the output from
the Nth stage is the 512-bit
message digest.
In 2012, NIST formally published
SHA-3.

En
d

24

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy