35
Computationally Data- Independent Memory Hard Functions MOHAMMAD HASSAN AMERI JEREMIAH BLOCKI SAMSON ZHOU

Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Computationally Data-Independent Memory Hard

Functions

MOHAMMAD HASSAN AMERI

JEREMIAH BLOCKI

SAMSON ZHOU

Page 2: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

MHF is a function that has high cumulative memory complexity (𝑐𝑐) when computed by any (parallel) algorithm

Memory Hard Functions [ABMW05, Percival09]

Time

Memory in Use

𝑐𝑐

Page 3: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

MHF is a function that has high cumulative memory complexity (𝑐𝑐) when computed by any (parallel) algorithm

Amortization: Metric that scales to the memory cost of computing function on 𝑚 inputs [AS15]

Application: Password hashing (want to ensure cost of checking millions/billions of password guesses is prohibitively high for attacker)

Memory Hard Functions [ABMW05, Percival09]

Page 4: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

iMHFs

In a data-independent memory hard functions (iMHFs) 𝑓, the memory access pattern for the evaluation algorithm of the MHF is static (information theoretically independent of the input)

3

2

9

1

4 5,7

6

8

10

memory access pattern

for 𝑓(𝑥)

RAM

Page 5: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

iMHFs

In a data-independent memory hard functions (iMHFs) 𝑓, the memory access pattern for the evaluation algorithm of the MHF is static (information theoretically independent of the input)

3, 3

2, 2

9, 9

1, 1

4, 4 5, 5, 7, 7

6, 6

8, 8

10, 10

same memory access pattern

for 𝑓(𝑦)

RAM

Page 6: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

dMHFs

In a data-dependent memory hard functions (dMHFs) 𝑓, the memory access pattern is dynamic and depends on the input

3

2

9

1

4 5,7

6

8

10

memory access pattern

for 𝑓(𝑥)

RAM

Page 7: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

dMHFs

In a data-dependent memory hard functions (dMHFs) 𝑓, the memory access pattern is dynamic and depends on the input

differentmemory

access pattern for 𝑓(𝑦)

RAM

3 4

2 2

9

9 1

4, 8 5,7

6 3

6

1

8, 5

7

10, 10

Page 8: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

iMHFs vs. dMHFs

iMHFs: Resists side channel attacks, but 𝑐𝑐(𝑓) =

𝑂𝑁2 log log 𝑁

log 𝑁[AB16] (𝑁 is the sequential evaluation

algorithm runtime)

dMHFs : Exist constructions with 𝑐𝑐(𝑓) = Ω 𝑁2

[Percival09, ACP+17], but vulnerable to side channel attacks [Bernstein05]

optimal

Page 9: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

iMHFs vs. dMHFs

iMHFs: Resists side channel attacks, but 𝑐𝑐(𝑓) =

𝑂𝑁2 log log 𝑁

log 𝑁[AB16] (𝑁 is the sequential evaluation

algorithm runtime)

dMHFs : Exist constructions with 𝑐𝑐(𝑓) = Ω 𝑁2

[Percival09, ACP+17], but vulnerable to side channel attacks [Bernstein05]

optimal

Can we design functions 𝑓 with 𝑐𝑐(𝑓) = Ω 𝑁2 AND resist side channel

attacks?

Page 10: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

ciMHFs

Intuition: Attacker cannot distinguish between memory access patterns for inputs 𝑥 and 𝑦

Resists side channel attacksCan we get maximally hard ciMHF constructions?

Naïve approach: ORAM hides memory access patterns but incurs Ω(log𝑁) overhead time, so the new runtime is Ω(𝑁 log𝑁) and

does not achieve effective 𝑐𝑐(𝑓) = Ω 𝑁2

Page 11: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Our Contributions (I)

We construct a family of “𝑘-restricted dynamic graphs” where 𝑘 =𝑜 𝑁𝜖 for any constant 0 < 𝜖 < 1 with 𝑐𝑐(𝑓𝐺,𝐻) = Ω 𝑁2

For each 𝐺 that is “amenable to shuffling”, there exists a computationally data-independent sequential evaluation algorithm computing an MHF based on the graph 𝐺 that runs in time 𝑂 𝑁

There exists a family of ciMHFs 𝐺 with 𝑐𝑐(𝑓𝐺,𝐻) = Ω 𝑁2

Page 12: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Our Contributions (II)

Let 𝐺 be any family of 𝑘-restricted dynamic graphs with constant indegree. Then

𝑐𝑐(𝑓𝐺,𝐻) = 𝑂𝑁2

log log 𝑁+ 𝑁

2−1

2 log log 𝑁 𝑘1−

1

log log 𝑁

Thus for 𝑘 = 𝑜 𝑁1/ log log 𝑁 , we have 𝑐𝑐(𝑓𝐺,𝐻) = 𝑜 𝑁2

Results essentially characterize the spectrum of 𝑘-restricted

dynamic graphs, i.e., 𝑘 = 𝑜 𝑁𝜖 and 𝑘 = 𝑜 𝑁1/ log log 𝑁

Page 13: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Assumption

Evaluation algorithm has (small) data structure that attacker cannot see

E.g., tiered memory architecture, where attacker can see access patterns to RAM but not cache

Page 14: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Memory Hard Functions [ABMW05, Percival09]

ℓ1 ℓ2 ℓ3 ℓ5

ℓ4

pwd

𝑓𝐺,𝐻

hash

ℓ1 = 𝐻(𝑝𝑤𝑑), ℓ2 = 𝐻(ℓ1), ℓ3 = 𝐻 ℓ1, ℓ2 , ℓ4 = 𝐻(ℓ2), ℓ5 = 𝐻 ℓ3, ℓ4

Page 15: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5dMHF

Page 16: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5dMHF

ℓ6

Page 17: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5dMHF

ℓ6 ℓ7

Page 18: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5dMHF

ℓ6 ℓ7 ℓ8

Page 19: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5dMHF

ℓ6 ℓ7 ℓ8 ℓ9

Page 20: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5dMHF

ℓ6 ℓ7 ℓ8 ℓ9 ℓ10

Page 21: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Dynamic and Static Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5iMHF

Page 22: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

𝑘-Restricted Dynamic Graphs

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5

ℓ1 ℓ2 ℓ3 ℓ4 ℓ5

dMHF

iMHF

Page 23: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

Family of 𝑘-restricted dynamic graphs where 𝑘 = 𝑜 𝑁𝜖 for anyconstant 0 < 𝜖 < 1 with 𝑐𝑐(𝑓𝐺,𝐻) = Ω 𝑁2

… 𝑁

Page 24: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

Family of 𝑘-restricted dynamic graphs where 𝑘 = 𝑜 𝑁𝜖 for anyconstant 0 < 𝜖 < 1 with 𝑐𝑐(𝑓𝐺,𝐻) = Ω 𝑁2

… 2𝑁

… 𝑁

Page 25: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

Family of 𝑘-restricted dynamic graphs where 𝑘 = 𝑜 𝑁𝜖 for anyconstant 0 < 𝜖 < 1 with 𝑐𝑐(𝑓𝐺,𝐻) = Ω 𝑁2

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘

Page 26: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

Family of 𝑘-restricted dynamic graphs where 𝑘 = 𝑜 𝑁𝜖 for anyconstant 0 < 𝜖 < 1 with 𝑐𝑐(𝑓𝐺,𝐻) = Ω 𝑁2

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘

Page 27: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘

Page 28: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

Cost is 𝑁 × 𝑁 = Ω(𝑁2)

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘

Page 29: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

Design the graph on nodes 1 to 𝑁 to be very expensive to recompute!

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘

Page 30: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘Grates [Sch83]

Superconcentrators[Pip77,LT82]

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

Design the graph on nodes 1 to 𝑁 to be very expensive to recompute!

Amenable to shuffling

Page 31: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Maximally Hard 𝑘-Restricted Dynamic Graphs

… 2𝑁

…1 2 … 𝑘

Block 1

Block 2

Block 𝑁/𝑘Grates [Sch83]

Superconcentrators[Pip77,LT82]

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

Design the graph on nodes 1 to 𝑁 to be very expensive to recompute!

Amenable to shuffling

ciMHF with

optimal 𝑐𝑐

Page 32: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Attack on 𝑘-Restricted Dynamic Graphs

For 𝑘 = 𝑜 𝑁1/ log log 𝑁 , we have 𝑐𝑐(𝑓𝐺,𝐻) = 𝑜 𝑁2

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

Previously: Design the graph on nodes 1 to 𝑁 to be very expensive to recompute labels??

Attack: always recompute labels because no longer possible to be very expensive for small 𝑘, similar strategy to [AB16]

Page 33: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

For 𝑘 = 𝑜 𝑁1/ log log 𝑁 , we have 𝑐𝑐(𝑓𝐺,𝐻) = 𝑜 𝑁2

To compute labels 𝑁 + 1 to 2𝑁, attacker should either (1) keep labels on nodes 1 to 𝑁 throughout or (2) recompute labels of nodes 1 to 𝑁when necessary

Previously: Design the graph on nodes 1 to 𝑁 to be very expensive to recompute labels??

Attack: always recompute labels because no longer possible to be very expensive for small 𝑘, similar strategy to [AB16]

Attack on 𝑘-Restricted Dynamic Graphs

Valiant’s Lemma [Val77]: Keep labels of a small

number of key locations

Page 34: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Summary

We construct a family of 𝑘-restricted dynamic graphs where 𝑘 = 𝑜 𝑁𝜖 for any constant 0 <𝜖 < 1 with 𝑐𝑐 𝑓𝐺,𝐻 = Ω 𝑁2

and give a ciMHF implementation of 𝑓𝐺,𝐻

We show that 𝑐𝑐(𝑓𝐺,𝐻) =𝑜 𝑁2 for 𝑘 = 𝑜 𝑁1/ log log 𝑁

Page 35: Computationally Data-Independent Memory Hard Functions · 2020. 7. 9. · 1 4 5,7 6 8 10 memory access pattern for 𝑓( ) RAM. iMHFs In a data-independent memory hard functions (iMHFs)

Future Directions

Fully characterize and tighten bounds for the spectrum of 𝑘-restricted dynamic graphs

Optimal ciMHFs without cache hierarchy assumptions

Show pebbling reduction for dMHFs