SlideShare a Scribd company logo
1 of 14
Secure Hashing Algorithm
(SHA)
3/11/2021
SHA
• Secure Hash Algorithm (SHA) was developed
by NIST along with NSA.
• In 1993, SHA was published as a Federal
Information Processing Standard.
• It was revised to FIPS PUB 180-1 in 1995 and
the name was changed to SHA-1.
• It is the modified version of MD5.
3/11/2021
SHA
• Input message is less than 2^64 bits
• Output of SHA is 160 bits in length
• SHA is designed to be computationally
infeasible to
a) Obtain the original message, given its
message digest
b) Find two message producing the same
message digest
How SHA-1 works?
 Step 1: Padding of Bits similar to MD5
in a way that the length of the
message is 64 bits short of a
multiple of 512
Ex:
Length of the message = 1000 bits
Padding bits = 472 (1536-1064)
1000+472 +64 =1536 That is Multiple of 512
(512 x 3 =
1536)
How SHA-1 works?
 Step 2: Append Length - Length of the
message excluding the length of
the padding is now calculated
and appended. After the 64 bit
length of the message is
appended, it becomes the final
message
 Step 3: Divide the input into 512-bit blocks
How SHA-1 works?
 Step 4: Initialize chaining variables
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
 Step 5: Process Blocks- Now the actual
algorithm begins….
How SHA-1 works?
 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)
3/11/2021
Value of K[t]
Round Value of t
between
K[t] in
heaxadecimal
1 1 and 19 5A 92 79 99
2 20 and 39 6E D9 EB A1
3 40 and 59 9F 1B BC DC
4 60 and 79 CA 62 C1 D6
5 30
t
How SHA-1 works?
 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 + S (a) + W[t] + K[t] ), a, S (b) , c , d
Where,
abcde = The register made up of 5 variables a, b, c, d, e.
Process P = The logic operation.
S = 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?
 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
3/11/2021
How SHA-1 works?
1
How SHA-1 works?
 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] = s ( W[t-16] XOR W[t-14] XOR W[t-8] XOR W[t-3])
3/11/2021
Comparison of 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 2^128 operations to
break in.
Requires 2^160 operations to
break in, therefore more
secure.
Attack to try and find two
messages producing same
message digest
Requires 2^64 operations to
break in.
Requires 2^80 operations to
break in.
Speed Faster Slower
Successful attempts so far There have been reported
attempts to some extent.
No such claims so far.
Software Implementation Simple Simple
3/11/2021
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

More Related Content

What's hot

Operating system security
Operating system securityOperating system security
Operating system securityRamesh Ogania
 
Network security - OSI Security Architecture
Network security - OSI Security ArchitectureNetwork security - OSI Security Architecture
Network security - OSI Security ArchitectureBharathiKrishna6
 
Wireless network security
Wireless network securityWireless network security
Wireless network securityVishal Agarwal
 
Security in Windows operating system
Security in Windows operating systemSecurity in Windows operating system
Security in Windows operating systemabdullah roomi
 
Wireless and mobile security
Wireless and mobile securityWireless and mobile security
Wireless and mobile securityPushkar Pashupat
 
Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its UsesMohsin Ali
 
Keyloggers and Spywares
Keyloggers and SpywaresKeyloggers and Spywares
Keyloggers and SpywaresAnkit Mistry
 
Secure electronic transaction ppt
Secure electronic transaction pptSecure electronic transaction ppt
Secure electronic transaction pptSubhash Gupta
 
Security & protection in operating system
Security & protection in operating systemSecurity & protection in operating system
Security & protection in operating systemAbou Bakr Ashraf
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)DUET
 
Security Attacks.ppt
Security Attacks.pptSecurity Attacks.ppt
Security Attacks.pptZaheer720515
 

What's hot (20)

MD-5 : Algorithm
MD-5 : AlgorithmMD-5 : Algorithm
MD-5 : Algorithm
 
Operating system security
Operating system securityOperating system security
Operating system security
 
Network security - OSI Security Architecture
Network security - OSI Security ArchitectureNetwork security - OSI Security Architecture
Network security - OSI Security Architecture
 
Wireless network security
Wireless network securityWireless network security
Wireless network security
 
Security in Windows operating system
Security in Windows operating systemSecurity in Windows operating system
Security in Windows operating system
 
Secure Hash Algorithm
Secure Hash AlgorithmSecure Hash Algorithm
Secure Hash Algorithm
 
Email security
Email securityEmail security
Email security
 
Wireless and mobile security
Wireless and mobile securityWireless and mobile security
Wireless and mobile security
 
Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its Uses
 
Keyloggers and Spywares
Keyloggers and SpywaresKeyloggers and Spywares
Keyloggers and Spywares
 
Keyloggers.ppt
Keyloggers.pptKeyloggers.ppt
Keyloggers.ppt
 
Secure electronic transaction ppt
Secure electronic transaction pptSecure electronic transaction ppt
Secure electronic transaction ppt
 
WPA2
WPA2WPA2
WPA2
 
Hash Function
Hash FunctionHash Function
Hash Function
 
SHA 1 Algorithm
SHA 1 AlgorithmSHA 1 Algorithm
SHA 1 Algorithm
 
Electronic mail security
Electronic mail securityElectronic mail security
Electronic mail security
 
Security & protection in operating system
Security & protection in operating systemSecurity & protection in operating system
Security & protection in operating system
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
 
S/MIME
S/MIMES/MIME
S/MIME
 
Security Attacks.ppt
Security Attacks.pptSecurity Attacks.ppt
Security Attacks.ppt
 

Similar to SHA

crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptshuchiagarwal12
 
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 CSourav Punoriyar
 
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 ⊞⌘
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsYoung Alista
 
Hash& mac algorithms
Hash& mac algorithmsHash& mac algorithms
Hash& mac algorithmsHarry Potter
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsJames Wong
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsTony Nguyen
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsFraboni Ec
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsDavid Hoen
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithmsHridyesh Bisht
 
SHA 1 Algorithm.ppt
SHA 1 Algorithm.pptSHA 1 Algorithm.ppt
SHA 1 Algorithm.pptRajapriya82
 
IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...
IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...
IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...IRJET Journal
 

Similar to SHA (20)

crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.ppt
 
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
 
Sha
ShaSha
Sha
 
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
 
27-SHA1.ppt
27-SHA1.ppt27-SHA1.ppt
27-SHA1.ppt
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Hash& mac algorithms
Hash& mac algorithmsHash& mac algorithms
Hash& mac algorithms
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
 
SHA 1 Algorithm.ppt
SHA 1 Algorithm.pptSHA 1 Algorithm.ppt
SHA 1 Algorithm.ppt
 
IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...
IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...
IRJET- Low Power and Simple Implementation of Secure Hashing Algorithm (SHA-2...
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hash function
Hash functionHash function
Hash function
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 

More from SubashiniRathinavel (11)

PYTHON - OBJECT ORIENTED PROGRAMMING .pptx
PYTHON - OBJECT ORIENTED PROGRAMMING .pptxPYTHON - OBJECT ORIENTED PROGRAMMING .pptx
PYTHON - OBJECT ORIENTED PROGRAMMING .pptx
 
Basic Introduction to Python Programming
Basic Introduction to Python ProgrammingBasic Introduction to Python Programming
Basic Introduction to Python Programming
 
VB.NET Datatypes.pptx
VB.NET Datatypes.pptxVB.NET Datatypes.pptx
VB.NET Datatypes.pptx
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Quiz
QuizQuiz
Quiz
 
DSS
DSSDSS
DSS
 
Wireless lan security(10.8)
Wireless lan security(10.8)Wireless lan security(10.8)
Wireless lan security(10.8)
 
Wireless LAN
Wireless LANWireless LAN
Wireless LAN
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Online
OnlineOnline
Online
 
Cryptography
CryptographyCryptography
Cryptography
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

SHA

  • 2. 3/11/2021 SHA • Secure Hash Algorithm (SHA) was developed by NIST along with NSA. • In 1993, SHA was published as a Federal Information Processing Standard. • It was revised to FIPS PUB 180-1 in 1995 and the name was changed to SHA-1. • It is the modified version of MD5.
  • 3. 3/11/2021 SHA • Input message is less than 2^64 bits • Output of SHA is 160 bits in length • SHA is designed to be computationally infeasible to a) Obtain the original message, given its message digest b) Find two message producing the same message digest
  • 4. How SHA-1 works?  Step 1: Padding of Bits similar to MD5 in a way that the length of the message is 64 bits short of a multiple of 512 Ex: Length of the message = 1000 bits Padding bits = 472 (1536-1064) 1000+472 +64 =1536 That is Multiple of 512 (512 x 3 = 1536)
  • 5. How SHA-1 works?  Step 2: Append Length - Length of the message excluding the length of the padding is now calculated and appended. After the 64 bit length of the message is appended, it becomes the final message  Step 3: Divide the input into 512-bit blocks
  • 6. How SHA-1 works?  Step 4: Initialize chaining variables 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  Step 5: Process Blocks- Now the actual algorithm begins….
  • 7. How SHA-1 works?  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)
  • 8. 3/11/2021 Value of K[t] Round Value of t between K[t] in heaxadecimal 1 1 and 19 5A 92 79 99 2 20 and 39 6E D9 EB A1 3 40 and 59 9F 1B BC DC 4 60 and 79 CA 62 C1 D6
  • 9. 5 30 t How SHA-1 works?  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 + S (a) + W[t] + K[t] ), a, S (b) , c , d Where, abcde = The register made up of 5 variables a, b, c, d, e. Process P = The logic operation. S = 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.
  • 10. How SHA-1 works?  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
  • 12. 1 How SHA-1 works?  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] = s ( W[t-16] XOR W[t-14] XOR W[t-8] XOR W[t-3])
  • 13. 3/11/2021 Comparison of 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 2^128 operations to break in. Requires 2^160 operations to break in, therefore more secure. Attack to try and find two messages producing same message digest Requires 2^64 operations to break in. Requires 2^80 operations to break in. Speed Faster Slower Successful attempts so far There have been reported attempts to some extent. No such claims so far. Software Implementation Simple Simple
  • 14. 3/11/2021 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