Hash Functions in Action Hash Functions in Action Lecture 12 Hash - - PowerPoint PPT Presentation

hash functions in action hash functions in action
SMART_READER_LITE
LIVE PREVIEW

Hash Functions in Action Hash Functions in Action Lecture 12 Hash - - PowerPoint PPT Presentation

Hash Functions in Action Hash Functions in Action Lecture 12 Hash Functions Hash Functions Main syntactic feature: Variable input length to fixed length output Hash Functions Main syntactic feature: Variable input length to fixed length


slide-1
SLIDE 1

Hash Functions in Action

slide-2
SLIDE 2

Hash Functions in Action

Lecture 12

slide-3
SLIDE 3

Hash Functions

slide-4
SLIDE 4

Main syntactic feature: Variable input length to fixed length output

Hash Functions

slide-5
SLIDE 5

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance

Hash Functions

slide-6
SLIDE 6

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment:

Hash Functions

slide-7
SLIDE 7

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions

Hash Functions

slide-8
SLIDE 8

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions

Hash Functions

slide-9
SLIDE 9

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions h←H; A(h)→(x,y) : Collision-Resistant Hash Functions

Hash Functions

slide-10
SLIDE 10

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions h←H; A(h)→(x,y) : Collision-Resistant Hash Functions h←H; Ah→(x,y) : Weak Collision-Resistant Hash Functions

Hash Functions

slide-11
SLIDE 11

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions h←H; A(h)→(x,y) : Collision-Resistant Hash Functions h←H; Ah→(x,y) : Weak Collision-Resistant Hash Functions

Hash Functions

Typically used

slide-12
SLIDE 12

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions h←H; A(h)→(x,y) : Collision-Resistant Hash Functions h←H; Ah→(x,y) : Weak Collision-Resistant Hash Functions Also often required: “unpredictability”

Hash Functions

Typically used

slide-13
SLIDE 13

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions h←H; A(h)→(x,y) : Collision-Resistant Hash Functions h←H; Ah→(x,y) : Weak Collision-Resistant Hash Functions Also often required: “unpredictability” So far: 2-UHF (chop(ax+b))

Hash Functions

Typically used

slide-14
SLIDE 14

Main syntactic feature: Variable input length to fixed length output Primary requirement: collision-resistance If for all PPT A, Pr[x≠y and h(x)=h(y)] is negligible in the following experiment: A→(x,y); h←H : Combinatorial Hash Functions A→x; h←H; A(h)→y : Universal One-Way Hash Functions h←H; A(h)→(x,y) : Collision-Resistant Hash Functions h←H; Ah→(x,y) : Weak Collision-Resistant Hash Functions Also often required: “unpredictability” So far: 2-UHF (chop(ax+b)) Today: UOWHF and CRHF constructions. Domain Extension. 
 Applications of hash functions

Hash Functions

Typically used

slide-15
SLIDE 15

UOWHF

slide-16
SLIDE 16

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p

slide-17
SLIDE 17

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF

slide-18
SLIDE 18

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF

slide-19
SLIDE 19

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family

slide-20
SLIDE 20

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family s.t. h compresses by a bit (i.e., 2-to-1 maps), and

slide-21
SLIDE 21

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family s.t. h compresses by a bit (i.e., 2-to-1 maps), and for all z, z’, w, can solve for h s.t. h(z) = h(z’) = w

slide-22
SLIDE 22

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family s.t. h compresses by a bit (i.e., 2-to-1 maps), and for all z, z’, w, can solve for h s.t. h(z) = h(z’) = w Is a UOWHF [Why?]

slide-23
SLIDE 23

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family s.t. h compresses by a bit (i.e., 2-to-1 maps), and for all z, z’, w, can solve for h s.t. h(z) = h(z’) = w Is a UOWHF [Why?]

BreakOWP(z) { get x ← A; sample random w; give A h s.t. h(z)=h(f(x))=w; if A→y s.t. h(f(y))=w, output y; }

slide-24
SLIDE 24

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family s.t. h compresses by a bit (i.e., 2-to-1 maps), and for all z, z’, w, can solve for h s.t. h(z) = h(z’) = w Is a UOWHF [Why?] Gives a UOWHF that compresses by 1 bit (same as the UHF)

BreakOWP(z) { get x ← A; sample random w; give A h s.t. h(z)=h(f(x))=w; if A→y s.t. h(f(y))=w, output y; }

slide-25
SLIDE 25

UOWHF

Universal One-Way HF: A→x; h←H; A(h)→y. h(x)=h(y) w.n.p Can be constructed from OWF Much easier to see: OWP ⇒ UOWHF Fh(x) = h(f(x)), where f is a OWP and h from a UHF family s.t. h compresses by a bit (i.e., 2-to-1 maps), and for all z, z’, w, can solve for h s.t. h(z) = h(z’) = w Is a UOWHF [Why?] Gives a UOWHF that compresses by 1 bit (same as the UHF) Will see later, how to extend the domain to arbitrarily long strings (without increasing output size)

BreakOWP(z) { get x ← A; sample random w; give A h s.t. h(z)=h(f(x))=w; if A→y s.t. h(f(y))=w, output y; }

slide-26
SLIDE 26

CRHF

slide-27
SLIDE 27

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p

slide-28
SLIDE 28

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p Not known to be possible from OWF/OWP alone

slide-29
SLIDE 29

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p Not known to be possible from OWF/OWP alone “Impossibility” (blackbox-separation) known

slide-30
SLIDE 30

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p Not known to be possible from OWF/OWP alone “Impossibility” (blackbox-separation) known Possible from “claw-free pair of permutations”

slide-31
SLIDE 31

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p Not known to be possible from OWF/OWP alone “Impossibility” (blackbox-separation) known Possible from “claw-free pair of permutations” In turn from hardness of discrete-log, factoring, and from lattice-based assumptions

slide-32
SLIDE 32

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p Not known to be possible from OWF/OWP alone “Impossibility” (blackbox-separation) known Possible from “claw-free pair of permutations” In turn from hardness of discrete-log, factoring, and from lattice-based assumptions Also from “homomorphic one-way permutations”, and from homomorphic encryptions

slide-33
SLIDE 33

CRHF

Collision-Resistant HF: h←H; A(h)→(x,y). h(x)=h(y) w.n.p Not known to be possible from OWF/OWP alone “Impossibility” (blackbox-separation) known Possible from “claw-free pair of permutations” In turn from hardness of discrete-log, factoring, and from lattice-based assumptions Also from “homomorphic one-way permutations”, and from homomorphic encryptions All candidates use mathematical operations that are considered computationally expensive

slide-34
SLIDE 34

CRHF

slide-35
SLIDE 35

CRHF from discrete log assumption:

CRHF

slide-36
SLIDE 36

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime)

CRHF

slide-37
SLIDE 37

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime) hg1,g2(x1,x2) = g1x1g2x2 (in G) where g1, g2 ≠ 1 (hence generators)

CRHF

slide-38
SLIDE 38

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime) hg1,g2(x1,x2) = g1x1g2x2 (in G) where g1, g2 ≠ 1 (hence generators) A collision: (x1,x2) ≠ (y1,y2) s.t. hg1,g2(x1,x2)= hg1,g2(y1,y2)

CRHF

slide-39
SLIDE 39

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime) hg1,g2(x1,x2) = g1x1g2x2 (in G) where g1, g2 ≠ 1 (hence generators) A collision: (x1,x2) ≠ (y1,y2) s.t. hg1,g2(x1,x2)= hg1,g2(y1,y2) Then (x1,x2) ≠ (y1,y2) ⇒ x1≠y1 and x2≠y2 [Why?]

CRHF

slide-40
SLIDE 40

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime) hg1,g2(x1,x2) = g1x1g2x2 (in G) where g1, g2 ≠ 1 (hence generators) A collision: (x1,x2) ≠ (y1,y2) s.t. hg1,g2(x1,x2)= hg1,g2(y1,y2) Then (x1,x2) ≠ (y1,y2) ⇒ x1≠y1 and x2≠y2 [Why?] Then g2 = g1 (x1-y1)/(x2-y2) (exponents in Zq*)

CRHF

slide-41
SLIDE 41

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime) hg1,g2(x1,x2) = g1x1g2x2 (in G) where g1, g2 ≠ 1 (hence generators) A collision: (x1,x2) ≠ (y1,y2) s.t. hg1,g2(x1,x2)= hg1,g2(y1,y2) Then (x1,x2) ≠ (y1,y2) ⇒ x1≠y1 and x2≠y2 [Why?] Then g2 = g1 (x1-y1)/(x2-y2) (exponents in Zq*) i.e., for some base g1, can compute DL of g2 (a random non-unit element). Breaks DL!

CRHF

slide-42
SLIDE 42

CRHF from discrete log assumption: Suppose G a group of prime order q, where DL is considered hard (e.g. QRp* for p=2q+1 a safe prime) hg1,g2(x1,x2) = g1x1g2x2 (in G) where g1, g2 ≠ 1 (hence generators) A collision: (x1,x2) ≠ (y1,y2) s.t. hg1,g2(x1,x2)= hg1,g2(y1,y2) Then (x1,x2) ≠ (y1,y2) ⇒ x1≠y1 and x2≠y2 [Why?] Then g2 = g1 (x1-y1)/(x2-y2) (exponents in Zq*) i.e., for some base g1, can compute DL of g2 (a random non-unit element). Breaks DL! Hash halves the size of the input

CRHF

slide-43
SLIDE 43

Domain Extension

slide-44
SLIDE 44

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value

slide-45
SLIDE 45

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value So far, UOWHF/CRHF which have a fixed domain

slide-46
SLIDE 46

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value So far, UOWHF/CRHF which have a fixed domain Repeated application?

slide-47
SLIDE 47

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value So far, UOWHF/CRHF which have a fixed domain Repeated application? If one-bit compression, to hash n-bit string, O(n) (independent) invocations of the basic hash function

slide-48
SLIDE 48

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value So far, UOWHF/CRHF which have a fixed domain Repeated application? If one-bit compression, to hash n-bit string, O(n) (independent) invocations of the basic hash function

slide-49
SLIDE 49

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value So far, UOWHF/CRHF which have a fixed domain Repeated application? If one-bit compression, to hash n-bit string, O(n) (independent) invocations of the basic hash function n individual hash functions, with different domains

slide-50
SLIDE 50

Domain Extension

Full-domain hash: hash arbitrarily long strings to a single hash value So far, UOWHF/CRHF which have a fixed domain Repeated application? If one-bit compression, to hash n-bit string, O(n) (independent) invocations of the basic hash function n individual hash functions, with different domains

h1 ht-2 ht-1 ht

slide-51
SLIDE 51

Domain Extension

slide-52
SLIDE 52

Can compose hash functions more efficiently, using a “Merkle tree”

Domain Extension

slide-53
SLIDE 53

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3

Domain Extension

slide-54
SLIDE 54

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3

Domain Extension

slide-55
SLIDE 55

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3 If basic hash from {0,1}k to {0,1}k-1, first construct new basic hash from {0,1}k to {0,1}k/2, by repeated hashing

Domain Extension

slide-56
SLIDE 56

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3 If basic hash from {0,1}k to {0,1}k-1, first construct new basic hash from {0,1}k to {0,1}k/2, by repeated hashing

Domain Extension

slide-57
SLIDE 57

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3 If basic hash from {0,1}k to {0,1}k-1, first construct new basic hash from {0,1}k to {0,1}k/2, by repeated hashing Any tree can be used, with consistent I/O sizes

Domain Extension

slide-58
SLIDE 58

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3 If basic hash from {0,1}k to {0,1}k-1, first construct new basic hash from {0,1}k to {0,1}k/2, by repeated hashing Any tree can be used, with consistent I/O sizes Independent hashes or same hash?

Domain Extension

slide-59
SLIDE 59

Can compose hash functions more efficiently, using a “Merkle tree” Suppose basic hash from {0,1}k to {0,1}k/2. A hash function from {0,1}4k to {0,1}k/2 using a tree of depth 3 If basic hash from {0,1}k to {0,1}k-1, first construct new basic hash from {0,1}k to {0,1}k/2, by repeated hashing Any tree can be used, with consistent I/O sizes Independent hashes or same hash? Depends!

Domain Extension

slide-60
SLIDE 60

Domain Extension for CRHF

slide-61
SLIDE 61

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash

Domain Extension for CRHF

slide-62
SLIDE 62

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash

Domain Extension for CRHF

slide-63
SLIDE 63

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-64
SLIDE 64

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-65
SLIDE 65

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-66
SLIDE 66

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-67
SLIDE 67

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-68
SLIDE 68

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-69
SLIDE 69

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-70
SLIDE 70

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-71
SLIDE 71

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-72
SLIDE 72

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top

Domain Extension for CRHF

slide-73
SLIDE 73

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top Collision at some step (different values

  • n ith front, same on i+1st); gives a

collision for basic hash

Domain Extension for CRHF

slide-74
SLIDE 74

For CRHF , same basic hash used through out the Merkle tree. Hash description same as for a single basic hash If a collision ( (x1...xn), (y1...yn) ) over all, then some collision (x’,y’) for basic hash Consider moving a “frontline” from bottom to top Collision at some step (different values

  • n ith front, same on i+1st); gives a

collision for basic hash A *(h): run A(h) to get (x1...xn), (y1...yn). Move frontline to find (x’,y’)

Domain Extension for CRHF

slide-75
SLIDE 75

Domain Extension for UOWHF

slide-76
SLIDE 76

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout!

slide-77
SLIDE 77

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h

slide-78
SLIDE 78

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed!

slide-79
SLIDE 79

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed!

slide-80
SLIDE 80

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed! Solution: a different h for each level of the 
 tree (i.e., no ancestor/successor has same h)

slide-81
SLIDE 81

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed! Solution: a different h for each level of the 
 tree (i.e., no ancestor/successor has same h) To compute x’: Get (x1…xn) from A. Then pick 
 a random node (say at level i), pick hj for 
 levels below i, and compute input to the node; let this be x’.

slide-82
SLIDE 82

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed! Solution: a different h for each level of the 
 tree (i.e., no ancestor/successor has same h) To compute x’: Get (x1…xn) from A. Then pick 
 a random node (say at level i), pick hj for 
 levels below i, and compute input to the node; let this be x’.

h1 h1 h1 h1

slide-83
SLIDE 83

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed! Solution: a different h for each level of the 
 tree (i.e., no ancestor/successor has same h) To compute x’: Get (x1…xn) from A. Then pick 
 a random node (say at level i), pick hj for 
 levels below i, and compute input to the node; let this be x’. On getting h, plug it in as hi, pick hj for remaining levels; give h’ s to A and get (y1…yn); compute y’ and output it.

h1 h1 h1 h1

slide-84
SLIDE 84

Domain Extension for UOWHF

For UOWHF , can’ t use same basic hash throughout! A * has to output an x’ on getting (x1...xn) from A,
 before getting h Can guess a random node (i.e., random pair of
 frontlines) where collision occurs, but if not a
 leaf, can’ t compute x’ until h is fixed! Solution: a different h for each level of the 
 tree (i.e., no ancestor/successor has same h) To compute x’: Get (x1…xn) from A. Then pick 
 a random node (say at level i), pick hj for 
 levels below i, and compute input to the node; let this be x’. On getting h, plug it in as hi, pick hj for remaining levels; give h’ s to A and get (y1…yn); compute y’ and output it.

h3 h2 h2 h1 h1 h1 h1

slide-85
SLIDE 85

UOWHF vs. CRHF

slide-86
SLIDE 86

UOWHF vs. CRHF

UOWHF has a weaker guarantee than CRHF

slide-87
SLIDE 87

UOWHF vs. CRHF

UOWHF has a weaker guarantee than CRHF UOWHF can be built based on OWF (we saw based on OWP), where as CRHF “needs stronger assumptions”

slide-88
SLIDE 88

UOWHF vs. CRHF

UOWHF has a weaker guarantee than CRHF UOWHF can be built based on OWF (we saw based on OWP), where as CRHF “needs stronger assumptions” But “usual” OWF candidates suffice for CRHF too (we saw construction based on discrete-log)

slide-89
SLIDE 89

UOWHF vs. CRHF

UOWHF has a weaker guarantee than CRHF UOWHF can be built based on OWF (we saw based on OWP), where as CRHF “needs stronger assumptions” But “usual” OWF candidates suffice for CRHF too (we saw construction based on discrete-log) Domain extension of CRHF is simpler, with no blow-up in the description size. For UOWHF description increases logarithmically in the input size

slide-90
SLIDE 90

UOWHF vs. CRHF

UOWHF has a weaker guarantee than CRHF UOWHF can be built based on OWF (we saw based on OWP), where as CRHF “needs stronger assumptions” But “usual” OWF candidates suffice for CRHF too (we saw construction based on discrete-log) Domain extension of CRHF is simpler, with no blow-up in the description size. For UOWHF description increases logarithmically in the input size UOWHF theoretically important (based on simpler assumptions, good if paranoid), but CRHF can substitute for it

slide-91
SLIDE 91

UOWHF vs. CRHF

UOWHF has a weaker guarantee than CRHF UOWHF can be built based on OWF (we saw based on OWP), where as CRHF “needs stronger assumptions” But “usual” OWF candidates suffice for CRHF too (we saw construction based on discrete-log) Domain extension of CRHF is simpler, with no blow-up in the description size. For UOWHF description increases logarithmically in the input size UOWHF theoretically important (based on simpler assumptions, good if paranoid), but CRHF can substitute for it Current practice: much less paranoid; faith on efficient, ad hoc (and unkeyed) constructions (though increasingly under attack)

slide-92
SLIDE 92

Hash Functions in Practice

slide-93
SLIDE 93

A single function, not a family (e.g. SHA-3, SHA-256, MD4, MD5)

Hash Functions in Practice

slide-94
SLIDE 94

A single function, not a family (e.g. SHA-3, SHA-256, MD4, MD5) Often from a fixed input-length compression function

Hash Functions in Practice

slide-95
SLIDE 95

A single function, not a family (e.g. SHA-3, SHA-256, MD4, MD5) Often from a fixed input-length compression function Merkle-Damgård iterated hash function:

Hash Functions in Practice

slide-96
SLIDE 96

A single function, not a family (e.g. SHA-3, SHA-256, MD4, MD5) Often from a fixed input-length compression function Merkle-Damgård iterated hash function:

Hash Functions in Practice

m1 m2 mt T

...

f f f f |m| IV

slide-97
SLIDE 97

A single function, not a family (e.g. SHA-3, SHA-256, MD4, MD5) Often from a fixed input-length compression function Merkle-Damgård iterated hash function:

Hash Functions in Practice

C

  • l

l i s i

  • n

r e s i s t a n c e e v e n w i t h v a r i a b l e i n p u t

  • l

e n g t h m1 m2 mt T

...

f f f f |m| IV

slide-98
SLIDE 98

A single function, not a family (e.g. SHA-3, SHA-256, MD4, MD5) Often from a fixed input-length compression function Merkle-Damgård iterated hash function: If f collision resistant (not as “keyed” hash, but “concretely”), then so is the Merkle-Damgård iterated hash-function (for any IV)

Hash Functions in Practice

C

  • l

l i s i

  • n

r e s i s t a n c e e v e n w i t h v a r i a b l e i n p u t

  • l

e n g t h m1 m2 mt T

...

f f f f |m| IV

slide-99
SLIDE 99

MAC

slide-100
SLIDE 100

One-time MAC

With 2-Universal Hash Functions

slide-101
SLIDE 101

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message):

slide-102
SLIDE 102

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n

slide-103
SLIDE 103

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n

r10 r20 r30 r11 r21 r31

slide-104
SLIDE 104

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n

r10 r20 r30 r11 r21 r31

slide-105
SLIDE 105

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n

r10 r20 r30 r11 r21 r31

slide-106
SLIDE 106

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce a signature on m’≠m

r10 r20 r30 r11 r21 r31

slide-107
SLIDE 107

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce a signature on m’≠m A much better solution, using 2-UHF (and no computational assumptions):

r10 r20 r30 r11 r21 r31

slide-108
SLIDE 108

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce a signature on m’≠m A much better solution, using 2-UHF (and no computational assumptions): Onetime-MACh(M) = h(M), where h←H, and H is a 2-UHF

r10 r20 r30 r11 r21 r31

slide-109
SLIDE 109

One-time MAC

With 2-Universal Hash Functions

Trivial (very inefficient) solution (to sign a single n bit message): Key: 2n random strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce a signature on m’≠m A much better solution, using 2-UHF (and no computational assumptions): Onetime-MACh(M) = h(M), where h←H, and H is a 2-UHF Seeing hash of one input gives no information on hash of another value

r10 r20 r30 r11 r21 r31

slide-110
SLIDE 110

MAC

With Combinatorial Hash Functions and PRF

slide-111
SLIDE 111

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages)

slide-112
SLIDE 112

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-113
SLIDE 113

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain Alternate approach (for fixed length domains):

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-114
SLIDE 114

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain Alternate approach (for fixed length domains): MACK,h*(M) = PRFK(h(M)) where h←H, and H a 2-UHF

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-115
SLIDE 115

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain Alternate approach (for fixed length domains): MACK,h*(M) = PRFK(h(M)) where h←H, and H a 2-UHF

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

h(M) not revealed

slide-116
SLIDE 116

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain Alternate approach (for fixed length domains): MACK,h*(M) = PRFK(h(M)) where h←H, and H a 2-UHF A proper MAC must work on inputs of variable length

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

h(M) not revealed

slide-117
SLIDE 117

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain Alternate approach (for fixed length domains): MACK,h*(M) = PRFK(h(M)) where h←H, and H a 2-UHF A proper MAC must work on inputs of variable length Making CBC-MAC variable input-length (can be proven secure): Derive K as FK’(t), where t is the number of blocks Or, Use first block to specify number of blocks Or, output not the last tag T, but FK’(T), where K’ is an independent key (EMAC) Or, XOR last message block with another key K’ (CMAC)

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

h(M) not revealed

slide-118
SLIDE 118

MAC

With Combinatorial Hash Functions and PRF

Recall: PRF is a MAC (on one-block messages) CBC-MAC: Extends to any fixed length domain Alternate approach (for fixed length domains): MACK,h*(M) = PRFK(h(M)) where h←H, and H a 2-UHF A proper MAC must work on inputs of variable length Making CBC-MAC variable input-length (can be proven secure): Derive K as FK’(t), where t is the number of blocks Or, Use first block to specify number of blocks Or, output not the last tag T, but FK’(T), where K’ is an independent key (EMAC) Or, XOR last message block with another key K’ (CMAC) Leave variable input-lengths to the hash?

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

h(M) not revealed

slide-119
SLIDE 119

MAC

With Cryptographic Hash Functions

slide-120
SLIDE 120

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC

slide-121
SLIDE 121

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC What if we are given just a fixed input-length MAC (not PRF)?

slide-122
SLIDE 122

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC What if we are given just a fixed input-length MAC (not PRF)? Why? “No export restrictions!” Also security/ efficiency/legacy

slide-123
SLIDE 123

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC What if we are given just a fixed input-length MAC (not PRF)? Why? “No export restrictions!” Also security/ efficiency/legacy Candidate fixed input-length MACs in practice that do not use a block-cipher: compression functions (with key as IV)

slide-124
SLIDE 124

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC What if we are given just a fixed input-length MAC (not PRF)? Why? “No export restrictions!” Also security/ efficiency/legacy Candidate fixed input-length MACs in practice that do not use a block-cipher: compression functions (with key as IV) MAC*K,h(M) = MACK(h(M)) where h←H, and H a weak-CRHF

slide-125
SLIDE 125

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC What if we are given just a fixed input-length MAC (not PRF)? Why? “No export restrictions!” Also security/ efficiency/legacy Candidate fixed input-length MACs in practice that do not use a block-cipher: compression functions (with key as IV) MAC*K,h(M) = MACK(h(M)) where h←H, and H a weak-CRHF

h(M) may be revealed
 but only

  • racle

access to h

slide-126
SLIDE 126

MAC

With Cryptographic Hash Functions

Previous extension solutions required pseudorandomness of MAC What if we are given just a fixed input-length MAC (not PRF)? Why? “No export restrictions!” Also security/ efficiency/legacy Candidate fixed input-length MACs in practice that do not use a block-cipher: compression functions (with key as IV) MAC*K,h(M) = MACK(h(M)) where h←H, and H a weak-CRHF Weak-CRHFs can be based on OWF . Can be more
 efficiently constructed from fixed input-length MACs.

h(M) may be revealed
 but only

  • racle

access to h

slide-127
SLIDE 127

HMAC

T M

slide-128
SLIDE 128

HMAC

HMAC: Hash-based MAC

T M

slide-129
SLIDE 129

HMAC

HMAC: Hash-based MAC Essentially built from a compression function f

T M m1 mt

...

f f f |m| f K2 K1

slide-130
SLIDE 130

HMAC

HMAC: Hash-based MAC Essentially built from a compression function f If keys K1, K2 independent (called NMAC), then secure MAC if: f is
 a fixed input-length MAC & the Merkle-Damgård iterated-hash is a weak-CRHF

T M m1 mt

...

f f f |m| f K2 K1

slide-131
SLIDE 131

HMAC

HMAC: Hash-based MAC Essentially built from a compression function f If keys K1, K2 independent (called NMAC), then secure MAC if: f is
 a fixed input-length MAC & the Merkle-Damgård iterated-hash is a weak-CRHF In HMAC (K1,K2) derived from (K’,K’’), in turn heuristically derived from a single key K. If f is a (weak kind of) PRF K1, K2 can be considered independent

K’’ f IV T M K’ f IV m1 mt

...

f f f |m| f K2 K1

slide-132
SLIDE 132

Hash Not a Random Oracle!

slide-133
SLIDE 133

Hash Not a Random Oracle!

Hash functions are no substitute for RO, especially if built using iterated-hashing (even if the compression function was to be modeled as an RO)

slide-134
SLIDE 134

Hash Not a Random Oracle!

Hash functions are no substitute for RO, especially if built using iterated-hashing (even if the compression function was to be modeled as an RO) If H is a Random Oracle, then just H(K||M) will be a MAC

slide-135
SLIDE 135

Hash Not a Random Oracle!

Hash functions are no substitute for RO, especially if built using iterated-hashing (even if the compression function was to be modeled as an RO) If H is a Random Oracle, then just H(K||M) will be a MAC But if H is a Merkle-Damgård iterated-hash function, then there is a simple length-extension attack for forgery

slide-136
SLIDE 136

Hash Not a Random Oracle!

Hash functions are no substitute for RO, especially if built using iterated-hashing (even if the compression function was to be modeled as an RO) If H is a Random Oracle, then just H(K||M) will be a MAC But if H is a Merkle-Damgård iterated-hash function, then there is a simple length-extension attack for forgery (That attack can be fixed by preventing extension: prefix-free encoding)

slide-137
SLIDE 137

Hash Not a Random Oracle!

Hash functions are no substitute for RO, especially if built using iterated-hashing (even if the compression function was to be modeled as an RO) If H is a Random Oracle, then just H(K||M) will be a MAC But if H is a Merkle-Damgård iterated-hash function, then there is a simple length-extension attack for forgery (That attack can be fixed by preventing extension: prefix-free encoding) Other suggestions like SHA1(M||K), SHA1(K||M||K) all turned

  • ut to be flawed too
slide-138
SLIDE 138

Today

slide-139
SLIDE 139

Today

A CRHF candidate from DDH

slide-140
SLIDE 140

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees

slide-141
SLIDE 141

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash

slide-142
SLIDE 142

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash Hash functions for MACs

slide-143
SLIDE 143

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash Hash functions for MACs 2-UHF: for domain extension of one-time MAC. Also for MAC from PRF .

slide-144
SLIDE 144

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash Hash functions for MACs 2-UHF: for domain extension of one-time MAC. Also for MAC from PRF . Hash-then-MAC

slide-145
SLIDE 145

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash Hash functions for MACs 2-UHF: for domain extension of one-time MAC. Also for MAC from PRF . Hash-then-MAC Using weak CRHF and fixed input-length MAC

slide-146
SLIDE 146

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash Hash functions for MACs 2-UHF: for domain extension of one-time MAC. Also for MAC from PRF . Hash-then-MAC Using weak CRHF and fixed input-length MAC Underlying HMAC/NMAC: compression function in an iterated-hash function assumed to be both a weak CRHF and a fixed input-length MAC

slide-147
SLIDE 147

Today

A CRHF candidate from DDH CRHF and UOWHF domain extension using Merkle trees Merkle-Damgård iterated hash function for full-domain hash Hash functions for MACs 2-UHF: for domain extension of one-time MAC. Also for MAC from PRF . Hash-then-MAC Using weak CRHF and fixed input-length MAC Underlying HMAC/NMAC: compression function in an iterated-hash function assumed to be both a weak CRHF and a fixed input-length MAC Next: Digital Signatures