Ruhr- Ruhr- Universit Universit ät ät Bochum Bochum Fakultät für Mathematik Fakultät für Mathematik Informationssicherheit und Informationssicherheit und Kryptologie Kryptologie Cryptanalysis Cryptanalysis of Hash Functions of Hash Functions of the MD4-Family of the MD4-Family CITS – Cryptology and Information Security CITS – Cryptology and Information Security Faculty of Mathematics Faculty of Mathematics Ruhr University Bochum Ruhr University Bochum Magnus Daum
57
Embed
Ruhr- Universität Bochum Fakultät für Mathematik Informationssicherheit und Kryptologie Cryptanalysis of Hash Functions of the MD4-Family CITS – Cryptology.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
CryptanalysisCryptanalysis
of Hash Functionsof Hash Functions
of the MD4-Familyof the MD4-Family
CITS – Cryptology and Information SecurityCITS – Cryptology and Information Security
Faculty of MathematicsFaculty of Mathematics
Ruhr University BochumRuhr University Bochum
Magnus Daum
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 2
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
OverviewOverview
• Hash Functions: Properties and Applications• The MD4-Family
– Design Principles– „Historical“ Overview
• Attack Techniques– Dobbertin‘s Attacks on MD4, MD5 and RIPEMD
• Improvements of Dobbertin‘s Methods
– Chabaud/Joux and Biham/Chen Attacks on SHA-0/1– Wang et al. Attacks on MD4, MD5 HAVAL and RIPEMD
• Conclusions
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 3
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Properties and ApplicationsProperties and Applications
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 4
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
What is a Hash Function?What is a Hash Function?
• A hash function – is efficiently computable– compresses information of arbitrary length to
some information of fixed length („digital fingerprint“)
messageHash function
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 5
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
ApplicationApplication in Digital Signature Schemesin Digital Signature Schemes
BobAlice
Alice
Alice
Alice
Alice
Signature okay?
?=
h h
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 6
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Properties ofProperties of Cryptographic HashfunctionsCryptographic Hashfunctions
• preimage-resistance:„Given V, find M such that h(M)=V“ is infeasible
• 2nd-preimage-resistance:„Given M, find M‘M such that h(M‘)=h(M)“
is infeasible
• collision-resistance:„Find M‘M such that h(M‘)=h(M)“ is infeasible
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 7
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
ApplicationApplication in Digital Signature Schemesin Digital Signature Schemes
BobAlice
AliceAlice
?=
Eve
€ 10k € 50k
h h
Alice, please sign this contract!
€ 10k
Bob, Alice signed this contract!
€ 50k
Alice
h h
Okay, I will sign the contract about €10k.
Alice signed the contract about
€50k.
Signature is okay !
Collision!
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 8
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Hash Functions of the MD4 FamilyHash Functions of the MD4 Family
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 9
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
MD4-Family
Hash FunctionsHash Functions
• Hash functions of practical interest:– Hash functions based on blockciphers:
such Systems of Equationssuch Systems of Equations
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 29
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Specialized AlgorithmsSpecialized Algorithms
• Equations include different kinds of operations:– addition/subtraction modulo 2n
– bitwise defined functions– bitrotations / -shifts
• Two kinds of auxiliary means:– for transforming the equations– for determining/representing the set of solutions of
such equations
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 30
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Examples for TransformationExamples for Transformation
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 31
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
• Naive idea: exhaustive search• Dobbertin‘s method from the attack on
MD4/MD5:– Solving „from right to left“– Basic Idea: Solutions for the least significant k bit
of the equations are extensions of solutions of the least significant k-1 bits
– Consider equations bitwise from the right to the left and try to extend the found solutions( tree of solutions)
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 32
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
x
x
x
x
tree of solutions
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 33
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
x
x
x
x
tree of solutions
• Often possible to stop early• Faster than exhaustive
search• For each solution there
exists a leaf in the tree• Complexity directly related
to the number of solutions• Problem: We are mainly
interested in equations with many solutions.
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 34
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
x
x
x
x
• Idea:Combine redundant subtrees
• Problem: Detect redundancy during the construction of the graph
• Only the carrybit is relevant for the
solution for the third bit
tree of solutions
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 35
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
• Labeling the vertices with the carrybits makes it possible to detect redundancies
• Number of needed carrybits gives an upper bound on the width of the graph of solutions
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 36
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
x
x
x
x
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 37
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
x
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
xx
x
x
graph of solutions
1100 1001
1100 1001
1100 1001
00
x
x
x
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 38
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
graph of solutions
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
x
x
x
x
• Compact representation of the set of solutions
• Can be simplified even more
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 39
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Algorithms for Determining/ Algorithms for Determining/ Representing the Set of SolutionsRepresenting the Set of Solutions
• Solution graphs are very similar to so called BDDs (Binary Decision Diagram)
• Further efficient algorithms from the theory of BDDs deriveable:– further reduction/minimalisation of the size– computing the number of solutions– combining solution graphs (e.g. intersecting two
sets of solutions)
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 45
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Chabaud/Joux Chabaud/Joux Attack on SHA-0Attack on SHA-0
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 46
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Attack on SHA-0Attack on SHA-0
• Chabaud/Joux (Crypto ’98):Collisions for SHA-0 can be found with complexity 261
• Idea:– Differential Attack with XOR-differences– Linearisation of the compression function
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 47
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Basic IdeasBasic Ideas• Linear parts:
– Differences are propagated deterministically– Behaviour of differences is
• predictable• not modifiable
– Usually chosen to cause a strong avalanche effect
• Non-linear parts:– Propagation of differences not unique but depends
on actual contents of the registers– Behaviour is more difficult to predict– Gives freedom to an attacker, e.g. to counteract
the avalanche effect
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 48
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Structure of the AttackStructure of the Attack
(1) Linearisation of the compression function
(2) Find a differential pattern that leads to a collision for the linearised function
(3) Find actual contents for the registers (from processing one actual message) which fit to the differential pattern found before(-> same differential propagation in the real compression function)
16.11.2004 Daum - Cryptanalysis of Hash Functions of the MD4-Family 49
Ruhr-Ruhr-UniversitätUniversitätBochumBochumFakultät für MathematikFakultät für Mathematik
Informationssicherheit und KryptologieInformationssicherheit und Kryptologie
Linearisation of theLinearisation of the compression functioncompression function
• 3 non-linear parts in SHA-0:– addition modulo 232