Code-Based Cryptography a Hands-On Introduction

Code-Based Cryptography a Hands-On Introduction

Code-based Cryptography a Hands-On Introduction Daniel Loebenberger <[email protected]> Ηράκλειο, September 27, 2018 Code-based Cryptography Post-Quantum Cryptography Various flavours: Lattice-based cryptography Hash-based cryptography Code-based cryptography Further techniques (e.g. multivariate, isogeny-based, …) 2 Code-based Cryptography Post-Quantum Cryptography Various flavours: Lattice-based cryptography Hash-based cryptography Code-based cryptography Further techniques (e.g. multivariate, isogeny-based, …) 2 Code-based Cryptography Coding theory Dating back to Claude Shannon in 1948 Goal is to protect a message sent over a noisy channel Typically, this is achieved by adding redundancy 3 Code-based Cryptography Public key Cryptography We need to specify three algorithms: Key Generation: Create a private and a public key Encryption of a message using the public key Decryption of a ciphertext using the private key Security: It is not possible to decrypt a ciphertext without the private key. 4 Code-based Cryptography Content Linear Codes Classic McEliece Optimizations Conclusion 5 Code-based Cryptography Linear Codes Content Linear Codes Classic McEliece Optimizations Conclusion 6 Theorem d−1 A linear (n; k; d)-code can correct up to t = 2 errors. Code-based Cryptography Linear Codes Basic Definitions Definition (Linear Code) A linear (n; k; d)-code C over a finite field F is a k-dimensional subspace of the vector space Fn with minimum distance d = minx6=y2C dist(x; y), where dist is the Hamming-distance. 7 Code-based Cryptography Linear Codes Basic Definitions Definition (Linear Code) A linear (n; k; d)-code C over a finite field F is a k-dimensional subspace of the vector space Fn with minimum distance d = minx6=y2C dist(x; y), where dist is the Hamming-distance. Theorem d−1 A linear (n; k; d)-code can correct up to t = 2 errors. 7 Code-based Cryptography Linear Codes Basic Definitions Definition (Generator Matrix) × The matrix G 2 Fk n is a generator matrix for the (n; k; d)-code C if C = hGi, i.e. the rows of G span C. Definition (Encoding) For a message m 2 Fk , define its encoding as c = mG 2 Fn. 7 Theorem The (general) decoding problem is NP-hard. Code-based Cryptography Linear Codes Basic Definitions Problem (Decoding problem) Given x 2 Fn find c 2 C, where dist(x; c) is minimal. If x = c + e and e is a vector of weight at most t then x is uniquely determined. 7 Code-based Cryptography Linear Codes Basic Definitions Problem (Decoding problem) Given x 2 Fn find c 2 C, where dist(x; c) is minimal. If x = c + e and e is a vector of weight at most t then x is uniquely determined. Theorem The (general) decoding problem is NP-hard. 7 21 0 1 1 1 0 03 H = 41 1 1 0 0 1 05 0 1 1 1 0 0 1 3×7 t , H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 60 1 0 0 0 1 17 G = 6 7 40 0 1 0 1 1 15 0 0 0 1 1 0 1 4×7 G 2 F2 generator matrix for code C 8 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 8 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 8 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 8 One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C 8 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 8 Then: xHt = cHt + eHt = eHt = 1 0 1 How to use this for decoding? Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 8 Code-based Cryptography Linear Codes Encoding/Decoding: Example 21 0 0 0 1 1 03 21 0 1 1 1 0 03 60 1 0 0 0 1 17 G = H = 1 1 1 0 0 1 0 60 0 1 0 1 1 17 4 5 4 5 0 1 1 1 0 0 1 0 0 0 1 1 0 1 4×7 3×7 t G 2 F2 generator matrix for code C, H 2 F2 parity check matrix: GH = 0 m = 0 1 0 1 =) c = mG = 0 1 0 1 1 1 0 cHt = 0, i.e. c 2 C One-bit error e = 0 0 0 1 0 0 0 =) x = c + e = 0 1 0 0 1 1 0 Then: xHt = cHt + eHt = eHt = 1 0 1 t t Decoding idea: run over all possible errors e, compute eH and compare to xH . 8 Code-based Cryptography Classic McEliece Content Linear Codes Classic McEliece Optimizations Conclusion 9 However, there are certain codes with efficient decoding One example are binary Goppa codes “Disguise” such a code Use this information as a trapdoor! Code-based Cryptography Classic McEliece Basic idea The general decoding problem is a hard problem 10 “Disguise” such a code Use this information as a trapdoor! Code-based Cryptography Classic McEliece Basic idea The general decoding problem is a hard problem However, there are certain codes with efficient decoding One example are binary Goppa codes 10 Use this information as a trapdoor! Code-based Cryptography Classic McEliece Basic idea The general decoding problem is a hard problem However, there are certain codes with efficient decoding One example are binary Goppa codes “Disguise” such a code 10 Code-based Cryptography Classic McEliece Basic idea The general decoding problem is a hard problem However, there are certain codes with efficient decoding One example are binary Goppa codes “Disguise” such a code Use this information as a trapdoor! 10 Heuristically, the matrix G0 behaves like a uniformly selected matrix, i.e.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    58 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us