An enciphering scheme based on a card shuffle Ben Morris - - PowerPoint PPT Presentation

an enciphering scheme based on a card shuffle
SMART_READER_LITE
LIVE PREVIEW

An enciphering scheme based on a card shuffle Ben Morris - - PowerPoint PPT Presentation

An enciphering scheme based on a card shuffle Ben Morris Mathematics, UC Davis Joint work with Viet Tung Hoang (Computer Science, UC Davis) and Phil Rogaway (Computer Science, UC Davis). Setting Blockcipher construction pseudorandom function


slide-1
SLIDE 1

An enciphering scheme based

  • n a card shuffle

Ben Morris Mathematics, UC Davis Joint work with Viet Tung Hoang (Computer Science, UC Davis) and Phil Rogaway (Computer Science, UC Davis).

slide-2
SLIDE 2

Setting

Blockcipher construction pseudorandom function − → pseudorandom permutation Most current methods rely on either: Feistel networks, or SP networks New method: Swap-or-not shuffle. Stronger provable-security results.

slide-3
SLIDE 3

Contribution: Swap-or-not

◮ A new method to construct a blockcipher ◮ A proof that it works, and with much better bounds than with

Feistel

slide-4
SLIDE 4

Security of Swap-or-not : Numerical Examples

Domain size # rounds AdvCCA # queries 64-bit strings 264 1200 < 10−10 263 social security numbers 109 340 < 10−10 108 credit card numbers 1016 500 < 10−10 1015

slide-5
SLIDE 5

Flexible domain

Our cipher works directly on nonbinary domains such as credit card numbers and social security numbers.

slide-6
SLIDE 6

The Problem

PRF − → PRP Luby, Rackoff 88 Patarin 90, 03, 10 Maurer 92 Maurer, Pietrzak 03 M, Rogaway, Stegers 09

slide-7
SLIDE 7

Proven upper bounds for enciphering n-bit strings:

method # rounds # queries Balanced Feistel 3 q ≈ 2n/4 Luby, Rackoff r q ≈ 2n/2−1/r Maurer, Pietrzak 6 q ≈ 2n/2 Patarin Thorp shuffle O(n) q ≈ 2(1−ǫ)n M, Rogaway, Stegers Swap-or-not O(n) q ≈ (1 − ǫ)2n today’s talk

slide-8
SLIDE 8

Format-preserving Encryption

Finite set M of messages. Eg M = {social security numbers} M = {credit card numbers} Want PRP π : M → M. It’s not clear how to do this using AES.

slide-9
SLIDE 9

Format-preserving Encryption

Bounds on balanced Feistel give security up to roughly

  • |M|

queries.

  • Problem. M = {social security numbers}

|M| = 109

  • |M| ≈ 32, 000

not too big Swap-or-not provides a practical solution to FPE on domains of troublesome size.

slide-10
SLIDE 10

Enciphering scheme ← → Card shuffle

000 001 010 011 100 101 110 111 000 001 010 011 100 101 110 111 messages encodings Oblivious shuffle (Naor): you can follow the trajectory of one card without attending to the others.

slide-11
SLIDE 11

Swap-or-not shuffle

000 001 010 011 100 101 110 111 At step t, choose Kt uniformly at random from {0, 1}n. Pair each x with Kt ⊕ x. For each pair, flip a coin. If the coin lands heads, swap the cards at those locations.

slide-12
SLIDE 12

Swap-or-not shuffle

000 001 010 011 100 101 110 111 Kt induces a random matching. (Pictured is the case Kt = 100.) At step t, choose Kt uniformly at random from {0, 1}n. Pair each x with Kt ⊕ x. For each pair, flip a coin. If the coin lands heads, swap the cards at those locations.

slide-13
SLIDE 13

Alternative view

function EKF (x) //swap-or-not for t ← 1 to r do

  • x ← max(x, Kt ⊕ x)

b ← Ft( x) if b = 1 then x ← Kt ⊕ x return x Cipher E encrypts x ∈ {0, 1}n using a key KF naming K1, . . . , Kr ∈ {0, 1}n and round functions F1, . . . , Fr : {0, 1}n → {0, 1}. Decryption: same, except run from r down to 1. Why this works: Each round is its own inverse. To reverse the effect of the final round, run it again. Then run the next-to-last round, and so on.

slide-14
SLIDE 14

Alternative view

Note that π(x) is of the form x ⊕

i∈Sx Ki.

But this is not linear. Sx is adaptively constructed.

slide-15
SLIDE 15

Quantifying the advantage of an adversary

Random permutation π. Adversary A queries π and π−1, then outputs a bit b. His advantage is P(b = 1) − Pu(b = 1). Advcca(q) = maximum advantage when A is limited to q queries Advncpa(q) = maximum advantage when A is limited to q nonadaptive queries of π

Theorem (Maurer, Pietrzak, Renner 2007)

If F and G are blockciphers on the same message space, then, for any q, Advcca

F◦G−1(q) ≤ Advncpa F

(q) + Advncpa

G

(q).

slide-16
SLIDE 16

Quantitative bound

Theorem

For r rounds of swap-or-not on {0, 1}n, Advcca(q) ≤ 22+3n/2 r + 4 q + 2n 2n+1 r/4+1 . If q ≤ (1 − ǫ)2n then the advantage is small after O(n) rounds.

slide-17
SLIDE 17

FE-4 FE-6 TH-8 TH-20 SN-8 SN-20

lg (q)

CCA Advantage (UB)

Feistel, Thorp, Swap-or-Not

  • n M = {0,1}64
slide-18
SLIDE 18

Proof sketch

By MPR07, we may assume a non-adaptive adversary who queries

  • nly π. For simplicity, suppose the queries are π(0), . . . , π(q − 1).

Game: Do r swap-or-not shuffles. Now turn over the cards labeled 0, 1, 2, . . . (reveal π(0), π(1), . . . ). Before each step, the adversary pays $1. If he guesses the next card’s location correctly, he wins $k if k cards were face down. Claim: If expected net winnings ≈ 0, then the adversary has small advantage.

slide-19
SLIDE 19

It remains to show that the expected winnings are small. This is true even if when we turn over a card we reveal its whole trajectory!

slide-20
SLIDE 20

1 2 1 2 1 2 1 2 1 2

slide-21
SLIDE 21

E(net winnings) Uncovered cards 1 2 4 −1 −1 −1 −1 −1 −1 3/2 −1 1 2 3/2

slide-22
SLIDE 22

Let wi(t) be the expected net winnings if the adversary guesses i. Note: the adversary can expect to win maxi wi(t). Let W(t) =

i wi(t)2.

Claim: If q ≤ (1 − ǫ)2n then E (W(t + 1)) ≤ (1 − ǫ/2)E(W(t)).

slide-23
SLIDE 23

Say an covered card is good if it is matched to another covered card. Not good: wi wi

slide-24
SLIDE 24

Good: wj wi w w w2 + w2 = 1

2(w2 i + w2 j) + wiwj

cross terms are 0 on the average

slide-25
SLIDE 25

Recall that W(t) =

i wi(t)2.

Good cards are expected to contribute 1

2w2 i (t) to W(t + 1).

Not good cards contribute w2

i (t) to W(t + 1). It follows that

E (W(t + 1) | Wt) = P(good) 1

2W(t) + P(not good)W(t)

=

  • 1 − 1

2P(good)

  • W(t)

≤ (1 − ǫ/2)W(t), since P(good) ≥ ǫ.

slide-26
SLIDE 26

Using swap-or-not to make confusion/diffusion ciphers

Example: Specify Ft by an n-bit string Lt and let Ft( x) = Lt ⊙ x be the inner product of Lt and x. function EKL(x) //inner product realization for t ← 1 to r do

  • x ← max(x, Kt ⊕ x)

b ← Lt⊙ x if b = 1 then x ← Kt ⊕ x return x Cipher E encrypts x ∈ {0, 1}n using a key KL that specifies K1, . . . , Kr, L1, . . . , Lr ∈ {0, 1}n. We don’t know how many rounds to suggest.

slide-27
SLIDE 27

More general domain

If the domain is a finite, abelian group (G, +), the cipher is the same as before, except

◮ Choose Kt uniformly at random from G. ◮ Pair x with Kt − x.

function EKF (x) //generalized domain for t ← 1 to r do

  • x ← max(x, Kt − x)

b ← Ft( x) if b = 1 then x ← Kt − x return x Cipher E encrypts x ∈ G using a key KF naming K1, . . . , Kr ∈ G and round functions F1, . . . , Fr : G → {0, 1}.