Decoding challenge Assessing the practical hardness of syndrome - - PowerPoint PPT Presentation

decoding challenge
SMART_READER_LITE
LIVE PREVIEW

Decoding challenge Assessing the practical hardness of syndrome - - PowerPoint PPT Presentation

Decoding challenge Assessing the practical hardness of syndrome decoding for code-based cryptography Matthieu Lequesne Sorbonne Universit Inria Paris, team Cosmiq February 27, 2020 All you ever wanted to know about code-based crypto


slide-1
SLIDE 1

Decoding challenge

Assessing the practical hardness of syndrome decoding for code-based cryptography Matthieu Lequesne

Sorbonne Université Inria Paris, team Cosmiq February 27, 2020

slide-2
SLIDE 2

All you ever wanted to know about code-based crypto

slide-3
SLIDE 3

Public Key Cryptography

... 1011010001101 1 39

slide-4
SLIDE 4

Public Key Cryptography

... 1011010001101 1 39

slide-5
SLIDE 5

Public Key Cryptography

... 1011010001101

RSA [1977]

1 39

slide-6
SLIDE 6

Public Key Cryptography

... 1011010001101

RSA [1977] + + [1994] /////////// ???

1 39

slide-7
SLIDE 7

Public Key Cryptography

... 1011010001101

RSA [1977] + + [1994] /////////// ???

1 39

slide-8
SLIDE 8

Post-Quantum Cryptography

Post-Quantum Cryptography Lattice Codes Hash Multivariate Isogenies

2 39

slide-9
SLIDE 9

Post-Quantum Cryptography

Post-Quantum Cryptography Lattice Codes Hash Multivariate Isogenies 1978, Robert McEliece: [McE78]

2 39

slide-10
SLIDE 10

Error correcting codes

Definition (Code)

An [n, k]Fq linear code C is a linear subspace of Fn

q of dimension k.

Definition (Decoder)

A decoder for the code C is a function ΦC : Fn

q → C ∪ {?}.

We say that ΦC can decode up to t errors if ∀c ∈ C, ∀e ∈ Fn

q,

|e| ≤ t ⇒ ΦC(c + e) = c.

3 39

slide-11
SLIDE 11

Error correcting codes

Definition (Generator matrix)

A generator matrix of a code C is a matrix G ∈ Fk×n

q

such that: C = {xG | x ∈ Fk

q}.

Definition (Parity-check matrix)

A parity-check matrix of a code C is a matrix H ∈ F(n−k)×n

q

such that: C = {y ∈ Fn

q | Hy⊺ = 0}. 4 39

slide-12
SLIDE 12

Error correcting codes

Example (Repetition Code)

F2 → F3

2

→ (0,0,0) 1 → (1,1,1)

Example (Decoder)

if |x| <= 1: return 0 else: return 1

5 39

slide-13
SLIDE 13

Error correcting codes

Example (Repetition Code)

F2 → F3

2

→ (0,0,0) 1 → (1,1,1)

Example (Decoder)

if |x| <= 1: return 0 else: return 1 G =

  • 1

1 1

  • H =

1 1 1 1

  • 5

39

slide-14
SLIDE 14

Code-based cryptography

Main idea: how hard is it to decode up to t errors?

6 39

slide-15
SLIDE 15

Code-based cryptography

Main idea: how hard is it to decode up to t errors? For a random code t medium hard

6 39

slide-16
SLIDE 16

Code-based cryptography

Main idea: how hard is it to decode up to t errors? For a random code t medium hard For some special families

  • f structured codes

t easy hard

6 39

slide-17
SLIDE 17

Code-based cryptography

Main idea: how hard is it to decode up to t errors? For a random code t medium hard For some special families

  • f structured codes

t easy hard easy = in polynomial time (with trap) medium / hard = requires exponential time

6 39

slide-18
SLIDE 18

Code-based cryptography

Main idea: how hard is it to decode up to t errors? For a random code t medium hard For some special families

  • f structured codes

t easy hard easy = in polynomial time (with trap) medium / hard = requires exponential time

{

CRYPTO

6 39

slide-19
SLIDE 19

How to design a code-based cryptosystem?

7 39

slide-20
SLIDE 20

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes;

7 39

slide-21
SLIDE 21

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes; a decoder ΦF that can correct efficiently up to t errors;

7 39

slide-22
SLIDE 22

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes; a decoder ΦF that can correct efficiently up to t errors; a shaker!

7 39

slide-23
SLIDE 23

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes; a decoder ΦF that can correct efficiently up to t errors; a shaker! Receipe:

KeyGen()

Gsk

$

← − F Gpk ← Shake(Gsk)

Enc(m)

e

$

← − Fn

q, s.t. |e| = t

c ← mGpk + e

Dec(c)

m ← ΦF(Gsk, c)

7 39

slide-24
SLIDE 24

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes; a decoder ΦF that can correct efficiently up to t errors; a shaker! Receipe:

KeyGen()

Gsk

$

← − F Gpk ← Shake(Gsk)

Enc(m)

e

$

← − Fn

q, s.t. |e| = t

c ← mGpk + e

Dec(c)

m ← ΦF(Gsk, c) The key to success: choose t s.t. it is hard to decode t errors for a random code;

7 39

slide-25
SLIDE 25

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes; a decoder ΦF that can correct efficiently up to t errors; a shaker! Receipe:

KeyGen()

Gsk

$

← − F Gpk ← Shake(Gsk)

Enc(m)

e

$

← − Fn

q, s.t. |e| = t

c ← mGpk + e

Dec(c)

m ← ΦF(Gsk, c) The key to success: choose t s.t. it is hard to decode t errors for a random code; ΦF needs the structured version of the code to be efficient;

7 39

slide-26
SLIDE 26

How to design a code-based cryptosystem?

Ingredients: a family F of structured codes; a decoder ΦF that can correct efficiently up to t errors; a shaker! Receipe:

KeyGen()

Gsk

$

← − F Gpk ← Shake(Gsk)

Enc(m)

e

$

← − Fn

q, s.t. |e| = t

c ← mGpk + e

Dec(c)

m ← ΦF(Gsk, c) The key to success: choose t s.t. it is hard to decode t errors for a random code; ΦF needs the structured version of the code to be efficient; the shaker shakes well enough!

7 39

slide-27
SLIDE 27

Security hypothesis

How could Eve break this scheme? 2 possibilities:

  • 1. Reconstruct Gsk from Gpk and then use ΦF to decode.

8 39

slide-28
SLIDE 28

Security hypothesis

How could Eve break this scheme? 2 possibilities:

  • 1. Reconstruct Gsk from Gpk and then use ΦF to decode.

Security hypothesis 1

Gpk is indistinguishable from a random k × n matrix.

8 39

slide-29
SLIDE 29

Security hypothesis

How could Eve break this scheme? 2 possibilities:

  • 1. Reconstruct Gsk from Gpk and then use ΦF to decode.

Security hypothesis 1

Gpk is indistinguishable from a random k × n matrix.

  • 2. Decode using Gpk.

8 39

slide-30
SLIDE 30

Security hypothesis

How could Eve break this scheme? 2 possibilities:

  • 1. Reconstruct Gsk from Gpk and then use ΦF to decode.

Security hypothesis 1

Gpk is indistinguishable from a random k × n matrix.

  • 2. Decode using Gpk.

Security hypothesis 2

Decoding t errors in a random [n, k]-code is hard.

8 39

slide-31
SLIDE 31

Security hypothesis

How could Eve break this scheme? 2 possibilities:

  • 1. Reconstruct Gsk from Gpk and then use ΦF to decode.

Security hypothesis 1

Gpk is indistinguishable from a random k × n matrix.

  • 2. Decode using Gpk.

Security hypothesis 2

Decoding t errors in a random [n, k]-code is hard. Remark: Hypothesis 1 depends on the choice of the family of codes F and the shaker, while Hypothesis 2 is generic!

8 39

slide-32
SLIDE 32

Some examples

Examples of choices of F:

◮ Goppa codes [Original McEliece]; ◮ Reed Solomon codes [Nie86] (broken by [SS92]); ◮ QC-MDPC codes [BIKE]; ◮ Rank-based codes [ROLLO].

9 39

slide-33
SLIDE 33

Some examples

Examples of choices of F:

◮ Goppa codes [Original McEliece]; ◮ Reed Solomon codes [Nie86] (broken by [SS92]); ◮ QC-MDPC codes [BIKE]; ◮ Rank-based codes [ROLLO].

Examples of shakers:

◮ row scrambler; ◮ columns isometry (permutation); ◮ subfield subcode; ◮ adding random columns...

9 39

slide-34
SLIDE 34

Syndrome Decoding

slide-35
SLIDE 35

Syndrome decoding

Let C be an [n, k] linear code of parity-check matrix H. Let y ∈ Fn

q and s = yH⊺ ∈ Fk q (the syndrome of y).

The following problems are equivalent.

10 39

slide-36
SLIDE 36

Syndrome decoding

Let C be an [n, k] linear code of parity-check matrix H. Let y ∈ Fn

q and s = yH⊺ ∈ Fk q (the syndrome of y).

The following problems are equivalent.

  • 1. Find a codeword x ∈ C such that |y − x| ≤ t.

10 39

slide-37
SLIDE 37

Syndrome decoding

Let C be an [n, k] linear code of parity-check matrix H. Let y ∈ Fn

q and s = yH⊺ ∈ Fk q (the syndrome of y).

The following problems are equivalent.

  • 1. Find a codeword x ∈ C such that |y − x| ≤ t.
  • 2. Find an error e ∈ y + C such that |e| ≤ t.

10 39

slide-38
SLIDE 38

Syndrome decoding

Let C be an [n, k] linear code of parity-check matrix H. Let y ∈ Fn

q and s = yH⊺ ∈ Fk q (the syndrome of y).

The following problems are equivalent.

  • 1. Find a codeword x ∈ C such that |y − x| ≤ t.
  • 2. Find an error e ∈ y + C such that |e| ≤ t.
  • 3. Find an error e such that eH⊺ = s and |e| ≤ t.

10 39

slide-39
SLIDE 39

Syndrome decoding

Let C be an [n, k] linear code of parity-check matrix H. Let y ∈ Fn

q and s = yH⊺ ∈ Fk q (the syndrome of y).

The following problems are equivalent.

  • 1. Find a codeword x ∈ C such that |y − x| ≤ t.
  • 2. Find an error e ∈ y + C such that |e| ≤ t.
  • 3. Find an error e such that eH⊺ = s and |e| ≤ t.

The Syndrome Decoding Problem - SD(q, n, R, W)

Instance: H ∈ F(n−k)×n

q

, s ∈ Fn−k

q

. Output: e ∈ Fn

q such that |e| = w and eH⊺ = s,

where k

=⌈Rn⌉, w

=⌈Wn⌉.

10 39

slide-40
SLIDE 40

Complexity

Theorem (NP-completeness)

The Syndrome Decoding problem is NP-complete. [BMvT78]

11 39

slide-41
SLIDE 41

Complexity

Theorem (NP-completeness)

The Syndrome Decoding problem is NP-complete. [BMvT78]

Conjecture (average case)

Decoding nε errors is hard on average ∀ε > 0. [Ale11]

11 39

slide-42
SLIDE 42

Binary Syndrome Decoding Problem

From now on, we focus on the binary case q = 2.

12 39

slide-43
SLIDE 43

Binary Syndrome Decoding Problem

From now on, we focus on the binary case q = 2. e =

Hamming weight w

H = s =

✲ ✛ n ✻ ❄ n − k

Find w columns of H adding to s

12 39

slide-44
SLIDE 44

Binary Syndrome Decoding Problem

From now on, we focus on the binary case q = 2. e =

Hamming weight w

H = s =

✲ ✛ n ✻ ❄ n − k

Find w columns of H adding to s

The next slides of this section are reproduced from Nicolas Sendrier’s MOOC “Code Based Cryptography” with his authorization.

12 39

slide-45
SLIDE 45

Number of solutions

Fix n and k, let w grow:

w

13 39

slide-46
SLIDE 46

Number of solutions

Fix n and k, let w grow:

✲ ✲

n

w

  • 2n−k solutions on average

w

13 39

slide-47
SLIDE 47

Number of solutions

Fix n and k, let w grow:

✲ ✛

at most one solution

n

w

  • 2n−k solutions on average

w

13 39

slide-48
SLIDE 48

Number of solutions

Fix n and k, let w grow:

✲ ✛

at most one solution

n

w

  • 2n−k solutions on average

dGV w dGV

= Gilbert-Varshamov radius, s.t. n

dGV

  • = 2n−k.

13 39

slide-49
SLIDE 49

Number of solutions

Fix n and k, let w grow:

✲ ✛

exactly

✭✭✭✭

at most one solution

n

w

  • 2n−k solutions on average

dGV w dGV

= Gilbert-Varshamov radius, s.t. n

dGV

  • = 2n−k.

In cryptanalysis, we only consider situations where there is a solution.

13 39

slide-50
SLIDE 50

Number of solutions

Fix n and k, let w grow:

✲ ✛

exactly

✭✭✭✭

at most one solution

n

w

  • 2n−k solutions on average

dGV w dGV

= Gilbert-Varshamov radius, s.t. n

dGV

  • = 2n−k.

In cryptanalysis, we only consider situations where there is a solution. We expect ≈ max

  • 1,

n

w

  • /2n−k

solutions.

13 39

slide-51
SLIDE 51

Exhaustive search

Problem: find w columns of H adding to s (modulo 2) H = h1 h2 · · · hn s =

✲ ✛ n ✻ ❄ n − k

14 39

slide-52
SLIDE 52

Exhaustive search

Problem: find w columns of H adding to s (modulo 2) H = h1 h2 · · · hn s =

✲ ✛ n ✻ ❄ n − k

Enumerate all w-tuples (j1, j2, · · · , jw) such that 1 ≤ j1 < j2 < . . . < jw ≤ n. Check whether s + hj1 + hj2 · · · + hjw = 0.

14 39

slide-53
SLIDE 53

Exhaustive search

Problem: find w columns of H adding to s (modulo 2) H = h1 h2 · · · hn s =

✲ ✛ n ✻ ❄ n − k

Enumerate all w-tuples (j1, j2, · · · , jw) such that 1 ≤ j1 < j2 < . . . < jw ≤ n. Check whether s + hj1 + hj2 · · · + hjw = 0. Cost: about n w

  • column operations.

Remark: we obtain all solutions.

14 39

slide-54
SLIDE 54

Birthday algorithm

Problem: find w columns of H adding to s (modulo 2) H = H1 H2 s =

✲ ✛ n ✻ ❄ n − k

15 39

slide-55
SLIDE 55

Birthday algorithm

Problem: find w columns of H adding to s (modulo 2) H = H1 H2 s =

✲ ✛ n ✻ ❄ n − k

Idea: Split H into two equal parts and enumerate the two following sets L1 =

  • e1HT

1, |e1| = w

2

  • and L2 =
  • s + e2HT

2, |e2| = w

2

  • If L1 ∩ L2 = ∅, we have solution(s): s + e1HT

1 + e2HT 2 = 0 15 39

slide-56
SLIDE 56

Birthday algorithm

Problem: find w columns of H adding to s (modulo 2) H = H1 H2 s =

✲ ✛ n ✻ ❄ n − k

Idea: Split H into two equal parts and enumerate the two following sets L1 =

  • e1HT

1, |e1| = w

2

  • and L2 =
  • s + e2HT

2, |e2| = w

2

  • If L1 ∩ L2 = ∅, we have solution(s): s + e1HT

1 + e2HT 2 = 0

Cost: Requires about 2L + L2/2n−k column operations, where L = |L1| = |L2|

15 39

slide-57
SLIDE 57

Birthday algorithm

Compute L1 ∩ L2 =

  • e1HT

1 | |(|e1) = w 2

  • s + e2HT

2 | |(|e2) = w 2

  • H =

H1 H2

✲ ✛ n

s

✻ ❄ n − k

16 39

slide-58
SLIDE 58

Birthday algorithm

Compute L1 ∩ L2 =

  • e1HT

1 | |(|e1) = w 2

  • s + e2HT

2 | |(|e2) = w 2

  • H =

H1 H2

✲ ✛ n

s

✻ ❄ n − k

Total cost: n/2

w/2

  • |L1|

for all e1 of weight w/2 x ← e1HT

1 ; T[x] ← T[x] ∪ {e1} 16 39

slide-59
SLIDE 59

Birthday algorithm

Compute L1 ∩ L2 =

  • e1HT

1 | |(|e1) = w 2

  • s + e2HT

2 | |(|e2) = w 2

  • H =

H1 H2

✲ ✛ n

s

✻ ❄ n − k

Total cost: n/2

w/2

  • +

n/2

w/2

  • |L1|

|L2| for all e1 of weight w/2 x ← e1HT

1 ; T[x] ← T[x] ∪ {e1}

for all e2 of weight w/2 x ← s + e2HT

2 16 39

slide-60
SLIDE 60

Birthday algorithm

Compute L1 ∩ L2 =

  • e1HT

1 | |(|e1) = w 2

  • s + e2HT

2 | |(|e2) = w 2

  • H =

H1 H2

✲ ✛ n

s

✻ ❄ n − k

Total cost: n/2

w/2

  • +

n/2

w/2

  • +

n/2

w/2

2

2n−k

|L1| |L2|

|L1|·|L2| 2n−k

for all e1 of weight w/2 x ← e1HT

1 ; T[x] ← T[x] ∪ {e1}

for all e2 of weight w/2 x ← s + e2HT

2

for all e1 ∈ T[x] I ← I ∪ {(e1, e2)}

16 39

slide-61
SLIDE 61

Birthday algorithm

Compute L1 ∩ L2 =

  • e1HT

1 | |(|e1) = w 2

  • s + e2HT

2 | |(|e2) = w 2

  • H =

H1 H2

✲ ✛ n

s

✻ ❄ n − k

Total cost: n/2

w/2

  • +

n/2

w/2

  • +

n/2

w/2

2

2n−k

|L1| |L2|

|L1|·|L2| 2n−k

for all e1 of weight w/2 x ← e1HT

1 ; T[x] ← T[x] ∪ {e1}

for all e2 of weight w/2 x ← s + e2HT

2

for all e1 ∈ T[x] I ← I ∪ {(e1, e2)} return I

16 39

slide-62
SLIDE 62

Birthday algorithm

One particular error of Hamming weight w splits evenly with probability P = n/2

w/2

2 n

w

  • 17

39

slide-63
SLIDE 63

Birthday algorithm

One particular error of Hamming weight w splits evenly with probability P = n/2

w/2

2 n

w

  • We may have to repeat with H divided in several different ways
  • r more generally by picking the two halves randomly

17 39

slide-64
SLIDE 64

Birthday algorithm

One particular error of Hamming weight w splits evenly with probability P = n/2

w/2

2 n

w

  • We may have to repeat with H divided in several different ways
  • r more generally by picking the two halves randomly

Repeat 1/P times to get most solutions. Cost: O n

w

  • .

17 39

slide-65
SLIDE 65

The power of linear algebra

Until here, we have not used linear algebra!

18 39

slide-66
SLIDE 66

The power of linear algebra

Until here, we have not used linear algebra! For any invertible U ∈ {0, 1}(n−k)×(n−k) and any permutation matrix P ∈ {0, 1}n×n

  • eHT = s
  • e′H′T = s′

where    H′ ← UHP s′ ← sUT e′ ← eP.

18 39

slide-67
SLIDE 67

The power of linear algebra

Until here, we have not used linear algebra! For any invertible U ∈ {0, 1}(n−k)×(n−k) and any permutation matrix P ∈ {0, 1}n×n

  • eHT = s
  • e′H′T = s′

where    H′ ← UHP s′ ← sUT e′ ← eP. Proof: e′H′T = (eP)(UHP)T = (eP)PTHTUT = eHTUT = sUT = s′.

18 39

slide-68
SLIDE 68

Prange’s algorithm

Idea: Perform a Gaussian Elimination and hope that all the errors are in positions corresponding to the identity part! H′ = UHP =

1 1

and s′ = sUT =

❅ ❅ ❅

19 39

slide-69
SLIDE 69

Prange’s algorithm

Idea: Perform a Gaussian Elimination and hope that all the errors are in positions corresponding to the identity part! H′ = UHP =

1 1

and s′ = sUT =

❅ ❅ ❅

possible if the first n−k columns

  • f HP are independent

❍ ❍ ❍ ❨

  • n − k

19 39

slide-70
SLIDE 70

Prange’s algorithm

Idea: Perform a Gaussian Elimination and hope that all the errors are in positions corresponding to the identity part! H′ = UHP =

1 1

and s′ = sUT =

❅ ❅ ❅

e′ = eP =

weight w 19 39

slide-71
SLIDE 71

Prange’s algorithm

Idea: Perform a Gaussian Elimination and hope that all the errors are in positions corresponding to the identity part! H′ = UHP =

1 1

and s′ = sUT =

❅ ❅ ❅

e′ = eP = s′

19 39

slide-72
SLIDE 72

Prange’s algorithm

REPEAT: 1- Pick a permutation matrix P

20 39

slide-73
SLIDE 73

Prange’s algorithm

REPEAT: 1- Pick a permutation matrix P 2- Compute UHP =

1 1 ❅ ❅ ❅

20 39

slide-74
SLIDE 74

Prange’s algorithm

REPEAT: 1- Pick a permutation matrix P 2- Compute UHP =

1 1 ❅ ❅ ❅

3- If wt(sUT) = w then return (sUT, 0)P−1

20 39

slide-75
SLIDE 75

Prange’s algorithm

REPEAT: 1- Pick a permutation matrix P 2- Compute UHP =

1 1 ❅ ❅ ❅

3- If wt(sUT) = w then return (sUT, 0)P−1 Cost of one iteration: K = n(n − k) column operations. Success probability: P = n−k

w

  • /

n

w

  • .

Total cost = K/P.

20 39

slide-76
SLIDE 76

Stern and Dumer’s algorithm

UHP = Us =

✲ ✛ k + ℓ ✻ ❄ n − k − ℓ ✻ ❄ ℓ

s′ s′′ H′ H′′

w − p p w − p p 1 1

❅ ❅

21 39

slide-77
SLIDE 77

Stern and Dumer’s algorithm

UHP = Us =

✲ ✛ k + ℓ ✻ ❄ n − k − ℓ ✻ ❄ ℓ

s′ s′′ H′ H′′

w − p p w − p p 1 1

❅ ❅

Step 3 Step 2

21 39

slide-78
SLIDE 78

Stern and Dumer’s algorithm

UHP = Us =

✲ ✛ k + ℓ ✻ ❄ n − k − ℓ ✻ ❄ ℓ

s′ s′′ H′ H′′

w − p p w − p p 1 1

❅ ❅

Step 3 Step 2 Repeat:     

  • 1. Permutation + partial Gaussian elimination
  • 2. Find many e′ such that |e′| = p and H′e′ = s′
  • 3. For all good e′, test |s′′ + H′′e′| ≤ w − p

Step 2 is Birthday Decoding (or whatever is best); Step 3 is (a kind of) Prange; Total cost is minimized over ℓ and p.

21 39

slide-79
SLIDE 79

Stern and Dumer’s algorithm

Iteration cost: K = n(n − k − ℓ) + 2 k+ℓ

p

  • +

k+ℓ

p

  • 2ℓ

+ k+ℓ

p

  • 2ℓ

22 39

slide-80
SLIDE 80

Stern and Dumer’s algorithm

Iteration cost: K = n(n − k − ℓ) + 2 k+ℓ

p

  • +

k+ℓ

p

  • 2ℓ

+ k+ℓ

p

  • 2ℓ

Gaussian elimination

22 39

slide-81
SLIDE 81

Stern and Dumer’s algorithm

Iteration cost: K = n(n − k − ℓ) + 2 k+ℓ

p

  • +

k+ℓ

p

  • 2ℓ

+ k+ℓ

p

  • 2ℓ

Gaussian elimination

Birthday decoding

22 39

slide-82
SLIDE 82

Stern and Dumer’s algorithm

Iteration cost: K = n(n − k − ℓ) + 2 k+ℓ

p

  • +

k+ℓ

p

  • 2ℓ

+ k+ℓ

p

  • 2ℓ

Gaussian elimination

Birthday decoding

Final check

22 39

slide-83
SLIDE 83

Stern and Dumer’s algorithm

Iteration cost: K = n(n − k − ℓ) + 2 k+ℓ

p

  • +

k+ℓ

p

  • 2ℓ

+ k+ℓ

p

  • 2ℓ

Gaussian elimination

Birthday decoding

Final check Success probability: P = k+ℓ

p

n−k−ℓ

w−p

  • n

w

  • .

Total cost = K/P, minimized over p and ℓ.

22 39

slide-84
SLIDE 84

More advanced algorithms

Improved Birthday Decoding: overlapping support. Representations. Recursive Birthday Decoding. Decoding One Out of Many. Nearest Neighbour approach.

23 39

slide-85
SLIDE 85

Complexity

Theoretical asymptotic exponent Best algorithm solves SD(n, W, R) in 2c·n operations with 1962 c = 0.121 [Pra62] 1988 c = 0.117 [Ste88, Dum89] 2011 c = 0.112 [MMT11] 2012 c = 0.102 [BJMM12] 2017 c = 0.095 [MO15, BM17] 2018 c = 0.089 [BM18] for w = dGV and worst choice of k.

24 39

slide-86
SLIDE 86

Complexity

Theoretical asymptotic exponent Best algorithm solves SD(n, W, R) in 2c·n operations with 1962 c = 0.121 [Pra62] 1988 c = 0.117 [Ste88, Dum89] 2011 c = 0.112 [MMT11] 2012 c = 0.102 [BJMM12] 2017 c = 0.095 [MO15, BM17] 2018 c = 0.089 [BM18] for w = dGV and worst choice of k. Practical complexity?

24 39

slide-87
SLIDE 87

The Decoding Challenge

slide-88
SLIDE 88

decodingchallenge.org

25 39

slide-89
SLIDE 89

The Decoding Challenge

Launched in August 2019 by Aragon, Lavauzelle and L. Goal:

◮ assess the practical complexity of problems in coding theory; ◮ motivate the implementation of ISD algorithms; ◮ increase the confidence in code-based crypto.

26 39

slide-90
SLIDE 90

The Decoding Challenge

Launched in August 2019 by Aragon, Lavauzelle and L. Goal:

◮ assess the practical complexity of problems in coding theory; ◮ motivate the implementation of ISD algorithms; ◮ increase the confidence in code-based crypto.

Concept:

◮ 4 categories of challenges; ◮ instances of increasing size; ◮ a hall of fame.

26 39

slide-91
SLIDE 91

4 categories of challenges

2 generic problems

◮ Syndrome Decoding

k/n = 0.5 and w = dGV

◮ Finding the Lowest Codeword

for k/n = 0.5 and n of cryptographic size

2 problems based on schemes in the NIST competition

◮ Goppa-McEliece

k/n = 0.8 and w = (n − k)/ log2 (n)

◮ QC-MDPC

k/n = 0.5 and w = √n

27 39

slide-92
SLIDE 92

Questions raised by implementation

Based on previous work from Landais, Sendrier, Meurer and Hochbach, and recent work from Vasseur, Couvreur, Kunz and L.

Choice of parameters p, ℓ, ε ... must be integers! Random shuffle vs. Canteaut-Chabaud. Birthday algorithm: sort vs. hash table. Allowing overlap? Early abort? ... It’s not just about asymptotic exponents anymore!

28 39

slide-93
SLIDE 93

Try the Challenge! decodingchallenge.org

How to contribute?

◮ Solve some challenges! ◮ Talk about the project to other people. ◮ Propose this as a student project. ◮ Contact us if you want to help.

29 39

slide-94
SLIDE 94

Try the Challenge! decodingchallenge.org

How to contribute?

◮ Solve some challenges! ◮ Talk about the project to other people. ◮ Propose this as a student project. ◮ Contact us if you want to help.

Current leader of the Hall of Fame: Valentin Vasseur, n = 450 (for SD) ≃ 247 operations (Dumer). You dream to read your name in a Hall of Fame? This is the chance of a lifetime!

29 39

slide-95
SLIDE 95

Future challenges

We intend to propose other categories of challenges

◮ rank-metric Syndrome decoding; ◮ q-ary Syndrome Decoding in Hamming metric; ◮ q-ary Syndrome Decoding in Hamming metric

with large weight.

30 39

slide-96
SLIDE 96

q-ary Syndrome Decoding

slide-97
SLIDE 97

Binary vs. ternary Decoding Challenge

for R = 1/2:

31 39

slide-98
SLIDE 98

Binary vs. ternary Decoding Challenge

for R = 1/2:

31 39

slide-99
SLIDE 99

Binary vs. ternary Decoding Challenge

for R = 1/2:

31 39

slide-100
SLIDE 100

Binary vs. ternary Decoding Challenge

for R = 1/5:

31 39

slide-101
SLIDE 101

Some observations

Asymetry

32 39

slide-102
SLIDE 102

Some observations

Asymetry Prange’s algorithm works in polynomial time if w ∈ q − 1 q (n − k), k + q − 1 q (n − k).

32 39

slide-103
SLIDE 103

Some observations

Asymetry Prange’s algorithm works in polynomial time if w ∈ q − 1 q (n − k), k + q − 1 q (n − k). For some values of R, there exists an equivalent of dGV for large weight: n d

  • (q − 1)d = qn−k.

32 39

slide-104
SLIDE 104

Some observations

Asymetry Prange’s algorithm works in polynomial time if w ∈ q − 1 q (n − k), k + q − 1 q (n − k). For some values of R, there exists an equivalent of dGV for large weight: n d

  • (q − 1)d = qn−k.

Worst case complexity for Prange’s algorithm is reached for R = 1 − logq(q − 1) and W = 1.

for q = 3 this is R = 0.369. 32 39

slide-105
SLIDE 105

Doing better than Prange?

“Ternary Syndrome Decoding with Large Weight”, Bricout, Chailloux, Debris-Alazard and L., SAC 2019 Motivation: Wave signature scheme [DST19].

33 39

slide-106
SLIDE 106

Doing better than Prange?

“Ternary Syndrome Decoding with Large Weight”, Bricout, Chailloux, Debris-Alazard and L., SAC 2019 Motivation: Wave signature scheme [DST19]. What would an equivalent of Dumer’s algorithm be?

33 39

slide-107
SLIDE 107

Doing better than Prange?

“Ternary Syndrome Decoding with Large Weight”, Bricout, Chailloux, Debris-Alazard and L., SAC 2019 Motivation: Wave signature scheme [DST19]. What would an equivalent of Dumer’s algorithm be? W = 1: we look for a solution containing no zeros.

33 39

slide-108
SLIDE 108

Doing better than Prange?

“Ternary Syndrome Decoding with Large Weight”, Bricout, Chailloux, Debris-Alazard and L., SAC 2019 Motivation: Wave signature scheme [DST19]. What would an equivalent of Dumer’s algorithm be? W = 1: we look for a solution containing no zeros. Up to a small transform, 1’s and 2’s become 0’s and 1’s.

33 39

slide-109
SLIDE 109

Doing better than Prange?

“Ternary Syndrome Decoding with Large Weight”, Bricout, Chailloux, Debris-Alazard and L., SAC 2019 Motivation: Wave signature scheme [DST19]. What would an equivalent of Dumer’s algorithm be? W = 1: we look for a solution containing no zeros. Up to a small transform, 1’s and 2’s become 0’s and 1’s.

Our problem is now the modular knapsack problem!

Given k + ℓ vectors hi ∈ Fℓ

3 and a target vector s ∈ Fℓ 3,

find L solutions of the form (b1, . . . , bk+ℓ) ∈ {0, 1}k+ℓ such that k+ℓ

i=1 bihi = s. 33 39

slide-110
SLIDE 110

Doing better than Prange?

“Ternary Syndrome Decoding with Large Weight”, Bricout, Chailloux, Debris-Alazard and L., SAC 2019 Motivation: Wave signature scheme [DST19]. What would an equivalent of Dumer’s algorithm be? W = 1: we look for a solution containing no zeros. Up to a small transform, 1’s and 2’s become 0’s and 1’s.

Our problem is now the modular knapsack problem!

Given k + ℓ vectors hi ∈ Fℓ

3 and a target vector s ∈ Fℓ 3,

find L solutions of the form (b1, . . . , bk+ℓ) ∈ {0, 1}k+ℓ such that k+ℓ

i=1 bihi = s.

This can be solved using Wagner’s algorithm [Wag02].

33 39

slide-111
SLIDE 111

Wagner’s algorithm

Set of solutions Merging on ℓ/2 bits according to s

sℓ/2 ℓ/2 ℓ/2 L1 L2 L3 L4

Merging on ℓ/2 bits according to s Merging on ℓ/2 bits

Figure: Wagner’s algorithm with a = 2.

34 39

slide-112
SLIDE 112

Beyond Wagner’s algorithm representations

Using Wagner’s algorithm with a floors and L = 3ℓ/a solutions can be solved in amortize time O

  • 3ℓ/a

.

35 39

slide-113
SLIDE 113

Beyond Wagner’s algorithm representations

Using Wagner’s algorithm with a floors and L = 3ℓ/a solutions can be solved in amortize time O

  • 3ℓ/a

. Smoothing of the algorithm.

35 39

slide-114
SLIDE 114

Beyond Wagner’s algorithm representations

Using Wagner’s algorithm with a floors and L = 3ℓ/a solutions can be solved in amortize time O

  • 3ℓ/a

. Smoothing of the algorithm. Using representations (as in [BJMM12]). Using partial representations.

35 39

slide-115
SLIDE 115

Beyond Wagner’s algorithm representations

Using Wagner’s algorithm with a floors and L = 3ℓ/a solutions can be solved in amortize time O

  • 3ℓ/a

. Smoothing of the algorithm. Using representations (as in [BJMM12]). Using partial representations. Remark: When q → ∞, all ISD algorithm become equivalent to Prange’s algorithm [Can17].

35 39

slide-116
SLIDE 116

Our algorithm [BCDL19]

7 floors Blue = “left-right” splits (no representations) Yellow = representations Badly-formed elements at floor 4 and 5

36 39

slide-117
SLIDE 117

Results (R = 0.5) [BCDL19]

37 39

slide-118
SLIDE 118

Hardest instances for q = 3 [BCDL19]

Algorithm q = 2 q = 3 and W > 0.5 Prange 0.121 (R = 0.454) 0.369 (R = 0.369) Dumer/Wagner 0.116 (R = 0.447) 0.269 (R = 0.369) BJMM/our algorithm 0.102 (R = 0.427) 0.247 (R = 0.369)

Table: Best exponents with associated rates.

38 39

slide-119
SLIDE 119

Hardest instances for q = 3 [BCDL19]

Algorithm q = 2 q = 3 and W > 0.5 Prange 0.121 (R = 0.454) 0.369 (R = 0.369) Dumer/Wagner 0.116 (R = 0.447) 0.269 (R = 0.369) BJMM/our algorithm 0.102 (R = 0.427) 0.247 (R = 0.369)

Table: Best exponents with associated rates.

Algorithm q = 2 q = 3 and W > 0.5 Prange 275 44 Dumer/Wagner 295 83 BJMM/Our algorithm 374 99

Table: Minimum input sizes (in kbits) for a time complexity of 2128.

38 39

slide-120
SLIDE 120

Concluding remarks

slide-121
SLIDE 121

Conclusion

Syndrome decoding is an old problem but still needs to be studied.

39 / 39

slide-122
SLIDE 122

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

39 / 39

slide-123
SLIDE 123

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

◮ New problem: syndrome decoding in large weight;

39 / 39

slide-124
SLIDE 124

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

◮ New problem: syndrome decoding in large weight; ◮ Worst case complexity seems higher than in small weight;

39 / 39

slide-125
SLIDE 125

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

◮ New problem: syndrome decoding in large weight; ◮ Worst case complexity seems higher than in small weight; ◮ New cryptographic schemes with shorter key size relying on

this problem?

39 / 39

slide-126
SLIDE 126

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

◮ New problem: syndrome decoding in large weight; ◮ Worst case complexity seems higher than in small weight; ◮ New cryptographic schemes with shorter key size relying on

this problem?

◮ Requires further study.

39 / 39

slide-127
SLIDE 127

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

◮ New problem: syndrome decoding in large weight; ◮ Worst case complexity seems higher than in small weight; ◮ New cryptographic schemes with shorter key size relying on

this problem?

◮ Requires further study.

Solve the challenges!

39 / 39

slide-128
SLIDE 128

Conclusion

Syndrome decoding is an old problem but still needs to be studied. Case q ≥ 3 behaves very differently from q = 2.

◮ New problem: syndrome decoding in large weight; ◮ Worst case complexity seems higher than in small weight; ◮ New cryptographic schemes with shorter key size relying on

this problem?

◮ Requires further study.

Solve the challenges! Thank you for your attention!

39 / 39

slide-129
SLIDE 129

Michael Alekhnovich. More on average case vs approximation complexity. Computational Complexity, 20(4):755–786, 2011. Anja Becker, Antoine Joux, Alexander May, and Alexander Meurer. Decoding random binary linear codes in 2n/20: How 1 + 1 = 0 improves information set decoding. In Advances in Cryptology - EUROCRYPT 2012, LNCS. Springer, 2012. Leif Both and Alexander May. Optimizing BJMM with Nearest Neighbors: Full Decoding in 22/21n and McEliece Security. In WCC Workshop on Coding and Cryptography, September 2017.

  • n line proceedings, see

http://wcc2017.suai.ru/Proceedings_WCC2017.zip. Leif Both and Alexander May. Decoding linear codes with high error rate and its impact for LPN security. In Tanja Lange and Rainer Steinwandt, editors, Post-Quantum Cryptography 2018, volume 10786 of LNCS, pages 25–46, Fort Lauderdale, FL, USA, April 2018. Springer. Elwyn Berlekamp, Robert McEliece, and Henk van Tilborg.

39 / 39

slide-130
SLIDE 130

On the inherent intractability of certain coding problems. IEEE Trans. Inform. Theory, 24(3):384–386, May 1978. Rodolfo Canto Torres. Asymptotic analysis of ISD algorithms for the q−ary case. In Proceedings of the Tenth International Workshop on Coding and Cryptography WCC 2017, September 2017. Thomas Debris-Alazard, Nicolas Sendrier, and Jean-Pierre Tillich. Wave: A new family of trapdoor one-way preimage sampleable functions based on codes. Cryptology ePrint Archive, Report 2018/996, May 2019. https://eprint.iacr.org/2018/996. Il’ya Dumer. Two decoding algorithms for linear codes.

  • Probl. Inf. Transm., 25(1):17–23, 1989.

Robert J. McEliece. A Public-Key System Based on Algebraic Coding Theory, pages 114–116. Jet Propulsion Lab, 1978. DSN Progress Report 44. Alexander May, Alexander Meurer, and Enrico Thomae. Decoding random linear codes in O(20.054n).

39 / 39

slide-131
SLIDE 131

In Dong Hoon Lee and Xiaoyun Wang, editors, Advances in Cryptology - ASIACRYPT 2011, volume 7073 of LNCS, pages 107–124. Springer, 2011. Alexander May and Ilya Ozerov. On computing nearest neighbors with applications to decoding of binary linear codes. In E. Oswald and M. Fischlin, editors, Advances in Cryptology - EUROCRYPT 2015, volume 9056 of LNCS, pages 203–228. Springer, 2015. Harald Niederreiter. Knapsack-type cryptosystems and algebraic coding theory. Problems of Control and Information Theory, 15(2):159–166, 1986. Eugene Prange. The use of information sets in decoding cyclic codes. IRE Transactions on Information Theory, 8(5):5–9, 1962. Vladimir Michilovich Sidelnikov and S.O. Shestakov. On the insecurity of cryptosystems based on generalized Reed-Solomon codes. Discrete Math. Appl., 1(4):439–444, 1992. Jacques Stern. A method for finding codewords of small weight.

39 / 39

slide-132
SLIDE 132

In G. D. Cohen and J. Wolfmann, editors, Coding Theory and Applications, volume 388 of LNCS, pages 106–113. Springer, 1988. David Wagner. A generalized birthday problem. In Moti Yung, editor, Advances in Cryptology - CRYPTO 2002, volume 2442 of LNCS, pages 288–303. Springer, 2002.

39 / 39