On the Concrete Security of Goldreichs PRG Yann Rotella Joint work - - PowerPoint PPT Presentation

on the concrete security of goldreich s prg
SMART_READER_LITE
LIVE PREVIEW

On the Concrete Security of Goldreichs PRG Yann Rotella Joint work - - PowerPoint PPT Presentation

On the Concrete Security of Goldreichs PRG Yann Rotella Joint work with Geoffroy Couteau, Aurlien Dupin, Pierrick Maux and Mlissa Rossi January 31, 2019 Introduction A subexponential-time attack Algebraic cryptanalysis


slide-1
SLIDE 1

On the Concrete Security of Goldreich’s PRG

Yann Rotella Joint work with Geoffroy Couteau, Aurélien Dupin, Pierrick Méaux and Mélissa Rossi January 31, 2019

slide-2
SLIDE 2

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

PseudoRandom Generators

Seed: Output:

(x1, x2, . . . , xn) ∈ Fn

2

(y1, y2, . . . , yn, yn+1, . . . , ym) ∈ Fn

2

PRG

(yi)i≤m should be indistinguishable from a random string;

it is hard to recover (xi)i≤n using the knowledge of (yi)i≤m.

1 / 36

slide-3
SLIDE 3

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Structure of this Talk

1

Introduction

2

A subexponential-time attack

3

Algebraic cryptanalysis

4

Generalization on all predicates

5

Conclusion

2 / 36

slide-4
SLIDE 4

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Stretch and locality

xn x1 x2 x3 . . . xi . . . yj+2 yj yj+1 . . . . . .

m = ns d= 3

3 / 36

slide-5
SLIDE 5

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Theoretical applications

Semi Secure computation with constant computational overhead [Ishai et al. STOC 2018, Applebaum et al. CRYPTO 2017] MPC-friendly primitives [Albrecht et al. EC 2015, Canteaut et al. FSE 2016, Méaux et al. EC 2016, Grassi et al. ACM-CCS 2016] Indistinguishability Obfuscation [Sahai and Waters STOC 2014, Lin and Tessaro CRYPTO 2017] Cryptographic Capsules [Boyle et al. ACN-CCS 2017]

4 / 36

slide-6
SLIDE 6

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Description of Goldreich’s PRG

Seed (x1, . . . , xn)

σi

1

σi

2

σi

d−1

σi

d

P(xσi

1, . . . , xσi d)

(yi)1≤i≤m

m = ns, s is the stretch.

5 / 36

slide-7
SLIDE 7

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Parameters

Stretch s > 1 ? Subsets (σi)i≤1 ? Boolean function (predicate) P ? Locality d ?

6 / 36

slide-8
SLIDE 8

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Parameters

Stretch s > 1 ? Subsets (σi)i≤1 ? Boolean function (predicate) P ? Locality d ?

6 / 36

slide-9
SLIDE 9

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Subsets

The subsets should be sufficiently expanding: for some k, every k subsets should cover k + Ω(n) elements of {1, . . . , n}. Ok if they are chosen uniformly random

7 / 36

slide-10
SLIDE 10

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Subsets

The subsets should be sufficiently expanding: for some k, every k subsets should cover k + Ω(n) elements of {1, . . . , n}. Ok if they are chosen uniformly random

7 / 36

slide-11
SLIDE 11

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Generic sub-exponential seed recovery

Create a list of all possible values for (2ε) ∗ n variables. A value x of the list can agree on 1 2 n output bits. Final complexity: 2n1

s 1 2d

s 1 45 and d 5 2n0 955

8 / 36

slide-12
SLIDE 12

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Generic sub-exponential seed recovery

Create a list of all possible values for (2ε) ∗ n variables. A value x′ of the list can agree on (1/2 + ε) ∗ n output bits. Final complexity: 2n1

s 1 2d

s 1 45 and d 5 2n0 955

8 / 36

slide-13
SLIDE 13

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Generic sub-exponential seed recovery

Create a list of all possible values for (2ε) ∗ n variables. A value x′ of the list can agree on (1/2 + ε) ∗ n output bits. Final complexity: 2n1−(s−1/2d) s 1 45 and d 5 2n0 955

8 / 36

slide-14
SLIDE 14

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Generic sub-exponential seed recovery

Create a list of all possible values for (2ε) ∗ n variables. A value x′ of the list can agree on (1/2 + ε) ∗ n output bits. Final complexity: 2n1−(s−1/2d) s = 1.45 and d = 5 ⇒ 2n0.955

8 / 36

slide-15
SLIDE 15

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Predicate criteria

degree [Goldreich 2000] rational degree (algebraic immunity) [Applebaum and Lovett STOC 2016] AI(P) > s resilience [O’Donnelland Witmer CCC 2014, Applebaum 2015] res(P) > 2s

9 / 36

slide-16
SLIDE 16

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

locality

degree resilience Siegenthaler

     ⇒ d ≥ 5

P5 x1 x2 x3 x4 x5 x1 x2 x3 x4x5

10 / 36

slide-17
SLIDE 17

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

locality

degree resilience Siegenthaler

     ⇒ d ≥ 5

P5(x1, x2, x3, x4, x5) = x1 + x2 + x3 + x4x5

10 / 36

slide-18
SLIDE 18

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Our results

A new subexponential-time attack in 2O(n2−s). Linearization and Gröbner-based attacks. Generalization of the subexponential attack to all predicates. locality and stretch are linked to the size of the seed.

11 / 36

slide-19
SLIDE 19

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Our results

A new subexponential-time attack in 2O(n2−s). Linearization and Gröbner-based attacks. Generalization of the subexponential attack to all predicates. locality and stretch are linked to the size of the seed.

11 / 36

slide-20
SLIDE 20

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Our results

A new subexponential-time attack in 2O(n2−s). Linearization and Gröbner-based attacks. Generalization of the subexponential attack to all predicates. locality and stretch are linked to the size of the seed.

11 / 36

slide-21
SLIDE 21

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Our results

A new subexponential-time attack in 2O(n2−s). Linearization and Gröbner-based attacks. Generalization of the subexponential attack to all predicates. locality and stretch are linked to the size of the seed.

11 / 36

slide-22
SLIDE 22

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Plan of this Section

1

Introduction

2

A subexponential-time attack

3

Algebraic cryptanalysis

4

Generalization on all predicates

5

Conclusion

12 / 36

slide-23
SLIDE 23

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Cryptanalysis of FLIP [Duval, Lallemand, Rotella CRYPTO 2016]

Key Register K PRNG Permutation Generator Pi F pi ci zi

F(x) =x1 + x2 + · · · + xk1

+ xk1+1xk1+2 + · · · + xk2−1xk2 + xk3 + xk3+1xk3+2 + · · · + xn−14 · · · xn−1xn

13 / 36

slide-24
SLIDE 24

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

FLIP vs Goldreich’s PRG

FLIP: overdetermined Goldreich’s PRG: underdetermined P5(x1, x2, x3, x4, x5) = x1 + x2 + x3 + x4x5

14 / 36

slide-25
SLIDE 25

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Collect linear equations

x1 + x4 + x8 + x9x11 = 1 x14 + x5 + x7 + x1x4 = 0 x13 + x10 + x3 + x11x9 = 1 We get the following linear equation: x1 x4 x8 x13 x10 x3 number of collisions c O n2 s

1

15 / 36

slide-26
SLIDE 26

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Collect linear equations

x1 + x4 + x8 + x9x11 = 1 x14 + x5 + x7 + x1x4 = 0 x13 + x10 + x3 + x11x9 = 1 We get the following linear equation: x1 + x4 + x8 + x13 + x10 + x3 = 0 number of collisions c O n2 s

1

15 / 36

slide-27
SLIDE 27

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Collect linear equations

x1 + x4 + x8 + x9x11 = 1 x14 + x5 + x7 + x1x4 = 0 x13 + x10 + x3 + x11x9 = 1 We get the following linear equation: x1 + x4 + x8 + x13 + x10 + x3 = 0 number of collisions c ∈ O(n2(s−1))

15 / 36

slide-28
SLIDE 28

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Guessing phase

Choose the ℓ variables that appear the most in the quadratic terms, such that you get n − c − ℓ linear equations. For all possible values of the bits: Solve the correponding linear system of n linear equations.

16 / 36

slide-29
SLIDE 29

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Guessing phase

Choose the ℓ variables that appear the most in the quadratic terms, such that you get n − c − ℓ linear equations. For all possible values of the ℓ bits: Solve the correponding linear system of n linear equations.

16 / 36

slide-30
SLIDE 30

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Guessing phase

Choose the ℓ variables that appear the most in the quadratic terms, such that you get n − c − ℓ linear equations. For all possible values of the ℓ bits: Solve the correponding linear system of n linear equations.

16 / 36

slide-31
SLIDE 31

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Analysis and complexity

Complexity: ℓ < n2−s → O

(

n32n2−s) Conjectured secure up to s < 1.5. The equations might be linearly dependent (almost never the case). This leads to a strong distinguisher and allows to determine if the Guess is right or wrong. If the equations aren’t linearly dependent, then we solve a full rank linear system of size n.

17 / 36

slide-32
SLIDE 32

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Analysis and complexity

Complexity: ℓ < n2−s → O

(

n32n2−s) Conjectured secure up to s < 1.5. The equations might be linearly dependent (almost never the case). This leads to a strong distinguisher and allows to determine if the Guess is right or wrong. If the equations aren’t linearly dependent, then we solve a full rank linear system of size n.

17 / 36

slide-33
SLIDE 33

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Analysis and complexity

Complexity: ℓ < n2−s → O

(

n32n2−s) Conjectured secure up to s < 1.5. The equations might be linearly dependent (almost never the case). This leads to a strong distinguisher and allows to determine if the Guess is right or wrong. If the equations aren’t linearly dependent, then we solve a full rank linear system of size n.

17 / 36

slide-34
SLIDE 34

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Table: Average number of collisions

n 256 512 1024 2048 4096 s = 1.45 142 269 506 946 1771 s = 1.4 83 145 254 442 773 s = 1.3 28 42 64 97 147

Table: Theoretical number of guesses (worst case)

n 256 512 1024 2048 4096 s = 1.45 4 7 11 18 27 s = 1.4 9 15 23 37 58 s = 1.3 20 34 56 94 156

Table: Experimental number of guesses (average)

n 256 512 1024 2048 4096 s = 1.45 4 6 9 14 21 s = 1.4 6 11 17 27 44 s = 1.3 13 23 39 65 110

Table: Complexity of our attack.

512 1024 2048 4096

< 280

1.120 1.215 1.296 1.361

< 2128

1.048 1.135 1.222 1.295

18 / 36

slide-35
SLIDE 35

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Complexity

29 210 211 212 213 214 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 Size of the seed Stretch of the PRG

above: < 80 bits security

19 / 36

slide-36
SLIDE 36

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Plan of this Section

1

Introduction

2

A subexponential-time attack

3

Algebraic cryptanalysis

4

Generalization on all predicates

5

Conclusion

20 / 36

slide-37
SLIDE 37

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Collecting equations of degree 2

xi1 + xi2 + xi3 + xi4xi5 = yi (1) xj1 + xj2 + xj3 + xj4xj5 = yj (2) using (1): xi4xi1+xi4xi2+xi4xi3+xi4xi5 =xi4yi if xi4xi5 = xj4xj5: xkyi+xkyj =xkxi1+xkxi2+xkxi3+xkxj1+xkxj2+xkxj3 if xi4 = xj4: xj5×(1)+xi5×(2)

21 / 36

slide-38
SLIDE 38

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Solving the system Q B

= y

Nvar Neq

22 / 36

slide-39
SLIDE 39

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Solving the system Q

=

B

+ y

23 / 36

slide-40
SLIDE 40

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Solving the system

Λ

B

= y

24 / 36

slide-41
SLIDE 41

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Experimental results

28 29 210 211 212 213 214 1.3 1.35 1.4 1.45 Size of the seed Stretch of the PRG above : conjectured polynomialy broken

25 / 36

slide-42
SLIDE 42

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Results on P5

29 210 211 212 213 214 1.15 1.2 1.25 1.3 1.35 1.4 1.45 Size of the seed Stretch of the PRG Guess and determine Degree-two linearization

26 / 36

slide-43
SLIDE 43

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Plan of this Section

1

Introduction

2

A subexponential-time attack

3

Algebraic cryptanalysis

4

Generalization on all predicates

5

Conclusion

27 / 36

slide-44
SLIDE 44

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

General sub-exponential time attack

P = x1 + x2 + · · · + xℓ + f(xℓ+1, . . . , xd) k = d − ℓ ⇒

2n

k−s k−1

28 / 36

slide-45
SLIDE 45

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

r-bit fixing Algebraic Immunity [MJSC, EC 2016]

min

(b,i)(AI(f(b,i)))

where bits at positions i are fixed. For example, if f(x1, x2, x3, x4, x5) = x1 + x2x3x4 + x5, then f(1,2),(0,1) = x3x4 + x5

29 / 36

slide-46
SLIDE 46

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Improvement

Fixing j bits on a predicate of the form P = x1 + x2 + · · · + xℓ + f(xℓ+1, . . . , xd) gives equations of degree smaller than

k − j 2

⌉ + 1

If the stretch is ”big enough”, we can improve the previous generic attack using bounds on r-bit fixing algebraic immunity.

30 / 36

slide-47
SLIDE 47

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Improvement

Fixing j bits on a predicate of the form P = x1 + x2 + · · · + xℓ + f(xℓ+1, . . . , xd) gives equations of degree smaller than

k − j 2

⌉ + 1

If the stretch is ”big enough”, we can improve the previous generic attack using bounds on r-bit fixing algebraic immunity.

30 / 36

slide-48
SLIDE 48

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Application to XOR-MAJ predicates

Fix enough bits to 0 (or 1). Recover linear equations.

O

(

2n

1− s−1 k/2+1

)

31 / 36

slide-49
SLIDE 49

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Polynomial Attack (AL theorem improvement)

Let Ne be the dimension of the vectorspace of annihilators of degree e, then if s ≥ e − log(Ne) log(n)) then there exists a polynomial-time algorithm that breaks the PRG.

32 / 36

slide-50
SLIDE 50

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Plan of this Section

1

Introduction

2

A subexponential-time attack

3

Algebraic cryptanalysis

4

Generalization on all predicates

5

Conclusion

33 / 36

slide-51
SLIDE 51

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Conclusion

First concrete parameters given. Symmetric Cryptanalysis can be applied to theoretical constructions. Several techniques that do not capture the same phenomenon. If s is close to 1.5, then the seed size has to be very big. New theorems and criteria on predicates.

34 / 36

slide-52
SLIDE 52

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Perspectives

Link between expander graphs, first attack (Guess-and-Determine) and second attack (Gröbner). Capture the Gröbner success phenomenon. Find best predicate ?

35 / 36

slide-53
SLIDE 53

Introduction A subexponential-time attack Algebraic cryptanalysis Generalization on all predicates Conclusion

Thank You ! Questions ?

36 / 36