Tools for Symmetric Key Provable Security Mridul Nandi Indian - - PowerPoint PPT Presentation

tools for symmetric key provable security
SMART_READER_LITE
LIVE PREVIEW

Tools for Symmetric Key Provable Security Mridul Nandi Indian - - PowerPoint PPT Presentation

Probability in Cryptography Two Tools: H-Coefficient and 2 Some Constructions and Applications Tools for Symmetric Key Provable Security Mridul Nandi Indian Statistical Institute, Kolkata ASK Workshop, Changsha 10 Dec. 2017 1 / 72


slide-1
SLIDE 1

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications

Tools for Symmetric Key Provable Security

Mridul Nandi

Indian Statistical Institute, Kolkata ASK Workshop, Changsha 10 Dec. 2017

1 / 72

slide-2
SLIDE 2

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

2 / 72

slide-3
SLIDE 3

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Outline of the talk

1 Probability in Cryptography

Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2 Two Tools: H-Coefficient and χ2

H-Coefficient Technique Mirror theory χ2 Method

3 Some Constructions and Applications

Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

3 / 72

slide-4
SLIDE 4

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

4 / 72

slide-5
SLIDE 5

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Notations for Probability

1 X ← Ω:

X is a random variable with sample space Ω.

2 PrX denotes the probability function of X. 3 For an event E ⊆ Ω we denote the probability of the event

E realized by X as Pr

X (E) or Pr(X ∈ E)

4 PrX(E | F) is the conditional probability defined only

when PrX(F) is positive and it is defined as Pr

X (E ∩ F)/ Pr X (F).

5 / 72

slide-6
SLIDE 6

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Notations for Probability

1 xt := (x1, . . . , xt) for any positive t.

Xt := (X1, . . . , Xt) ← Ω = Ω1 × · · · × Ωt is also called joint random variable.

2 We denote Pr(Xi = xi | Xi−1 = xi−1) as PrX(xi | xi−1). 3 Let X ← Ω, f : Ω → R then

Ex(f(X)) =

  • x∈Ω

f(x) Pr

X (x).

4 If X is a real valued random variable

Var(X) = E((X − Ex(X))2).

6 / 72

slide-7
SLIDE 7

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Notations for Probability

1 xt := (x1, . . . , xt) for any positive t.

Xt := (X1, . . . , Xt) ← Ω = Ω1 × · · · × Ωt is also called joint random variable.

2 We denote Pr(Xi = xi | Xi−1 = xi−1) as PrX(xi | xi−1). 3 Let X ← Ω, f : Ω → R then

Ex(f(X)) =

  • x∈Ω

f(x) Pr

X (x).

4 If X is a real valued random variable

Var(X) = E((X − Ex(X))2).

7 / 72

slide-8
SLIDE 8

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

With and Without Replacement Sample

1 Examples. In statistics with replacement (WR) and

without replacement sample (WOR) sampling are very popular.

2 U := (U1, . . . , Ut) ←wr S says that U ←$ St. So we specify

PrU completely as PrU(xt) = |S|−t.

3 WOR sample V := (V1, . . . , Vt) ←wor S is specified through

conditional probability as PrV(xi | xi−1) =

1 |S|−i+1, for all distinct x1, . . . , xi ∈ S.

8 / 72

slide-9
SLIDE 9

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

With and Without Replacement Sample

1 Examples. In statistics with replacement (WR) and

without replacement sample (WOR) sampling are very popular.

2 U := (U1, . . . , Ut) ←wr S says that U ←$ St. So we specify

PrU completely as PrU(xt) = |S|−t.

3 WOR sample V := (V1, . . . , Vt) ←wor S is specified through

conditional probability as PrV(xi | xi−1) =

1 |S|−i+1, for all distinct x1, . . . , xi ∈ S.

9 / 72

slide-10
SLIDE 10

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Why do we study WR and WOR in Cryptography?

1 Let f ←$ Func(D, R) (random function). Then, for any

distinct x1, . . . , xq ∈ D, (f(x1), . . . , f(xq)) ←wr R.

2 If π ←$ Perm(R) (random permutation - we use it for block

cipher or permutation in the ideal model) then (π(x1), . . . , π(xq)) ←wor R.

3 The both results are true even if xi’s are some functions of

yi−1 where yj = f(xj) (or yj = π(xj)). This happens for adaptive adversary interacting with f or π.

10 / 72

slide-11
SLIDE 11

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Why do we study WR and WOR in Cryptography?

1 Let f ←$ Func(D, R) (random function). Then, for any

distinct x1, . . . , xq ∈ D, (f(x1), . . . , f(xq)) ←wr R.

2 If π ←$ Perm(R) (random permutation - we use it for block

cipher or permutation in the ideal model) then (π(x1), . . . , π(xq)) ←wor R.

3 The both results are true even if xi’s are some functions of

yi−1 where yj = f(xj) (or yj = π(xj)). This happens for adaptive adversary interacting with f or π.

11 / 72

slide-12
SLIDE 12

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Why do we study WR and WOR in Cryptography?

1 Let f ←$ Func(D, R) (random function). Then, for any

distinct x1, . . . , xq ∈ D, (f(x1), . . . , f(xq)) ←wr R.

2 If π ←$ Perm(R) (random permutation - we use it for block

cipher or permutation in the ideal model) then (π(x1), . . . , π(xq)) ←wor R.

3 The both results are true even if xi’s are some functions of

yi−1 where yj = f(xj) (or yj = π(xj)). This happens for adaptive adversary interacting with f or π.

12 / 72

slide-13
SLIDE 13

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Why do we study WR and WOR in Cryptography?

1 In cryptography blockcipher modeled to be pseudorandom

permutation.

2 This means (using hybrid argument) that we can replace

random permutation instead of a blockcipher.

3 Consider the XOR construction: EK(x0) ⊕ EK(x1). 4 If we replace blockcipher by random permutation, te output

distribution of the XOR construction is same as Xt where X1 = V1 ⊕ V2, . . . , Xt = V2t−1 ⊕ V2t and (V1, . . . , Vt) ←wor {0, 1}n.

13 / 72

slide-14
SLIDE 14

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Why do we study WR and WOR in Cryptography?

1 In cryptography blockcipher modeled to be pseudorandom

permutation.

2 This means (using hybrid argument) that we can replace

random permutation instead of a blockcipher.

3 Consider the XOR construction: EK(x0) ⊕ EK(x1). 4 If we replace blockcipher by random permutation, te output

distribution of the XOR construction is same as Xt where X1 = V1 ⊕ V2, . . . , Xt = V2t−1 ⊕ V2t and (V1, . . . , Vt) ←wor {0, 1}n.

14 / 72

slide-15
SLIDE 15

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

15 / 72

slide-16
SLIDE 16

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Total variation

Definition Total variation (or statistical distance) is a metric on the set of probability functions over Ω. P0 − P1 = 1 2

  • x∈Ω

|P0(x) − P1(x)|.

16 / 72

slide-17
SLIDE 17

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Geometric interpretation of Total variation

Total variation between X and Y = area A+ area C. (Picture courtesy Shoup’s book “A Computational Introduction to

Number Theory and Algebra”).

17 / 72

slide-18
SLIDE 18

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Indistinguishability Game and total variation

A is a distinguisher - two oracles O1 and O2. The advantage of the adversary in this game, denoted AdvA(O1, O2), is given by Advdist

O1,O2(A) := | Pr(AO1 → 1) − Pr(AO2 → 1)|,

If Xq and Y q denote the outputs of O1 and O2

  • respectively. Then,

Advdist

O1,O2(A) ≤ Pr Xq − Pr Y q .

18 / 72

slide-19
SLIDE 19

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Properties of Total variation

1 P0 − P1 ≤ 1. When equality holds? 2 Triangle inequality. Let Pi be the probability function of

Xi, i ∈ [d] def = {1, 2, . . . , d} then P1 − Pd ≤ P1 − P2 + · · · + Pd−1 − Pd.

19 / 72

slide-20
SLIDE 20

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Some Examples of Total Variation

We sometimes denote dTV(X, Y ) = PrX − PrY .

1 Let T ⊆ S and X ←$ S, Y ←$ T . Then,

dTV(X, Y ) = 1 − |T | |S| .

2 Let |S| = N, U q ←wr S and V q ←wor S then

dTV(U, V ) = 1 −

q−1

  • i=1

(1 − i N ) = cp(q, N) where cp(q, N) denotes the collision probability of q random elements chosen from a set of size N.

20 / 72

slide-21
SLIDE 21

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Chi-square distance

The χ2 distance between P0 and P1, with P0 ≪ P1 (support

  • f P0 is contained in that of P1), is defined as

dχ2(P0, P1) :=

  • x∈Ω

(P0(x) − P1(x))2 P1(x) . Has its origin in mathematical statistics dating back to Pearson. It can be seen that χ2 distance is not symmetric, does not satisfy triangle inequality.

21 / 72

slide-22
SLIDE 22

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Chi-square distance

The χ2 distance between P0 and P1, with P0 ≪ P1 (support

  • f P0 is contained in that of P1), is defined as

dχ2(P0, P1) :=

  • x∈Ω

(P0(x) − P1(x))2 P1(x) . Has its origin in mathematical statistics dating back to Pearson. It can be seen that χ2 distance is not symmetric, does not satisfy triangle inequality.

22 / 72

slide-23
SLIDE 23

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Well Known Distribution in Cryptography Some Metrics on Probability Distributions

Other Metrics

1 Helinger distance: Steinberger used this metric to bound

advantage of key-alternating cipher.

2 Renyi divergence of order a (generalized form of χ2. When

a = 2 it is closely related to χ2). Used in lattice based cryptography.

3 Separation measurement (used in Markov chain). 4 KL divergence is popular in cryptography. Also used in the

proof of the χ2 method.

23 / 72

slide-24
SLIDE 24

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Outline of the talk

1 Probability in Cryptography

Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2 Two Tools: H-Coefficient and χ2

H-Coefficient Technique Mirror theory χ2 Method

3 Some Constructions and Applications

Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

24 / 72

slide-25
SLIDE 25

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

25 / 72

slide-26
SLIDE 26

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method 1 O1 or O2 two oracles returning Y elements. 2 Transcript: yq ∈ Yq. 3 Let Xq and Y q be the responses while A interacts with O1

and O2 respectively.

26 / 72

slide-27
SLIDE 27

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Theorem of H-coefficient technique

Theorem (H-coefficient technique) Let Yq = Vgood ⊔ Vbad be a partition. Suppose for any xq ∈ Vgood, Pr(Xq = xq) Pr(Y q = xq) := ipreal ipideal ≥ 1 − ǫratio, and Pr[Y q ∈ Vbad] ≤ ǫbad. Then, Advdist

O1,O2(A) ≤ ǫratio + ǫbad.

27 / 72

slide-28
SLIDE 28

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Simple Applications

1 PRP-PRF switching lemma. 2 Hash-then-PRF. 3 Hash-then-TBC. 4 Many more... 28 / 72

slide-29
SLIDE 29

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Summing up H-Coefficient

1 Good tool for birthday bound. 2 Some times we have beyond birthday bound, mostly 23n/4

and 22n/3 (in case of xor of k permutations we have bound

  • f the form 2(2k−1)n/2k).

3 Not so powerful for optimal security (i.e., n bit security). 4 Mirror theory for sum of permutation. Not easy to

understand the proof. Seems to have non-trivial gaps.

29 / 72

slide-30
SLIDE 30

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

30 / 72

slide-31
SLIDE 31

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

What is Mirror theory?

1 A combinatorial result. 2 Hall’s result: Let G be an abelian group and f : G → G be a

function such that

x∈G f(x) = 0. Then there exists two

permutations π1, π2 over G such that f = π1 − π2.

3 It has been proved by induction by Marshall J. Hall in

1951.

31 / 72

slide-32
SLIDE 32

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

What is Mirror theory?

1 Patarin extend this with a cryptographic motivation. 2 Number of functions is NN and the number of

permutations is N! where N = |G|.

3 The number of pairs of permutations (π1, π2) such that

f = π1 − π2 is about N!2

NN (on the average).

4 Instead of matching a function exactly, match over a

domain of size q (the query set for an adversary).

32 / 72

slide-33
SLIDE 33

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

What is Mirror theory?

1 Patarin claimed for q < N/67 and for any q-distinct xq,

and any (not necessarily distinct) y1, . . . , yq (so no bad transcripts and hence ǫbad = 0), #{(π1, π2) : π1(xi) + π2(xi) = yi} ≥ N!2 Nq × (1 − ǫratio) where ǫratio = O(q/2n)

2 In other words,

Pr(RP1(x1) + RP2(x1) = y1, . . . , RP1(xq) + RP2(xq) = yq) ≥ 1 − ǫratio Nq .

33 / 72

slide-34
SLIDE 34

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Recall that for coefficients H technique, we need to compute a lower bound for Pr(Xq = xq) ≥ 1 − ǫratio Nq . Mirror theory essentially provides the lower bound. Pr(RP1(x1) + RP2(x1) = y1, . . . , RP1(xq) + RP2(xq) = yq) ≥ 1 − O(q/N) Nq . Hence, Advdist

O1,O2(A) = O(q/N).

34 / 72

slide-35
SLIDE 35

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

What is Mirror theory?

1 Similar result with a single permutations. 2 The number of permutations π such that

π(0xi) + π(1xi) = yi is at least N!2

Nq for q < N/67.

1 So ǫratio = 0. However, yi’s are non-zero (need a bad set of

transcripts and ǫbad = q/2n).

3 In other words, for all q-distinct xq and non-zero yi’s,

Pr(RP(0x1)+RP(1x1) = y1, . . . , RP(0xq)+RP(1xq) = yq) ≥ 1 Nq .

35 / 72

slide-36
SLIDE 36

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Patarin considered the following general problem also called mirror theory.

1 distinct xi,j ∈ {0, 1}n, i ∈ [q], j ∈ [w] and 2 yi,j ∈ {0, 1}n. i ∈ [q], j ∈ [w] such that yi,j’s are nonzero

and for every i, yi,1, . . . , yi,w−1 are distinct. Pr( for all i, RP(xi,1) ⊕ RP(xi,w) = yi,1, . . . , RP(xi,w−1) ⊕ RP(xi,w) = yi,w−1) ≥ 1 Nq . This is also studied in CENC (by Tetsu Iwata, FSE 2006).

36 / 72

slide-37
SLIDE 37

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Key stream for CENC with w = 2, w = 4

(Picture courtesy: https://eprint.iacr.org/2016/1087.pdf ).

37 / 72

slide-38
SLIDE 38

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

CENC cipher with w = 4

(Picture courtesy: https://eprint.iacr.org/2016/1087.pdf ).

38 / 72

slide-39
SLIDE 39

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

39 / 72

slide-40
SLIDE 40

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

χ2 Method

X := (X1, . . . , Xq) and Y := (Y1, . . . , Yq) are two random vectors of size q distributed over Ωq. P0|xi−1[xi] = Pr(Xi = xi|X1 = x1, . . . , Xi−1 = xi−1) P1|xi−1[xi] = Pr(Yi = xi|Y1 = x1, . . . , Yi−1 = xi−1) When i = 1, P0|xi−1[x1] represents P[X1 = x1]. Similarly, for P1|xi−1[x1].

40 / 72

slide-41
SLIDE 41

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Let xi−1 ∈ Ωi−1, i ≥ 1. χ2(·) a real valued function defined as χ2(xi−1) := dχ2(P0|xi−1, P1|xi−1). In other notation, χ2(xi−1) :=

  • xi
  • PrX(xi|xi−1) − PrY(xi|xi−1)

2 PrY(xi|xi−1) .

41 / 72

slide-42
SLIDE 42

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Let xi−1 ∈ Ωi−1, i ≥ 1. χ2(·) a real valued function defined as χ2(xi−1) := dχ2(P0|xi−1, P1|xi−1). In other notation, χ2(xi−1) :=

  • xi
  • PrX(xi|xi−1) − PrY(xi|xi−1)

2 PrY(xi|xi−1) .

42 / 72

slide-43
SLIDE 43

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Theorem Suppose P0 and P1 denote probability distributions of X := (X1, . . . , Xq) and Y := (Y1, . . . , Yq) and for all x1, . . . , xi−1, we have P0|xi−1 ≪ P1|xi−1. Then P0 − P1 ≤

  • 1

2

q

  • i=1

Ex[χ2(Xi−1)] 1

2

.

43 / 72

slide-44
SLIDE 44

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Comparison with H-coefficient technique

1 Need: conditional probability instead of joint probabilities. 2 Suppose, for all xq and i ≤ q,

1 + ǫ ≥ PrX(xi|xi−1) PrY(xi|xi−1) ≥ 1 − ǫ

3 Then, PrX(xq)

PrY(xq) ≥ 1 − qǫ and so PrX − PrY ≤ ǫ × q.

4 If we apply χ2 method, PrX − PrY ≤ ǫ ×

  • q/2.

5 If we know more on the distributions get better bound. 44 / 72

slide-45
SLIDE 45

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Switching between PRF and PRP

1 PrY(xi|xi−1) = 1/2n for all i-distinct xi

Pr

X (xi|xi−1) = 1/(2n − i + 1)

if xi ∈ xi−1 = 0 if xi ∈ xi−1

2

  • PrX(xi|xi−1) − PrY(xi|xi−1)

2 PrY(xi|xi−1) = (i − 1)2 2n(2n − i + 1)2 if xi ∈ xi−1 = 1 2n if xi ∈ xi−1

45 / 72

slide-46
SLIDE 46

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Switching between PRF and PRP

1 PrY(xi|xi−1) = 1/2n for all i-distinct xi

Pr

X (xi|xi−1) = 1/(2n − i + 1)

if xi ∈ xi−1 = 0 if xi ∈ xi−1

2

  • PrX(xi|xi−1) − PrY(xi|xi−1)

2 PrY(xi|xi−1) = (i − 1)2 2n(2n − i + 1)2 if xi ∈ xi−1 = 1 2n if xi ∈ xi−1

46 / 72

slide-47
SLIDE 47

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications H-Coefficient Technique Mirror theory χ2 Method

Switching between PRF and PRP

χ2(xi−1) =

  • xi
  • PrX(xi|xi−1) − PrY(xi|xi−1)

2 PrY(xi|xi−1) = i − 1 2n + (i − 1)2 2n(2n − i + 1). By χ2 method, Pr

X − Pr Y ≤ q

  • i=1

1 2(Ex(χ2(Xi−1)))1/2 =

  • q(q − 1)

2n+1 + q3 22n .

47 / 72

slide-48
SLIDE 48

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Outline of the talk

1 Probability in Cryptography

Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2 Two Tools: H-Coefficient and χ2

H-Coefficient Technique Mirror theory χ2 Method

3 Some Constructions and Applications

Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

48 / 72

slide-49
SLIDE 49

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Comparisons

Construction H-coefficient using mirror Th. χ2 EDM (q3/22n)1/2 q/2n (q4/23n)1/2 XORP

  • q/2n

q/2n XORP (2-keyed)

  • q/2n

q1.5/21.5n Trunc-RPm (q/2n− m

2 ) 2 3

  • q/2n− m

2 49 / 72

slide-50
SLIDE 50

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

50 / 72

slide-51
SLIDE 51

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Encrypted Davies-Meyer (EDM) Construction

EDMπ,π′ : {0, 1}n × {0, 1}n → {0, 1}n Takes two permutations π, π′ ∈ Permn as key. On input x ∈ {0, 1}n, returns π′(π(x) ⊕ x). Bound using coefficients H technique (Cogliati and Seurin - Crypto 2016) Advprf

EDM(A) ≤ 5q

3 2

N . Bound using χ2 method (Dai, Hoang, Tessaro - Crypto 2017) Advprf

EDM(A) ≤ 3q2

N

3 2

.

51 / 72

slide-52
SLIDE 52

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Proof Sketch : EDMπ,π′(x) = π′(π(x) ⊕ x)

upper bd PrX(xi|xi−1) ≤ 1/(2n − i) ≤

1 2n + 2i 22n .

lower bd PrX(xi|xi−1) ≥

2n−4i 2n(2n−i) ≥ 1 2n − 4i 22n .

| PrX(xi|xi−1) − 1

2n | ≤ 4i 22n .

χ2(Xi−1) ≤ 16i3

23n (non-random bound).

  • i Ex(χ2(Xi−1)) ≤ 18q4

23n . So, Advprf EDM(A) ≤ 3q2 N

3 2 . 52 / 72

slide-53
SLIDE 53

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Proof Sketch : EDMπ,π′(x) = π′(π(x) ⊕ x)

upper bd PrX(xi|xi−1) ≤ 1/(2n − i) ≤

1 2n + 2i 22n .

lower bd PrX(xi|xi−1) ≥

2n−4i 2n(2n−i) ≥ 1 2n − 4i 22n .

| PrX(xi|xi−1) − 1

2n | ≤ 4i 22n .

χ2(Xi−1) ≤ 16i3

23n (non-random bound).

  • i Ex(χ2(Xi−1)) ≤ 18q4

23n . So, Advprf EDM(A) ≤ 3q2 N

3 2 . 53 / 72

slide-54
SLIDE 54

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Proof Sketch : EDMπ,π′(x) = π′(π(x) ⊕ x)

upper bd PrX(xi|xi−1) ≤ 1/(2n − i) ≤

1 2n + 2i 22n .

lower bd PrX(xi|xi−1) ≥

2n−4i 2n(2n−i) ≥ 1 2n − 4i 22n .

| PrX(xi|xi−1) − 1

2n | ≤ 4i 22n .

χ2(Xi−1) ≤ 16i3

23n (non-random bound).

  • i Ex(χ2(Xi−1)) ≤ 18q4

23n . So, Advprf EDM(A) ≤ 3q2 N

3 2 . 54 / 72

slide-55
SLIDE 55

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Proof Sketch : EDMπ,π′(x) = π′(π(x) ⊕ x)

upper bd PrX(xi|xi−1) ≤ 1/(2n − i) ≤

1 2n + 2i 22n .

lower bd PrX(xi|xi−1) ≥

2n−4i 2n(2n−i) ≥ 1 2n − 4i 22n .

| PrX(xi|xi−1) − 1

2n | ≤ 4i 22n .

χ2(Xi−1) ≤ 16i3

23n (non-random bound).

  • i Ex(χ2(Xi−1)) ≤ 18q4

23n . So, Advprf EDM(A) ≤ 3q2 N

3 2 . 55 / 72

slide-56
SLIDE 56

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

56 / 72

slide-57
SLIDE 57

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Construction

1 Let m ≤ n and truncm denote the function which returns

the first m bits of x ∈ {0, 1}n.

2 We define for every x ∈ {0, 1}n,

trRPm(x) = truncm(RPn(x)). Note that it is a function family, keyed by random permutation, mapping the set of all n bits to the set of all m bits.

3 Let X1, . . . , Xq denote all outputs of the construction to the

adversary then Xi = truncm(Vi) for all i.

57 / 72

slide-58
SLIDE 58

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Proof Sketch : trRPm(x) = truncm(RP(x))

PrX(xi|xi−1) = 2n−m−H

2n−i+1 where H follows Hypergeomtric

distribution (HG). χ2(xi−1) =

x 2m (2n−i+1)2 ×

  • H − i−1

2m

2 By using expectation and variance formula of HG and χ2 method, we have Advprf

trRPm(A) ≤

  • 1

2

q

  • i=1

Ex[χ2(Xi−1)] 1

2

≤ q × 2(m−1)/2 2n .

58 / 72

slide-59
SLIDE 59

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Theorem for trRPm

Theorem For any adversary A making q queries we have Advprf

trRPm(A) ≤ q × 2(m−1)/2

2n .

1 When, m = n (no truncation), PRF advantage is O(q/2n/2)

(again, the presence of square root).

2 When m = 1 (returns only one bit), PRF advantage is

O(q/2n).

3 When m = n/2 (mid-way : returns half of the bits), PRF

advantage is O(q/23n/4).

59 / 72

slide-60
SLIDE 60

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Outline of the talk

1

Probability in Cryptography Well Known Distribution in Cryptography Some Metrics on Probability Distributions

2

Two Tools: H-Coefficient and χ2 H-Coefficient Technique Mirror theory χ2 Method

3

Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

60 / 72

slide-61
SLIDE 61

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

XOR Construction

1 Define XORπ : {0, 1}n−1 → {0, 1}n to be the construction

that takes a permutation π ∈ Permn as a key, and on input x ∈ {0, 1}n−1 it returns π(x0) ⊕ π(x1).

2 XOR construction based on a random permutation RPn

returns X1, . . . , Xq where X1 := V1 ⊕ V2, . . ., Xq := V2q−1 ⊕ V2q and V1, . . . , V2q ←wor {0, 1}n.

3 Mirror theory and H-coefficients proves the PRF security. 61 / 72

slide-62
SLIDE 62

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Sum of Permutations.

Theorem (DHT-Crypto-17) Fix an integer n ≥ 8 and let N = 2n. For any adversary A that makes q ≤ N

32 queries we have

Advprf

XOR(A) ≤ 1.5q + 3√q

N .

1 U′

1, . . . , U′ q ←$ {0, 1}n.

2 Let P1 and P2 denote the output distributions of

X := (X1, . . . , Xq) and U′ := (U′

1, . . . , U′ q) respectively. Thus,

Advprf

XOR(A) ≤ P1 − P2.

62 / 72

slide-63
SLIDE 63

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Sum of Permutations.

1 P0 is the probability function for

(U1, . . . , Uq) ←wr [N]∗ := {0, 1}n \ {0n}.

2 P0 − P2 ≤ q/2n. 3 It is sufficient to bound P0 − P1. 4 For every non-zero x1, . . . , xi we clearly have

P0|xi−1(xi) = 1/(N − 1). χ2(xi−1) =

  • x=0n

(N − 1)(Yi,x − 1 N − 1)2. (1) where Yi,x := Pr(Xi = x|Xi−1 = xi−1).

63 / 72

slide-64
SLIDE 64

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Sum of Permutations.

1 S = {V1, V2, . . . , V2i−2}. 2 Let Di,x be the number of pairs (u, u ⊕ x) such that both u

and u ⊕ x belongs to S.

3 Note that S and Di,x are both random variables, and in

fact functions of the random variables V1, V2, . . . , V2i−2. Yi,x = N − 4(i − 1) + Di,x (N − 2i + 1)(N − 2i). (2)

64 / 72

slide-65
SLIDE 65

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Sum of Permutations.

1

(Yi,x − 1 N − 1)2 ≤ 3(Di,x − 4(i − 1)2/N)2 + 18 N4 . Ex(χ2(Xi−1)) ≤

  • x=0n

N · Ex[(Yi,x − 1 N − 1)2] (3) ≤

  • x=0n

18 N3 + 3 N3 · Ex[(Di,x − 4(i − 1)2 N )2] (4)

2 Di,x as a function of V1, V2, . . . , V2i−2, and the expectation

is taken over the choices of V1, V2, . . . , V2i−2.

65 / 72

slide-66
SLIDE 66

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Ex[(Di,x − 4(i − 1)2 N )2] ≤ 4(i − 1)2 N (5) Ex(χ2(Xi−1)) ≤ 18 N2 + 12(i − 1)2 N3 . Summing up, from χ2-method P0 − P1 ≤

  • 1

2

q

  • i=1

Ex[χ2(Xi−1)] 1

2

≤ 3√q + .5q N .

66 / 72

slide-67
SLIDE 67

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction 1 Is everything OK? 2 we have

P[Xi = x|V1 = v1, . . . , V2i−2 = v2i−2] = N − 4(i − 1) + Di,x (N − 2i + 1)(N − 2i) (6) But, P[Xi = x|V2i−2 = v2i−2] = P[Xi = x|Xi−1 = xi−1] (7) does not hold for every v1, . . . , v2i−2.

67 / 72

slide-68
SLIDE 68

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction 1 Is everything OK? 2 we have

P[Xi = x|V1 = v1, . . . , V2i−2 = v2i−2] = N − 4(i − 1) + Di,x (N − 2i + 1)(N − 2i) (6) But, P[Xi = x|V2i−2 = v2i−2] = P[Xi = x|Xi−1 = xi−1] (7) does not hold for every v1, . . . , v2i−2.

68 / 72

slide-69
SLIDE 69

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

How to get rid of it?

1 Consider an extended system which leaks more (similar to

H technique).

2 Release Vi values in real world. In the ideal world simulate

the Vi values keeping compatibility.

3 We aim a more general useful form of Mirror theory. 69 / 72

slide-70
SLIDE 70

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Summing Up

1 H-Technique is nowadays in popular (in comparison with

game playing technique).

2 Sometimes hard to get optimum bound. 3 χ2 method can be another useful tool for proving security -

mainly for close to optimal security.

4 Mirror theory needs attention. It has high potential, 5 We should also study the potentiality of the other metrics. 70 / 72

slide-71
SLIDE 71

Probability in Cryptography Two Tools: H-Coefficient and χ2 Some Constructions and Applications Encrypted Davies-Meyer (EDM) Construction Truncation Construction Sum of Permutations Construction

Thank You for your attention

71 / 72