56
Multi-target Preimage search using parallel Grover Gustavo Banegas 1 and Daniel J. Bernstein 1, 2 ECRYPT-NET Meeting October 11th, 2017 1 Department of Mathematics and Computer Science Technische Universiteit Eindhoven [email protected] 2 Department of Computer Science University of Illinois at Chicago [email protected] 1 / 24

Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Multi-target Preimage search using parallel Grover

Gustavo Banegas1 and Daniel J. Bernstein1,2

ECRYPT-NET MeetingOctober 11th, 2017

1Department of Mathematics and Computer ScienceTechnische Universiteit [email protected]

2Department of Computer ScienceUniversity of Illinois at [email protected]

1 / 24

Page 2: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Reversibility

Finding t-images

Example

Conclusion

What’s next?

2 / 24

Page 3: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

PreimageLet H be a function that H : {0, 1}b → {0, 1}b. Preimage search isgiven an output y , find a x such that H(x) = y .

It is desirable that given an output it should be computationallyinfeasible to find any input that maps to that output.

3 / 24

Page 4: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

PreimageLet H be a function that H : {0, 1}b → {0, 1}b. Preimage search isgiven an output y , find a x such that H(x) = y .It is desirable that given an output it should be computationallyinfeasible to find any input that maps to that output.

3 / 24

Page 5: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Brute-force search for one preimageLet H be a function that H : {0, 1}b → {0, 1}b.The brute force is to check every input x given an output y . Thetime complexity will be 2b guesses using classical computers.If we apply Grover’s algorithm, using a quantum computer, thecomplexity decreases to 2b/2 guesses.

4 / 24

Page 6: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Brute-force search for multi target preimagesLet H be a function that H : {0, 1}b → {0, 1}b.Now, we have a set of output y ’s, i.e., Y = {y1, y2, . . . , yt} and wewant to find one yi and we verify every input x with a set of outputY .If we ignore several costs, the complexity decreases to 2b/tguesses in a classical computer.If we apply Grover’s algorithm, using a quantum computer, thecomplexity decreases to 2b/2/t1/2 guesses.

5 / 24

Page 7: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Costs for comparisonOne big cost for preimage search in both cases is the comparisons.

I Classical computer:I Single target: 2bI Multi target: t · (2b)/t

I Quantum computer:I Single target: 2b/2I Multi target: t · (2b/2)/t1/2

6 / 24

Page 8: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Costs for comparisonOne big cost for preimage search in both cases is the comparisons.

I Classical computer:I Single target: 2bI Multi target: t · (2b)/t

I Quantum computer:I Single target: 2b/2I Multi target: t · (2b/2)/t1/2

6 / 24

Page 9: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Costs for comparisonOne big cost for preimage search in both cases is the comparisons.

I Classical computer:I Single target: 2bI Multi target: t · (2b)/t

I Quantum computer:I Single target: 2b/2I Multi target: t · (2b/2)/t1/2

6 / 24

Page 10: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

IntroductionParallel multi-target image attack for AES:

van Oorschot–Wiener “parallelrho method”

I It uses a mesh of p smallprocessors.

I Each processor runs 2128/ptfast steps, to find one of tindependent AES keysk1, . . . , kt , using a fixedplain text, e.g, AES(0).

However, it is pre-quantum.

7 / 24

Page 11: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

IntroductionParallel multi-target image attack for AES:

van Oorschot–Wiener “parallelrho method”

I It uses a mesh of p smallprocessors.

I Each processor runs 2128/ptfast steps, to find one of tindependent AES keysk1, . . . , kt , using a fixedplain text, e.g, AES(0).

However, it is pre-quantum.

7 / 24

Page 12: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

IntroductionParallel multi-target image attack for AES:

van Oorschot–Wiener “parallelrho method”

I It uses a mesh of p smallprocessors.

I Each processor runs 2128/ptfast steps, to find one of tindependent AES keysk1, . . . , kt , using a fixedplain text, e.g, AES(0).

However, it is pre-quantum.

7 / 24

Page 13: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

IntroductionParallel multi-target image attack for AES:

van Oorschot–Wiener “parallelrho method”

I It uses a mesh of p smallprocessors.

I Each processor runs 2128/ptfast steps, to find one of tindependent AES keysk1, . . . , kt , using a fixedplain text, e.g, AES(0).

However, it is pre-quantum.

7 / 24

Page 14: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

IntroductionParallel multi-target image attack for AES:

van Oorschot–Wiener “parallelrho method”

I It uses a mesh of p smallprocessors.

I Each processor runs 2128/ptfast steps, to find one of tindependent AES keysk1, . . . , kt , using a fixedplain text, e.g, AES(0).

However, it is pre-quantum.

7 / 24

Page 15: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Is AES−128 secure against quantum attacks?NIST has claimed that AES-128 is secure enough.

8 / 24

Page 16: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction

Is AES−128 secure against quantum attacks?NIST has claimed that AES-128 is secure enough.

8 / 24

Page 17: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction - Parallel rho method

Distinguished PointConsider H : {0, 1}b → {0, 1}bTake x an input of H, x ′ = H(x).Thereafter, take x ′ and apply H again, x ′′ = H(x ′).It is possible to do it n times and we denote as Hn(x).

9 / 24

Page 18: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction - Parallel rho method

Distinguished PointConsider H : {0, 1}b → {0, 1}bWe want that our distinguished point satisfied d = b/2 and wedenote as:

Hd(x) = 0 . . . 0︸ ︷︷ ︸d zeros

{0, 1}b/2

10 / 24

Page 19: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Introduction - Parallel rho method

Distinguished Point

x1

x1’

x1’’

x1’’’

x1’’’’

x1’’’’’

Distinguish point

x2

x2’

x2’’

x2’’’

x2’’’’

x2’’’’’

Distinguish point

xj

xj’

xj’’

xj’’’

xj’’’’

xj’’’’’

Distinguish point

xi

xi’

xi’’

xi’’’

11 / 24

Page 20: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

OverviewOraclecalls

p smallprocessors,

freecommunication

p smallprocessors,realistic

communicationSingle-targetpreimage

N N/p N/p pre-quantum

√N

√N/p

√N/p post-

quantum

Multi-targetpreimage

N/t N/pt N/pt

√N/t ? ?

Collision√N

√N/p

√N/p

3√N

√N/p

√N/p

12 / 24

Page 21: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

OverviewOraclecalls

p smallprocessors,

freecommunication

p smallprocessors,realistic

communicationSingle-targetpreimage

N N/p N/p pre-quantum

√N

√N/p

√N/p post-

quantum

Multi-targetpreimage

N/t N/pt N/pt

√N/t

√N/pt

√N/pt1/2

Collision√N

√N/p

√N/p

3√N

√N/p

√N/p

13 / 24

Page 22: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingDistinguished point in quantum computers

I The operations in quantum computer must be reversible;

I It is not possible to design a “simple circuit” for distinguishedpoint;

I The sorting needs to bereversible too.

14 / 24

Page 23: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingDistinguished point in quantum computers

I The operations in quantum computer must be reversible;I It is not possible to design a “simple circuit” for distinguished

point;

I The sorting needs to bereversible too.

14 / 24

Page 24: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingDistinguished point in quantum computers

I The operations in quantum computer must be reversible;I It is not possible to design a “simple circuit” for distinguished

point;

I The sorting needs to bereversible too.

14 / 24

Page 25: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum setting

Using classical computersExample to compute H3(x):

time 0: x 0 0time 1: x 0 H(x)time 2: x 0 H2(x)time 3: x H3(x) H2(x)

15 / 24

Page 26: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum setting

Using classical computersExample to compute H3(x):

time 0: x 0 0

time 1: x 0 H(x)time 2: x 0 H2(x)time 3: x H3(x) H2(x)

15 / 24

Page 27: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum setting

Using classical computersExample to compute H3(x):

time 0: x 0 0time 1: x 0 H(x)

time 2: x 0 H2(x)time 3: x H3(x) H2(x)

15 / 24

Page 28: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum setting

Using classical computersExample to compute H3(x):

time 0: x 0 0time 1: x 0 H(x)time 2: x 0 H2(x)

time 3: x H3(x) H2(x)

15 / 24

Page 29: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum setting

Using classical computersExample to compute H3(x):

time 0: x 0 0time 1: x 0 H(x)time 2: x 0 H2(x)time 3: x H3(x) H2(x)

15 / 24

Page 30: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0time 1: x 0 H(x) 0time 2: x 0 H(x) H2(x)time 3: x H3(x) H(x) H2(x)time 4: x H3(x) H(x) 0time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 31: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0

time 1: x 0 H(x) 0time 2: x 0 H(x) H2(x)time 3: x H3(x) H(x) H2(x)time 4: x H3(x) H(x) 0time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 32: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0time 1: x 0 H(x) 0

time 2: x 0 H(x) H2(x)time 3: x H3(x) H(x) H2(x)time 4: x H3(x) H(x) 0time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 33: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0time 1: x 0 H(x) 0time 2: x 0 H(x) H2(x)

time 3: x H3(x) H(x) H2(x)time 4: x H3(x) H(x) 0time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 34: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0time 1: x 0 H(x) 0time 2: x 0 H(x) H2(x)time 3: x H3(x) H(x) H2(x)

time 4: x H3(x) H(x) 0time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 35: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0time 1: x 0 H(x) 0time 2: x 0 H(x) H2(x)time 3: x H3(x) H(x) H2(x)time 4: x H3(x) H(x) 0

time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 36: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Distinguished point in quantum settingTrade-off from Bennett–TompaExample to compute H3(x):

time 0: x 0 0 0time 1: x 0 H(x) 0time 2: x 0 H(x) H2(x)time 3: x H3(x) H(x) H2(x)time 4: x H3(x) H(x) 0time 5: x H3(x) 0 0

Hnd (x) =

Input: x ∊ {0,1}b

H(x)

Output: bit string with the DP of x

Check for d zeros

No

Yes

Copy of DP

Compute 2d+1 times.

16 / 24

Page 37: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

xt ... x1

Hd(x1) ...

Hn(x1)

.

.

.Hn(xt)d d

...

...

Hd(xt)

yt ... y1

Hd(y1)...

Hn(y1)

.

.

.Hn(yt)d d

...

...

Hd(yt)

Hn(yi)d Hn(xj)d≟

If this condition is true then weneed to run classically:

Hnk (xi ) = yj

17 / 24

Page 38: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

xt ... x1

Hd(x1) ...

Hn(x1)

.

.

.Hn(xt)d d

...

...

Hd(xt)

yt ... y1

Hd(y1)...

Hn(y1)

.

.

.Hn(yt)d d

...

...

Hd(yt)

Hn(yi)d Hn(xj)d≟

If this condition is true then weneed to run classically:

Hnk (xi ) = yj

17 / 24

Page 39: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

xt ... x1

Hd(x1) ...

Hn(x1)

.

.

.Hn(xt)d d

...

...

Hd(xt)

yt ... y1

Hd(y1)...

Hn(y1)

.

.

.Hn(yt)d d

...

...

Hd(yt)

Hn(yi)d Hn(xj)d≟

If this condition is true then weneed to run classically:

Hnk (xi ) = yj

17 / 24

Page 40: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Reversibility

Reversibility of Distinguished point

I Bennett-Tompa technique to build a reversible circuit for Hnd ;

I It is possible to achieve a+O(b log2 n) ancillas and gate depthO(gn1+ε).

Reversibility of sorting on a mesh network

I Using the sorting strategy from “Efficient distributed quantumcomputing”3;

I We used odd-even mergesort;I It is possible to perform the sorting of t elements using

O(t(b + (log t)2)) ancillas and O(t1/2(log t)2) steps.

3Efficient distributed quantum computingBeals, Robert and Brierley, Stephen and Gray, Oliver and Harrow, Aram W.and Kutin, Samuel and Linden, Noah and Shepherd, Dan and Stather, Mark

18 / 24

Page 41: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Reversibility

Reversibility of Distinguished point

I Bennett-Tompa technique to build a reversible circuit for Hnd ;

I It is possible to achieve a+O(b log2 n) ancillas and gate depthO(gn1+ε).

Reversibility of sorting on a mesh network

I Using the sorting strategy from “Efficient distributed quantumcomputing”3;

I We used odd-even mergesort;I It is possible to perform the sorting of t elements using

O(t(b + (log t)2)) ancillas and O(t1/2(log t)2) steps.

3Efficient distributed quantum computingBeals, Robert and Brierley, Stephen and Gray, Oliver and Harrow, Aram W.and Kutin, Samuel and Linden, Noah and Shepherd, Dan and Stather, Mark

18 / 24

Page 42: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Finding t-images

Fix images y1, . . . , yt . We build a reversible circuit that performsthe following operations:

I Input a vector (x1, . . . , xt).

I Compute, in parallel, the chain ends for x1, . . . , xt : i.e.,Hnd (x1), . . . ,H

nd (xt).

I Precompute the chain ends for y1, . . . , yt .I Sort the chain ends for x1, . . . , xt and the chain ends for

y1, . . . , yt .I If there is a collision, say a collision between the chain end for

xi and the chain end for yj : recompute the chain for xi ,checking each chain element to see whether it is a preimagefor yj .

I Output 0 if a preimage was found, otherwise 1.

19 / 24

Page 43: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Finding t-images

Fix images y1, . . . , yt . We build a reversible circuit that performsthe following operations:

I Input a vector (x1, . . . , xt).I Compute, in parallel, the chain ends for x1, . . . , xt : i.e.,

Hnd (x1), . . . ,H

nd (xt).

I Precompute the chain ends for y1, . . . , yt .I Sort the chain ends for x1, . . . , xt and the chain ends for

y1, . . . , yt .I If there is a collision, say a collision between the chain end for

xi and the chain end for yj : recompute the chain for xi ,checking each chain element to see whether it is a preimagefor yj .

I Output 0 if a preimage was found, otherwise 1.

19 / 24

Page 44: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Finding t-images

Fix images y1, . . . , yt . We build a reversible circuit that performsthe following operations:

I Input a vector (x1, . . . , xt).I Compute, in parallel, the chain ends for x1, . . . , xt : i.e.,

Hnd (x1), . . . ,H

nd (xt).

I Precompute the chain ends for y1, . . . , yt .

I Sort the chain ends for x1, . . . , xt and the chain ends fory1, . . . , yt .

I If there is a collision, say a collision between the chain end forxi and the chain end for yj : recompute the chain for xi ,checking each chain element to see whether it is a preimagefor yj .

I Output 0 if a preimage was found, otherwise 1.

19 / 24

Page 45: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Finding t-images

Fix images y1, . . . , yt . We build a reversible circuit that performsthe following operations:

I Input a vector (x1, . . . , xt).I Compute, in parallel, the chain ends for x1, . . . , xt : i.e.,

Hnd (x1), . . . ,H

nd (xt).

I Precompute the chain ends for y1, . . . , yt .I Sort the chain ends for x1, . . . , xt and the chain ends for

y1, . . . , yt .

I If there is a collision, say a collision between the chain end forxi and the chain end for yj : recompute the chain for xi ,checking each chain element to see whether it is a preimagefor yj .

I Output 0 if a preimage was found, otherwise 1.

19 / 24

Page 46: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Finding t-images

Fix images y1, . . . , yt . We build a reversible circuit that performsthe following operations:

I Input a vector (x1, . . . , xt).I Compute, in parallel, the chain ends for x1, . . . , xt : i.e.,

Hnd (x1), . . . ,H

nd (xt).

I Precompute the chain ends for y1, . . . , yt .I Sort the chain ends for x1, . . . , xt and the chain ends for

y1, . . . , yt .I If there is a collision, say a collision between the chain end for

xi and the chain end for yj : recompute the chain for xi ,checking each chain element to see whether it is a preimagefor yj .

I Output 0 if a preimage was found, otherwise 1.

19 / 24

Page 47: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Finding t-images

Fix images y1, . . . , yt . We build a reversible circuit that performsthe following operations:

I Input a vector (x1, . . . , xt).I Compute, in parallel, the chain ends for x1, . . . , xt : i.e.,

Hnd (x1), . . . ,H

nd (xt).

I Precompute the chain ends for y1, . . . , yt .I Sort the chain ends for x1, . . . , xt and the chain ends for

y1, . . . , yt .I If there is a collision, say a collision between the chain end for

xi and the chain end for yj : recompute the chain for xi ,checking each chain element to see whether it is a preimagefor yj .

I Output 0 if a preimage was found, otherwise 1.

19 / 24

Page 48: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Example

I Imagine AES−128;

I Consider t = 240 and p = 240, for this example.I The probability to find is roughly t5/2/N; For our example:

(240)5/2/2128 ≈ 2−28.I Each processor is going to use

√N/pt3/2 iterations;

I√

2128/240(240)3/2 ≈√

2128/2100

=√228 = 214 iterations.

20 / 24

Page 49: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Example

I Imagine AES−128;I Consider t = 240 and p = 240, for this example.

I The probability to find is roughly t5/2/N; For our example:(240)5/2/2128 ≈ 2−28.

I Each processor is going to use√N/pt3/2 iterations;

I√

2128/240(240)3/2 ≈√

2128/2100

=√228 = 214 iterations.

20 / 24

Page 50: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Example

I Imagine AES−128;I Consider t = 240 and p = 240, for this example.I The probability to find is roughly t5/2/N; For our example:

(240)5/2/2128 ≈ 2−28.

I Each processor is going to use√N/pt3/2 iterations;

I√

2128/240(240)3/2 ≈√

2128/2100

=√228 = 214 iterations.

20 / 24

Page 51: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Example

I Imagine AES−128;I Consider t = 240 and p = 240, for this example.I The probability to find is roughly t5/2/N; For our example:

(240)5/2/2128 ≈ 2−28.I Each processor is going to use

√N/pt3/2 iterations;

I√

2128/240(240)3/2 ≈√

2128/2100

=√228 = 214 iterations.

20 / 24

Page 52: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Example

I Imagine AES−128;I Consider t = 240 and p = 240, for this example.I The probability to find is roughly t5/2/N; For our example:

(240)5/2/2128 ≈ 2−28.I Each processor is going to use

√N/pt3/2 iterations;

I√

2128/240(240)3/2 ≈√

2128/2100

=√228 = 214 iterations.

20 / 24

Page 53: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Conclusion

Conclusion:I Circuit uses O(a+ tb + t(log t)2) ancillas;I Depth of O(

√N/pt1/2(gtε/2 + (log t)2 log b));

I Approximately√N/pt3/2 iterations.

I Create the circuit using quantum simulator for AES;I We already implemented using libquantum; One round of AES

with 11, 100 gates;4 (libquantum instead of LiQUi |〉);

4Applying Grover’s algorithm to AES: quantum resource estimatesGrassl, Markus and Langenberg, Brandon and Roetteler, Martin andSteinwandt, Rainer

21 / 24

Page 54: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Outreach

I This work was at SAC 2017;I We gave a talk at CWG (Crypto working group) reaching the

Dutch community;I We gave a talk at Quantum Cryptanalysis Seminar in Dagstuhl

(Reaching the scientific community);I Ei/ψ - Security in times of surveillance (General Public);

22 / 24

Page 55: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

What’s next?I Check for the real number of qubits/gates giving an

implementation;I Change libquantum for “Big Integer”;I Implement the work from “Quantum resources estimates for

ECC”5;I Finish the side channel attacks on ECC (work with Riscure);

I Quantum Research Retreat(QRR) in Eindhoven (midDecember,https://cryptme.in/events/);

5Quantum resource estimates for computing elliptic curve discretelogarithmsMartin Roetteler, Michael Naehrig, Krysta M. Svore, Kristin Lauter

23 / 24

Page 56: Multi-target Preimage search using parallel Grover · Multi-target Preimage search using parallel Grover Gustavo Banegas1 andDanielJ.Bernstein1;2 ECRYPT-NETMeeting October11th,2017

Questions

Thank you for your attention.Questions?

[email protected]

24 / 24