SlideShare a Scribd company logo
SECURE HASHING
ALGORITHM (SHA 1)
By: S.RAJAPRIYA,MS(IT).,
Assistant Professor of IT
SHA 1 ALGORITHM
 SHA-1 or Secure Hash Algorithm 1 is a cryptographic hash function which
takes an input and produces a 160-bit (20-byte) hash value.
 This hash value is known as a message digest.
 This message digest is usually then rendered as a hexadecimal number
which is 40 digits long.
 It is a U.S. Federal Information Processing Standard and was designed by
the United States National Security Agency.
SALIENT FEATURES
STEPS INVOLVED HASH FUNCTION
SHA1 ALGORITHM DESCRIPTION
 It is a 6-step process of padding of '1000...',
 appending message length,
 preparing 80 process functions,
 preparing 80 constants,
 preparing 5 word buffers,
 processing input in 512 blocks.
SHA1 ALGORITHM CONSISTS OF 6 TASKS:
Task 1.Appending Padding Bits.
The original message is "padded" (extended) so that its length (in bits) is
congruent to 448, modulo 512.
 The padding rules are:
 The original message is always padded with one bit "1" first.
 Then padded with as many 0’s as necessary to bring the message length
to 64 bits fewer than a multiple of 512.
CONT...
Task 2.Appending Length.
64 bits are appended to the end of the padded message to indicate the length
of the original message.
The rules of appending length are:
 The length of the original message in bytes is converted to its binary
format of 64 bits.
 If overflow happens, only the low-order 64 bits are used.
 Break the 64-bit length into 2 words (32 bits each).
 The low-order word is appended first and followed by the high-order
word.
CONT…
Task 3.Preparing 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)
CONT…
Task 4.Preparing Processing Constants.
SHA1 requires 80 processing constant words defined as:
K(t) = 5A827999 ( 0 <= t <= 19)
K(t) = 6ED9EBA1 (20 <= t <= 39)
K(t) = 8F1BBCDC (40 <= t <= 59)
K(t) = CA62C1D6 (60 <= t <= 79)
CONT…
Task 5.Initializing Buffers.
SHA1 algorithm requires 5 word buffers with the following initial values:
H0 = 67452301
H1 = EFCDAB89
H2 = 98BADCFE
H3 = 10325476
H4 = C3D2E1F0
CONT…
Task 6.Processing Message in 512-bit Blocks.
This is the main task of SHA1 algorithm, which loops through the padded and
appended message in blocks of 512 bits each.
For each input block, a number of operations are performed
COMPUTING THE MESSAGE DIGEST
The message digest is computed using the final padded message.
The computation uses two buffers:
 each consisting of five 32-bit words
 a sequence of eighty 32-bit words.
The words of the first 5-word buffer are labeled A,B,C,D,E.
The words of the second 5-word buffer are labeled H0, H1, H2, H3, H4.
The words of the 80-word sequence are labeled W0, W1,..., W79.
A single word buffer TEMP is also employed.
To generate the message digest, the 16-word blocks M1, M2,..., Mn .
 The processing of each Mi involves 80 steps.
SHA-1 FRAMEWORK FINAL STEP
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
SHA-1 FRAMEWORK CONTINUED
 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
SHA 1 Algorithm.ppt

More Related Content

What's hot

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
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
DarshanPatil82
 
block ciphers
block ciphersblock ciphers
block ciphers
Asad Ali
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
Haris Ahmed
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
Krishna Gehlot
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
DUET
 
Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
Computer_ at_home
 
Pass Structure of Assembler
Pass Structure of AssemblerPass Structure of Assembler
Message authentication
Message authenticationMessage authentication
Message authentication
CAS
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
Keymanagement of ipsec
Keymanagement of ipsecKeymanagement of ipsec
Keymanagement of ipsec
PACHIYAPPAN PACHIYAPPAS
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
Data link layer
Data link layer Data link layer
Data link layer
Mukesh Chinta
 
Sha
ShaSha
Sha
ha123
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Dr.Florence Dayana
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
Riya Choudhary
 
Hashing
HashingHashing
Web Security
Web SecurityWeb Security
Web Security
Dr.Florence Dayana
 

What's hot (20)

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
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
 
block ciphers
block ciphersblock ciphers
block ciphers
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
 
Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
 
Pass Structure of Assembler
Pass Structure of AssemblerPass Structure of Assembler
Pass Structure of Assembler
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Keymanagement of ipsec
Keymanagement of ipsecKeymanagement of ipsec
Keymanagement of ipsec
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
Data link layer
Data link layer Data link layer
Data link layer
 
Sha
ShaSha
Sha
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
Hashing
HashingHashing
Hashing
 
Web Security
Web SecurityWeb Security
Web Security
 

Similar to SHA 1 Algorithm.ppt

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
 
SHA
SHASHA
MD5
MD5MD5
Hashfunction
HashfunctionHashfunction
Hashfunction
Tony Nguyen
 
Hashfunction
HashfunctionHashfunction
Hashfunction
Fraboni Ec
 
Hash function
Hash functionHash function
Hash function
Harry Potter
 
Hashfunction
HashfunctionHashfunction
Hashfunction
David Hoen
 
Hashfunction
HashfunctionHashfunction
Hashfunction
James Wong
 
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
 
Network security CS6
Network security   CS6Network security   CS6
Network security CS6
Infinity Tech Solutions
 

Similar to SHA 1 Algorithm.ppt (20)

crypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.pptcrypto secure-hash-algorithm-versions.ppt
crypto secure-hash-algorithm-versions.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
 
SHA
SHASHA
SHA
 
MD5
MD5MD5
MD5
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hash function
Hash functionHash function
Hash function
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Ch12
Ch12Ch12
Ch12
 
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
 
Network security CS6
Network security   CS6Network security   CS6
Network security CS6
 

More from Rajapriya82

Applications of IoTs in Home,City,Health
Applications of IoTs in Home,City,HealthApplications of IoTs in Home,City,Health
Applications of IoTs in Home,City,Health
Rajapriya82
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
Rajapriya82
 
File System Implementation.pptx
File System Implementation.pptxFile System Implementation.pptx
File System Implementation.pptx
Rajapriya82
 
Consensus Algorithms.pptx
Consensus Algorithms.pptxConsensus Algorithms.pptx
Consensus Algorithms.pptx
Rajapriya82
 
Security services and mechanisms
Security services and mechanismsSecurity services and mechanisms
Security services and mechanisms
Rajapriya82
 
Wireless transmission
Wireless transmissionWireless transmission
Wireless transmission
Rajapriya82
 
Guided Transmission Media
Guided  Transmission MediaGuided  Transmission Media
Guided Transmission Media
Rajapriya82
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical data
Rajapriya82
 
Clipping
ClippingClipping
Clipping
Rajapriya82
 
Heaptree
HeaptreeHeaptree
Heaptree
Rajapriya82
 
Deadlock
DeadlockDeadlock
Deadlock
Rajapriya82
 
Deadlock
DeadlockDeadlock
Deadlock
Rajapriya82
 

More from Rajapriya82 (12)

Applications of IoTs in Home,City,Health
Applications of IoTs in Home,City,HealthApplications of IoTs in Home,City,Health
Applications of IoTs in Home,City,Health
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
File System Implementation.pptx
File System Implementation.pptxFile System Implementation.pptx
File System Implementation.pptx
 
Consensus Algorithms.pptx
Consensus Algorithms.pptxConsensus Algorithms.pptx
Consensus Algorithms.pptx
 
Security services and mechanisms
Security services and mechanismsSecurity services and mechanisms
Security services and mechanisms
 
Wireless transmission
Wireless transmissionWireless transmission
Wireless transmission
 
Guided Transmission Media
Guided  Transmission MediaGuided  Transmission Media
Guided Transmission Media
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical data
 
Clipping
ClippingClipping
Clipping
 
Heaptree
HeaptreeHeaptree
Heaptree
 
Deadlock
DeadlockDeadlock
Deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
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
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 

Recently uploaded (20)

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 

SHA 1 Algorithm.ppt

  • 1. SECURE HASHING ALGORITHM (SHA 1) By: S.RAJAPRIYA,MS(IT)., Assistant Professor of IT
  • 2. SHA 1 ALGORITHM  SHA-1 or Secure Hash Algorithm 1 is a cryptographic hash function which takes an input and produces a 160-bit (20-byte) hash value.  This hash value is known as a message digest.  This message digest is usually then rendered as a hexadecimal number which is 40 digits long.  It is a U.S. Federal Information Processing Standard and was designed by the United States National Security Agency.
  • 4.
  • 6. SHA1 ALGORITHM DESCRIPTION  It is a 6-step process of padding of '1000...',  appending message length,  preparing 80 process functions,  preparing 80 constants,  preparing 5 word buffers,  processing input in 512 blocks.
  • 7. SHA1 ALGORITHM CONSISTS OF 6 TASKS: Task 1.Appending Padding Bits. The original message is "padded" (extended) so that its length (in bits) is congruent to 448, modulo 512.  The padding rules are:  The original message is always padded with one bit "1" first.  Then padded with as many 0’s as necessary to bring the message length to 64 bits fewer than a multiple of 512.
  • 8.
  • 9. CONT... Task 2.Appending Length. 64 bits are appended to the end of the padded message to indicate the length of the original message. The rules of appending length are:  The length of the original message in bytes is converted to its binary format of 64 bits.  If overflow happens, only the low-order 64 bits are used.  Break the 64-bit length into 2 words (32 bits each).  The low-order word is appended first and followed by the high-order word.
  • 10.
  • 11. CONT… Task 3.Preparing 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)
  • 12. CONT… Task 4.Preparing Processing Constants. SHA1 requires 80 processing constant words defined as: K(t) = 5A827999 ( 0 <= t <= 19) K(t) = 6ED9EBA1 (20 <= t <= 39) K(t) = 8F1BBCDC (40 <= t <= 59) K(t) = CA62C1D6 (60 <= t <= 79)
  • 13. CONT… Task 5.Initializing Buffers. SHA1 algorithm requires 5 word buffers with the following initial values: H0 = 67452301 H1 = EFCDAB89 H2 = 98BADCFE H3 = 10325476 H4 = C3D2E1F0
  • 14. CONT… Task 6.Processing Message in 512-bit Blocks. This is the main task of SHA1 algorithm, which loops through the padded and appended message in blocks of 512 bits each. For each input block, a number of operations are performed
  • 15. COMPUTING THE MESSAGE DIGEST The message digest is computed using the final padded message. The computation uses two buffers:  each consisting of five 32-bit words  a sequence of eighty 32-bit words. The words of the first 5-word buffer are labeled A,B,C,D,E. The words of the second 5-word buffer are labeled H0, H1, H2, H3, H4. The words of the 80-word sequence are labeled W0, W1,..., W79. A single word buffer TEMP is also employed. To generate the message digest, the 16-word blocks M1, M2,..., Mn .  The processing of each Mi involves 80 steps.
  • 16. SHA-1 FRAMEWORK FINAL STEP 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
  • 17. SHA-1 FRAMEWORK CONTINUED  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