code based one way functions
play

Code-based One Way Functions Nicolas Sendrier INRIA Rocquencourt, - PowerPoint PPT Presentation

Code-based One Way Functions Nicolas Sendrier INRIA Rocquencourt, projet CODES Ecrypt Summer School Emerging Topics in Cryptographic Design and Cryptanalysis I. Introduction Binary linear code n the length C a ( n, k ) binary


  1. Code-based One Way Functions Nicolas Sendrier INRIA Rocquencourt, projet CODES Ecrypt Summer School Emerging Topics in Cryptographic Design and Cryptanalysis

  2. I. Introduction

  3. Binary linear code  n the length   C a ( n, k ) binary linear code k the dimension  r = n − k the co-dimension  C = { uG | u ∈ { 0 , 1 } k } Generator matrix G (size k × n ) C = { x ∈ { 0 , 1 } n | xH T = 0 } Parity check matrix H (size r × n ) — For any y ∈ { 0 , 1 } n , yH T is the syndrome of y relatively to H The set y + C = { y + x | x ∈ C} is a coset of C We have y + C = { v ∈ { 0 , 1 } n | vH T = yH T } 1

  4. Decoding a linear code Decoding: given y ∈ { 0 , 1 } n , find a codeword x ∈ C closest to y (for the Hamming distance) Find e ∈ { 0 , 1 } n of minimal Hamming weight such that (equivalently) (i) x = y − e ∈ C (ii) e ∈ y + C (iii) eH T = yH T Decoding is difficult in general 2

  5. The syndrome decoding problem Berlekamp, McEliece, van Tilborg, 1978 Problem: Syndrome Decoding NP-complete Instance: An r × n binary matrix H , a word s of { 0 , 1 } r and an integer t > 0. Question: Is there a word of weight ≤ t in { e | eH T = s } ? Easy for small (constant) or for large values of t (i.e. t � r/ 2) Average case complexity: no reduction is known. Decades of research indicate that it is hard in practice. � n � ≈ 2 r (Gilbert-Varshamov bound) Heuristic: most difficult if t (see the Handbook of Coding Theory , chapter 7 “Complexity issues in coding theory”, by A. Barg) 3

  6. Bounded decoding What about smaller values of the error weight ? Finiasz, 2004 Problem: Goppa Bounded Decoding NP-complete Instance: An r × n binary matrix H , a word s of { 0 , 1 } r . r log 2 n in { e | eH T = s } ? Question: Is there a word of weight ≤ The number of errors you can decode in a binary Goppa code of length n and codimension r is ≈ r/ log 2 n . Probably still NP-complete for w = cr/ log 2 n , c > 0. Also considered difficult in practice in the average case. 4

  7. II. Code-based one-way functions

  8. The syndrome mapping – A simple and fast primitive Let H be a binary r × n matrix n n a few thousand · · · H = r = s r several hundreds t a few dozens � �� � ✻ ⊕ t Complexity: t column additions for one column of output Let W n,t denote the set of words of length n and weight t . The syndrome mapping is defined as { 0 , 1 } r S : W n,t − → eH T e �− → 5

  9. Code-based one way functions C a linear code, H a parity check matrix { 0 , 1 } r { 0 , 1 } n S : E − → Φ : E × C − → eH T e �− → ( e, x ) �− → x + e Φ and S are equally difficult to invert � � 1) Φ − 1 ( y ) = S − 1 ( yH T ) , y − S − 1 ( yH T ) 2) Let H 0 = U · H = ( I | X ) For any s ∈ { 0 , 1 } r , the word y = ( sU T | 0 , . . . , 0) verifies yH T = s � � Thus Φ − 1 ( y ) = S − 1 ( s ) , y − S − 1 ( s ) 6

  10. The error set { 0 , 1 } r S : E − → eH T e �− → Usually E = W n,t (or E ⊂ W n,t ) for some error weight t • S is injective if t ≤ ( d − 1) / 2 ( d the minimum distance) • S is surjective if t ≥ ρ ( ρ the covering radius) • S is (almost) never bijective 7

  11. II.1 Security

  12. Decoding attack – Information set decoding log 2 ( WF ) ✻ � n � t 0 log 2 Cost for solving s = eH T r independent of n ✏ for a given H and s , with ✏ ✏ ✏ ✏ ✮ e of weigth t by informa- linear PPPP P q tion set decoding. Both n and r are fixed � n � ≈ 2 r . t 0 is such that ✲ 0 0 t t 0 t 0 r many solutions one solution 2 Best implementation by Canteaut and Chabaud (1998). Information set decoding attack is the best attack when t ≤ t 0 . If t > t 0 the generalized birthday attack (Wagner, 2002) is sometimes better. 8

  13. Decoding attack for n = 1024 and security 2 85 t ♦ generalized birthday attack 250 Gilbert-Varshamov bound ❅ 200 ❅ ❅ ❅ ❅ ❅ ❅ ✉ 150 ♦ ❍❍❍❍❍❍❍❍❍❍❍❍ ✉ ♦ ♦ ♦ 100 ❍ ♦ ♦ ♦ 85 bits of security ✉ between those curves 50 0 r 200 300 400 500 600 700 800 9

  14. Decoding attack for n = 1024 and security 2 128 t 250 200 150 100 50 0 r 200 300 400 500 600 700 800 10

  15. Decoding attack for n = 1024 and security 2 128 – Zoom t 160 140 120 100 80 r 450 500 550 600 650 11

  16. Decoding attack for n = 2048 and security 2 128 t ♦ generalized birthday attack 600 500 Gilbert-Varshamov bound ❅ ❅ 400 ❅ ❅ ❅ ❅ ❅ ✉ 300 ❍❍❍❍❍❍❍❍❍❍❍❍❍❍ ✉ ♦ ♦ ♦ 200 ♦ ♦ ♦ ❍ ♦ ♦ 128 bits of security ♦ 100 ✉ ♦ ♦ ♦ between those curves ♦ ♦ ♦ ♦ ♦ 0 r 200 400 600 800 1000 1200 1400 1600 1800 12

  17. Decoding attack for n = 2048 and security 2 128 – Detail t 65 60 ♦ 55 ♦ 50 ♦ 45 ♦ 40 r 300 320 340 360 380 13

  18. II.2 Encoding errors

  19. Encoding errors In practice there is an encoding problem and we need a mapping (preferably injective) θ : { 0 , 1 } ℓ → W n,t • Fixed length and injective. Let 0 ≤ i 1 < i 2 < . . . < i t < n � � n �� S : 0 , W n,t − → t � i 1 � � i t � ( i 1 , . . . , i t ) + . . . + �− → 1 t From this we can construct an injective mapping { 0 , 1 } ℓ → W n,t � � n �� with ℓ = log 2 and complexity quadratic in ℓ . t • Variable length and bijective. We can define an (unambiguous) encoding { 0 , 1 } ∗ → W n,t with linear complexity and an input aver- age length very close to ℓ • Other trade-offs (regular words, . . . ) 14

  20. Regular words The word is divided as evenly as possible into n/t part, each of them will have weight one exactly. We denote R n,t this set. Of course R n,t ⊂ W n,t . · · · 1 · · · · · · 1 · · · · · · 1 · · · · · · 1 · · · · · · 1 · · · · · · 1 · · · · · · 1 · · · If n/t is an integer there are precisely ( n/t ) t regular words. If n/t = 2 b is a power of 2, then | R n,t | = 2 bt and the encoding { 0 , 1 } bt is particularly easy { 0 , 1 } bt [0 , 2 b [ t − → − → R n,t ( j 1 , j 2 + 2 b , . . . , j t + 2 b ( t − 1) ) ( j 1 , j 2 . . . , j t ) �− → 15

  21. The security of regular words Syndrome decoding for regular words is NP-complete (Finiasz, 2004). � n � ≈ n t /t ! and | R n,t | = n t /t t . The ratio is ≈ exp( t ), We have | W n,t | = t so decoding a regular error of weight t can be easier by a factor at most exp( t ). In practice, decoding attack have the same cost when t ≤ t 0 and are more expensive for regular words when t gets larger. For larger values of t the generalized birthday attack is not much more expensive for regular word, so it often becomes the best attack. 16

  22. What have we got so far ? We have got a mean to produce efficient mappings f : { 0 , 1 } ℓ → { 0 , 1 } r whose security is reduced to instances of syndrome decoding. We have a mean to evaluate the “practical” security of those map- pings. We will now consider more precisely two cases • ℓ = r with which we can design stream ciphers. • ℓ > r with which we can design hash functions. 17

  23. III. New designs

  24. How does this relates to the McEliece encryption scheme ? McEliece encryption scheme uses a binary code C of length n and dimension k . The public key is a generator ( k × n ) matrix G of C and the encryption mapping is the following { 0 , 1 } k { 0 , 1 } n − → C − → m �− → x = mG �− → x + e where the error e is chosen randomly of weight t . The trapdoor is a t -error correcting procedure for C . Typical sizes for 80 bits of security are n = 2048 , k = 1696 , r = 352 , t = 32 18

  25. How does this relates to the Niederreiter encryption scheme ? Niederreiter encryption scheme uses a binary code C of length n and codimension r . The public key is a parity check ( r × n ) matrix H of C and the encryption mapping is the following ( { 0 , 1 } ℓ { 0 , 1 } n − → ) W n,t − → eH T ( m �− → ) e �− → The trapdoor is a t -error correcting procedure for C . Typical sizes for 80 bits of security are n = 2048 , k = 1696 , r = 352 , t = 32 19

  26. III.1 Reducing the matrix size

  27. Reducing the matrix size One of the drawbacks of code-based mappings is that they require a large binary matrix (can be several Mbits). In public key cryptography it is difficult to overcome that problem (there is an attempt by Gaborit, though). For one-way functions (without trapdoor), the matrix is random, so with have options: • use a pseudo-random number generator, so we only need to know a seed, • use a structured matrix (cyclic or quasi-cyclic for instance), so we only need to know the first row. 20

  28. Block circulant matrices A circulant square matrix is composed of all the cyclic shifts of a single word. A block circulant matrix is obtained by concatenating several circulant square matrices ( R i ) H = R 1 R 2 · · · R s The code defined by H is quasi-cyclic. The syndrome mapping is not likely to be easier to solve for quasi-cyclic codes. The Holy Grail of coding theory is a class of good block codes (quasi- cyclic codes meet the GV bound, which mean “good” in coding the- ory) which has an efficient complete decoder (i.e. the syndrome map- ping can be inverted everywhere). 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend