SlideShare a Scribd company logo
1 of 22
Download to read offline
DESIGN OF SECURE HASH ALGORITHM
Dr.T.M.SARAVANAN
Associate Professor,
Department of Computer Applications,
Kongu Engineering College,
Perundurai โ€“ 638 060.
SECURE HASH ALGORITHM
๏ƒ˜ Here we will see the design of SHA-256 and SHA-3.
๏ƒ˜ Both of these are used in Bitcoin and Ethereum, respectively.
1. Design of SHA-256
๏ƒ˜ SHA-256 has the input message size < 264-bits. Block size is 512-
bits, and it has a word size of 32-bits.
๏ƒ˜ The output is a 256-bit digest.
๏ƒ˜ The compression function processes a 512-bit message block and a
256-bit intermediate hash value.
๏ƒ˜ There are two main components of this function: the Compression
Function and a Message Schedule.
29-06-2021
SECURE HASH ALGORITHM
๏ƒ˜ The algorithm works as follows, in eight steps:
1. Preprocessing:
1. Padding of the message is used to adjust the length of a block to
512-bits if it is smaller than the required block size of 512-bits.
2. Parsing the message into message blocks, which ensures that
the message and its padding is divided into equal blocks of 512-
bits.
3. Setting up the initial hash value, which consists of the eight 32-bit
words obtained by taking the first 32-bits of the fractional parts of
the square roots of the first eight prime numbers. These initial
values are randomly chosen to initialize the process, and they
provide a level of confidence that no backdoor exists in the
algorithm.
29-06-2021
SECURE HASH ALGORITHM
2. Hash computation:
4. Each message block is then processed in a sequence, and it
requires 64 rounds to compute the full hash output. Each round
uses slightly different constants to ensure that no two rounds are
the same.
5. The message schedule is prepared.
6. Eight working variables are initialized.
7. The intermediate hash value is calculated.
8. Finally, the message is processed, and the output hash is
produced:
29-06-2021
SECURE HASH ALGORITHM
29-06-2021
SECURE HASH ALGORITHM
๏ƒ˜ In the preceding diagram, a, b, c, d, e, f, g, and h are the registers.
Maj and Ch are applied bitwise.
๏ƒ˜ ฮฃ0 and ฮฃ1 performs bitwise rotation.
๏ƒ˜ Round constants are Wj and Kj, which are added, mod 232.
๏ƒ˜ Maj stands for majority , Ch stands for choose or choice.
29-06-2021
SECURE HASH ALGORITHM
2. Design of SHA-3(Keccak)
๏ƒ˜ The structure of SHA-3 is very different from that of SHA-1 and SHA-
2.
๏ƒ˜ The key idea behind SHA-3 is based on unkeyed permutations, as
opposed to other typical hash function constructions that used keyed
permutations.
๏ƒ˜ Keccak also does not make use of the Merkle-Damgard
transformation that is commonly used to handle arbitrary-length
input messages in hash functions.
๏ƒ˜ A newer approach called sponge and squeeze construction is
used in Keccak.
๏ƒ˜ It is a random permutation model.
29-06-2021
SECURE HASH ALGORITHM
2. Design of SHA-3(Keccak)
๏ƒ˜ Different variants of SHA-3 have been standardized, such as SHA-3-
224, SHA-3-256, SHA-3-384, SHA-3-512, SHAKE-128, and SHAKE-
256.
๏ƒ˜ SHAKE-128 and SHAKE-256 are Extendable Output Functions
(XOFs), which are also standardized by NIST.
๏ƒ˜ XOFs allow the output to be extended to any desired length.
๏ƒ˜ The following diagram shows the sponge and squeeze model,
which is the basis of SHA-3 or Keccak.
29-06-2021
SECURE HASH ALGORITHM
29-06-2021
SECURE HASH ALGORITHM
2. Design of SHA-3(Keccak)
๏ƒ˜ Analogous to a sponge, the data is first absorbed into the sponge
after applying padding.
๏ƒ˜ There it is then changed into a subset of permutation state using
XOR, and then the output is squeezed out of the sponge function
that represents the transformed state.
๏ƒ˜ The rate is the input block size of a sponge function, while capacity
determines the general security level.
29-06-2021
SECURE HASH ALGORITHM
29-06-2021
SECURE HASH ALGORITHM
๏ƒ˜ Usually, hash functions do not use a key.
๏ƒ˜ Nevertheless, if they are used with a key, then they can be used to
create another cryptographic construct called MACs.
Message Authentication Codes
๏ƒ˜ MACs are sometimes called keyed hash functions, and they can be
used to provide message integrity and authentication.
๏ƒ˜ More specifically, they are used to provide data origin authentication.
๏ƒ˜ These are symmetric cryptographic primitives that use a shared key
between the sender and the receiver.
๏ƒ˜ MACs can be constructed using block ciphers or hash functions.
29-06-2021
SECURE HASH ALGORITHM
๏ƒ˜ With this approach, block ciphers are used in the Cipher Block
Chaining (CBC) mode in order to generate a MAC.
๏ƒ˜ Any block cipher, for example AES in the CBC mode, can be used.
๏ƒ˜ The length of the MAC output is the same as the block length of the
block cipher used to generate the MAC.
๏ƒ˜ MACs are verified simply by computing the MAC of the message and
comparing it to the received MAC.
๏ƒ˜ If they are the same, then the message integrity is confirmed;
otherwise, the message is considered altered.
๏ƒ˜ It should also be noted that MACs work like digital signatures,
however they cannot provide non-repudiation service due to their
symmetric nature.
29-06-2021
SECURE HASH ALGORITHM
Merkle Trees
๏ƒ˜ The concept of Merkle tree was introduced by Ralph Merkle.
๏ƒ˜ Merkle trees enable secure and efficient verification of large
datasets.
๏ƒ˜ A diagram of Merkle tree is shown here.
๏ƒ˜ A Merkle tree is a binary tree in which the inputs are first placed at
the leaves (node with no children), and then the values of pairs of
child nodes are hashed together to produce a value for the parent
node (internal node) until a single hash value known as Merkle root
is achieved.
29-06-2021
SECURE HASH ALGORITHM
29-06-2021
SECURE HASH ALGORITHM
Patricia Trees
๏ƒ˜ To understand Patricia trees, you will first be introduced to the
concept of a trie.
๏ƒ˜ Trie is an efficient information reTrieval data structure.
๏ƒ˜ Using Trie, search complexities can be brought to optimal limit (key
length).
๏ƒ˜ A trie, or a digital tree, is an ordered tree data structure used to
store a dataset.
๏ƒ˜ Practical Algorithm to Retrieve Information Coded in
Alphanumeric (Patricia), also known as Radix tree, is a compact
representation of a trie in which a node that is the only child of a
parent is merged with its parent.
๏ƒ˜ A Merkle-Patricia tree, based on the definitions of Patricia and
Merkle, is a tree that has a root node which contains the hash value
of the entire data structure.
29-06-2021
SECURE HASH ALGORITHM
Distributed Hash Tables
๏ƒ˜ A hash table is a data structure that is used to map keys to values.
๏ƒ˜ Internally, a hash function is used to calculate an index into an array
of buckets from which the required value can be found.
๏ƒ˜ Buckets have records stored in them using a hash key and are
organized into a particular order.
๏ƒ˜ One can think of a DHT as a data structure where data is spread
across various nodes, and nodes are equivalent to buckets in a peer-
to-peer network.
๏ƒ˜ The following diagram shows how a DHT works.
29-06-2021
SECURE HASH ALGORITHM
29-06-2021
SECURE HASH ALGORITHM
Distributed Hash Tables
๏ƒ˜ Data is passed through a hash function, which then generates a
compact key.
๏ƒ˜ This key is then linked with the data (values) on the peer-to-peer
network.
๏ƒ˜ When users on the network request the data (via the filename), the
filename can be hashed again to produce the same key, and any
node on the network can then be requested to find the corresponding
data.
๏ƒ˜ DHT provides decentralization, fault tolerance, and scalability.
๏ƒ˜ Another application of hash functions is in digital signatures, where
they can be used in combination with asymmetric cryptography.
29-06-2021
SECURE HASH ALGORITHM
Digital Signatures
๏ƒ˜ Digital signatures provide a means of associating a message with
an entity from which the message has originated.
๏ƒ˜ Digital signatures are used to provide data origin authentication
and non-repudiation.
๏ƒ˜ Digital signatures are used in blockchain where the transactions are
digitally signed by senders using their private key before
broadcasting the transaction to the network.
๏ƒ˜
๏ƒ˜ This digital signing, proves they are the rightful owner of the asset,
for example, bitcoins.
๏ƒ˜ These transactions are verified again by other nodes on the network
to ensure that the funds indeed belong to the node (user) who claims
to be the owner.
29-06-2021
SECURE HASH ALGORITHM
Signcryption
๏ƒ˜ Signcryption is a public key cryptography primitive that provides all
of the functions of a digital signature and encryption.
๏ƒ˜ Yuliang Zheng invented signcryption, and it is now an ISO standard,
ISO/IEC 29150:2011.
๏ƒ˜ Traditionally, sign then encrypt or encrypt then sign schemes are
used to provide unforgeability, authentication, and non-repudiation,
but with signcryption, all services of digital signatures and encryption
are provided at a cost that is less than that of the sign then encrypt
scheme.
๏ƒ˜ Signcryption enables Cost (signature & encryption) << Cost
(signature) + Cost (Encryption) in a single logical step.
29-06-2021
SECURE HASH ALGORITHM
Blind Signatures
๏ƒ˜ Blind signatures were introduced by David Chaum in 1982.
๏ƒ˜ They are based on public key digital signature schemes, such as
RSA.
๏ƒ˜ The key idea behind blind signatures is to get the message signed
by the signer without actually revealing the message.
๏ƒ˜ This is achieved by disguising or blinding the message before
signing it, hence the name blind signatures.
๏ƒ˜ This blind signature can then be verified against the original
message just like a normal digital signature.
๏ƒ˜ Blind signatures were introduced as a mechanism to allow the
development of digital cash schemes.
29-06-2021

More Related Content

What's hot

Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardDr.Florence Dayana
ย 
Hash function
Hash function Hash function
Hash function Salman Memon
ย 
block ciphers
block ciphersblock ciphers
block ciphersAsad Ali
ย 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash functionChirag Patel
ย 
CONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTIONCONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTIONSHUBHA CHATURVEDI
ย 
SHA-256.pptx
SHA-256.pptxSHA-256.pptx
SHA-256.pptxJadhavSujeet
ย 
Message Authentication
Message AuthenticationMessage Authentication
Message Authenticationchauhankapil
ย 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation harshit chavda
ย 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithmSunita Kharayat
ย 
Modern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherModern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherMahbubur Rahman
ย 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacyPawan Arya
ย 
X.509 Certificates
X.509 CertificatesX.509 Certificates
X.509 CertificatesSou Jana
ย 
Cryptography and Information Security
Cryptography and Information SecurityCryptography and Information Security
Cryptography and Information SecurityDr Naim R Kidwai
ย 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithmsRashmi Burugupalli
ย 
Secure Socket Layer (SSL)
Secure Socket Layer (SSL)Secure Socket Layer (SSL)
Secure Socket Layer (SSL)amanchaurasia
ย 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationsarhadisoftengg
ย 
Network security cryptographic hash function
Network security  cryptographic hash functionNetwork security  cryptographic hash function
Network security cryptographic hash functionMijanur Rahman Milon
ย 

What's hot (20)

Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
ย 
Hash function
Hash function Hash function
Hash function
ย 
block ciphers
block ciphersblock ciphers
block ciphers
ย 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
ย 
CONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTIONCONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTION
ย 
SHA-256.pptx
SHA-256.pptxSHA-256.pptx
SHA-256.pptx
ย 
Hash Function
Hash FunctionHash Function
Hash Function
ย 
Cryptography
CryptographyCryptography
Cryptography
ย 
Rc4
Rc4Rc4
Rc4
ย 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
ย 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
ย 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
ย 
Modern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherModern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key Cipher
ย 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
ย 
X.509 Certificates
X.509 CertificatesX.509 Certificates
X.509 Certificates
ย 
Cryptography and Information Security
Cryptography and Information SecurityCryptography and Information Security
Cryptography and Information Security
ย 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
ย 
Secure Socket Layer (SSL)
Secure Socket Layer (SSL)Secure Socket Layer (SSL)
Secure Socket Layer (SSL)
ย 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
ย 
Network security cryptographic hash function
Network security  cryptographic hash functionNetwork security  cryptographic hash function
Network security cryptographic hash function
ย 

Similar to Design of Secure Hash Algorithm(SHA)

Key aggregate searchable encryption (kase) for group data sharing via cloud s...
Key aggregate searchable encryption (kase) for group data sharing via cloud s...Key aggregate searchable encryption (kase) for group data sharing via cloud s...
Key aggregate searchable encryption (kase) for group data sharing via cloud s...CloudTechnologies
ย 
KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ...
 KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ... KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ...
KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ...Nexgen Technology
ย 
M021201092098
M021201092098M021201092098
M021201092098theijes
ย 
A new algorithm for implementing message authentication and integrity in soft...
A new algorithm for implementing message authentication and integrity in soft...A new algorithm for implementing message authentication and integrity in soft...
A new algorithm for implementing message authentication and integrity in soft...TELKOMNIKA JOURNAL
ย 
Blockchain Based Decentralized Cloud System
Blockchain Based Decentralized Cloud SystemBlockchain Based Decentralized Cloud System
Blockchain Based Decentralized Cloud SystemDhruvdoshi25071999
ย 
Security in Manets using Cryptography Algorithms
Security in Manets using Cryptography AlgorithmsSecurity in Manets using Cryptography Algorithms
Security in Manets using Cryptography AlgorithmsIRJET Journal
ย 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...editor1knowledgecuddle
ย 
Key aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storage Key aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storage Adz91 Digital Ads Pvt Ltd
ย 
Documenting Software Architectural Component and Connector with UML 2
Documenting Software Architectural Component and Connector with UML 2Documenting Software Architectural Component and Connector with UML 2
Documenting Software Architectural Component and Connector with UML 2editor1knowledgecuddle
ย 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmIRJET Journal
ย 
Efficient Data Mining Of Association Rules in Horizontally Distributed Databases
Efficient Data Mining Of Association Rules in Horizontally Distributed DatabasesEfficient Data Mining Of Association Rules in Horizontally Distributed Databases
Efficient Data Mining Of Association Rules in Horizontally Distributed Databasesijircee
ย 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to BlockchainHamzamohammed70
ย 
Key aggregate cryptosystem for scalable data sharing in cloud
Key aggregate cryptosystem for scalable data sharing in cloudKey aggregate cryptosystem for scalable data sharing in cloud
Key aggregate cryptosystem for scalable data sharing in cloudMeka Subramanyam
ย 
Key aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storageKey aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storageShakas Technologies
ย 
REU Group 2 - Paper
REU Group 2 - PaperREU Group 2 - Paper
REU Group 2 - PaperScott Payne
ย 
iaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databasesiaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databasesIaetsd Iaetsd
ย 
A Crypto-System with Embedded Error Control for Secure and Reliable Communica...
A Crypto-System with Embedded Error Control for Secure and Reliable Communica...A Crypto-System with Embedded Error Control for Secure and Reliable Communica...
A Crypto-System with Embedded Error Control for Secure and Reliable Communica...CSCJournals
ย 
B03302007012
B03302007012B03302007012
B03302007012theijes
ย 
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTSPERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTSijcisjournal
ย 
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTSPERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTSijcisjournal
ย 

Similar to Design of Secure Hash Algorithm(SHA) (20)

Key aggregate searchable encryption (kase) for group data sharing via cloud s...
Key aggregate searchable encryption (kase) for group data sharing via cloud s...Key aggregate searchable encryption (kase) for group data sharing via cloud s...
Key aggregate searchable encryption (kase) for group data sharing via cloud s...
ย 
KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ...
 KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ... KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ...
KEY-AGGREGATE SEARCHABLE ENCRYPTION (KASE) FOR GROUP DATA SHARING VIA CLOUD ...
ย 
M021201092098
M021201092098M021201092098
M021201092098
ย 
A new algorithm for implementing message authentication and integrity in soft...
A new algorithm for implementing message authentication and integrity in soft...A new algorithm for implementing message authentication and integrity in soft...
A new algorithm for implementing message authentication and integrity in soft...
ย 
Blockchain Based Decentralized Cloud System
Blockchain Based Decentralized Cloud SystemBlockchain Based Decentralized Cloud System
Blockchain Based Decentralized Cloud System
ย 
Security in Manets using Cryptography Algorithms
Security in Manets using Cryptography AlgorithmsSecurity in Manets using Cryptography Algorithms
Security in Manets using Cryptography Algorithms
ย 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
ย 
Key aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storage Key aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storage
ย 
Documenting Software Architectural Component and Connector with UML 2
Documenting Software Architectural Component and Connector with UML 2Documenting Software Architectural Component and Connector with UML 2
Documenting Software Architectural Component and Connector with UML 2
ย 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication Algorithm
ย 
Efficient Data Mining Of Association Rules in Horizontally Distributed Databases
Efficient Data Mining Of Association Rules in Horizontally Distributed DatabasesEfficient Data Mining Of Association Rules in Horizontally Distributed Databases
Efficient Data Mining Of Association Rules in Horizontally Distributed Databases
ย 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
ย 
Key aggregate cryptosystem for scalable data sharing in cloud
Key aggregate cryptosystem for scalable data sharing in cloudKey aggregate cryptosystem for scalable data sharing in cloud
Key aggregate cryptosystem for scalable data sharing in cloud
ย 
Key aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storageKey aggregate cryptosystem for scalable data sharing in cloud storage
Key aggregate cryptosystem for scalable data sharing in cloud storage
ย 
REU Group 2 - Paper
REU Group 2 - PaperREU Group 2 - Paper
REU Group 2 - Paper
ย 
iaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databasesiaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databases
ย 
A Crypto-System with Embedded Error Control for Secure and Reliable Communica...
A Crypto-System with Embedded Error Control for Secure and Reliable Communica...A Crypto-System with Embedded Error Control for Secure and Reliable Communica...
A Crypto-System with Embedded Error Control for Secure and Reliable Communica...
ย 
B03302007012
B03302007012B03302007012
B03302007012
ย 
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTSPERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
ย 
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTSPERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
PERFORMANCE ANALYSIS OF SHA-2 AND SHA-3 FINALISTS
ย 

Recently uploaded

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
ย 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
ย 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
ย 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
ย 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
ย 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
ย 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
ย 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
ย 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
ย 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
ย 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
ย 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
ย 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
ย 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
ย 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
ย 
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
ย 
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
ย 

Recently uploaded (20)

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
ย 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
ย 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
ย 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
ย 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
ย 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
ย 
Model Call Girl in Bikash Puri Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”
Model Call Girl in Bikash Puri  Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”Model Call Girl in Bikash Puri  Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”
Model Call Girl in Bikash Puri Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”
ย 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
ย 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
ย 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
ย 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ย 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
ย 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
ย 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
ย 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
ย 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
ย 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
ย 
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
ย 
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
ย 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
ย 

Design of Secure Hash Algorithm(SHA)

  • 1. DESIGN OF SECURE HASH ALGORITHM Dr.T.M.SARAVANAN Associate Professor, Department of Computer Applications, Kongu Engineering College, Perundurai โ€“ 638 060.
  • 2. SECURE HASH ALGORITHM ๏ƒ˜ Here we will see the design of SHA-256 and SHA-3. ๏ƒ˜ Both of these are used in Bitcoin and Ethereum, respectively. 1. Design of SHA-256 ๏ƒ˜ SHA-256 has the input message size < 264-bits. Block size is 512- bits, and it has a word size of 32-bits. ๏ƒ˜ The output is a 256-bit digest. ๏ƒ˜ The compression function processes a 512-bit message block and a 256-bit intermediate hash value. ๏ƒ˜ There are two main components of this function: the Compression Function and a Message Schedule. 29-06-2021
  • 3. SECURE HASH ALGORITHM ๏ƒ˜ The algorithm works as follows, in eight steps: 1. Preprocessing: 1. Padding of the message is used to adjust the length of a block to 512-bits if it is smaller than the required block size of 512-bits. 2. Parsing the message into message blocks, which ensures that the message and its padding is divided into equal blocks of 512- bits. 3. Setting up the initial hash value, which consists of the eight 32-bit words obtained by taking the first 32-bits of the fractional parts of the square roots of the first eight prime numbers. These initial values are randomly chosen to initialize the process, and they provide a level of confidence that no backdoor exists in the algorithm. 29-06-2021
  • 4. SECURE HASH ALGORITHM 2. Hash computation: 4. Each message block is then processed in a sequence, and it requires 64 rounds to compute the full hash output. Each round uses slightly different constants to ensure that no two rounds are the same. 5. The message schedule is prepared. 6. Eight working variables are initialized. 7. The intermediate hash value is calculated. 8. Finally, the message is processed, and the output hash is produced: 29-06-2021
  • 6. SECURE HASH ALGORITHM ๏ƒ˜ In the preceding diagram, a, b, c, d, e, f, g, and h are the registers. Maj and Ch are applied bitwise. ๏ƒ˜ ฮฃ0 and ฮฃ1 performs bitwise rotation. ๏ƒ˜ Round constants are Wj and Kj, which are added, mod 232. ๏ƒ˜ Maj stands for majority , Ch stands for choose or choice. 29-06-2021
  • 7. SECURE HASH ALGORITHM 2. Design of SHA-3(Keccak) ๏ƒ˜ The structure of SHA-3 is very different from that of SHA-1 and SHA- 2. ๏ƒ˜ The key idea behind SHA-3 is based on unkeyed permutations, as opposed to other typical hash function constructions that used keyed permutations. ๏ƒ˜ Keccak also does not make use of the Merkle-Damgard transformation that is commonly used to handle arbitrary-length input messages in hash functions. ๏ƒ˜ A newer approach called sponge and squeeze construction is used in Keccak. ๏ƒ˜ It is a random permutation model. 29-06-2021
  • 8. SECURE HASH ALGORITHM 2. Design of SHA-3(Keccak) ๏ƒ˜ Different variants of SHA-3 have been standardized, such as SHA-3- 224, SHA-3-256, SHA-3-384, SHA-3-512, SHAKE-128, and SHAKE- 256. ๏ƒ˜ SHAKE-128 and SHAKE-256 are Extendable Output Functions (XOFs), which are also standardized by NIST. ๏ƒ˜ XOFs allow the output to be extended to any desired length. ๏ƒ˜ The following diagram shows the sponge and squeeze model, which is the basis of SHA-3 or Keccak. 29-06-2021
  • 10. SECURE HASH ALGORITHM 2. Design of SHA-3(Keccak) ๏ƒ˜ Analogous to a sponge, the data is first absorbed into the sponge after applying padding. ๏ƒ˜ There it is then changed into a subset of permutation state using XOR, and then the output is squeezed out of the sponge function that represents the transformed state. ๏ƒ˜ The rate is the input block size of a sponge function, while capacity determines the general security level. 29-06-2021
  • 12. SECURE HASH ALGORITHM ๏ƒ˜ Usually, hash functions do not use a key. ๏ƒ˜ Nevertheless, if they are used with a key, then they can be used to create another cryptographic construct called MACs. Message Authentication Codes ๏ƒ˜ MACs are sometimes called keyed hash functions, and they can be used to provide message integrity and authentication. ๏ƒ˜ More specifically, they are used to provide data origin authentication. ๏ƒ˜ These are symmetric cryptographic primitives that use a shared key between the sender and the receiver. ๏ƒ˜ MACs can be constructed using block ciphers or hash functions. 29-06-2021
  • 13. SECURE HASH ALGORITHM ๏ƒ˜ With this approach, block ciphers are used in the Cipher Block Chaining (CBC) mode in order to generate a MAC. ๏ƒ˜ Any block cipher, for example AES in the CBC mode, can be used. ๏ƒ˜ The length of the MAC output is the same as the block length of the block cipher used to generate the MAC. ๏ƒ˜ MACs are verified simply by computing the MAC of the message and comparing it to the received MAC. ๏ƒ˜ If they are the same, then the message integrity is confirmed; otherwise, the message is considered altered. ๏ƒ˜ It should also be noted that MACs work like digital signatures, however they cannot provide non-repudiation service due to their symmetric nature. 29-06-2021
  • 14. SECURE HASH ALGORITHM Merkle Trees ๏ƒ˜ The concept of Merkle tree was introduced by Ralph Merkle. ๏ƒ˜ Merkle trees enable secure and efficient verification of large datasets. ๏ƒ˜ A diagram of Merkle tree is shown here. ๏ƒ˜ A Merkle tree is a binary tree in which the inputs are first placed at the leaves (node with no children), and then the values of pairs of child nodes are hashed together to produce a value for the parent node (internal node) until a single hash value known as Merkle root is achieved. 29-06-2021
  • 16. SECURE HASH ALGORITHM Patricia Trees ๏ƒ˜ To understand Patricia trees, you will first be introduced to the concept of a trie. ๏ƒ˜ Trie is an efficient information reTrieval data structure. ๏ƒ˜ Using Trie, search complexities can be brought to optimal limit (key length). ๏ƒ˜ A trie, or a digital tree, is an ordered tree data structure used to store a dataset. ๏ƒ˜ Practical Algorithm to Retrieve Information Coded in Alphanumeric (Patricia), also known as Radix tree, is a compact representation of a trie in which a node that is the only child of a parent is merged with its parent. ๏ƒ˜ A Merkle-Patricia tree, based on the definitions of Patricia and Merkle, is a tree that has a root node which contains the hash value of the entire data structure. 29-06-2021
  • 17. SECURE HASH ALGORITHM Distributed Hash Tables ๏ƒ˜ A hash table is a data structure that is used to map keys to values. ๏ƒ˜ Internally, a hash function is used to calculate an index into an array of buckets from which the required value can be found. ๏ƒ˜ Buckets have records stored in them using a hash key and are organized into a particular order. ๏ƒ˜ One can think of a DHT as a data structure where data is spread across various nodes, and nodes are equivalent to buckets in a peer- to-peer network. ๏ƒ˜ The following diagram shows how a DHT works. 29-06-2021
  • 19. SECURE HASH ALGORITHM Distributed Hash Tables ๏ƒ˜ Data is passed through a hash function, which then generates a compact key. ๏ƒ˜ This key is then linked with the data (values) on the peer-to-peer network. ๏ƒ˜ When users on the network request the data (via the filename), the filename can be hashed again to produce the same key, and any node on the network can then be requested to find the corresponding data. ๏ƒ˜ DHT provides decentralization, fault tolerance, and scalability. ๏ƒ˜ Another application of hash functions is in digital signatures, where they can be used in combination with asymmetric cryptography. 29-06-2021
  • 20. SECURE HASH ALGORITHM Digital Signatures ๏ƒ˜ Digital signatures provide a means of associating a message with an entity from which the message has originated. ๏ƒ˜ Digital signatures are used to provide data origin authentication and non-repudiation. ๏ƒ˜ Digital signatures are used in blockchain where the transactions are digitally signed by senders using their private key before broadcasting the transaction to the network. ๏ƒ˜ ๏ƒ˜ This digital signing, proves they are the rightful owner of the asset, for example, bitcoins. ๏ƒ˜ These transactions are verified again by other nodes on the network to ensure that the funds indeed belong to the node (user) who claims to be the owner. 29-06-2021
  • 21. SECURE HASH ALGORITHM Signcryption ๏ƒ˜ Signcryption is a public key cryptography primitive that provides all of the functions of a digital signature and encryption. ๏ƒ˜ Yuliang Zheng invented signcryption, and it is now an ISO standard, ISO/IEC 29150:2011. ๏ƒ˜ Traditionally, sign then encrypt or encrypt then sign schemes are used to provide unforgeability, authentication, and non-repudiation, but with signcryption, all services of digital signatures and encryption are provided at a cost that is less than that of the sign then encrypt scheme. ๏ƒ˜ Signcryption enables Cost (signature & encryption) << Cost (signature) + Cost (Encryption) in a single logical step. 29-06-2021
  • 22. SECURE HASH ALGORITHM Blind Signatures ๏ƒ˜ Blind signatures were introduced by David Chaum in 1982. ๏ƒ˜ They are based on public key digital signature schemes, such as RSA. ๏ƒ˜ The key idea behind blind signatures is to get the message signed by the signer without actually revealing the message. ๏ƒ˜ This is achieved by disguising or blinding the message before signing it, hence the name blind signatures. ๏ƒ˜ This blind signature can then be verified against the original message just like a normal digital signature. ๏ƒ˜ Blind signatures were introduced as a mechanism to allow the development of digital cash schemes. 29-06-2021