SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

Consensus Algorithms.pptx
Consensus Algorithms.pptxConsensus Algorithms.pptx
Consensus Algorithms.pptx
Rajapriya82
 
Secure Hash Algorithm
Secure Hash AlgorithmSecure Hash Algorithm
Secure Hash Algorithm
Vishakha Agarwal
 
Network security cryptographic hash function
Network security  cryptographic hash functionNetwork security  cryptographic hash function
Network security cryptographic hash function
Mijanur Rahman Milon
 
Hash Function.pdf
Hash Function.pdfHash Function.pdf
Hash Function.pdf
Santosh Gupta
 
Web Security
Web SecurityWeb Security
Web Security
Dr.Florence Dayana
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
Niloy Biswas
 
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
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
CheapSSLsecurity
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
DES
DESDES
DES
Naga Srimanyu Timmaraju
 
Symmetric Key Algorithm
Symmetric Key AlgorithmSymmetric Key Algorithm
Symmetric Key Algorithm
SHUBHA CHATURVEDI
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Hash Function
Hash FunctionHash Function
Hash Function
stalin rijal
 
Message authentication
Message authenticationMessage authentication
Message authentication
CAS
 
AES.ppt
AES.pptAES.ppt
AES.ppt
BincySam2
 
Merkle Trees and Fusion Trees
Merkle Trees and Fusion TreesMerkle Trees and Fusion Trees
Merkle Trees and Fusion Trees
RohithND
 
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
Dr.Florence Dayana
 
Hashing
HashingHashing
Hashing
Hossain Md Shakhawat
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
omarShiekh1
 
Cryptography
CryptographyCryptography
Cryptography
Rutuja Solkar
 
Consensus Algorithms.pptx
Consensus Algorithms.pptxConsensus Algorithms.pptx
Consensus Algorithms.pptx
Rajapriya82
 
Network security cryptographic hash function
Network security  cryptographic hash functionNetwork security  cryptographic hash function
Network security cryptographic hash function
Mijanur Rahman Milon
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
Niloy Biswas
 
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
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
CheapSSLsecurity
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Message authentication
Message authenticationMessage authentication
Message authentication
CAS
 
Merkle Trees and Fusion Trees
Merkle Trees and Fusion TreesMerkle Trees and Fusion Trees
Merkle Trees and Fusion Trees
RohithND
 
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
Dr.Florence Dayana
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
omarShiekh1
 

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...
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
M021201092098
theijes
 
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 System
Dhruvdoshi25071999
 
Security in Manets using Cryptography Algorithms
Security in Manets using Cryptography AlgorithmsSecurity in Manets using Cryptography Algorithms
Security in Manets using Cryptography Algorithms
IRJET 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 2
editor1knowledgecuddle
 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication Algorithm
IRJET 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 Databases
ijircee
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
Hamzamohammed70
 
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
Meka 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 storage
Shakas Technologies
 
REU Group 2 - Paper
REU Group 2 - PaperREU Group 2 - Paper
REU Group 2 - Paper
Scott 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 databases
Iaetsd 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
B03302007012
theijes
 
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
ijcisjournal
 
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
ijcisjournal
 
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
M021201092098
theijes
 
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 System
Dhruvdoshi25071999
 
Security in Manets using Cryptography Algorithms
Security in Manets using Cryptography AlgorithmsSecurity in Manets using Cryptography Algorithms
Security in Manets using Cryptography Algorithms
IRJET 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 2
editor1knowledgecuddle
 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication Algorithm
IRJET 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 Databases
ijircee
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
Hamzamohammed70
 
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
Meka 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 storage
Shakas Technologies
 
REU Group 2 - Paper
REU Group 2 - PaperREU Group 2 - Paper
REU Group 2 - Paper
Scott 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 databases
Iaetsd 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
B03302007012
theijes
 
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
ijcisjournal
 
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
ijcisjournal
 
Ad

Recently uploaded (20)

Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdfIntroduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
james5028
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdfIntroduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
james5028
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Ad

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