SlideShare a Scribd company logo
7
Most read
9
Most read
10
Most read
Information and Network Security:38
Birthday Attacks and Security of Hash Functions
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
Two Simple Insecure Hash
Functions
• consider two simple insecure 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
Attacks on Hash Functions
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
Attacks on Hash Functions
• As with encryption algorithms, there are two categories of attacks on
hash functions: brute-force attacks and cryptanalysis. A brute-force
attack does not depend on the specific algorithm but depends only
on bit length. In the case of a hash function, a brute-force attack
depends only on the bit length of the hash value. A cryptanalysis, in
contrast, is an attack based on weaknesses in a particular
cryptographic algorithm.
Attacks on Hash Functions
• For a preimage or second preimage attack, an adversary wishes to
find a value y such that H(y) is equal to a given hash value h. The
brute force method is to pick values of y at random and try each value
until a collision occurs. For an m-bit hash value, the level of effort is
proportional to 2m. Specifically, the adversary would have to try, on
average, 2m–1 values of y to find one that generates a given hash
value h.
Attacks on Hash Functions
• For a collision resistant attack, an adversary wishes to find two
messages or data blocks, x and y, that yield the same hash function:
H(x) = H(y). This requires much less effort than a preimage or second
preimage attack. The effort required is explained by a mathematical
result referred to as the birthday paradox (next slide).
Attacks on Hash Functions
• If collision resistance is required, then the value 2m/2 determines the
strength of the hash code against brute-force attacks. Van Oorschot
and Wiener presented a design for a $10 million collision search
machine for MD5, which has a 128-bit hash length, that could find a
collision in 24 days. Thus a 128-bit code may be viewed as
inadequate. The next step up, if a hash code is treated as a sequence
of 32 bits, is a 160-bit hash length. With a hash length of 160 bits, the
same search machine would require over four thousand years to find
a collision. With today's technology, the time would be much shorter,
so that 160 bits now appears suspect.
Birthday Attacks
• might think a 64-bit hash is secure
• but by Birthday Paradox is not
• birthday attack works thus:
• given user prepared to sign a valid message x
• opponent generates 2
m/2 variations x’ of x, all with
essentially the same meaning, and saves them
• opponent generates 2
m/2 variations y’ of a desired
fraudulent message y
• two sets of messages are compared to find pair with same
hash (probability > 0.5 by birthday paradox)
• have user sign the valid message, then substitute the
forgery which will have a valid signature
• conclusion is that need to use larger MAC/hash
Birthday Attacks
• The Birthday Attack exploits the birthday paradox – the chance that in
a group of people two will share the same birthday – only 23 people
are needed for a Pr>0.5 of this. Can generalize the problem to one
wanting a matching pair from any two sets, and show need 2m/2 in
each to get a matching m-bit hash.
• Yuval proposed the strategy shown to exploit the birthday paradox in
a collision resistant attack. Note that creating many message variants
is relatively easy, either by rewording or just varying the amount of
white-space in the message. All of which indicates that larger
MACs/Hashes are needed.
Hash Function Cryptanalysis
cryptanalytic attacks exploit some property of alg so
faster than exhaustive search
hash functions use iterative structure
process message in blocks (incl length)
attacks focus on collisions in function f
• A number of proposals have been made for hash functions based on
using a cipher block chaining technique, but without the secret key
(instead using the message blocks as keys).
• One of the first such proposals was that of Rabin, which divided a
message M into fixed-size blocks, and usde a symmetric encryption
system such as DES to compute the hash code G as shown.
• This is similar to the CBC technique, but in this case there is no secret
key. As with any hash code, this scheme is subject to the birthday
attack, and if the encryption algorithm is DES and only a 64-bit hash
code is produced, then the system is vulnerable.
• Furthermore, another version of the birthday attack can be used
even if the opponent has access to only one message and its valid
signature and cannot obtain multiple signings, known as a “meet-in-
the-middle” attack (see text).
• It can be shown that some form of birthday attack will succeed
against any hash scheme involving the use of cipher block chaining
without a secret key provided that either the resulting hash code is
small enough (e.g., 64 bits or less) or that a larger hash code can be
decomposed into independent subcodes.
• Thus, attention has been directed at finding other approaches to
hashing.
Block Ciphers as Hash Functions
• can use block ciphers as hash functions
• using H0=0 and zero-pad of final block
• compute: Hi = EMi
[Hi-1]
• and use final block as the hash value
• similar to CBC but without a key
• resulting hash is too small (64-bit)
• both due to direct birthday attack
• and to “meet-in-the-middle” attack
• other variants also susceptible to attack
Assignment
• Discuss the security issues of Hash Functions and Explain Birthday
Attacks

More Related Content

PDF
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
PPTX
Public Key Cryptography
PPTX
Hash Function
PPT
Authentication Protocols
PDF
PPTX
Public Key Cryptosystem
PPTX
MAC-Message Authentication Codes
PDF
Introduction to Cryptography
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Public Key Cryptography
Hash Function
Authentication Protocols
Public Key Cryptosystem
MAC-Message Authentication Codes
Introduction to Cryptography

What's hot (20)

PPTX
Block Cipher
PPTX
Cryptography & Steganography
PPTX
Introduction to Cryptography
PPT
Network security cryptographic hash function
PPT
Digital signature
PPTX
Security services and mechanisms
PPTX
One Time Pad Encryption Technique
PPTX
Elgamal & schnorr digital signature scheme copy
PPTX
Substitution techniques
PPTX
Key management
PPTX
Principles of public key cryptography and its Uses
PDF
Network security - OSI Security Architecture
PPTX
SHA- Secure hashing algorithm
PDF
Birthday Paradox explained
PPTX
Digital signature(Cryptography)
PPTX
Hash Function
PPTX
Cryptography
PPTX
Password Cracking
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
Block Cipher
Cryptography & Steganography
Introduction to Cryptography
Network security cryptographic hash function
Digital signature
Security services and mechanisms
One Time Pad Encryption Technique
Elgamal & schnorr digital signature scheme copy
Substitution techniques
Key management
Principles of public key cryptography and its Uses
Network security - OSI Security Architecture
SHA- Secure hashing algorithm
Birthday Paradox explained
Digital signature(Cryptography)
Hash Function
Cryptography
Password Cracking
CRYPTOGRAPHY AND NETWORK SECURITY
Ad

Similar to Information and network security 38 birthday attacks and security of hash functions (20)

PPT
secure hash function for authentication in CNS
PPTX
2 Cryptographic_Hash_Functions.pptx
PDF
18CS2005 Cryptography and Network Security
PDF
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
PPTX
Information and data security cryptanalysis method
PDF
Public Key Encryption & Hash functions
PDF
Cs8792 cns - unit iv
PDF
Cs8792 cns - unit iv
DOCX
Cryptography and Network Security Principles and Practice.docx
PPT
Hash Function & Analysis
PPTX
Message Digest message digest ppttsx.pptx
PPTX
unit 4.pptx of hash function in cryptography
PDF
A Modified approach for implementation of an efficient padding scheme in a di...
PDF
A Modified approach for implementation of an efficient padding scheme in a di...
PPTX
PPT
ch11_hashing Function.ppthdhdjdjdidjebehehejeueu
PPT
NSC_Unit-III_final.ppt
PDF
Cns
PPT
Hash crypto
PPT
Hash crypto
secure hash function for authentication in CNS
2 Cryptographic_Hash_Functions.pptx
18CS2005 Cryptography and Network Security
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Information and data security cryptanalysis method
Public Key Encryption & Hash functions
Cs8792 cns - unit iv
Cs8792 cns - unit iv
Cryptography and Network Security Principles and Practice.docx
Hash Function & Analysis
Message Digest message digest ppttsx.pptx
unit 4.pptx of hash function in cryptography
A Modified approach for implementation of an efficient padding scheme in a di...
A Modified approach for implementation of an efficient padding scheme in a di...
ch11_hashing Function.ppthdhdjdjdidjebehehejeueu
NSC_Unit-III_final.ppt
Cns
Hash crypto
Hash crypto
Ad

More from Vaibhav Khanna (20)

PPTX
Information and network security 47 authentication applications
PPTX
Information and network security 46 digital signature algorithm
PPTX
Information and network security 45 digital signature standard
PPTX
Information and network security 44 direct digital signatures
PPTX
Information and network security 43 digital signatures
PPTX
Information and network security 42 security of message authentication code
PPTX
Information and network security 41 message authentication code
PPTX
Information and network security 40 sha3 secure hash algorithm
PPTX
Information and network security 39 secure hash algorithm
PPTX
Information and network security 37 hash functions and message authentication
PPTX
Information and network security 35 the chinese remainder theorem
PPTX
Information and network security 34 primality
PPTX
Information and network security 33 rsa algorithm
PPTX
Information and network security 32 principles of public key cryptosystems
PPTX
Information and network security 31 public key cryptography
PPTX
Information and network security 30 random numbers
PPTX
Information and network security 29 international data encryption algorithm
PPTX
Information and network security 28 blowfish
PPTX
Information and network security 27 triple des
PPTX
Information and network security 26 aes decryption and implementational issues
Information and network security 47 authentication applications
Information and network security 46 digital signature algorithm
Information and network security 45 digital signature standard
Information and network security 44 direct digital signatures
Information and network security 43 digital signatures
Information and network security 42 security of message authentication code
Information and network security 41 message authentication code
Information and network security 40 sha3 secure hash algorithm
Information and network security 39 secure hash algorithm
Information and network security 37 hash functions and message authentication
Information and network security 35 the chinese remainder theorem
Information and network security 34 primality
Information and network security 33 rsa algorithm
Information and network security 32 principles of public key cryptosystems
Information and network security 31 public key cryptography
Information and network security 30 random numbers
Information and network security 29 international data encryption algorithm
Information and network security 28 blowfish
Information and network security 27 triple des
Information and network security 26 aes decryption and implementational issues

Recently uploaded (20)

PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Transform Your Business with a Software ERP System
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
medical staffing services at VALiNTRY
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Online Work Permit System for Fast Permit Processing
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Digital Strategies for Manufacturing Companies
PDF
Odoo Companies in India – Driving Business Transformation.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Transform Your Business with a Software ERP System
Navsoft: AI-Powered Business Solutions & Custom Software Development
2025 Textile ERP Trends: SAP, Odoo & Oracle
PTS Company Brochure 2025 (1).pdf.......
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Design an Analysis of Algorithms II-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
medical staffing services at VALiNTRY
How Creative Agencies Leverage Project Management Software.pdf
ai tools demonstartion for schools and inter college
Online Work Permit System for Fast Permit Processing
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Digital Strategies for Manufacturing Companies
Odoo Companies in India – Driving Business Transformation.pdf

Information and network security 38 birthday attacks and security of hash functions

  • 1. Information and Network Security:38 Birthday Attacks and Security of Hash Functions Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2. Two Simple Insecure Hash Functions • consider two simple insecure 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
  • 3. Attacks on Hash Functions 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
  • 4. Attacks on Hash Functions • As with encryption algorithms, there are two categories of attacks on hash functions: brute-force attacks and cryptanalysis. A brute-force attack does not depend on the specific algorithm but depends only on bit length. In the case of a hash function, a brute-force attack depends only on the bit length of the hash value. A cryptanalysis, in contrast, is an attack based on weaknesses in a particular cryptographic algorithm.
  • 5. Attacks on Hash Functions • For a preimage or second preimage attack, an adversary wishes to find a value y such that H(y) is equal to a given hash value h. The brute force method is to pick values of y at random and try each value until a collision occurs. For an m-bit hash value, the level of effort is proportional to 2m. Specifically, the adversary would have to try, on average, 2m–1 values of y to find one that generates a given hash value h.
  • 6. Attacks on Hash Functions • For a collision resistant attack, an adversary wishes to find two messages or data blocks, x and y, that yield the same hash function: H(x) = H(y). This requires much less effort than a preimage or second preimage attack. The effort required is explained by a mathematical result referred to as the birthday paradox (next slide).
  • 7. Attacks on Hash Functions • If collision resistance is required, then the value 2m/2 determines the strength of the hash code against brute-force attacks. Van Oorschot and Wiener presented a design for a $10 million collision search machine for MD5, which has a 128-bit hash length, that could find a collision in 24 days. Thus a 128-bit code may be viewed as inadequate. The next step up, if a hash code is treated as a sequence of 32 bits, is a 160-bit hash length. With a hash length of 160 bits, the same search machine would require over four thousand years to find a collision. With today's technology, the time would be much shorter, so that 160 bits now appears suspect.
  • 8. Birthday Attacks • might think a 64-bit hash is secure • but by Birthday Paradox is not • birthday attack works thus: • given user prepared to sign a valid message x • opponent generates 2 m/2 variations x’ of x, all with essentially the same meaning, and saves them • opponent generates 2 m/2 variations y’ of a desired fraudulent message y • two sets of messages are compared to find pair with same hash (probability > 0.5 by birthday paradox) • have user sign the valid message, then substitute the forgery which will have a valid signature • conclusion is that need to use larger MAC/hash
  • 9. Birthday Attacks • The Birthday Attack exploits the birthday paradox – the chance that in a group of people two will share the same birthday – only 23 people are needed for a Pr>0.5 of this. Can generalize the problem to one wanting a matching pair from any two sets, and show need 2m/2 in each to get a matching m-bit hash. • Yuval proposed the strategy shown to exploit the birthday paradox in a collision resistant attack. Note that creating many message variants is relatively easy, either by rewording or just varying the amount of white-space in the message. All of which indicates that larger MACs/Hashes are needed.
  • 10. Hash Function Cryptanalysis cryptanalytic attacks exploit some property of alg so faster than exhaustive search hash functions use iterative structure process message in blocks (incl length) attacks focus on collisions in function f
  • 11. • A number of proposals have been made for hash functions based on using a cipher block chaining technique, but without the secret key (instead using the message blocks as keys). • One of the first such proposals was that of Rabin, which divided a message M into fixed-size blocks, and usde a symmetric encryption system such as DES to compute the hash code G as shown. • This is similar to the CBC technique, but in this case there is no secret key. As with any hash code, this scheme is subject to the birthday attack, and if the encryption algorithm is DES and only a 64-bit hash code is produced, then the system is vulnerable.
  • 12. • Furthermore, another version of the birthday attack can be used even if the opponent has access to only one message and its valid signature and cannot obtain multiple signings, known as a “meet-in- the-middle” attack (see text). • It can be shown that some form of birthday attack will succeed against any hash scheme involving the use of cipher block chaining without a secret key provided that either the resulting hash code is small enough (e.g., 64 bits or less) or that a larger hash code can be decomposed into independent subcodes. • Thus, attention has been directed at finding other approaches to hashing.
  • 13. Block Ciphers as Hash Functions • can use block ciphers as hash functions • using H0=0 and zero-pad of final block • compute: Hi = EMi [Hi-1] • and use final block as the hash value • similar to CBC but without a key • resulting hash is too small (64-bit) • both due to direct birthday attack • and to “meet-in-the-middle” attack • other variants also susceptible to attack
  • 14. Assignment • Discuss the security issues of Hash Functions and Explain Birthday Attacks