Grow & Cut - Using Representations in Cryptanalysis Alexander - - PowerPoint PPT Presentation

grow cut using representations in cryptanalysis
SMART_READER_LITE
LIVE PREVIEW

Grow & Cut - Using Representations in Cryptanalysis Alexander - - PowerPoint PPT Presentation

Grow & Cut - Using Representations in Cryptanalysis Alexander Meurer , Ruhr-Universitt Bochum ECRYPT Summer School on Tools, Mykonos, 2012 Motivation Motivation Generic technique for combinatorial problems Simple (no complicated


slide-1
SLIDE 1

Grow & Cut - Using Representations in Cryptanalysis

Alexander Meurer, Ruhr-Universität Bochum ECRYPT Summer School on Tools, Mykonos, 2012

slide-2
SLIDE 2

Motivation Motivation

  • Generic technique for combinatorial problems
  • Simple (no complicated math needed)
  • Powerful (3x Eurocrypt, 1x Asiacrypt)
  • Versatile (fnd more applications!)
slide-3
SLIDE 3

Motivation Motivation

  • Generic technique for combinatorial problems
  • Simple (no complicated math needed)
  • Powerful (3x Eurocrypt, 1x Asiacrypt)
  • Versatile (fnd more applications!)
slide-4
SLIDE 4

Motivation Motivation

  • Generic technique for combinatorial problems
  • Simple (no complicated math needed)
  • Powerful (3x Eurocrypt, 1x Asiacrypt)
  • Versatile (fnd more applications!)
slide-5
SLIDE 5

Motivation Motivation

  • Generic technique for combinatorial problems
  • Simple (no complicated math needed)
  • Powerful (3x Eurocrypt, 1x Asiacrypt)
  • Versatile (fnd more applications!)
slide-6
SLIDE 6

Motivation Motivation

  • Generic technique for combinatorial problems
  • Simple (no complicated math needed)
  • Powerful (3x Eurocrypt, 1x Asiacrypt)
  • Versatile (fnd more applications!)

This talk:

  • High-level introduction
  • Spotlight low-level pitfalls
slide-7
SLIDE 7

Motivation Motivation

  • Generic technique for combinatorial problems
  • Simple (no complicated math needed)
  • Powerful (3x Eurocrypt, 1x Asiacrypt)
  • Versatile (fnd more applications!)

This talk:

  • High-level introduction
  • Spotlight low-level pitfalls

Corresponding slides marked with

slide-8
SLIDE 8

Outline Outline

1 1

Knapsack problem

2 2

Basic representation technique

3 3

Information Set Decoding

4 4

Extended representation technique

5 5

Conclusion & open questions

slide-9
SLIDE 9

The Knapsack Problem The Knapsack Problem

slide-10
SLIDE 10

Knapsack Problem Knapsack Problem

  • Given positive integers S and a1 , … , an consider

equation

  • Decisional knapsack problem

Is there a {0,1} solution?

  • Computational knapsack problem: Find it!
slide-11
SLIDE 11

Knapsack Problem Knapsack Problem

  • Given positive integers S and a1 , … , an consider

equation

  • Decisional knapsack problem

Is there a {0,1} solution?

  • Computational knapsack problem: Find it!

Simplifying Assumptions:

  • Hamming weight wt(x) of x=( x1 , … , xn ) is known
  • wt(x) = n / 2 (hardest case)
slide-12
SLIDE 12

Basic Facts Basic Facts

  • Decisional version is NP-complete
  • Computational version is NP-hard
  • Crucial parameter: Density
  • There are a lot of easy knapsacks ( e.g. low

density d<0.94 or structured ai )

slide-13
SLIDE 13

Basic Facts Basic Facts

  • Decisional version is NP-complete
  • Computational version is NP-hard
  • Crucial parameter: Density
  • There are a lot of easy knapsacks ( e.g. low

density d<0.94 or structured ai )

We will consider random knapsacks

  • f density d ≈ 1, i.e. ai ←R {1,...,2n}
slide-14
SLIDE 14

Elementary Algorithms Elementary Algorithms

  • Brute-Force: Time O(2n) and Space O(1)
  • Meet-in-the-Middle algorithm based on

yields Time O(2n/2) and Space O(2n/2)

slide-15
SLIDE 15

Elementary Algorithms Elementary Algorithms

  • Brute-Force: Time O(2n) and Space O(1)
  • Meet-in-the-Middle algorithm based on

yields Time O(2n/2) and Space O(2n/2)

slide-16
SLIDE 16

Schroeppel-Shamir Algorithm Schroeppel-Shamir Algorithm

  • To run the MitM algorithm, it suffces to

enumerate the sets

  • n-the-fy in increasing order
  • Can be done with less memory
  • Time O(2n/2) and Space O(2n/4)
slide-17
SLIDE 17

Schroeppel-Shamir Algorithm Schroeppel-Shamir Algorithm

  • To run the MitM algorithm, it suffces to

enumerate the sets

  • n-the-fy in increasing order
  • Can be done with less memory
  • Time O(2n/2) and Space O(2n/4)

So far: All algorithms deterministic!

slide-18
SLIDE 18

The Representation Technique The Representation Technique

slide-19
SLIDE 19

The Representation Technique [HGJ10] The Representation Technique [HGJ10]

How to fnd a needle N in a haystack H

slide-20
SLIDE 20

The Representation Technique [HGJ10] The Representation Technique [HGJ10]

...or how to fnd a grain of rice among sand...

slide-21
SLIDE 21

The Representation Technique [HGJ10] The Representation Technique [HGJ10]

  • Expand H into larger stack H'
  • Expanding H' introduces r many representations

N1 , … , Nr

  • Examine a 1/r – fraction of H' to fnd one Ni
slide-22
SLIDE 22

The Representation Technique [HGJ10] The Representation Technique [HGJ10]

  • Expand H into larger stack H'
  • Expanding H' introduces r many representations

N1 , … , Nr

  • Examine a 1/r – fraction of H' to fnd one Ni

Technicality: Find a way to examine a 1/r – fraction

  • f H' without completely

constructing it beforehand Technicality: Find a way to examine a 1/r – fraction

  • f H' without completely

constructing it beforehand

slide-23
SLIDE 23

Building Block: Merging Lists Building Block: Merging Lists

  • Given: two sorted lists of labeled elements
slide-24
SLIDE 24

Building Block: Merging Lists Building Block: Merging Lists

  • Given: two sorted lists of labeled elements
  • Labeling function ¸
  • Maps x onto totally
  • rdered set ( ¤ , ≤ )
  • Assigns „uniformly dis-

tributed“ labels

slide-25
SLIDE 25

Building Block: Merging Lists Building Block: Merging Lists

  • Given: two sorted lists of labeled elements
  • Compute all ( xL , xR ) with ¸L(xL) = ¸R(xR)
slide-26
SLIDE 26

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

slide-27
SLIDE 27

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

Both lists sorted according to those labels

slide-28
SLIDE 28

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 1 j = 1

slide-29
SLIDE 29

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 1 j = 1

If ¸L(xL

i) < ¸R(xR j) then i++

slide-30
SLIDE 30

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 2 j = 1

If ¸L(xL

i) < ¸R(xR j) then i++

slide-31
SLIDE 31

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 2 j = 1

If ¸L(xL

i) > ¸R(xR j) then j++

slide-32
SLIDE 32

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 2 j = 2

If ¸L(xL

i) > ¸R(xR j) then j++

slide-33
SLIDE 33

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 2 j = 2

If ¸L(xL

i) = ¸R(xR j) then

  • Find minimal i* with ¸L(xL

i) < ¸L(xL i*)

  • Find minimal j* with ¸R(xR

j) < ¸R(xR j*)

slide-34
SLIDE 34

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 2 j = 2 i* = 6 j* = 4

slide-35
SLIDE 35

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i* = 6 j* = 4

Output all ( xL

I , xR J ) for i ≤ I < i* and j ≤ J < j*

i = 2 j = 2

slide-36
SLIDE 36

Building Block: Merging Lists Building Block: Merging Lists

xL

1 , ¸L(xL 1)

xL

2 , ¸L(xL 2)

. . . . . . xL

m , ¸L(xL m)

xR

1 , ¸R(xR 1)

xR

2 , ¸R(xR 2)

. . . . . . xR

n , ¸R(xR n)

i = 6 j = 4

Continue with i := i* and j := j* until end

  • f one list reached
slide-37
SLIDE 37

Building Block: Merging Lists Building Block: Merging Lists

  • Denote C the number of collisions
  • Complexity at most
  • Expected number of collisions C

since ¸ assigns uniform labels

slide-38
SLIDE 38

Building Block: Merging Lists Building Block: Merging Lists

  • Given: two sorted lists of labeled elements
  • Compute all ( xL , xR ) with ¸L(xL) = ¸R(xR) that

fulfll a predicate ∏( xL , xR ) = 1

slide-39
SLIDE 39
  • Given: two sorted lists of labeled elements
  • Compute all ( xL , xR ) with ¸L(xL) = ¸R(xR) that

fulfll a predicate ∏( xL , xR ) = 1 e.g. wt( xL + xR ) = w for some appropriately chosen parameter w

Building Block: Merging Lists Building Block: Merging Lists

slide-40
SLIDE 40
  • Given: two sorted lists of labeled elements
  • Compute all ( xL , xR ) with ¸L(xL) = ¸R(xR) that

fulfll a predicate ∏( xL , xR ) = 1

Size of merged lists might be smaller than number of collisions C!

Building Block: Merging Lists Building Block: Merging Lists

e.g. wt( xL + xR ) = w for some appropriately chosen parameter w

slide-41
SLIDE 41

Knapsack Representation Technique Knapsack Representation Technique

Expand H into larger stack H'

slide-42
SLIDE 42

Expanding the Knapsack Haystack Expanding the Knapsack Haystack

  • Recall: Classical MitM haystack

H = {0,1}n/2 x {0}n/2

  • f size 2n/2
slide-43
SLIDE 43

Expanding the Knapsack Haystack Expanding the Knapsack Haystack

  • Recall: Classical MitM haystack

H = {0,1}n/2 x {0}n/2

  • f size 2n/2

Contains unique Needle ( x1 , … , xn/2 )

slide-44
SLIDE 44

Expanding the Knapsack Haystack Expanding the Knapsack Haystack

  • Recall: Classical MitM haystack

H = {0,1}n/2 x {0}n/2

  • f size 2n/2
  • New expanded haystack

H' = { x 2 {0,1}n : wt(x) = n/4 }

slide-45
SLIDE 45

Expanding the Knapsack Haystack Expanding the Knapsack Haystack

  • Recall: Classical MitM haystack

H = {0,1}n/2 x {0}n/2

  • f size 2n/2
  • New expanded haystack

H' = { x 2 {0,1}n : wt(x) = n/4 }

slide-46
SLIDE 46

Knapsack Representation Technique Knapsack Representation Technique

Expanding H' introduces r many representations N1 , … , Nr

slide-47
SLIDE 47

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-48
SLIDE 48

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-49
SLIDE 49

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-50
SLIDE 50

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-51
SLIDE 51

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-52
SLIDE 52

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-53
SLIDE 53

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 )

slide-54
SLIDE 54

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 ) We can choose 2 out of 4 of the 1-entries, so many representations

slide-55
SLIDE 55

Number of Knapsack Representations Number of Knapsack Representations

  • Example (n=8)
  • Denote x* = ( 1 0 1 1 0 0 1 0) the solution
  • x* can be represented as

( 1 0 1 0 0 0 0 0 ) + ( 0 0 0 1 0 0 1 0 ) ( 1 0 0 1 0 0 0 0 ) + ( 0 0 1 0 0 0 1 0 ) ( 1 0 0 0 0 0 1 0 ) + ( 0 0 1 1 0 0 0 0 ) ( 0 0 1 1 0 0 0 0 ) + ( 1 0 0 0 0 0 1 0 ) ( 0 0 1 0 0 0 1 0 ) + ( 1 0 0 1 0 0 0 0 ) ( 0 0 0 1 0 0 1 0 ) + ( 1 0 1 0 0 0 0 0 ) We can choose 2 out of 4 of the 1-entries, so many representations In general: many representations

slide-56
SLIDE 56

Knapsack Representation Technique Knapsack Representation Technique

Examine a 1/r – fraction of H' to fnd one Ni

slide-57
SLIDE 57

The Cutting Phase The Cutting Phase

  • We need to flter out a 2-n/2 fraction of

H' = { x 2 {0,1}n : wt(x) = n/4 }

  • For

compute two lists

  • Find one (x,y) with
  • ver
slide-58
SLIDE 58

The Cutting Phase The Cutting Phase

  • We need to flter out a 2-n/2 fraction of

H' = { x 2 {0,1}n : wt(x) = n/4 }

  • For

compute two lists

  • Find one (x,y) with
  • ver
slide-59
SLIDE 59

The Cutting Phase The Cutting Phase

  • We need to flter out a 2-n/2 fraction of

H' = { x 2 {0,1}n : wt(x) = n/4 }

  • For

compute two lists

  • Find one (x,y) with
  • ver
slide-60
SLIDE 60

The Cutting Phase The Cutting Phase

  • We need to flter out a 2-n/2 fraction of

H' = { x 2 {0,1}n : wt(x) = n/4 }

  • For

compute two lists

  • Find one (x,y) with
  • ver

Complexity

slide-61
SLIDE 61

The Cutting Phase The Cutting Phase

  • We need to flter out a 2-n/2 fraction of

H' = { x 2 {0,1}n : wt(x) = n/4 }

  • For

compute two lists

  • Find one (x,y) with
  • ver

Complexity Computing the is in fact more expensive!

slide-62
SLIDE 62

Computing Computing L L1

1 - 1

  • 1st

st Attempt

Attempt

  • Idea: Do it in a Meet-in-the-Middle way
  • Choose a (random) partition
  • Merge the lists
slide-63
SLIDE 63

Computing Computing L L1

1 - 1

  • 1st

st Attempt

Attempt

  • Idea: Do it in a Meet-in-the-Middle way
  • Choose a (random) partition
  • Merge the lists
slide-64
SLIDE 64

Computing Computing L L1

1 - 1

  • 1st

st Attempt

Attempt

  • Idea: Do it in a Meet-in-the-Middle way
  • Choose a (random) partition
  • Merge the lists

Choose labels

slide-65
SLIDE 65

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

List sizes

slide-66
SLIDE 66

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

List sizes

slide-67
SLIDE 67

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

List sizes

slide-68
SLIDE 68

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

List sizes

slide-69
SLIDE 69

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

x

List sizes

slide-70
SLIDE 70

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

x

List sizes

Complexity* = Max = 20.4057n

slide-71
SLIDE 71

Complexity Analysis: 1 Complexity Analysis: 1st

st Attempt

Attempt

x

List sizes

Complexity* = Max = 20.4057n

If assign uniform labels

slide-72
SLIDE 72

¸ ¸L

L and

and ¸

¸R

R are almost always good

are almost always good

  • Recall
  • Example: Good and bad distributed labels (n=20)

random ai ai = 0 for i=1,...,n/2

slide-73
SLIDE 73
  • Recall
  • Example: Good and bad distributed labels (n=20)

random ai ai = 0 for i=1,...,n/2

One can show: Fraction of bad knapsacks (a1, … , an) is exponentially small!

¸ ¸L

L and

and ¸

¸R

R are almost always good

are almost always good

slide-74
SLIDE 74

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

  • Aim: Compute 2-n/2 fraction of

H' = { x 2 2 {0,1}n : wt(x) = n/4 }

  • Idea: Use representations again!
  • Decompose x2H' as x = y+z where y,z 2

2 H'' and H'' = { y 2 2 {0,1}n : wt(y) = n/8 } → Every x has representations (y,z)

slide-75
SLIDE 75

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

  • Aim: Compute 2-n/2 fraction of

H' = { x 2 2 {0,1}n : wt(x) = n/4 }

  • Idea: Use representations again!
  • Decompose x2H' as x = y+z where y,z 2

2 H'' and H'' = { y 2 2 {0,1}n : wt(y) = n/8 } → Every x has representations (y,z)

slide-76
SLIDE 76
  • Choose coprime M(1) and M(2) of size 20.25n
  • Choose random target values (of size 20.25n)

with with

  • Compute lists
  • Merge into

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

slide-77
SLIDE 77
  • Choose coprime M(1) and M(2) of size 20.25n
  • Choose random target values (of size 20.25n)

with with

  • Compute lists
  • Merge into

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

slide-78
SLIDE 78
  • Choose coprime M(1) and M(2) of size 20.25n
  • Choose random target values (of size 20.25n)

with with

  • Compute lists
  • Merge into

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

slide-79
SLIDE 79
  • Choose coprime M(1) and M(2) of size 20.25n
  • Choose random target values (of size 20.25n)

with with

  • Compute lists
  • Merge into

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

Can be computed as before by a MitM approach!

slide-80
SLIDE 80
  • Choose coprime M(1) and M(2) of size 20.25n
  • Choose random target values (of size 20.25n)

with with

  • Compute lists
  • Merge into

Computing Computing L L1

1 - 2

  • 2nd

nd Attempt

Attempt

slide-81
SLIDE 81

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

Randomly partioned base lists

List sizes

slide-82
SLIDE 82

Randomly partioned base lists

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-83
SLIDE 83

Randomly partioned base lists

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-84
SLIDE 84

Randomly partioned base lists

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-85
SLIDE 85

Randomly partioned base lists

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-86
SLIDE 86

Randomly partioned base lists

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-87
SLIDE 87

Randomly partioned base lists

List sizes Two modular constraints:

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-88
SLIDE 88

Randomly partioned base lists x

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-89
SLIDE 89

Randomly partioned base lists x

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

Complexity = Max = 20.3113n Lower bound achieved?

slide-90
SLIDE 90

Randomly partioned base lists x

List sizes

No! Forgot merge costs!

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-91
SLIDE 91

Randomly partioned base lists x

List sizes

Complexity Analysis: 2 Complexity Analysis: 2nd

nd Attempt

Attempt

slide-92
SLIDE 92

Summary (so far) Summary (so far)

  • Represenation Technique gives fastest

(randomized) algorithm for random hard knapsacks Time Space Brute-Force 2n 1 MitM 2n/2 2n/2 Schroeppel-Shamir 2n/2 2n/4 Representations 20.3373n 20.2936n

slide-93
SLIDE 93

Generic Decoding of Random Generic Decoding of Random Binary Linear Codes Binary Linear Codes

slide-94
SLIDE 94

Recap Binary Linear Codes Recap Binary Linear Codes

  • C = random binary [n,k,d] code
  • n = length / k = dimension / d = minimum

distance

  • Given x = c+e with c C

and w := wt(e) =

  • Find e and thus c = x+e

2

4 5 d-1 2 · · · ·

c 4 5 d-1 2 x·

Bounded Distance Decoding (BDD) Bounded Distance Decoding (BDD)

slide-95
SLIDE 95

Why do we care about BDD? Why do we care about BDD?

  • BDD is connected to
  • Message Recovery for classical McEliece

c = m*G + e

  • Key recovery for Stern's identifcation scheme

id = H*s

  • Hardness of the LPN problem (Learning

Parities with noise)

slide-96
SLIDE 96

Comparing Running Times Comparing Running Times

How to compare performance of decoding algorithms

  • Running time T(n,k,d)
  • Fixed code rate R = k/n
  • For n→∞, k and d are related via Gilbert-Varshamov

bound, thus T(n,k,d) = T(n,k) = T(n,R)

  • Compare algorithms by complexity coeffcient F(R), i.e.

T(n,R) = 2F(R) • n + o(n)

slide-97
SLIDE 97

How to compare performance of decoding algorithms

  • Running time T(n,k,d)
  • Fixed code rate R = k/n
  • For n→∞, k and d are related via Gilbert-Varshamov

bound, thus T(n,k,d) = T(n,k) = T(n,R)

  • Compare algorithms by complexity coeffcient F(R), i.e.

T(n,R) = 2F(R) • n + o(n) Minimize F(R)! Minimize F(R)!

Comparing Running Times Comparing Running Times

slide-98
SLIDE 98

Syndrome Decoding Syndrome Decoding

  • H = parity check matrix
  • Consider syndrome s := s(x) = H·x = H·(c+e) = H·e

→ Find linear combination of w columns of H matching s

H

weight w n n-k

= + + =

s

(BDD) Given x = c+e with c C and wt(e)=w, fnd e!

2

slide-99
SLIDE 99

Syndrome Decoding Syndrome Decoding

  • H = parity check matrix
  • Consider syndrome s := s(x) = H·x = H·(c+e) = H·e

→ Find linear combination of w columns of H matching s

H

weight w n n-k

= + + =

s

(BDD) Given x = c+e with c C and wt(e)=w, fnd e!

2

Brute-Force complexity T(n,k,d) = Brute-Force complexity T(n,k,d) =

slide-100
SLIDE 100

Complexity Coeffcients (BDD) Complexity Coeffcients (BDD)

Brute-Force

F(R)

0,3868 0,06 0,05

slide-101
SLIDE 101

Complexity Coeffcients (BDD) Complexity Coeffcients (BDD)

Brute-Force

F(R)

0,3868 0,06 0,05 0,0576 Prange

slide-102
SLIDE 102

Complexity Coeffcients (BDD) Complexity Coeffcients (BDD)

Brute-Force

F(R)

0,3868 0,06 0,05 0,0576 Prange 0,0557 Stern

slide-103
SLIDE 103

Complexity Coeffcients (BDD) Complexity Coeffcients (BDD)

Brute-Force

F(R)

0,3868 0,06 0,05 0,0576 Prange 0,0557 Stern 0,0556 Ball-Collision

slide-104
SLIDE 104

Some Basic Observations for BDD Some Basic Observations for BDD

Allowed (linear algebra) transformations

  • Permuting the columns of H does not change the

problem

slide-105
SLIDE 105

Some Basic Observations for BDD Some Basic Observations for BDD

Allowed (linear algebra) transformations

  • Permuting the columns of H does not change the

problem

= s

weight w

H

n-k n

slide-106
SLIDE 106

Some Basic Observations for BDD Some Basic Observations for BDD

Allowed (linear algebra) transformations

  • Permuting the columns of H does not change the

problem

= s

weight w

H

n-k n

= s

weight w

H

n-k n

= s

weight w

H

n-k n

slide-107
SLIDE 107

Some Basic Observations for BDD Some Basic Observations for BDD

Allowed (linear algebra) transformations

  • Permuting the columns of H does not change the

problem

  • Elementary row operations on H do not change the

problem

slide-108
SLIDE 108

Some Basic Observations for BDD Some Basic Observations for BDD

Allowed (linear algebra) transformations

  • Permuting the columns of H does not change the

problem

  • Elementary row operations on H do not change the

problem

=

weight w

H

n-k n

s

slide-109
SLIDE 109

Some Basic Observations for BDD Some Basic Observations for BDD

Allowed (linear algebra) transformations

  • Permuting the columns of H does not change the

problem

  • Elementary row operations on H do not change the

problem

=

weight w

H

n-k n

s = s

weight w

H

n-k n

UG

Invertible (n-k)x(n-k) matrix

UG

slide-110
SLIDE 110

Randomized quasi-systematic form Randomized quasi-systematic form

  • Work on randomly column-permuted version of H
  • Transform H into quasi-systematic form

First used in generalized ISD framework of [FS09]

In-k-l In-k-l

l rows

Q' q1 , ..., qk+l

k+l n-k-l

H =

slide-111
SLIDE 111

Information Set Decoding Information Set Decoding

''Reducing the brute-force search space by linear algebra.''

slide-112
SLIDE 112

The ISD Principle The ISD Principle

  • Structure of H allows to divide e =

e1 e2

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

k+l n-k-l

slide-113
SLIDE 113

The ISD Principle The ISD Principle

  • Structure of H allows to divide e =

e1 e2

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

=

Q' q1 , ..., qk+l

e1

In-k-l In-k-l

e2

+

slide-114
SLIDE 114

The ISD Principle The ISD Principle

  • Structure of H allows to divide e =

e1 e2

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

=

Q' q1 , ..., qk+l

e1

In-k-l In-k-l

e2

+

* *

= +

* * *

= !

s

l coordinates

slide-115
SLIDE 115

The ISD Principle The ISD Principle

  • Structure of H allows to divide e =

e1 e2

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

=

Q' q1 , ..., qk+l

e1

In-k-l In-k-l

e2

+

* *

= +

* * *

= !

s

l coordinates

Focus on e1 matching s on frst l coordinates Focus on e1 matching s on frst l coordinates

slide-116
SLIDE 116

The ISD Principle The ISD Principle

  • Structure of H allows to divide e = e1

e2

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

=

Q' q1 , ..., qk+l

e1

In-k-l In-k-l

e2

+

* *

= +

* * *

= !

s

l coordinates

Find all e1 of weight p matching s on frst l coordinates

slide-117
SLIDE 117

The ISD Principle The ISD Principle

  • Structure of H allows to divide e = e1

e2

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

=

Q' q1 , ..., qk+l

e1

In-k-l In-k-l

e2

+

* *

= +

* * *

= !

s

l coordinates

Find all e1 of weight p matching s on frst l coordinates

In-k-l In-k-l Q' q1 , ..., qk+l

e1 e2

= =

  • Method only recovers

particular error patterns

  • If no solution found:

→ Rerandomize H

k+l n-k-l p w-p

e1 e2

slide-118
SLIDE 118

The ISD Principle The ISD Principle

  • 1st step (randomization): Compute „fresh“ random quasi-

systematic form of H

  • 2nd step (search): Try to fnd a solution e amongst all

q1 , ..., qk+l

e1

=

s

H

k+l n-k-l p w-p

e1 e2

with

slide-119
SLIDE 119

The ISD Principle The ISD Principle

  • 1st step (randomization): Compute „fresh“ random quasi-

systematic form of H

  • 2nd step (search): Try to fnd a solution e amongst all

q1 , ..., qk+l

e1

=

s

H

k+l n-k-l p w-p

e1 e2

with

T = Pr[„good rand.“]-1 * T[search]

slide-120
SLIDE 120

Link to the Representation Technique Link to the Representation Technique

Find vector

  • f weight p with

e1

q1 , ..., qk+l

e1

=

s

slide-121
SLIDE 121

Link to the Representation Technique Link to the Representation Technique

Find vector

  • f weight p with

e1

q1 , ..., qk+l

e1

=

s

This is exactly a binary coordinate-wise knapsack instance!

slide-122
SLIDE 122

Link to the Representation Technique Link to the Representation Technique

Find vector

  • f weight p with

e1

q1 , ..., qk+l

e1

=

s

Thus using representations improves T[search] !

slide-123
SLIDE 123

Complexity Coeffcients (BDD) Complexity Coeffcients (BDD)

Brute-Force

F(R)

0,3868 0,06 0,05 0,0576 Prange 0,0557 Stern 0,0556 Ball-Collision 0,0537 MMT

slide-124
SLIDE 124

Extended Representation Extended Representation Technique Technique

slide-125
SLIDE 125

Extended Representation Technique Extended Representation Technique

  • Expand H into larger stack H'
  • Expanding H' introduces r many representations

N1 , … , Nr

  • Examine a 1/r – fraction of H' to find one Ni
slide-126
SLIDE 126

Extended Representation Technique Extended Representation Technique

  • Expand H into larger stack H'
  • Expanding H' introduces r many representations

N1 , … , Nr

  • Examine a 1/r – fraction of H' to find one Ni
  • Ratio |H'|/r determines

effciency

  • Idea: Increase r while

keeping |H'| small

slide-127
SLIDE 127

Extended Reps for knapsacks Extended Reps for knapsacks

  • Recall: Basic representation technique allows

to write 1 = 1+0 = 0+1, i.e. x* = ( 1 0 1 1 0 0 1 0) has many reps

slide-128
SLIDE 128

Extended Reps for knapsacks Extended Reps for knapsacks

  • Recall: Basic representation technique allows

to write 1 = 1+0 = 0+1, i.e. x* = ( 1 0 1 1 0 0 1 0) has many reps

  • Artifcially introduce ∆ many -1's and extra 1's

in each part y,z of x* = y + z

slide-129
SLIDE 129

Extended Reps for knapsacks Extended Reps for knapsacks

  • Recall: Basic representation technique allows

to write 1 = 1+0 = 0+1, i.e. x* = ( 1 0 1 1 0 0 1 0) has many reps

  • Artifcially introduce ∆ many -1's and extra 1's

in each part y,z of x* = y + z

  • This allows to represent 2∆ many 0's in x* as

0 = 1+(-1) = (-1)+1

slide-130
SLIDE 130

Extended Reps for knapsacks Extended Reps for knapsacks

  • Recall: Basic representation technique allows

to write 1 = 1+0 = 0+1, i.e. x* = ( 1 0 1 1 0 0 1 0) has many reps

  • Artifcially introduce ∆ many -1's and extra 1's

in each part y,z of x* = y + z

  • This allows to represent 2∆ many 0's in x* as

0 = 1+(-1) = (-1)+1 Size of expanded haystack

slide-131
SLIDE 131

Number of Extended Representations Number of Extended Representations

  • Example (n=8, ∆=1) for x* = ( 1 0 1 1 0 0 1 0)

( 1 -1 1 0 0 0 0 1 ) + ( 0 1 0 1 0 0 1 -1 ) ( 1 -1 0 1 0 0 0 1 ) + ( 0 1 1 0 0 0 1 -1 ) ( 1 0 0 1 -1 0 0 1 ) + ( 0 0 1 0 1 0 1 -1 ) . . .

slide-132
SLIDE 132

Number of Extended Representations Number of Extended Representations

  • Example (n=8, ∆=1) for x* = ( 1 0 1 1 0 0 1 0)

( 1 -1 1 0 0 0 0 1 ) + ( 0 1 0 1 0 0 1 -1 ) ( 1 -1 0 1 0 0 0 1 ) + ( 0 1 1 0 0 0 1 -1 ) ( 1 0 0 1 -1 0 0 1 ) + ( 0 0 1 0 1 0 1 -1 ) . . .

slide-133
SLIDE 133

Number of Extended Representations Number of Extended Representations

  • Example (n=8, ∆=1) for x* = ( 1 0 1 1 0 0 1 0)

( 1 -1 1 0 0 0 0 1 ) + ( 0 1 0 1 0 0 1 -1 ) ( 1 -1 0 1 0 0 0 1 ) + ( 0 1 1 0 0 0 1 -1 ) ( 1 0 0 1 -1 0 0 1 ) + ( 0 0 1 0 1 0 1 -1 ) . . .

slide-134
SLIDE 134

Number of Extended Representations Number of Extended Representations

  • Example (n=8, ∆=1) for x* = ( 1 0 1 1 0 0 1 0)

( 1 -1 1 0 0 0 0 1 ) + ( 0 1 0 1 0 0 1 -1 ) ( 1 -1 0 1 0 0 0 1 ) + ( 0 1 1 0 0 0 1 -1 ) ( 1 0 0 1 -1 0 0 1 ) + ( 0 0 1 0 1 0 1 -1 ) . . . Choose 2 (=n/4) out of 4 (=n/2) positions for 1 and (∆=) 1 positions for -1 and 1 amongst the Remaining 4 (=n/2) free 0-positions

slide-135
SLIDE 135

Number of Extended Representations Number of Extended Representations

  • Example (n=8, ∆=1) for x* = ( 1 0 1 1 0 0 1 0)

( 1 -1 1 0 0 0 0 1 ) + ( 0 1 0 1 0 0 1 -1 ) ( 1 -1 0 1 0 0 0 1 ) + ( 0 1 1 0 0 0 1 -1 ) ( 1 0 0 1 -1 0 0 1 ) + ( 0 0 1 0 1 0 1 -1 ) . . . representations

slide-136
SLIDE 136

Number of Extended Representations Number of Extended Representations

  • Example (n=8, ∆=1) for x* = ( 1 0 1 1 0 0 1 0)

( 1 -1 1 0 0 0 0 1 ) + ( 0 1 0 1 0 0 1 -1 ) ( 1 -1 0 1 0 0 0 1 ) + ( 0 1 1 0 0 0 1 -1 ) ( 1 0 0 1 -1 0 0 1 ) + ( 0 0 1 0 1 0 1 -1 ) . . . In general: representations

slide-137
SLIDE 137

Lower Bound and Actual Complexity Lower Bound and Actual Complexity

  • Minimizing |H'|/r yields optimal ∆=0.05677n and

complexity 20.173n

slide-138
SLIDE 138

Lower Bound and Actual Complexity Lower Bound and Actual Complexity

  • Minimizing |H'|/r yields optimal ∆=0.05677n and

complexity 20.173n

  • Actual complexity is higher (due to all the

) Time Space Brute-Force 2n 1 MitM 2n/2 2n/2 Schroeppel-Shamir 2n/2 2n/4 Representations 20.3373n 20.2936n Extended Reps 20.291n 20.291n

slide-139
SLIDE 139

Extended Reps for ISD Extended Reps for ISD

  • The same trick applies to Information Set

Decoding

  • Write ∆ many 0's as 0=1+1 mod 2
  • Has large impact since usually error vectors are

very sparse (i.e. decomposing 0's introduces many new representations)

slide-140
SLIDE 140

Main Result for ISD: F(R) Main Result for ISD: F(R) ≤ ≤ 0.0494 0.0494

Brute-Force

F(R)

0,3868 0,06 0,05 0,0576 Prange 0,0557 Stern 0,0556 Ball-Collision 0,0537 MMT BJMM 0,0494

slide-141
SLIDE 141

Main Result for ISD: F(R) Main Result for ISD: F(R) ≤ ≤ 0.0494 0.0494

F(R) R

  • - - Ball-Collisions

MMT BJMM

slide-142
SLIDE 142

In Practical terms... In Practical terms...

  • 256-Bit security for McEliece revisited

→ [n,k,d] = [6624,5129,117]

  • Exact complexity analysis (using tricks from

[BLP08]) → Stern ≈ 2256 → Ball-Collisions ≈ 2254 → Our Algorithm ≈ 2239

slide-143
SLIDE 143

Conclusion & Open Questions Conclusion & Open Questions

slide-144
SLIDE 144

Wrapping up... Wrapping up...

  • Representation technique gives asymptotically

fastest algorithms for

  • Random knapsacks
  • Decoding random binary linear codes
  • Practical impact on parameter choice for code-

based crypto (high security levels)

slide-145
SLIDE 145

Some Open Questions Some Open Questions

  • For knapsacks:
  • How far can we go? Use even more reps by

writing 1=(-1)+2=2+(-1) and so on...

  • Tight lower bound?
slide-146
SLIDE 146

Some Open Questions Some Open Questions

  • For ISD:
  • Generalization to non-binary codes?
  • Does it work for multiple syndromes?
slide-147
SLIDE 147

Some Open Questions Some Open Questions

  • For ISD:
  • Generalization to non-binary codes?
  • Does it work for multiple syndromes?
  • Are there further applications? (works also for

NTRU)

slide-148
SLIDE 148

Some Open Questions Some Open Questions

  • For ISD:
  • Generalization to non-binary codes?
  • Does it work for multiple syndromes?
  • Are there further applications? (works also for

NTRU)

Thank you!