Reverse Cycle Walking and its Applications Sarah Miracle and Scott - - PowerPoint PPT Presentation

reverse cycle walking and its applications
SMART_READER_LITE
LIVE PREVIEW

Reverse Cycle Walking and its Applications Sarah Miracle and Scott - - PowerPoint PPT Presentation

Reverse Cycle Walking and its Applications Sarah Miracle and Scott Yilek University of St. Thomas Format Preserving Encryption Example: Existing database with millions of US social security numbers 9 digit numbers First 3 digits


slide-1
SLIDE 1

Reverse Cycle Walking and its Applications

Sarah Miracle and Scott Yilek University of St. Thomas

slide-2
SLIDE 2

Format Preserving Encryption

Existing database with millions of US social security numbers

  • 9 digit numbers
  • First 3 digits can’t be 666
  • And more . . .

Example:

slide-3
SLIDE 3

Format Preserving Encryption

Existing database with millions of US social security numbers

  • 9 digit numbers
  • First 3 digits can’t be 666
  • And more . . .

Example:

How to add encryption?

slide-4
SLIDE 4

Format Preserving Encryption

Existing database with millions of US social security numbers Example: How to add encryption?

slide-5
SLIDE 5

Format Preserving Encryption

Existing database with millions of US social security numbers Example:

  • Represent SSN as 30-bit numbers
  • Pad with zeros
  • Encrypt using a standard block cipher

(e.g. AES) How to add encryption?

slide-6
SLIDE 6

Format Preserving Encryption

Existing database with millions of US social security numbers Example:

  • Represent SSN as 30-bit numbers
  • Pad with zeros
  • Encrypt using a standard block cipher

(e.g. AES) How to add encryption? Encrypted numbers have a significantly different format!

slide-7
SLIDE 7

Format Preserving Encryption

Format Preserve Encryption schemes: Encryption schemes in which ciphertexts have the same format as plaintexts.

Name SSN Alan Johnson 845-10-3814 Brianna Smith 143-66-9875 Catherine Jones 333-79-0123 Douglas Wilson 593-58-2057 Encrypted SSN 942-54-3210 771-98-1094 574-30-9214 889-01-4884 ???

slide-8
SLIDE 8

Talk Outline

  • Background and Previous Work
  • Our Algorithm
  • Proof Outline
slide-9
SLIDE 9

Background

slide-10
SLIDE 10

Background

  • Small-domain block ciphers for bitstrings or integers up to N
slide-11
SLIDE 11

Background

  • Small-domain block ciphers for bitstrings or integers up to N

[Hoang, Morris, Rogaway ’12], [Ristenpart, Yilek ‘13], [Morris,Rogaway ’14] . . . .

slide-12
SLIDE 12

Background

  • Small-domain block ciphers for bitstrings or integers up to N

[Hoang, Morris, Rogaway ’12], [Ristenpart, Yilek ‘13], [Morris,Rogaway ’14] . . . .

  • If the target set S has an efficient way to rank/unrank then

you can use a cipher on {0,…., |S| - 1}

slide-13
SLIDE 13

Background

  • Small-domain block ciphers for bitstrings or integers up to N

[Hoang, Morris, Rogaway ’12], [Ristenpart, Yilek ‘13], [Morris,Rogaway ’14] . . . .

  • If the target set S has an efficient way to rank/unrank then

you can use a cipher on {0,…., |S| - 1}

We’ll only assume we can test membership in our target domain set S

slide-14
SLIDE 14

General Approach

  • 1. Find a cipher on a larger set T
  • 2. Transform it to a cipher on a smaller set S
  • Let T be the set of 30-bit strings (109 < 230)
  • There are many block ciphers to encipher 30-bit

strings Example: Social Security Numbers

slide-15
SLIDE 15

Cycle Walking

  • 1. Find a cipher on a larger set T
  • 2. Transform it to a cipher on a smaller set S
slide-16
SLIDE 16

Cycle Walking

  • 1. Find a cipher on a larger set T
  • 2. Transform it to a cipher on a smaller set S

Algorithm CWπ(x): do x π(x) while(x S) return x

slide-17
SLIDE 17

Cycle Walking - Example

T = {0,...,9} S = {0,2,4,6,8} Algorithm CWπ(x): do x π(x) while(x S) return x ∉

(9 4 6 5 1 0) (3 2 7 8) (9 4 6 5 1 0) (3 2 7 8) (4 6 0) (2 8)

Permutation on T Permutation on S

Consider the cycle structure:

slide-18
SLIDE 18

Running Time of Cycle Walking

Formally analyzed by Black and Rogaway [CT-RSA 2002]

slide-19
SLIDE 19

Running Time of Cycle Walking

  • Small expected running time – O(1)

(assuming |S| is a constant fraction of |T|)

Formally analyzed by Black and Rogaway [CT-RSA 2002]

slide-20
SLIDE 20

Running Time of Cycle Walking

  • Small expected running time – O(1)

(assuming |S| is a constant fraction of |T|)

  • Worst case running time of Θ(|T|)

Formally analyzed by Black and Rogaway [CT-RSA 2002]

slide-21
SLIDE 21

Running Time of Cycle Walking

  • Small expected running time – O(1)

(assuming |S| is a constant fraction of |T|)

  • Worst case running time of Θ(|T|)
  • Different run times can leak timing information
  • If the adversary has access to ciphertexts, # cycle-

walking steps then not damaging [Bellare, Ristenpart, Rogaway, Stegers ‘09]

  • In general?

Formally analyzed by Black and Rogaway [CT-RSA 2002]

slide-22
SLIDE 22

Running Time of Cycle Walking

  • Small expected running time – O(1)

(assuming |S| is a constant fraction of |T|)

  • Worst case running time of Θ(|T|)
  • Different run times can leak timing information
  • If the adversary has access to ciphertexts, # cycle-

walking steps then not damaging [Bellare, Ristenpart, Rogaway, Stegers ‘09]

  • In general?

Formally analyzed by Black and Rogaway [CT-RSA 2002] Can we do better?

slide-23
SLIDE 23

Talk Outline

  • Background and Previous Work
  • Our Algorithm – an alternative to cycle walking
  • Proof Outline
slide-24
SLIDE 24

First Approach

T = {0,...,9} S = {0,2,4,6,8} (4 1 3 5 7 0 2 9 6 8)

Permutation on T

Consider the cycle structure:

slide-25
SLIDE 25

First Approach

T = {0,...,9} S = {0,2,4,6,8} (4 1 3 5 7 0 2 9 6 8)

Permutation on T

Consider the cycle structure: Idea: Cut-off Cycle Walking Early

slide-26
SLIDE 26

Reverse Cycle Walking

T = {0,...,9} S = {0,2,4,6,8} Consider the cycle structure: Our Algorithm: Walk backward (4 1 3 5 7 0 2 9 6 8) (4 1 3 5 7 0 2 9 6 8) (6 8 4) (0 2)

slide-27
SLIDE 27

Reverse Cycle Walking

T = {0,...,9} S = {0,2,4,6,8} Consider the cycle structure: Our Algorithm: Walk backward (4 1 3 5 7 0 2 9 6 8) (4 1 3 5 7 0 2 9 6 8) (6 8 4) (0 2) + only consider 2-cycles (4) (8) (6) (0 2)

slide-28
SLIDE 28

Another Example

T = {0,...,9} S = {0,2,4,6,8}

(9 4 6 5 1 0) (3 2 7 8) (9 4 6 5 1 0) (3 2 7 8) (4 6) (0) (2) (8)

Permutation on T Permutation on S

Consider the cycle structure:

slide-29
SLIDE 29

Algorithm RCWπ,B(x): y π(x); z π-1(x) if y S and z S and π(y) S: b B(x) if b = 1 return y else return x else if y S and z S and π-1(z) S: b B(z) if b = 1 return z else return x else return x

Reverse Cycle Walking

∉ ∉ ∉ ∈ ∈

slide-30
SLIDE 30

Running Time of RCW

slide-31
SLIDE 31

Running Time of RCW

  • 1 Step of RCW takes O(1) time
slide-32
SLIDE 32

Running Time of RCW

  • 1 Step of RCW takes O(1) time
  • But, even if π is random, RCWπ is NOT random
slide-33
SLIDE 33

Running Time of RCW

  • 1 Step of RCW takes O(1) time
  • But, even if π is random, RCWπ is NOT random

How many rounds of RCW are needed before the resulting permutation on S is close to random?

slide-34
SLIDE 34

Running Time of RCW

  • 1 Step of RCW takes O(1) time
  • But, even if π is random, RCWπ is NOT random

How many rounds of RCW are needed before the resulting permutation on S is close to random? This is a Markov chain!

slide-35
SLIDE 35

Running Time of RCW

  • 1 Step of RCW takes O(1) time
  • But, even if π is random, RCWπ is NOT random

How many rounds of RCW are needed before the resulting permutation on S is close to random? This is a Markov chain! Answer: O(log |T|)

slide-36
SLIDE 36

Advantages of RCW

slide-37
SLIDE 37

Advantages of RCW

  • Lower worst case running time - O(n)

n) to O( O(log n n)

slide-38
SLIDE 38

Advantages of RCW

  • Lower worst case running time - O(n)

n) to O(log n) n)

  • No leaked timing information
slide-39
SLIDE 39

Advantages of RCW

  • Lower worst case running time - O(n)

n) to O(log n) n)

  • No leaked timing information
  • Can trade-off security and running time
slide-40
SLIDE 40

Advantages of RCW

  • Lower worst case running time - O(n)

n) to O(log n) n)

  • No leaked timing information
  • Can trade-off security and running time
  • Increases the level of security
slide-41
SLIDE 41

Advantages of RCW

  • Lower worst case running time - O(n)

n) to O(log n) n)

  • No leaked timing information
  • Can trade-off security and running time
  • Increases the level of security

NOT fully secure cipher on larger set T Fully secure cipher on smaller set S!

Reverse 2-Cycle Walking under certain circumstances . . .

slide-42
SLIDE 42

Talk Outline

  • Background and Previous Work
  • Reverse Cycle Walking
  • Proof Outline – analyzing the mixing time of RCW
slide-43
SLIDE 43

Definition: The total variation distance is || Pt, π || = max ½ ∑ |Pt(x,y) – π(y)|. Definition: Given ε, the mixing time is τ(ε) = min {t: ||Pt’,π|| < ε, t’ ≥ t}.

A

Mixing Time

x Ω

y Ω

slide-44
SLIDE 44

Bounding the Mixing Time of RCW

slide-45
SLIDE 45

Bounding the Mixing Time of RCW

  • 1. Show that RCW yields a “matching exchange

process”

slide-46
SLIDE 46

Bounding the Mixing Time of RCW

  • 1. Show that RCW yields a “matching exchange

process”

  • 2. Defined and analyzed by Czumaj and Kutylowski

[RSA ’00]

slide-47
SLIDE 47

Bounding the Mixing Time of RCW

  • 1. Show that RCW yields a “matching exchange

process”

  • 2. Defined and analyzed by Czumaj and Kutylowski

[RSA ’00]

  • 3. Use same techniques but . . .
  • Give explicit constants for RCW algorithm
  • Reprove several key lemmas
slide-48
SLIDE 48

Matching Exchange Process

Matching Exchange:

Repeat:

  • 1. Choose a number κ according to some distribution.
  • 2. Pick a matching M of size κ uniformly at random
  • 3. For each pair in the matching,
  • transpose the two points with prob. ½
  • otherwise, do nothing
slide-49
SLIDE 49

Matching Exchange Process

Matching Exchange:

Repeat:

  • 1. Choose a number κ according to some distribution.
  • 2. Pick a matching M of size κ uniformly at random
  • 3. For each pair in the matching,
  • transpose the two points with prob. ½
  • otherwise, do nothing

Theorem [Czumaj, Kutylowski]: If E(κ) is Θ(n) then a matching exchange process mixes in time O(log n).

slide-50
SLIDE 50

Path Coupling Approach

[Bubley,Dyer,Greenhill’97-8]

slide-51
SLIDE 51

Path Coupling Approach

  • Consider 2 configurations that differ by a single

transposition (u,v)

[Bubley,Dyer,Greenhill’97-8]

slide-52
SLIDE 52

Path Coupling Approach

  • Consider 2 configurations that differ by a single

transposition (u,v)

  • If the first matching contains the pair (u,v) then we

can couple the processes after a single step

[Bubley,Dyer,Greenhill’97-8]

slide-53
SLIDE 53

Path Coupling Approach

  • Consider 2 configurations that differ by a single

transposition (u,v)

  • If the first matching contains the pair (u,v) then we

can couple the processes after a single step

  • But, this only happens with probably O(1/n)

[Bubley,Dyer,Greenhill’97-8]

slide-54
SLIDE 54

Path Coupling Approach

  • Consider 2 configurations that differ by a single

transposition (u,v)

  • If the first matching contains the pair (u,v) then we

can couple the processes after a single step

  • But, this only happens with probably O(1/n)

O(n log n)

[Bubley,Dyer,Greenhill’97-8]

slide-55
SLIDE 55

Analyzing a Matching Exchange

slide-56
SLIDE 56

High-level Approach:

Analyzing a Matching Exchange

slide-57
SLIDE 57

High-level Approach:

  • Look at what happens over O(log(n)) steps.

Delayed Path Coupling [Czumaj, et al.]

Analyzing a Matching Exchange

slide-58
SLIDE 58

High-level Approach:

  • Look at what happens over O(log(n)) steps.

Delayed Path Coupling [Czumaj, et al.]

  • Use a non-Markovian coupling

Analyzing a Matching Exchange

slide-59
SLIDE 59

High-level Approach:

  • Look at what happens over O(log(n)) steps.

Delayed Path Coupling [Czumaj, et al.]

  • Use a non-Markovian coupling
  • Let M1 . . . Mt be the matchings for process X and

N1 . . . Nt be the matchings for process Y.

Analyzing a Matching Exchange

slide-60
SLIDE 60

High-level Approach:

  • Look at what happens over O(log(n)) steps.

Delayed Path Coupling [Czumaj, et al.]

  • Use a non-Markovian coupling
  • Let M1 . . . Mt be the matchings for process X and

N1 . . . Nt be the matchings for process Y.

  • Choose M1 . . . Mt randomly – according to the alg.

Analyzing a Matching Exchange

slide-61
SLIDE 61

Key Idea

slide-62
SLIDE 62

Key Idea

  • Assume X0 and Y0 differ by a (u,v) transposition
slide-63
SLIDE 63

Key Idea

  • Assume X0 and Y0 differ by a (u,v) transposition
  • Assume M1 contains (u,z) and (v,w)
  • If you let N1 = M1 then X1 and Y1 differ by a (z,w) trans.
  • If you let N1 = M1 – (u,z) – (v,w) + (u,w) + (v,z) then X1 and

Y1 differ by a (u,v) trans.

slide-64
SLIDE 64

Key Idea

  • Assume X0 and Y0 differ by a (u,v) transposition
  • Assume M1 contains (u,z) and (v,w)
  • If you let N1 = M1 then X1 and Y1 differ by a (z,w) trans.
  • If you let N1 = M1 – (u,z) – (v,w) + (u,w) + (v,z) then X1 and

Y1 differ by a (u,v) trans.

  • If M2 contains (u,v) OR (z,w) then can choose N2 so

that Δ(X1, Y1) = 0 .

slide-65
SLIDE 65

Key Idea

  • Assume X0 and Y0 differ by a (u,v) transposition
  • Assume M1 contains (u,z) and (v,w)
  • If you let N1 = M1 then X1 and Y1 differ by a (z,w) trans.
  • If you let N1 = M1 – (u,z) – (v,w) + (u,w) + (v,z) then X1 and

Y1 differ by a (u,v) trans.

  • If M2 contains (u,v) OR (z,w) then can choose N2 so

that Δ(X1, Y1) = 0 . Call (u,v) and (z,w) “good pairs”.

slide-66
SLIDE 66

Key Lemmas

slide-67
SLIDE 67

Key Lemmas

  • 1. Show that after Θ(log n) steps with high

probability, the number of good pairs is Θ(n)

slide-68
SLIDE 68

Key Lemmas

  • 1. Show that after Θ(log n) steps with high

probability, the number of good pairs is Θ(n)

  • 2. Show that with high probability, one of the next

Θ(log n) matchings contains a good pair

slide-69
SLIDE 69

Future Directions

slide-70
SLIDE 70

Future Directions

  • Improve the constants further
slide-71
SLIDE 71

Future Directions

  • Improve the constants further
  • Remove the bit flip
slide-72
SLIDE 72

Future Directions

  • Improve the constants further
  • Remove the bit flip
  • Design an alternative algorithm

Expected O(1) running time of cycle walking is very attractive

slide-73
SLIDE 73

Questions?