SlideShare a Scribd company logo
Information and data security cryptographic hash functions
2
Hash functions
• A hash function H accepts a variable-length block of
data M as input and produces a fixed-size hash value.
• h = H(M).
• the principal object of a hash function is data integrity.
• hash used to detect changes to message.
• The kind of hash in security applications is referred to as
a cryptographic hash function.
- computationally infeasible to find data mapping to
specific hash (one-way property)
- computationally infeasible to find two data to same
hash (collision-free property)
Cryptographic Hash Function
3
APPLICATIONS OF
CRYPTOGRAPHIC HASH FUNCTIONS
• Message Authentication.
- message authentication code (MAC).
• Digital Signatures.
• Other application:-
- one-way password file.
- intrusion detection.
- virus detection.
- pseudorandom function(PRF).
4
Message Authentication
5
• Message authentication is a mechanism or
service used to verify the integrity of a message.
• Message authentication assures that data
received are exactly as sent (i.e., contain no
modification, insertion, deletion, or replay).
• When a hash function is used to provide message
authentication, the hash function value is often
referred to as a message digest.
Hash Functions & Message Authentication
6
Authentication+confidentiality
Authentication only
Authentication only
Authentication+confidentiality
Message Authentication Code
(MAC)
7
• Message authentication is achieved using message
authentication code(MAC).
• also known as a keyed hash function.
• MACs are used between two parties that share a secret
key to authenticate information exchanged between
those parties.
• A MAC function takes as input a secret key and a data
block and produces a hash value, referred to as the
MAC.
Digital signatures
• Another important application, which is similar to
the message authentication application.
• The operation of the digital signature is similar to
that of the MAC.
• In the case of the digital signature, the hash value of
a message is encrypted with a user's private key.
• Anyone who knows the user's public key can verify
the integrity of the message that is associated with
the digital signature. In this case an attacker who
wishes to alter the message would need to know
the user's private key.
8
Hash Functions & Digital Signatures
9
Digital signature+Authentication
Digital signature+Authentication+Confidentiality
10
• to create a one-way password file
– store hash of password not actual password
• for intrusion detection and virus detection
– keep & check hash of files on system
• pseudorandom function (PRF) or
pseudorandom number generator (PRNG)
Other Hash Function Uses
11
Two Simple Hash Functions
• consider two simple hash functions
• bit-by-bit exclusive-OR (XOR) of every block
– Ci = bi1 xor bi2 xor . . . xor bim
– a longitudinal redundancy check
– reasonably effective as data integrity check
• one-bit circular shift on hash value
– for each successive n-bit block
• rotate current hash value to left by1bit and XOR block
– good for data integrity but useless for security
Hash Function Requirements
12
13
Hash Function Resistance Properties Required for
Various Data Integrity Application
Attacks on Hash Functions
14
• Have brute-force attacks and cryptanalysis
• a preimage or second preimage attack
– find y s.t. H(y) equals a given hash value
• collision resistance
– find two messages x & y with same hash so H(x) =
H(y)
• hence value 2m/2 determines strength of hash
code against brute-force attacks
– 128-bits inadequate, 160-bits suspect
Hash Function Cryptanalysis
15
• cryptanalytic attacks exploit some property of alg
so faster than exhaustive search
• hash functions use iterative structure
– process message in blocks (fixed length)
• attacks focus on collisions in function f
16
Secure Hash Algorithm
(SHA)
• SHA originally designed by the National Institute of Standards and
Technology (NIST) in 1993.
• based on design of MD4
• was revised in 1995 as SHA-1
• produces a hash value of 160 bits.
• NIST produced three new versions of SHA, known as SHA-256,
SHA-384, and SHA-512, these hash algorithms are known as
SHA-2.
• These new versions have the same structure and use the same
types of arithmetic and logical operations as SHA-1
• hence analysis should be similar but security levels are rather higher
SHA Versions
SHA-1 SHA-224 SHA-256 SHA-384 SHA-512
Message
digest size 160 224 256 384 512
Message
size < 264 < 264 < 264 < 2128 < 2128
Block size 512 512 512 1024 1024
Word size 32 32 32 64 64
Number of
steps 80 64 64 80 80
17
SHA-512 Overview
18
SHA-5 Logic
19
20
SHA compression function
• Step 4/ processing message in 1024-bit blocks
• Heart of the algorithm
• consists of 80 rounds
– updating a 512-bit buffer
– using a 64-bit value Wt derived from the current
message block
– and a round constant based on cube root of first
80 prime numbers
21
22
SHA-512 Processing of a single
1024-Bits Block
23
24
Elementary SHA-512 Operation
(single round)
25
• Let us look in more detail at the logic in each of the 80
steps of the processing of one 512-bit block .Each round
is defined by the following set of equations:
26
Creation of 80-word input sequence for
SHA-512 processing of single block
27
28
It remains to indicate how the 64-bit word values Wt are
derived from the 1024-bit message. The first 16 values of
Wt are taken directly from the 16 words of the current
block. The remaining values are defined as:
29
SHA-3
• SHA-1 not yet "broken”
– but similar to broken MD5 & SHA-0
– so considered insecure
• SHA-2 (esp. SHA-512) seems secure
– shares same structure and mathematical operations
as predecessors so have concern
• NIST announced in 2007 a competition for the
SHA-3 next gen NIST hash function
30
• replace SHA-2 with SHA-3 in any use
– so use same hash sizes
• preserve the online nature of SHA-2
– so must process small blocks (512 / 1024 bits)
• evaluation criteria
– security
– cost in time & memory
– characteristics: such as flexibility & simplicity
The basic requirements of SHA-3
31

More Related Content

What's hot (20)

PPT
block ciphers
Asad Ali
 
PPTX
Hash function
Salman Memon
 
PPTX
Digital signature(Cryptography)
Soham Kansodaria
 
PPTX
Hash function
Harry Potter
 
PPT
Cryptography and Network Security William Stallings Lawrie Brown
Information Security Awareness Group
 
PPTX
Block cipher modes of operation
harshit chavda
 
PPTX
Public Key Cryptography
Gopal Sakarkar
 
PPTX
unit 4.pptx of hash function in cryptography
NithyasriA2
 
PPT
PGP S/MIME
Sou Jana
 
PPT
Message authentication
CAS
 
PPTX
SSL And TLS
Ghanshyam Patel
 
PPTX
Blow fish final ppt
Ajay AJ
 
PDF
An introduction to X.509 certificates
Stephane Potier
 
PDF
CNIT 141: 6. Hash Functions
Sam Bowne
 
PDF
2. public key cryptography and RSA
Dr.Florence Dayana
 
PPTX
MAC-Message Authentication Codes
DarshanPatil82
 
PPT
Message Authentication Code & HMAC
Krishna Gehlot
 
PDF
Block Ciphers and the Data Encryption Standard
Dr.Florence Dayana
 
block ciphers
Asad Ali
 
Hash function
Salman Memon
 
Digital signature(Cryptography)
Soham Kansodaria
 
Hash function
Harry Potter
 
Cryptography and Network Security William Stallings Lawrie Brown
Information Security Awareness Group
 
Block cipher modes of operation
harshit chavda
 
Public Key Cryptography
Gopal Sakarkar
 
unit 4.pptx of hash function in cryptography
NithyasriA2
 
PGP S/MIME
Sou Jana
 
Message authentication
CAS
 
SSL And TLS
Ghanshyam Patel
 
Blow fish final ppt
Ajay AJ
 
An introduction to X.509 certificates
Stephane Potier
 
CNIT 141: 6. Hash Functions
Sam Bowne
 
2. public key cryptography and RSA
Dr.Florence Dayana
 
MAC-Message Authentication Codes
DarshanPatil82
 
Message Authentication Code & HMAC
Krishna Gehlot
 
Block Ciphers and the Data Encryption Standard
Dr.Florence Dayana
 

Similar to Information and data security cryptographic hash functions (20)

PPTX
cryptography and network security cns.pptx
gkumar610
 
PDF
Public Key Encryption & Hash functions
Dr.Florence Dayana
 
PPTX
Unit 4
KRAMANJANEYULU1
 
PPT
NSC_Unit-III_final.ppt
DrVASAVIBANDE
 
PDF
Cns
ArthyR3
 
PPT
Hash crypto
Fraboni Ec
 
PPT
Hash crypto
Harry Potter
 
PPT
Hash crypto
Luis Goldster
 
PPT
Hash crypto
David Hoen
 
PPT
Hash crypto
Tony Nguyen
 
PPT
Hash crypto
James Wong
 
PPT
Hash crypto
Young Alista
 
PPT
secure hash function for authentication in CNS
NithyasriA2
 
PPT
Hash Function & Analysis
Pawandeep Kaur
 
PDF
Cs8792 cns - unit iv
ArthyR3
 
PDF
Cs8792 cns - unit iv
ArthyR3
 
PPT
Hash_Crypto.ppt
ssuser5297f5
 
PPT
01204427-Hash_Crypto (1).ppt
GnanalakshmiV
 
PDF
Sha
ha123
 
PPTX
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
cryptography and network security cns.pptx
gkumar610
 
Public Key Encryption & Hash functions
Dr.Florence Dayana
 
NSC_Unit-III_final.ppt
DrVASAVIBANDE
 
Cns
ArthyR3
 
Hash crypto
Fraboni Ec
 
Hash crypto
Harry Potter
 
Hash crypto
Luis Goldster
 
Hash crypto
David Hoen
 
Hash crypto
Tony Nguyen
 
Hash crypto
James Wong
 
Hash crypto
Young Alista
 
secure hash function for authentication in CNS
NithyasriA2
 
Hash Function & Analysis
Pawandeep Kaur
 
Cs8792 cns - unit iv
ArthyR3
 
Cs8792 cns - unit iv
ArthyR3
 
Hash_Crypto.ppt
ssuser5297f5
 
01204427-Hash_Crypto (1).ppt
GnanalakshmiV
 
Sha
ha123
 
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
Ad

More from Mazin Alwaaly (20)

PPTX
Pattern recognition voice biometrics
Mazin Alwaaly
 
PPTX
Pattern recognition palm print authentication system
Mazin Alwaaly
 
PPTX
Pattern recognition on line signature
Mazin Alwaaly
 
PPTX
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly
 
PPTX
Pattern recognition IRIS recognition
Mazin Alwaaly
 
PPT
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly
 
PPTX
Pattern recognition Hand Geometry
Mazin Alwaaly
 
PPTX
Pattern recognition forensic dental identification
Mazin Alwaaly
 
PPT
Pattern recognition fingerprints
Mazin Alwaaly
 
PPTX
Pattern recognition facial recognition
Mazin Alwaaly
 
PPTX
Pattern recognition ear as a biometric
Mazin Alwaaly
 
PPTX
Pattern recognition 3d face recognition
Mazin Alwaaly
 
PPTX
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly
 
PPT
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly
 
PPTX
Multimedia content based retrieval in digital libraries
Mazin Alwaaly
 
PPTX
Multimedia lossy compression algorithms
Mazin Alwaaly
 
PPTX
Multimedia lossless compression algorithms
Mazin Alwaaly
 
PPTX
Multimedia basic video compression techniques
Mazin Alwaaly
 
PPT
Multimedia image compression standards
Mazin Alwaaly
 
PPTX
Multimedia fundamental concepts in video
Mazin Alwaaly
 
Pattern recognition voice biometrics
Mazin Alwaaly
 
Pattern recognition palm print authentication system
Mazin Alwaaly
 
Pattern recognition on line signature
Mazin Alwaaly
 
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly
 
Pattern recognition IRIS recognition
Mazin Alwaaly
 
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly
 
Pattern recognition Hand Geometry
Mazin Alwaaly
 
Pattern recognition forensic dental identification
Mazin Alwaaly
 
Pattern recognition fingerprints
Mazin Alwaaly
 
Pattern recognition facial recognition
Mazin Alwaaly
 
Pattern recognition ear as a biometric
Mazin Alwaaly
 
Pattern recognition 3d face recognition
Mazin Alwaaly
 
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly
 
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly
 
Multimedia content based retrieval in digital libraries
Mazin Alwaaly
 
Multimedia lossy compression algorithms
Mazin Alwaaly
 
Multimedia lossless compression algorithms
Mazin Alwaaly
 
Multimedia basic video compression techniques
Mazin Alwaaly
 
Multimedia image compression standards
Mazin Alwaaly
 
Multimedia fundamental concepts in video
Mazin Alwaaly
 
Ad

Recently uploaded (20)

PPTX
Different formulation of fungicides.pptx
MrRABIRANJAN
 
PDF
WUCHERIA BANCROFTI-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PDF
GK_GS One Liner For Competitive Exam.pdf
abhi01nm
 
PDF
A young gas giant and hidden substructures in a protoplanetary disk
Sérgio Sacani
 
PDF
The-Origin- of -Metazoa-vertebrates .ppt
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PPTX
Hypothalamus_nuclei_ structure_functions.pptx
muralinath2
 
PPTX
Diagnostic Features of Common Oral Ulcerative Lesions.pptx
Dr Palak borade
 
PPTX
MICROBIOLOGY PART-1 INTRODUCTION .pptx
Mohit Kumar
 
PPTX
Akshay tunneling .pptx_20250331_165945_0000.pptx
akshaythaker18
 
PPTX
Animal Reproductive Behaviors Quiz Presentation in Maroon Brown Flat Graphic ...
LynetteGaniron1
 
PPTX
LESSON 2 PSYCHOSOCIAL DEVELOPMENT.pptx L
JeanCarolColico1
 
PDF
A proposed mechanism for the formation of protocell-like structures on Titan
Sérgio Sacani
 
PPTX
Vectors and applications of genetic engineering Pptx
Ashwini I Chuncha
 
PPTX
Structure and uses of DDT, Saccharin..pptx
harsimrankaur204
 
PDF
Adding Geochemistry To Understand Recharge Areas - Kinney County, Texas - Jim...
Texas Alliance of Groundwater Districts
 
PDF
Phosphates reveal high pH ocean water on Enceladus
Sérgio Sacani
 
PDF
Step-by-Step Guide: How mRNA Vaccines Works
TECNIC
 
PDF
The role of the Lorentz force in sunspot equilibrium
Sérgio Sacani
 
PDF
Continuous Model-Based Engineering of Software-Intensive Systems: Approaches,...
Hugo Bruneliere
 
PDF
Annual report 2024 - Inria - English version.pdf
Inria
 
Different formulation of fungicides.pptx
MrRABIRANJAN
 
WUCHERIA BANCROFTI-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
GK_GS One Liner For Competitive Exam.pdf
abhi01nm
 
A young gas giant and hidden substructures in a protoplanetary disk
Sérgio Sacani
 
The-Origin- of -Metazoa-vertebrates .ppt
S.B.P.G. COLLEGE BARAGAON VARANASI
 
Hypothalamus_nuclei_ structure_functions.pptx
muralinath2
 
Diagnostic Features of Common Oral Ulcerative Lesions.pptx
Dr Palak borade
 
MICROBIOLOGY PART-1 INTRODUCTION .pptx
Mohit Kumar
 
Akshay tunneling .pptx_20250331_165945_0000.pptx
akshaythaker18
 
Animal Reproductive Behaviors Quiz Presentation in Maroon Brown Flat Graphic ...
LynetteGaniron1
 
LESSON 2 PSYCHOSOCIAL DEVELOPMENT.pptx L
JeanCarolColico1
 
A proposed mechanism for the formation of protocell-like structures on Titan
Sérgio Sacani
 
Vectors and applications of genetic engineering Pptx
Ashwini I Chuncha
 
Structure and uses of DDT, Saccharin..pptx
harsimrankaur204
 
Adding Geochemistry To Understand Recharge Areas - Kinney County, Texas - Jim...
Texas Alliance of Groundwater Districts
 
Phosphates reveal high pH ocean water on Enceladus
Sérgio Sacani
 
Step-by-Step Guide: How mRNA Vaccines Works
TECNIC
 
The role of the Lorentz force in sunspot equilibrium
Sérgio Sacani
 
Continuous Model-Based Engineering of Software-Intensive Systems: Approaches,...
Hugo Bruneliere
 
Annual report 2024 - Inria - English version.pdf
Inria
 

Information and data security cryptographic hash functions

  • 2. 2 Hash functions • A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value. • h = H(M). • the principal object of a hash function is data integrity. • hash used to detect changes to message. • The kind of hash in security applications is referred to as a cryptographic hash function. - computationally infeasible to find data mapping to specific hash (one-way property) - computationally infeasible to find two data to same hash (collision-free property)
  • 4. APPLICATIONS OF CRYPTOGRAPHIC HASH FUNCTIONS • Message Authentication. - message authentication code (MAC). • Digital Signatures. • Other application:- - one-way password file. - intrusion detection. - virus detection. - pseudorandom function(PRF). 4
  • 5. Message Authentication 5 • Message authentication is a mechanism or service used to verify the integrity of a message. • Message authentication assures that data received are exactly as sent (i.e., contain no modification, insertion, deletion, or replay). • When a hash function is used to provide message authentication, the hash function value is often referred to as a message digest.
  • 6. Hash Functions & Message Authentication 6 Authentication+confidentiality Authentication only Authentication only Authentication+confidentiality
  • 7. Message Authentication Code (MAC) 7 • Message authentication is achieved using message authentication code(MAC). • also known as a keyed hash function. • MACs are used between two parties that share a secret key to authenticate information exchanged between those parties. • A MAC function takes as input a secret key and a data block and produces a hash value, referred to as the MAC.
  • 8. Digital signatures • Another important application, which is similar to the message authentication application. • The operation of the digital signature is similar to that of the MAC. • In the case of the digital signature, the hash value of a message is encrypted with a user's private key. • Anyone who knows the user's public key can verify the integrity of the message that is associated with the digital signature. In this case an attacker who wishes to alter the message would need to know the user's private key. 8
  • 9. Hash Functions & Digital Signatures 9 Digital signature+Authentication Digital signature+Authentication+Confidentiality
  • 10. 10 • to create a one-way password file – store hash of password not actual password • for intrusion detection and virus detection – keep & check hash of files on system • pseudorandom function (PRF) or pseudorandom number generator (PRNG) Other Hash Function Uses
  • 11. 11 Two Simple Hash Functions • consider two simple hash functions • bit-by-bit exclusive-OR (XOR) of every block – Ci = bi1 xor bi2 xor . . . xor bim – a longitudinal redundancy check – reasonably effective as data integrity check • one-bit circular shift on hash value – for each successive n-bit block • rotate current hash value to left by1bit and XOR block – good for data integrity but useless for security
  • 13. 13 Hash Function Resistance Properties Required for Various Data Integrity Application
  • 14. Attacks on Hash Functions 14 • Have brute-force attacks and cryptanalysis • a preimage or second preimage attack – find y s.t. H(y) equals a given hash value • collision resistance – find two messages x & y with same hash so H(x) = H(y) • hence value 2m/2 determines strength of hash code against brute-force attacks – 128-bits inadequate, 160-bits suspect
  • 15. Hash Function Cryptanalysis 15 • cryptanalytic attacks exploit some property of alg so faster than exhaustive search • hash functions use iterative structure – process message in blocks (fixed length) • attacks focus on collisions in function f
  • 16. 16 Secure Hash Algorithm (SHA) • SHA originally designed by the National Institute of Standards and Technology (NIST) in 1993. • based on design of MD4 • was revised in 1995 as SHA-1 • produces a hash value of 160 bits. • NIST produced three new versions of SHA, known as SHA-256, SHA-384, and SHA-512, these hash algorithms are known as SHA-2. • These new versions have the same structure and use the same types of arithmetic and logical operations as SHA-1 • hence analysis should be similar but security levels are rather higher
  • 17. SHA Versions SHA-1 SHA-224 SHA-256 SHA-384 SHA-512 Message digest size 160 224 256 384 512 Message size < 264 < 264 < 264 < 2128 < 2128 Block size 512 512 512 1024 1024 Word size 32 32 32 64 64 Number of steps 80 64 64 80 80 17
  • 20. 20
  • 21. SHA compression function • Step 4/ processing message in 1024-bit blocks • Heart of the algorithm • consists of 80 rounds – updating a 512-bit buffer – using a 64-bit value Wt derived from the current message block – and a round constant based on cube root of first 80 prime numbers 21
  • 22. 22
  • 23. SHA-512 Processing of a single 1024-Bits Block 23
  • 25. 25 • Let us look in more detail at the logic in each of the 80 steps of the processing of one 512-bit block .Each round is defined by the following set of equations:
  • 26. 26
  • 27. Creation of 80-word input sequence for SHA-512 processing of single block 27
  • 28. 28 It remains to indicate how the 64-bit word values Wt are derived from the 1024-bit message. The first 16 values of Wt are taken directly from the 16 words of the current block. The remaining values are defined as:
  • 29. 29 SHA-3 • SHA-1 not yet "broken” – but similar to broken MD5 & SHA-0 – so considered insecure • SHA-2 (esp. SHA-512) seems secure – shares same structure and mathematical operations as predecessors so have concern • NIST announced in 2007 a competition for the SHA-3 next gen NIST hash function
  • 30. 30 • replace SHA-2 with SHA-3 in any use – so use same hash sizes • preserve the online nature of SHA-2 – so must process small blocks (512 / 1024 bits) • evaluation criteria – security – cost in time & memory – characteristics: such as flexibility & simplicity The basic requirements of SHA-3
  • 31. 31