SlideShare a Scribd company logo
SECURE HASHING
ALGORITHM
By: Ruth Betcher
Purpose: Authentication
               Not Encryption
Authentication Requirements:
   Masquerade   – Insertion of message from
    fraudulent source
   Content Modification – Changing content of
    message
   Sequence Modification – Insertion, deletion
    and reordering sequence
   Timing Modification – Replaying valid
    sessions
Background Theory
•   Message Digest or “Fingerprint”
       → Condensed Representation
       → Easy to generate for a given file.
•   Computationally infeasible to produce two
    messages with same message digest
•   Impossible to recreate a message given a
    message digest.
•   Data Integrity and Comparison Checking
       → Message Integrity Validation
Applications:
   One-way hash functions
•   Public Key Algorithms
    –   Password Logins
    –   Encryption Key Management
    –   Digital Signatures
•   Integrity Checking
    –   Virus and Malware Scanning
•   Authentication
    –   Secure Web Connections
         •   (PGP, SSL, SSH, S/MIME)
Variants
•   MD4 and MD5 by Ron Rivest (1990,1994)
•   SHA-0, SHA-1 by NSA (1993, 1995)
•   RIPEMD-160 (1996)
•   SHA-2 (2002 – 224, 256, 385, 512)
•   Whirlpool
•   Tiger
•   GOST-3411
•   SHA-3
    •   Winner selected from solicitations in 2012
Basic Hash Function Diagram
Message Diagram
SHA-1 (160 bit message)
Algorithm Framework
   Step 1: Append Padding Bits….
    Message is “padded” with a 1 and as many 0’s as
    necessary to bring the message length to 64 bits fewer
    than an even multiple of 512.
   Step 2: Append Length....
    64 bits are appended to the end of the padded message. These bits
    hold the binary format of 64 bits indicating the length of the original
    message.
   http://www.herongyang.com

        f
SHA-1 Framework Continued
   Step 3: Prepare Processing Functions….
    SHA1 requires 80 processing functions defined as:
             f(t;B,C,D) = (B AND C) OR ((NOT B) AND D) ( 0 <= t <= 19)
             f(t;B,C,D) = B XOR C XOR D                (20 <= t <= 39)
             f(t;B,C,D) = (B AND C) OR (B AND D) OR (C AND D) (40 <= t <=59)
             f(t;B,C,D) = B XOR C XOR D                 (60 <= t <= 79)

   Step 4: Prepare Processing Constants....
    SHA1 requires 80 processing constant words defined as:
             K(t) = 0x5A827999              ( 0 <= t <= 19)
             K(t) = 0x6ED9EBA1              (20 <= t <= 39)
             K(t) = 0x8F1BBCDC              (40 <= t <= 59)
             K(t) = 0xCA62C1D6              (60 <= t <= 79)

   http://www.herongyang.com
SHA-1 Framework Continued
   Step 5: Initialize Buffers….
    SHA1 requires 160 bits or 5 buffers of words (32 bits):
                       H0 = 0x67452301
                       H1 = 0xEFCDAB89
                       H2 = 0x98BADCFE
                       H3 = 0x10325476
                       H4 = 0xC3D2E1F0
   http://www.herongyang.com
SHA-1 Framework Final Step
   Step 6: Processing Message in 512-bit
    blocks (L blocks in total message)….
    This is the main task of SHA1 algorithm which loops through the
    padded and appended message in 512-bit blocks.
    Input and predefined functions:
          M[1, 2, ..., L]: Blocks of the padded and appended message
    f(0;B,C,D), f(1,B,C,D), ..., f(79,B,C,D): 80 Processing Functions   K(0),
    K(1), ..., K(79): 80 Processing Constant Words
          H0, H1, H2, H3, H4, H5: 5 Word buffers with initial values

   http://www.herongyang.com
SHA-1 Framework Continued
   Step 6: Pseudo Code….
    For loop on k = 1 to L
          (W(0),W(1),...,W(15)) = M[k]       /* Divide M[k] into 16 words */
          For t = 16 to 79 do:
                   W(t) = (W(t-3) XOR W(t-8) XOR W(t-14) XOR W(t-16)) <<< 1
           A = H0, B = H1, C = H2, D = H3, E = H4
           For t = 0 to 79 do:
                TEMP = A<<<5 + f(t;B,C,D) + E + W(t) + K(t) E = D, D = C,
                             C = B<<<30, B = A, A = TEMP
           End of for loop
           H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4 + E
       End of for loop

Output:
              H0, H1, H2, H3, H4, H5: Word buffers with final message digest
   http://www.herongyang.com
Message Diagram
SHA-1 Message Digest

The message digest of the string:

                “This is a test for theory of computation”



     4480afca4407400b035d9debeb88bfc402db514f
Cryptanalysis and Limitation

•   Key Premises for Hash Functions:
       1. Impossible to re-create a message
    given a fingerprint
       2. Collision Free

•   SHA-1 failure using brute force attack in 280 operations
•   Collision failure found in 2005 in 233 operations
Bibliography
   http://www.herongyang.com
   http://www.ipa.go.jp/security
   Salomon, David, Foundations of Computer
    Security Springer-Verlag London Limited 2006.
   Schneier, Bruce, “Opinion: Cryptanalysis of MD
    % and SHA: Time for a new standard”,
    Computer World, August 2004.
   Stallings, William, Cryptography and Network
    Security, Prentice Hall, 1999.
   Tanenbaum, Andrew, Computer Networks,
    Prentice Hall, 2003.

More Related Content

What's hot

SHA512.pptx
SHA512.pptxSHA512.pptx
SHA512.pptx
ssuserb4287c
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
DUET
 
Rc4
Rc4Rc4
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
Krishna Gehlot
 
Hash function
Hash functionHash function
Hash function
Harry Potter
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
harshit chavda
 
SHA-256.pptx
SHA-256.pptxSHA-256.pptx
SHA-256.pptx
JadhavSujeet
 
Ipsec
IpsecIpsec
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
DarshanPatil82
 
Design of Secure Hash Algorithm(SHA)
Design of Secure Hash Algorithm(SHA)Design of Secure Hash Algorithm(SHA)
Design of Secure Hash Algorithm(SHA)
Saravanan T.M
 
Hash Function
Hash FunctionHash Function
Hash Function
Siddharth Srivastava
 
Data encryption standard
Data encryption standardData encryption standard
Data encryption standard
Vasuki Ramasamy
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
sakhi rehman
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
Pina Parmar
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
CheapSSLsecurity
 
Hash Function
Hash Function Hash Function
Hash Function
ssuserdfb2da
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
SAurabh PRajapati
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
Dr.Florence Dayana
 

What's hot (20)

SHA512.pptx
SHA512.pptxSHA512.pptx
SHA512.pptx
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
 
Rc4
Rc4Rc4
Rc4
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
Hash function
Hash functionHash function
Hash function
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
 
SHA-256.pptx
SHA-256.pptxSHA-256.pptx
SHA-256.pptx
 
Ipsec
IpsecIpsec
Ipsec
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
 
Design of Secure Hash Algorithm(SHA)
Design of Secure Hash Algorithm(SHA)Design of Secure Hash Algorithm(SHA)
Design of Secure Hash Algorithm(SHA)
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Data encryption standard
Data encryption standardData encryption standard
Data encryption standard
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
 
Hash Function
Hash Function Hash Function
Hash Function
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
 
DES
DESDES
DES
 

Similar to Secure hashing algorithm

Sha
ShaSha
Sha
ha123
 
Hashfunction
HashfunctionHashfunction
Hashfunction
Tony Nguyen
 
Hashfunction
HashfunctionHashfunction
Hashfunction
Fraboni Ec
 
Hashfunction
HashfunctionHashfunction
Hashfunction
David Hoen
 
Hashfunction
HashfunctionHashfunction
Hashfunction
James Wong
 
crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.ppt
shuchiagarwal12
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Fraboni Ec
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Young Alista
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
David Hoen
 
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
Luis Goldster
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
Tony Nguyen
 
Cryptographic hash function md5
Cryptographic hash function md5Cryptographic hash function md5
Cryptographic hash function md5
Khulna University, Khulna, Bangladesh
 
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 Function & Analysis
Hash Function & AnalysisHash Function & Analysis
Hash Function & Analysis
Pawandeep Kaur
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
Hridyesh Bisht
 

Similar to Secure hashing algorithm (20)

Sha
ShaSha
Sha
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.ppt
 
Ch12
Ch12Ch12
Ch12
 
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
 
Cryptographic hash function md5
Cryptographic hash function md5Cryptographic hash function md5
Cryptographic hash function md5
 
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
 
Hash Function & Analysis
Hash Function & AnalysisHash Function & Analysis
Hash Function & Analysis
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
 

Recently uploaded

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 

Recently uploaded (20)

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 

Secure hashing algorithm

  • 2. Purpose: Authentication Not Encryption Authentication Requirements:  Masquerade – Insertion of message from fraudulent source  Content Modification – Changing content of message  Sequence Modification – Insertion, deletion and reordering sequence  Timing Modification – Replaying valid sessions
  • 3. Background Theory • Message Digest or “Fingerprint” → Condensed Representation → Easy to generate for a given file. • Computationally infeasible to produce two messages with same message digest • Impossible to recreate a message given a message digest. • Data Integrity and Comparison Checking → Message Integrity Validation
  • 4. Applications: One-way hash functions • Public Key Algorithms – Password Logins – Encryption Key Management – Digital Signatures • Integrity Checking – Virus and Malware Scanning • Authentication – Secure Web Connections • (PGP, SSL, SSH, S/MIME)
  • 5. Variants • MD4 and MD5 by Ron Rivest (1990,1994) • SHA-0, SHA-1 by NSA (1993, 1995) • RIPEMD-160 (1996) • SHA-2 (2002 – 224, 256, 385, 512) • Whirlpool • Tiger • GOST-3411 • SHA-3 • Winner selected from solicitations in 2012
  • 8. SHA-1 (160 bit message) Algorithm Framework  Step 1: Append Padding Bits…. Message is “padded” with a 1 and as many 0’s as necessary to bring the message length to 64 bits fewer than an even multiple of 512.  Step 2: Append Length.... 64 bits are appended to the end of the padded message. These bits hold the binary format of 64 bits indicating the length of the original message.  http://www.herongyang.com f
  • 9. SHA-1 Framework Continued  Step 3: Prepare Processing Functions…. SHA1 requires 80 processing functions defined as: f(t;B,C,D) = (B AND C) OR ((NOT B) AND D) ( 0 <= t <= 19) f(t;B,C,D) = B XOR C XOR D (20 <= t <= 39) f(t;B,C,D) = (B AND C) OR (B AND D) OR (C AND D) (40 <= t <=59) f(t;B,C,D) = B XOR C XOR D (60 <= t <= 79)  Step 4: Prepare Processing Constants.... SHA1 requires 80 processing constant words defined as: K(t) = 0x5A827999 ( 0 <= t <= 19) K(t) = 0x6ED9EBA1 (20 <= t <= 39) K(t) = 0x8F1BBCDC (40 <= t <= 59) K(t) = 0xCA62C1D6 (60 <= t <= 79)  http://www.herongyang.com
  • 10. SHA-1 Framework Continued  Step 5: Initialize Buffers…. SHA1 requires 160 bits or 5 buffers of words (32 bits): H0 = 0x67452301 H1 = 0xEFCDAB89 H2 = 0x98BADCFE H3 = 0x10325476 H4 = 0xC3D2E1F0  http://www.herongyang.com
  • 11. SHA-1 Framework Final Step  Step 6: Processing Message in 512-bit blocks (L blocks in total message)…. This is the main task of SHA1 algorithm which loops through the padded and appended message in 512-bit blocks. Input and predefined functions: M[1, 2, ..., L]: Blocks of the padded and appended message f(0;B,C,D), f(1,B,C,D), ..., f(79,B,C,D): 80 Processing Functions K(0), K(1), ..., K(79): 80 Processing Constant Words H0, H1, H2, H3, H4, H5: 5 Word buffers with initial values  http://www.herongyang.com
  • 12. SHA-1 Framework Continued  Step 6: Pseudo Code…. For loop on k = 1 to L (W(0),W(1),...,W(15)) = M[k] /* Divide M[k] into 16 words */ For t = 16 to 79 do: W(t) = (W(t-3) XOR W(t-8) XOR W(t-14) XOR W(t-16)) <<< 1 A = H0, B = H1, C = H2, D = H3, E = H4 For t = 0 to 79 do: TEMP = A<<<5 + f(t;B,C,D) + E + W(t) + K(t) E = D, D = C, C = B<<<30, B = A, A = TEMP End of for loop H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4 + E End of for loop Output: H0, H1, H2, H3, H4, H5: Word buffers with final message digest  http://www.herongyang.com
  • 14. SHA-1 Message Digest The message digest of the string: “This is a test for theory of computation” 4480afca4407400b035d9debeb88bfc402db514f
  • 15. Cryptanalysis and Limitation • Key Premises for Hash Functions: 1. Impossible to re-create a message given a fingerprint 2. Collision Free • SHA-1 failure using brute force attack in 280 operations • Collision failure found in 2005 in 233 operations
  • 16. Bibliography  http://www.herongyang.com  http://www.ipa.go.jp/security  Salomon, David, Foundations of Computer Security Springer-Verlag London Limited 2006.  Schneier, Bruce, “Opinion: Cryptanalysis of MD % and SHA: Time for a new standard”, Computer World, August 2004.  Stallings, William, Cryptography and Network Security, Prentice Hall, 1999.  Tanenbaum, Andrew, Computer Networks, Prentice Hall, 2003.

Editor's Notes

  1. Verify that received messages come from the alleged source and have not been altered. Also verify the sequence and timing. Digital Signature is used to combat denial of receipt of a message by either the source or desitination.
  2. All variants have a similar framework. The variation is in the bits compressed into the digest. Thereby, differ in the number of blocks and words of data used in hashing.