34
Code-Based Cryptography McEliece Cryptosystem 0 I. Márquez-Corbella

Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Code-Based CryptographyMcEliece Cryptosystem

0I. Márquez-Corbella

Page 2: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Code-Based Cryptography

1. Error-Correcting Codes and Cryptography2. McEliece Cryptosystem3. Message Attacks (ISD)4. Key Attacks5. Other Cryptographic Constructions Relying on Coding Theory

I. Márquez-Corbella CODE-BASED CRYPTOGRAPHY

Page 3: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

2. McEliece Cryptosystem

1. Formal Definition2. Security-Reduction Proof3. McEliece Assumptions4. Notions of Security5. Critical Attacks - Semantic Secure Conversions6. Reducing the Key Size7. Reducing the Key Size - LDPC codes8. Reducing the Key Size - MDPC codes9. Implementation

I. Márquez-Corbella CODE-BASED CRYPTOGRAPHY

Page 4: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyP =

PlaintextSpace

C =Ciphertext

SpaceKp =

Public-KeySpace

Ks =Secret-Key

Space

1. Key generation algorithm: KEYGEN

K ∈ NSecurity parameter KEYGEN kp ∈ Kp ks ∈ Ks

Ü Run in expected polynomial time ∼ O(Kc)

1

Page 5: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyP =

PlaintextSpace

C =Ciphertext

SpaceKp =

Public-KeySpace

Ks =Secret-Key

Space

1. Key generation algorithm: KEYGEN

K ∈ NSecurity parameter KEYGEN kp ∈ Kp ks ∈ Ks

Ü Run in expected polynomial time ∼ O(Kc)

1

Page 6: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyP =

PlaintextSpace

C =Ciphertext

SpaceKp =

Public-KeySpace

Ks =Secret-Key

Space

2. Encryption algorithm: ENCRYPT

m ∈ P ENCRYPT ENCRYPT(m,Kp) = y ∈ C

Kp ∈ Kp

Ü Run in expected polynomial time ∼ O(Kc)

2

Page 7: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyP =

PlaintextSpace

C =Ciphertext

SpaceKp =

Public-KeySpace

Ks =Secret-Key

Space

2. Encryption algorithm: ENCRYPT

m ∈ P ENCRYPT ENCRYPT(m,Kp) = y ∈ C

Kp ∈ Kp

Ü Run in expected polynomial time ∼ O(Kc)

2

Page 8: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyP =

PlaintextSpace

C =Ciphertext

SpaceKp =

Public-KeySpace

Ks =Secret-Key

Space

3. Decryption algorithm: DECRYPT

c ∈ C DECRYPT DECRYPT(c,Ks) = m ∈ P , or invalidciphertext

Ks ∈ Ks

Ü Run in polynomial time

3

Page 9: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyP =

PlaintextSpace

C =Ciphertext

SpaceKp =

Public-KeySpace

Ks =Secret-Key

Space

3. Decryption algorithm: DECRYPT

c ∈ C DECRYPT DECRYPT(c,Ks) = m ∈ P , or invalidciphertext

Ks ∈ Ks

Ü Run in polynomial time

3

Page 10: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Formal definition of Public-Key CryptographyK ∈ N

Security parameter KEYGEN kp ∈ Kp ks ∈ Ks

m ∈ P ENCRYPT ENCRYPT(m,Kp) = y ∈ C

Kp ∈ Kp

c ∈ C DECRYPT DECRYPT(c,Ks) = m ∈ P , or invalidciphertext

Ks ∈ Ks

Ü It is required that: DECRYPT (ENCRYPT(m,Kp),Ks) = mÜ Fasten known attack should requires ≥ 2K bit operations4

Page 11: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece Cryptosystem

Advantages:

1. Fast ENCRYPT and DECRYPT.2. Post-quantum cryptosystem.

Drawback:

ã Large key size.

Security of the McEliece scheme is based on:

1. Hardness of decoding random linear codes2. Distinguishing Goppa codes

McEliece introduced the first PKC basedon Error-Correcting Codes in 1978.

R. J. McEliece.A public-key cryptosystem based on algebraic coding theory.DSN Progress Report, 42-44:114-116, 1978.5

Page 12: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece Cryptosystem

Advantages:

1. Fast ENCRYPT and DECRYPT.2. Post-quantum cryptosystem.

Drawback:

ã Large key size.

Security of the McEliece scheme is based on:

1. Hardness of decoding random linear codes2. Distinguishing Goppa codes

McEliece introduced the first PKC basedon Error-Correcting Codes in 1978.

R. J. McEliece.A public-key cryptosystem based on algebraic coding theory.DSN Progress Report, 42-44:114-116, 1978.5

Page 13: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemAdvantages:

1. Fast ENCRYPT and DECRYPT.2. Post-quantum cryptosystem.

Drawback:

ã Large key size.

Security of the McEliece scheme is based on:

1. Hardness of decoding random linear codes2. Distinguishing Goppa codes

McEliece introduced the first PKC basedon Error-Correcting Codes in 1978.

R. J. McEliece.A public-key cryptosystem based on algebraic coding theory.DSN Progress Report, 42-44:114-116, 1978.5

Page 14: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemAdvantages:

1. Fast ENCRYPT and DECRYPT.2. Post-quantum cryptosystem.

Drawback:

ã Large key size.

Security of the McEliece scheme is based on:

1. Hardness of decoding random linear codes2. Distinguishing Goppa codes

McEliece introduced the first PKC basedon Error-Correcting Codes in 1978.

R. J. McEliece.A public-key cryptosystem based on algebraic coding theory.DSN Progress Report, 42-44:114-116, 1978.5

Page 15: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece Cryptosystem

Consider(F

)family of codes

with an efficientdecoding algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. G ∈ Fk×nq a generator matrix for C ∈ F

2. AC an “Efficient” decoding algorithm for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (AC)

6

Page 16: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece Cryptosystem

Consider(F

)family of codes

with an efficientdecoding algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. G ∈ Fk×nq a generator matrix for C ∈ F

2. AC an “Efficient” decoding algorithm for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (AC)

6

Page 17: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece Cryptosystem

Consider(F

)family of codes

with an efficientdecoding algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. G ∈ Fk×nq a generator matrix for C ∈ F

2. AC an “Efficient” decoding algorithm for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (AC)

6

Page 18: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece Cryptosystem

Consider(F

)family of codes

with an efficientdecoding algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. G ∈ Fk×nq a generator matrix for C ∈ F

2. AC an “Efficient” decoding algorithm for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (AC)

6

Page 19: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemEncryption Algorithm:Encrypt a message m ∈ Fk

q as

ENCRYPT(m) = mG + e = y

where e is a random error vector of weight at most t .

Decryption Algorithm:Using Ksecret , the receiver obtain m.

DECRYPT(y) = AC(y) = m

Parameters Key size Security level[1024,524,101]2 67 ko 262

[2048,1608,48]2 412 ko 296

7

Page 20: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemEncryption Algorithm:Encrypt a message m ∈ Fk

q as

ENCRYPT(m) = mG + e = y

where e is a random error vector of weight at most t .

Decryption Algorithm:Using Ksecret , the receiver obtain m.

DECRYPT(y) = AC(y) = m

Parameters Key size Security level[1024,524,101]2 67 ko 262

[2048,1608,48]2 412 ko 296

7

Page 21: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemEncryption Algorithm:Encrypt a message m ∈ Fk

q as

ENCRYPT(m) = mG + e = y

where e is a random error vector of weight at most t .

Decryption Algorithm:Using Ksecret , the receiver obtain m.

DECRYPT(y) = AC(y) = m

Parameters Key size Security level[1024,524,101]2 67 ko 262

[2048,1608,48]2 412 ko 296

7

Page 22: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The Niederreiter Cryptosystem

Differences with the McEliece cryptosystem:

1. The public key is a parity check matrix. This improve-ment reduce the key size.

2. The secret key is an efficient syndrome decoder3. The encryption mechanism

Niederreiter presents a dual version ofMcEliece (which is equivalent in terms of

security) in 1986.

H. Niederreiter. (1986).Knapsack-type crypto system and algebraic coding theory.Problems of Control and Information Theory.

8

Page 23: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The Niederreiter CryptosystemDifferences with the McEliece cryptosystem:

1. The public key is a parity check matrix. This improve-ment reduce the key size.

2. The secret key is an efficient syndrome decoder3. The encryption mechanism

Niederreiter presents a dual version ofMcEliece (which is equivalent in terms of

security) in 1986.

H. Niederreiter. (1986).Knapsack-type crypto system and algebraic coding theory.Problems of Control and Information Theory.

8

Page 24: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The Niederreiter CryptosystemConsider

(F

)family of codes

with an efficientSyndrome decoding

algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. H ∈ F(n−k)×nq a parity check matrix for C ∈ F

2. DC an “Efficient” Syndrome Dec. for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (DC)

9

Page 25: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The Niederreiter CryptosystemConsider

(F

)family of codes

with an efficientSyndrome decoding

algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. H ∈ F(n−k)×nq a parity check matrix for C ∈ F

2. DC an “Efficient” Syndrome Dec. for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (DC)

9

Page 26: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The Niederreiter CryptosystemConsider

(F

)family of codes

with an efficientSyndrome decoding

algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. H ∈ F(n−k)×nq a parity check matrix for C ∈ F

2. DC an “Efficient” Syndrome Dec. for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (DC)

9

Page 27: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The Niederreiter CryptosystemConsider

(F

)family of codes

with an efficientSyndrome decoding

algorithm

Indistinguishablefrom random codes

Key Generation Algorithm:

1. H ∈ F(n−k)×nq a parity check matrix for C ∈ F

2. DC an “Efficient” Syndrome Dec. for C which corrects up to t errors.

Public Key: Kpub = (G, t)Private Key: Ksecret = (DC)

9

Page 28: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemEncryption Algorithm:Encrypt a message m ∈ Fk

q of weight ≤ t

ENCRYPT(m) = mHT ∈ Fn−k2

Decryption Algorithm:Using Ksecret , the receiver obtain m.

DECRYPT(y) = DC(y) = m

Parameters Key size Security level[256,128,129]256 67 ko 295

10

Page 29: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemEncryption Algorithm:Encrypt a message m ∈ Fk

q of weight ≤ t

ENCRYPT(m) = mHT ∈ Fn−k2

Decryption Algorithm:Using Ksecret , the receiver obtain m.

DECRYPT(y) = DC(y) = m

Parameters Key size Security level[256,128,129]256 67 ko 295

10

Page 30: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

The McEliece CryptosystemEncryption Algorithm:Encrypt a message m ∈ Fk

q of weight ≤ t

ENCRYPT(m) = mHT ∈ Fn−k2

Decryption Algorithm:Using Ksecret , the receiver obtain m.

DECRYPT(y) = DC(y) = m

Parameters Key size Security level[256,128,129]256 67 ko 295

10

Page 31: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Cryptanalysis - McEliece scheme

We have mainly 2 ways of cryptanalyzing the McEliece system:

1. Message Attacks• Address the problem of decoding a random linear code• More efficient Message-Attacks Ü Larger codes

2. Key Attacks• Try to retrieve the code structure• Efficiently applied to: GRS codes, subcodes of GRS codes, Reed-Muller

codes, AG codes, Concatenated codes, ...

11

Page 32: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Cryptanalysis - McEliece scheme

We have mainly 2 ways of cryptanalyzing the McEliece system:

1. Message Attacks• Address the problem of decoding a random linear code• More efficient Message-Attacks Ü Larger codes

2. Key Attacks• Try to retrieve the code structure• Efficiently applied to: GRS codes, subcodes of GRS codes, Reed-Muller

codes, AG codes, Concatenated codes, ...

11

Page 33: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

Cryptanalysis - McEliece scheme

We have mainly 2 ways of cryptanalyzing the McEliece system:

1. Message Attacks• Address the problem of decoding a random linear code• More efficient Message-Attacks Ü Larger codes

2. Key Attacks• Try to retrieve the code structure• Efficiently applied to: GRS codes, subcodes of GRS codes, Reed-Muller

codes, AG codes, Concatenated codes, ...

11

Page 34: Code-Based Cryptography - McEliece Cryptosystem · 2016. 6. 20. · Formal definition of Public-Key Cryptography P= Plaintext Space C= Ciphertext Space K p = Public-Key Space K s

2. McEliece Cryptosystem

1. Formal Definition2. Security-Reduction Proof3. McEliece Assumptions4. Notions of Security5. Critical Attacks - Semantic Secure Conversions6. Reducing the Key Size7. Reducing the Key Size - LDPC codes8. Reducing the Key Size - MDPC codes9. Implementation

I. Márquez-Corbella CODE-BASED CRYPTOGRAPHY