security/efficiency tradeoffs for permutation-based hashing

46
Security/Efficiency Tradeoffs for Permutation-Based Hashing Security/Efficiency Tradeoffs for Permutation-Based Hashing Phillip Rogaway, John P. Steinberger April 14, 2008 Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Upload: others

Post on 03-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs forPermutation-Based Hashing

Phillip Rogaway, John P. Steinberger

April 14, 2008

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 2: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Motivation

Most hash functions are built from blockciphers (SHA-1,MD4, MD5, MDC-2, ...)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 3: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Motivation

Most hash functions are built from blockciphers (SHA-1,MD4, MD5, MDC-2, ...)

Keying costs

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 4: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Motivation

Most hash functions are built from blockciphers (SHA-1,MD4, MD5, MDC-2, ...)

Keying costs

Use fixed keys → random permutations

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 5: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Motivation

Most hash functions are built from blockciphers (SHA-1,MD4, MD5, MDC-2, ...)

Keying costs

Use fixed keys → random permutations

Advantages: speed + minimalism + assurance

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 6: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Difficulties

Permutations afford no compression

π

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 7: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Difficulties

Permutations afford no compression

π

Black-Cochran-Shrimpton ’05: No rate-1 iterated constructionmaking a single call to a permutation can be secure

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 8: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Difficulties

Permutations afford no compression

π

Black-Cochran-Shrimpton ’05: No rate-1 iterated constructionmaking a single call to a permutation can be secure

Large number of permutations necessary to achieve reasonablerate of security

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 9: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Prior Constructions

Govaerts-Preneel-Vandewalle ’93: variety ofpermutation-based constructions of rates 1/4–1/8; no securityproofs

Shrimpton-Stam ’07: A 2n-to-n bit compression functionusing 3 calls to a random function, of collision security 2n/2

Bertoni-Daemens-Peeters-Assche ’07: sponge construction

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 10: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Our results

A “good” 2n-to-n bit compression function needs 3permutations to get collision security 2n/2

A good 3n-to-2n bit compression function needs 5permutations to get collision security above 2n/2

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 11: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Our results

A “good” 2n-to-n bit compression function needs 3permutations to get collision security 2n/2

A good 3n-to-2n bit compression function needs 5permutations to get collision security above 2n/2

A good mn-to-rn bit compression function making k calls to arandom permutation has collision security at most

∼ 2n(1−(m−0.5r)/k)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 12: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Our results

A “good” 2n-to-n bit compression function needs 3permutations to get collision security 2n/2

A good 3n-to-2n bit compression function needs 5permutations to get collision security above 2n/2

A good mn-to-rn bit compression function making k calls to arandom permutation has collision security at most

∼ 2n(1−(m−0.5r)/k)

A permutation-based rate α hash function has collision andpreimage security at most ∼ 2n(1−α)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 13: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Model

f1mn

vn

π1

f2

n

y1

v

π2

f3y2

y1

v

π3

g

y3

y1

y2

v

rnw

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 14: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Model

f1mn

vn

π1

f2

n

y1

v

π2

f3y2

y1

v

π3

g

y3

y1

y2

v

rnw

Distinct-permutation setting: πi ’s are all different

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 15: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Model

f1mn

vn

π1

f2

n

y1

v

π2

f3y2

y1

v

π3

g

y3

y1

y2

v

rnw

Distinct-permutation setting: πi ’s are all different

Single-permutation setting: π1 = π2 = π3

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 16: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Model

f1mn

vn

π1

f2

n

y1

v

π2

f3y2

y1

v

π3

g

y3

y1

y2

v

rnw

Distinct-permutation setting: πi ’s are all different

Single-permutation setting: π1 = π2 = π3

Order of permutations is fixed

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 17: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Have q queries to make.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 18: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Have q queries to make.Make queries greedily to hashmaximum number of inputs.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 19: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Have q queries to make.Make queries greedily to hashmaximum number of inputs.

Make p =qk queries to each permutation.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 20: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Have q queries to make.Make queries greedily to hashmaximum number of inputs.

Make p =qk queries to each permutation.

Choose p queries to start hashingmaximum number of inputs.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 21: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Choose p queries to start hashingmaximum number of inputs. Can average

V2n

inputs per query.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 22: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Choose p queries to start hashingmaximum number of inputs. Can average

V2n

inputs per query.

Get pV2n inputs we can start hashing.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 23: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Get pV2n inputs we can start hashing.

Choose best p queries again.

Can average Vp2n

12n inputs per query.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 24: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Choose best p queries again.

Can average Vp2n

12n inputs per query.

Can continue hashing V(

p2n

)2inputs.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 25: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Sufficient that V(

p2n

)k> #outputs

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 26: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole Attack

f1V

inputs

π1

f2π2

f3

π3

g

Sufficient that V(

p2n

)k> #outputs

Solving, get q = k2n(1−(m−r)/k)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 27: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Theorem

Let H : {0, 1}mn → {0, 1}rn be a k-call permutation-basedcompression function. Then with

q = k2n(1−(m−r)/k) + k

queries an adversary can find a collision in H.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 28: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole-Birthday Attack

f1V

inputs

π1

f2π2

f3

π3

g

If outputs are random, sufficient that V(

p2n

)k> (#outputs)

12

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 29: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

The Pigeonhole-Birthday Attack

f1V

inputs

π1

f2π2

f3

π3

g

If outputs are random, sufficient that V(

p2n

)k> (#outputs)

12

Solving, get q = k2n(1−(m−0.5r)/k)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 30: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Uniformity assumption:

The outputs produced by the pigeonhole-birthday attack behaverandomly with respect to collisions.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 31: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Uniformity assumption:

The outputs produced by the pigeonhole-birthday attack behaverandomly with respect to collisions.

Theorem

Let H : {0, 1}mn → {0, 1}rn be a k-call permutation-basedcompression function. Then, under the uniformity assumption,

q ≈ k2n(1−(m−0.5r)/k)

queries suffice to find a collision with probability 1/2.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 32: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Uniformity assumption:

The outputs produced by the pigeonhole-birthday attack behaverandomly with respect to collisions.

Theorem

Let H : {0, 1}mn → {0, 1}rn be a k-call permutation-basedcompression function. Then, under the uniformity assumption,

q ≈ k2n(1−(m−0.5r)/k)

queries suffice to find a collision with probability 1/2.

Sufficient condition for uniformity assumption:

When an adversary learns the output values for K inputs, theexpected number of collisions is ∼ K 2/(#outputs).

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 33: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Attacking a Rate α Hash Function

m/α permutations πkbbπ1 π2 π3 b b b

︷ ︸︸ ︷

m blocks of input

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 34: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Attacking a Rate α Hash Function

m/α permutations πkbbπ1 π2 π3 b b b

︷ ︸︸ ︷

m blocks of input

Pigeonhole attack: q = k2n(1−(m−r)/k) = (m/α)2n(1−α+αr/m)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 35: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Attacking a Rate α Hash Function

m/α permutations πkbbπ1 π2 π3 b b b

︷ ︸︸ ︷

m blocks of input

Pigeonhole attack: q = k2n(1−(m−r)/k) = (m/α)2n(1−α+αr/m)

Optimize for m → q ≈ nr2n(1−α)

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 36: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Theorem

Let H : {0, 1}∗ → {0, 1}rn be a permutation-based hash functionwith rate α = 1/β. Then with

q = ⌊β⌈ln(2)αnr + α⌉⌋(e2n(1−α) + 1) ≈ 1.89nr2n(1−α)

queries an adversary can find a collision in H.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 37: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Preimage Resistance

The pigeonhole attack yields the hash of more inputs thanthere are outputs, which suggests a preimage attack

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 38: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Preimage Resistance

The pigeonhole attack yields the hash of more inputs thanthere are outputs, which suggests a preimage attack

But...b

n

πn

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 39: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Preimage Resistance

The pigeonhole attack yields the hash of more inputs thanthere are outputs, which suggests a preimage attack

But...b

n

πn

Uniformity assumption for preimage resistance (UAPR)

When an adversary learns the output values for K inputs, thechance of finding any particular output is ∼ K/(#outputs).

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 40: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Theorem

Let H : {0, 1}mn → {0, 1}rn be a k-call permutation-basedcompression function. Then, if H obeys the UAPR, with

q ≈ k2n(1−(m−r)/k)

queries an adversary can find a preimage in H with probability 1/2.

Theorem

Let H : {0, 1}∗ → {0, 1}rn be a permutation-based hash functionwith rate α. Then, if H obeys the UAPR, with

q ≈ 1.89nr2n(1−α)

queries an adversary can find a preimage in H with probability 1/2.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 41: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

“Too-Few-Wires Attack”

An mn-bit to rn-bit compression function wich keeps at mostmn bits in memory at all times is insecure.

f1

π1

f2

π2

f3

π3

f4

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 42: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Recent Progress on Constructions

Have had good progress constructing compression functionsthat meet the bound of the pigeonhole-birthday attack

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 43: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Recent Progress on Constructions

Have had good progress constructing compression functionsthat meet the bound of the pigeonhole-birthday attack

A 2n-bit to n-bit compression function using 3 calls to arandom permutation, of collision resistance 2n/2 and preimageresistance 22n/3.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 44: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Recent Progress on Constructions

Have had good progress constructing compression functionsthat meet the bound of the pigeonhole-birthday attack

A 2n-bit to n-bit compression function using 3 calls to arandom permutation, of collision resistance 2n/2 and preimageresistance 22n/3.

A 3n-bit to 2n-bit compression function using 5 calls to arandom permutation, of collision resistance 20.54n andpreimage resistance 20.8n.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 45: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Recent Progress on Constructions

Have had good progress constructing compression functionsthat meet the bound of the pigeonhole-birthday attack

A 2n-bit to n-bit compression function using 3 calls to arandom permutation, of collision resistance 2n/2 and preimageresistance 22n/3.

A 3n-bit to 2n-bit compression function using 5 calls to arandom permutation, of collision resistance 20.54n andpreimage resistance 20.8n.

A 3n-bit to 2n-bit compression function using 6 calls to arandom permutation, of collision resistance 20.6n andpreimage resistance 20.8n.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing

Page 46: Security/Efficiency Tradeoffs for Permutation-Based Hashing

Security/Efficiency Tradeoffs for Permutation-Based Hashing

Recent Progress on Constructions

Have had good progress constructing compression functionsthat meet the bound of the pigeonhole-birthday attack

A 2n-bit to n-bit compression function using 3 calls to arandom permutation, of collision resistance 2n/2 and preimageresistance 22n/3.

A 3n-bit to 2n-bit compression function using 5 calls to arandom permutation, of collision resistance 20.54n andpreimage resistance 20.8n.

A 3n-bit to 2n-bit compression function using 6 calls to arandom permutation, of collision resistance 20.6n andpreimage resistance 20.8n.

The Shrimpton-Stam construction can be implemented withfeed-forward random permutations and maintain collisionresistance of 2n/2.

Phillip Rogaway, John P. Steinberger Security/Efficiency Tradeoffs for Permutation-Based Hashing