SlideShare a Scribd company logo
SECURE
HASH
ALGORITHM
Secure Hash Algorithm ( SHA )
 Secure Hash Algorithm (SHA) was developed
by NIST along with NSA.
 In 1993, SHA was published as a Federal
Information Processing Standard.
 It has following versions-
 SHA-0
 SHA-1
 SHA-2
 SHA-3
SHA-1
 It works for any input message that is less than 264 bits.
 The output of SHA is a message digest of 160 bits in length.
 This is designed to be computationally infeasible to:
a) Obtain the original message , given its message digest.
b) Find two messages producing the same message digest.
How SHA-1 works?
 Step 1: Padding of Bits
 Step 2: Append Length
 Step 3: Divide the input into 512-bit blocks
1 0 1 1 0 1 0 0 0 0 0 0 0 0 …………………………… 0 0 0 0 1 1 0
Original
string
Padding of 0’s to 64 bits short of X 512
Length of
message
Total Message length multiple of 512
How SHA-1 works cont…
 Step 4: Initialize chaining variables
 Step 5: Process Blocks- Now the actual algorithm
begins….
Chaining Variables Hex values
A 01 23 45 67
B 89 AB CD EF
C FE DC BA 98
D 76 54 32 10
E C3 D2 E1 F0
How SHA-1 works cont…
 Step 5.1 : Copy chaining variables A-E into variables a-e.
 Step 5.2 : Divide current 512-bit block into 16 sub-blocks of
32-bits.
 Step 5.3 : SHA has 4 rounds, each consisting of 20 steps.
Each round takes 3 inputs-
• 512-bit block,
• The register abcde
• A constant K[t] (where t= 0 to 79)
Round Value of t between
1 1 and 19
2 20 and 39
3 40 and 59
4 60 and 79
How SHA-1 works cont…
 Step 5.4 : SHA has a total of 80 iterations (4 rounds X 20
-iterations). Each iteration consists of following
operations:-
abcde = ( e +Process P + S5(a) + W[t] + K[t] ), a, S30(b) , c , d
Where,
abcde = The register made up of 5 variables a, b, c, d, e.
Process P = The logic operation.
St = Circular-left shift of 32-bit sub-block by t bits.
W[t[ = A 32-bit derived from the current 32-bit sub-block.
K[t] = One of the five additive constants.
How SHA-1 works cont…
 Process P in each SHA round
Round Process P
1 (b AND c) OR (( NOT b) AND (d))
2 b XOR c XOR d
3 (b AND c ) OR (b AND d) OR (c AND d)
4 b XOR c XOR d
How SHA-1 works cont…
Single SHA-1 iteration
How SHA-1 works cont…
 The values of W[t] are calculated as follows :
 For the first 16 words of W (i.e. t=0 to 15) , the contents of the input
message sub-block M[t] become the contents of W[t].
 For the remaining 64 values of W are derived using the equation
W[t] = s1 ( W[t-16] XOR W[t-14] XOR W[t-8] XOR W[t-3])
Comparison between MD5 and SHA-1
Point of discussion MD5 SHA-1
Message digest length in
bits
128 160
Attack to try and find the
original message given a
message digest
Requires 2128 operations to
break in.
Requires 2160 operations to
break in, therefore more
secure.
Attack to try and find two
messages producing same
message digest
Requires 264 operations to
break in.
Requires 280 operations to
break in.
Speed Faster Slower
Successful attempts so far There have been reported
attempts to some extent.
No such claims so far.
Parameters for various versions of SHA
Parameter SHA-1 SHA-256 SHA-384 SHA-512
Message digest size(in
bits)
160 256 384 512
Message size(in bits) <264 264 2128 2128
Block size (in bits) 512 512 1024 1024
Word size (in bits) 32 32 64 64
Steps in algorithm 80 64 80 80
SHA-512
 SHA-512 algorithm takes a message of length
2128 bits and produces a message digest of size
512 bits.
 SHA-512 was closely modeled after SHA-1 ,
which itself is modeled on MD5.
How SHA-512 works?
 Step 1 : Padding of bits – 128 bits short of a multiple of
1024.
 Step 2 : Append length.
 Step 3 : Divide the input into 1024-bit blocks.
 Step 4: Initialize chaining variables.
A= 6A09E667F3BCC908 B= BB67AE8584CAA73B
C= 3C6EF372FE94F82B D= A54FF53A5F1D36F1
E= 510E527FADE6821D F= 9B05688C2B3E6C1F
G= 1F83D9ABFB41BD6B H= 5BE0CD19137E2179
How SHA-512 works cont…
 Step 5 : Process blocks.
 Step 5.1 : Copy the variables A-H to a-h.
 Step 5.2 : Divide the 1024-bit block into 16 sub-blocks of
64-bit each.
 Step 5.3 : It takes 80 rounds with 1024-bit block, abcdefgh
register and K[t] constant as three inputs.
Each round consists of following operations:
Temp1 = h + Ch(e,f,g) + Sum (e[i] for i=1 to 512) + W[t] + K[t]
Temp2 = Sum (a[i] for i=0 to 512) + Maj(a,b,c)
a = Temp1 + Temp2
b = a
c = b
How SHA-512 works cont…
d = c
e = d + Temp1
f = e
g = f
h = g
Where,
t = round number
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)
Sum (a[i]) = ROTR (a[i] by 28 bits) XOR ROTR (a[i] by 34 bits)
XOR ROTR (a[i] by 39 bits)
Sum (e[i]) = ROTR (e[i] by 14 bits) XOR ROTR (e[i] by
18 bits) XOR ROTR (e[i] by 41 bits)
How SHA-512 works cont…
ROTR(x) = Circular right shift, i.e. rotation , of the 64-bit
array x by the specified no. of bits.
W[t] = 64-bit word derived from the current 512-bit input
block.
K[t] = 64-bit additive constant.
+ (or Add) = Addition mod 264.
 In case of values of W[t] , for the first 16 rounds (0 to 15) ,
the value of W[t] is equal to the corresponding word in the
message block.
 For the remaining 64 steps, the value W[t] is equal to the
circular left shift by one bit of the XOR of the four preceding
values of W[t] with two of them subjected to shift and rotate
operations
How SHA-512 works cont…
Single SHA-512 iteration
Conclusion
 Developing Secure Hash Algorithm was initially major
concern for defense authorities.
 SHA produces message digest which has an application
in digital signature.
 In this way, this technique took a contributed in secure
and robust encryption.
Thank you for your attention!
Encrypt Safe…
Ad

More Related Content

What's hot (20)

AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
Prince Rachit
 
IP Security
IP SecurityIP Security
IP Security
Keshab Nath
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
Tirthika Bandi
 
Hash Function
Hash FunctionHash Function
Hash Function
Siddharth Srivastava
 
Hash Function
Hash Function Hash Function
Hash Function
ssuserdfb2da
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
harshit chavda
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
IGZ Software house
 
Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security
Dr. Kapil Gupta
 
CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signature
Adarsh Patel
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
Web Security
Web SecurityWeb Security
Web Security
Dr.Florence Dayana
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
Krishna Gehlot
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
patisa
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
kusum sharma
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
Riya Choudhary
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
Pawan Arya
 
Hash function
Hash function Hash function
Hash function
Salman Memon
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
Sunita Kharayat
 
PAC Learning
PAC LearningPAC Learning
PAC Learning
Sanghyuk Chun
 
Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
OECLIB Odisha Electronics Control Library
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
Prince Rachit
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
harshit chavda
 
Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security
Dr. Kapil Gupta
 
CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signature
Adarsh Patel
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
Krishna Gehlot
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
patisa
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
Riya Choudhary
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
Pawan Arya
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
Sunita Kharayat
 

Viewers also liked (9)

Secure hashing algorithm
Secure hashing algorithmSecure hashing algorithm
Secure hashing algorithm
Karteek Paruchuri
 
Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
daxesh chauhan
 
RSA & MD5 algorithm
RSA & MD5 algorithmRSA & MD5 algorithm
RSA & MD5 algorithm
Siva Rushi
 
The MD5 hashing algorithm
The MD5 hashing algorithmThe MD5 hashing algorithm
The MD5 hashing algorithm
Bob Landstrom
 
MD5Algorithm
MD5AlgorithmMD5Algorithm
MD5Algorithm
Mirza Tarannum
 
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Dylan Field
 
Message Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 AlgorithmMessage Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 Algorithm
Ajay Karri
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
DUET
 
Aes (advance encryption standard)
Aes (advance encryption standard) Aes (advance encryption standard)
Aes (advance encryption standard)
Sina Manavi
 
Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
daxesh chauhan
 
RSA & MD5 algorithm
RSA & MD5 algorithmRSA & MD5 algorithm
RSA & MD5 algorithm
Siva Rushi
 
The MD5 hashing algorithm
The MD5 hashing algorithmThe MD5 hashing algorithm
The MD5 hashing algorithm
Bob Landstrom
 
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Dylan Field
 
Message Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 AlgorithmMessage Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 Algorithm
Ajay Karri
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
DUET
 
Aes (advance encryption standard)
Aes (advance encryption standard) Aes (advance encryption standard)
Aes (advance encryption standard)
Sina Manavi
 
Ad

Similar to Secure Hash Algorithm (20)

SHA
SHASHA
SHA
SubashiniRathinavel
 
crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.ppt
shuchiagarwal12
 
Sha
ShaSha
Sha
ha123
 
AES.pptx
AES.pptxAES.pptx
AES.pptx
RizwanBasha12
 
Basic explanation to md5 implementation in C
Basic explanation to md5 implementation in CBasic explanation to md5 implementation in C
Basic explanation to md5 implementation in C
Sourav Punoriyar
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Tony Nguyen
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
David Hoen
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Fraboni Ec
 
Hash& mac algorithms
Hash& mac algorithmsHash& mac algorithms
Hash& mac algorithms
Harry Potter
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Luis Goldster
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
James Wong
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Young Alista
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
Hridyesh Bisht
 
Unit 3_Secure Hash Algorithm_SHA_Working.pdf
Unit 3_Secure Hash Algorithm_SHA_Working.pdfUnit 3_Secure Hash Algorithm_SHA_Working.pdf
Unit 3_Secure Hash Algorithm_SHA_Working.pdf
KanchanPatil34
 
A Comparative Analysis between SHA and MD5 algorithms
A Comparative Analysis between SHA and MD5 algorithms A Comparative Analysis between SHA and MD5 algorithms
A Comparative Analysis between SHA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
Module 2onblockchain technologies 2.pptx
Module 2onblockchain technologies 2.pptxModule 2onblockchain technologies 2.pptx
Module 2onblockchain technologies 2.pptx
shruthig40
 
Cryptographic algorithms
Cryptographic algorithmsCryptographic algorithms
Cryptographic algorithms
Anamika Singh
 
Cryptographic algorithms
Cryptographic algorithmsCryptographic algorithms
Cryptographic algorithms
Anamika Singh
 
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
ENGG_CSE_III_YEAR_Message_Digest_MD_5.pptENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
SakethBhargavaRallap
 
Block Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docxBlock Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docx
UsamaAliLone3
 
crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.ppt
shuchiagarwal12
 
Basic explanation to md5 implementation in C
Basic explanation to md5 implementation in CBasic explanation to md5 implementation in C
Basic explanation to md5 implementation in C
Sourav Punoriyar
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Tony Nguyen
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
David Hoen
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Fraboni Ec
 
Hash& mac algorithms
Hash& mac algorithmsHash& mac algorithms
Hash& mac algorithms
Harry Potter
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
James Wong
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Young Alista
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
Hridyesh Bisht
 
Unit 3_Secure Hash Algorithm_SHA_Working.pdf
Unit 3_Secure Hash Algorithm_SHA_Working.pdfUnit 3_Secure Hash Algorithm_SHA_Working.pdf
Unit 3_Secure Hash Algorithm_SHA_Working.pdf
KanchanPatil34
 
A Comparative Analysis between SHA and MD5 algorithms
A Comparative Analysis between SHA and MD5 algorithms A Comparative Analysis between SHA and MD5 algorithms
A Comparative Analysis between SHA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
Module 2onblockchain technologies 2.pptx
Module 2onblockchain technologies 2.pptxModule 2onblockchain technologies 2.pptx
Module 2onblockchain technologies 2.pptx
shruthig40
 
Cryptographic algorithms
Cryptographic algorithmsCryptographic algorithms
Cryptographic algorithms
Anamika Singh
 
Cryptographic algorithms
Cryptographic algorithmsCryptographic algorithms
Cryptographic algorithms
Anamika Singh
 
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
ENGG_CSE_III_YEAR_Message_Digest_MD_5.pptENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
SakethBhargavaRallap
 
Block Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docxBlock Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docx
UsamaAliLone3
 
Ad

Recently uploaded (20)

Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 

Secure Hash Algorithm

  • 2. Secure Hash Algorithm ( SHA )  Secure Hash Algorithm (SHA) was developed by NIST along with NSA.  In 1993, SHA was published as a Federal Information Processing Standard.  It has following versions-  SHA-0  SHA-1  SHA-2  SHA-3
  • 3. SHA-1  It works for any input message that is less than 264 bits.  The output of SHA is a message digest of 160 bits in length.  This is designed to be computationally infeasible to: a) Obtain the original message , given its message digest. b) Find two messages producing the same message digest.
  • 4. How SHA-1 works?  Step 1: Padding of Bits  Step 2: Append Length  Step 3: Divide the input into 512-bit blocks 1 0 1 1 0 1 0 0 0 0 0 0 0 0 …………………………… 0 0 0 0 1 1 0 Original string Padding of 0’s to 64 bits short of X 512 Length of message Total Message length multiple of 512
  • 5. How SHA-1 works cont…  Step 4: Initialize chaining variables  Step 5: Process Blocks- Now the actual algorithm begins…. Chaining Variables Hex values A 01 23 45 67 B 89 AB CD EF C FE DC BA 98 D 76 54 32 10 E C3 D2 E1 F0
  • 6. How SHA-1 works cont…  Step 5.1 : Copy chaining variables A-E into variables a-e.  Step 5.2 : Divide current 512-bit block into 16 sub-blocks of 32-bits.  Step 5.3 : SHA has 4 rounds, each consisting of 20 steps. Each round takes 3 inputs- • 512-bit block, • The register abcde • A constant K[t] (where t= 0 to 79) Round Value of t between 1 1 and 19 2 20 and 39 3 40 and 59 4 60 and 79
  • 7. How SHA-1 works cont…  Step 5.4 : SHA has a total of 80 iterations (4 rounds X 20 -iterations). Each iteration consists of following operations:- abcde = ( e +Process P + S5(a) + W[t] + K[t] ), a, S30(b) , c , d Where, abcde = The register made up of 5 variables a, b, c, d, e. Process P = The logic operation. St = Circular-left shift of 32-bit sub-block by t bits. W[t[ = A 32-bit derived from the current 32-bit sub-block. K[t] = One of the five additive constants.
  • 8. How SHA-1 works cont…  Process P in each SHA round Round Process P 1 (b AND c) OR (( NOT b) AND (d)) 2 b XOR c XOR d 3 (b AND c ) OR (b AND d) OR (c AND d) 4 b XOR c XOR d
  • 9. How SHA-1 works cont… Single SHA-1 iteration
  • 10. How SHA-1 works cont…  The values of W[t] are calculated as follows :  For the first 16 words of W (i.e. t=0 to 15) , the contents of the input message sub-block M[t] become the contents of W[t].  For the remaining 64 values of W are derived using the equation W[t] = s1 ( W[t-16] XOR W[t-14] XOR W[t-8] XOR W[t-3])
  • 11. Comparison between MD5 and SHA-1 Point of discussion MD5 SHA-1 Message digest length in bits 128 160 Attack to try and find the original message given a message digest Requires 2128 operations to break in. Requires 2160 operations to break in, therefore more secure. Attack to try and find two messages producing same message digest Requires 264 operations to break in. Requires 280 operations to break in. Speed Faster Slower Successful attempts so far There have been reported attempts to some extent. No such claims so far.
  • 12. Parameters for various versions of SHA Parameter SHA-1 SHA-256 SHA-384 SHA-512 Message digest size(in bits) 160 256 384 512 Message size(in bits) <264 264 2128 2128 Block size (in bits) 512 512 1024 1024 Word size (in bits) 32 32 64 64 Steps in algorithm 80 64 80 80
  • 13. SHA-512  SHA-512 algorithm takes a message of length 2128 bits and produces a message digest of size 512 bits.  SHA-512 was closely modeled after SHA-1 , which itself is modeled on MD5.
  • 14. How SHA-512 works?  Step 1 : Padding of bits – 128 bits short of a multiple of 1024.  Step 2 : Append length.  Step 3 : Divide the input into 1024-bit blocks.  Step 4: Initialize chaining variables. A= 6A09E667F3BCC908 B= BB67AE8584CAA73B C= 3C6EF372FE94F82B D= A54FF53A5F1D36F1 E= 510E527FADE6821D F= 9B05688C2B3E6C1F G= 1F83D9ABFB41BD6B H= 5BE0CD19137E2179
  • 15. How SHA-512 works cont…  Step 5 : Process blocks.  Step 5.1 : Copy the variables A-H to a-h.  Step 5.2 : Divide the 1024-bit block into 16 sub-blocks of 64-bit each.  Step 5.3 : It takes 80 rounds with 1024-bit block, abcdefgh register and K[t] constant as three inputs. Each round consists of following operations: Temp1 = h + Ch(e,f,g) + Sum (e[i] for i=1 to 512) + W[t] + K[t] Temp2 = Sum (a[i] for i=0 to 512) + Maj(a,b,c) a = Temp1 + Temp2 b = a c = b
  • 16. How SHA-512 works cont… d = c e = d + Temp1 f = e g = f h = g Where, t = round number 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) Sum (a[i]) = ROTR (a[i] by 28 bits) XOR ROTR (a[i] by 34 bits) XOR ROTR (a[i] by 39 bits) Sum (e[i]) = ROTR (e[i] by 14 bits) XOR ROTR (e[i] by 18 bits) XOR ROTR (e[i] by 41 bits)
  • 17. How SHA-512 works cont… ROTR(x) = Circular right shift, i.e. rotation , of the 64-bit array x by the specified no. of bits. W[t] = 64-bit word derived from the current 512-bit input block. K[t] = 64-bit additive constant. + (or Add) = Addition mod 264.  In case of values of W[t] , for the first 16 rounds (0 to 15) , the value of W[t] is equal to the corresponding word in the message block.  For the remaining 64 steps, the value W[t] is equal to the circular left shift by one bit of the XOR of the four preceding values of W[t] with two of them subjected to shift and rotate operations
  • 18. How SHA-512 works cont… Single SHA-512 iteration
  • 19. Conclusion  Developing Secure Hash Algorithm was initially major concern for defense authorities.  SHA produces message digest which has an application in digital signature.  In this way, this technique took a contributed in secure and robust encryption.
  • 20. Thank you for your attention! Encrypt Safe…
  翻译: