qc-mdpc kem - nist€¦ · using quasi-cyclic moderate density parity check codes. n - codeword...

36
QC-MDPC KEM Philip Lafrance ISARA Corporation <[email protected]> April 13, 2018

Upload: others

Post on 05-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

QC-MDPC KEM

Philip Lafrance

ISARA Corporation <[email protected]>

April 13, 2018

Page 2: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it?

Encryption-based Key Encapsulation Mechanism:

Takes as input a public key and a secret seed.Derives and “encapsulates” an ephemeral symmetric key K .K can be recovered from the ciphertext by using the secret keymatching the public key used above.

Philip Lafrance QC-MDPC KEM

Page 3: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Takes as input a public key and a secret seed.Derives and “encapsulates” an ephemeral symmetric key K .K can be recovered from the ciphertext by using the secret keymatching the public key used above.

Background

What is it? Encryption-based Key Encapsulation Mechanism:

Philip Lafrance QC-MDPC KEM

Page 4: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Derives and “encapsulates” an ephemeral symmetric key K .K can be recovered from the ciphertext by using the secret keymatching the public key used above.

Background

What is it? Encryption-based Key Encapsulation Mechanism:

Takes as input a public key and a secret seed.

Philip Lafrance QC-MDPC KEM

Page 5: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

K can be recovered from the ciphertext by using the secret keymatching the public key used above.

Background

What is it? Encryption-based Key Encapsulation Mechanism:

Takes as input a public key and a secret seed. Derives and “encapsulates” an ephemeral symmetric key K .

Philip Lafrance QC-MDPC KEM

Page 6: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it? Encryption-based Key Encapsulation Mechanism:

Takes as input a public key and a secret seed. Derives and “encapsulates” an ephemeral symmetric key K . K can be recovered from the ciphertext by using the secret key matching the public key used above.

Philip Lafrance QC-MDPC KEM

Page 7: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it based on?

McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e,where, m is the message, e is an error vector, and G is thepublic-key.

Using Quasi-Cyclic Moderate Density Parity Check codes.

n - codeword length2k - cardinality of the code familyk, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Philip Lafrance QC-MDPC KEM

Page 8: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it based on?McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e,where, m is the message, e is an error vector, and G is thepublic-key.

Using Quasi-Cyclic Moderate Density Parity Check codes.

n - codeword length2k - cardinality of the code familyk, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Philip Lafrance QC-MDPC KEM

Page 9: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it based on?McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e,

where, m is the message, e is an error vector, and G is thepublic-key.

Using Quasi-Cyclic Moderate Density Parity Check codes.

n - codeword length2k - cardinality of the code familyk, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Philip Lafrance QC-MDPC KEM

Page 10: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it based on?McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e,where, m is the message, e is an error vector, and G is thepublic-key.

Using Quasi-Cyclic Moderate Density Parity Check codes.

n - codeword length2k - cardinality of the code familyk, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Philip Lafrance QC-MDPC KEM

Page 11: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

n - codeword length2k - cardinality of the code familyk, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Background

What is it based on? McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e, where, m is the message, e is an error vector, and G is the public-key.

Using Quasi-Cyclic Moderate Density Parity Check codes.

Philip Lafrance QC-MDPC KEM

Page 12: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

2k - cardinality of the code familyk, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Background

What is it based on? McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e, where, m is the message, e is an error vector, and G is the public-key.

Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length

Philip Lafrance QC-MDPC KEM

Page 13: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

k, and r = k = n/2 - dimension and co-dimensionw 2 O(

pn log(n)) - weight of the rows of the parity-check

matrix Ht - the error-correction threshold

Background

What is it based on? McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e, where, m is the message, e is an error vector, and G is the public-key.

Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2k - cardinality of the code family

Philip Lafrance QC-MDPC KEM

Page 14: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

w 2 O(p

n log(n)) - weight of the rows of the parity-checkmatrix Ht - the error-correction threshold

Background

What is it based on? McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e, where, m is the message, e is an error vector, and G is the public-key.

Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2k - cardinality of the code family k, and r = k = n/2 - dimension and co-dimension

Philip Lafrance QC-MDPC KEM

Page 15: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

t - the error-correction threshold

Background

What is it based on? McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e, where, m is the message, e is an error vector, and G is the public-key.

Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2k - cardinality of the code family k, and r = k = n/2 - dimension and co-dimensionpw 2 O( n log(n)) - weight of the rows of the parity-check matrix H

Philip Lafrance QC-MDPC KEM

Page 16: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Background

What is it based on? McEliece Encryption Scheme:

Encrypted messages are of the form: mG � e, where, m is the message, e is an error vector, and G is the public-key.

Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2k - cardinality of the code family k, and r = k = n/2 - dimension and co-dimensionpw 2 O( n log(n)) - weight of the rows of the parity-check matrix H t - the error-correction threshold

Philip Lafrance QC-MDPC KEM

Page 17: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Key Generation

Algorithm 1 QCMDPC.KeyGen

Input: Security parameter n = 2r , weight w , and co-dimension r . Output: Public key G , secret key H.

$1: Select h0, h1 − {0, 1}r , each of odd weight w/2. 2: Compute H0, H1 2 Fr

2 ×r by right circular shifts of h0 and h1.

3: Set H = [H0|H1] 2 Fr ×n .2 4: Calculate Q = (H−1H0)T

1 5: Set G = [Ik |Q]. 6: return (G , H).

Philip Lafrance QC-MDPC KEM

Page 18: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

To recover m, a decoding algorithm is required.The choice of decoder does not a�ectinteroperability/functionality.However, for security reasons, the decoding algorithm must beconstant time, and preferably with as low of a decoding failurerate (DFR) as possible.

Decoding Algorithms

Recall that an encrypted message is of the form:

c = mG � e.

Philip Lafrance QC-MDPC KEM

Page 19: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

The choice of decoder does not a�ectinteroperability/functionality.However, for security reasons, the decoding algorithm must beconstant time, and preferably with as low of a decoding failurerate (DFR) as possible.

Decoding Algorithms

Recall that an encrypted message is of the form:

c = mG � e.

To recover m, a decoding algorithm is required.

Philip Lafrance QC-MDPC KEM

Page 20: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

However, for security reasons, the decoding algorithm must beconstant time, and preferably with as low of a decoding failurerate (DFR) as possible.

Decoding Algorithms

Recall that an encrypted message is of the form:

c = mG � e.

To recover m, a decoding algorithm is required. The choice of decoder does not a�ect interoperability/functionality.

Philip Lafrance QC-MDPC KEM

Page 21: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Decoding Algorithms

Recall that an encrypted message is of the form:

c = mG � e.

To recover m, a decoding algorithm is required. The choice of decoder does not a�ect interoperability/functionality. However, for security reasons, the decoding algorithm must be constant time, and preferably with as low of a decoding failure rate (DFR) as possible.

Philip Lafrance QC-MDPC KEM

Page 22: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

� : {0, 1}� ! {0, 1}n – an eÿcient, deterministic,pseudorandom, one-way function with weight t outputs.KDF1 : {0, 1}� ! {0, 1}k , andKDF2 : {0, 1}� ! {0, 1}256+` – where ` is the desired keylength.

Encapsulation

We require an error vector derivation function, as well as two key derivation functions.

Philip Lafrance QC-MDPC KEM

Page 23: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

KDF1 : {0, 1}� ! {0, 1}k , andKDF2 : {0, 1}� ! {0, 1}256+` – where ` is the desired keylength.

Encapsulation

We require an error vector derivation function, as well as two key derivation functions.

� : {0, 1}� ! {0, 1}n – an eÿcient, deterministic, pseudorandom, one-way function with weight t outputs.

Philip Lafrance QC-MDPC KEM

Page 24: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

KDF2 : {0, 1}� ! {0, 1}256+` – where ` is the desired keylength.

Encapsulation

We require an error vector derivation function, as well as two key derivation functions.

� : {0, 1}� ! {0, 1}n – an eÿcient, deterministic, pseudorandom, one-way function with weight t outputs. KDF1 : {0, 1}� ! {0, 1}k , and

Philip Lafrance QC-MDPC KEM

Page 25: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Encapsulation

We require an error vector derivation function, as well as two key derivation functions.

� : {0, 1}� ! {0, 1}n – an eÿcient, deterministic, pseudorandom, one-way function with weight t outputs. KDF1 : {0, 1}� ! {0, 1}k , and KDF2 : {0, 1}� ! {0, 1}256+` – where ` is the desired key length.

Philip Lafrance QC-MDPC KEM

Page 26: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Encapsulation

Algorithm 2 QCMDPC.Encap

Input: Public key G , and random seed s 2 Fk2 .

Output: Symmetric key K 2 {0, 1}m

Output: Ciphertext C = (C1, C2) 2 F2562 × F`

2. 1: e �(s) . Compute n-bit error vector 2: y KDF1(e) . Compute k-bit masking value 3: x s � y . Obtain k-bit plain text 4: C1 xG � e . Encrypt x with e 5: C2||K KDF2(s) 6: return (K , C = (C1, C2))

Philip Lafrance QC-MDPC KEM

Page 27: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Decapsulation

Algorithm 3 QCMDPC.Decap

Input: Secret key H, ciphertext (C1, C2) 2 F256×F` 2, and dimension 2

k. Output: Symmetric key K 2 {0, 1}` or a decapsulation failure ?.

1: ((x , e), derr) QCMDPC.Decrypt(H, C1). 2: y KDF1(e) 3: s x � y 4: e0 �(s). 5: C2

0 ||K KDF2(s). 6: if e0 = e and C2

0 = C2 and derr = False then 7: return K 8: else 9: return ?

10: end if

Philip Lafrance QC-MDPC KEM

Page 28: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

State-of-the-art key distinguishing, key recovery, and decodingattacks.

ISD,Prange + Grover, MMT + Quantum Walks (QISD),

GJSIND-CPA reduction

Security

What attacks were considered?

Philip Lafrance QC-MDPC KEM

Page 29: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

ISD,Prange + Grover, MMT + Quantum Walks (QISD),

GJSIND-CPA reduction

Security

What attacks were considered? State-of-the-art key distinguishing, key recovery, and decodingattacks.

Philip Lafrance QC-MDPC KEM

Page 30: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Prange + Grover, MMT + Quantum Walks (QISD),GJSIND-CPA reduction

Security

What attacks were considered? State-of-the-art key distinguishing, key recovery, and decodingattacks.

ISD,

Philip Lafrance QC-MDPC KEM

Page 31: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

GJSIND-CPA reduction

Security

What attacks were considered? State-of-the-art key distinguishing, key recovery, and decodingattacks.

ISD, Prange + Grover, MMT + Quantum Walks (QISD),

Philip Lafrance QC-MDPC KEM

Page 32: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

IND-CPA reduction

Security

What attacks were considered? State-of-the-art key distinguishing, key recovery, and decodingattacks.

ISD, Prange + Grover, MMT + Quantum Walks (QISD),

GJS

Philip Lafrance QC-MDPC KEM

Page 33: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Security

What attacks were considered? State-of-the-art key distinguishing, key recovery, and decodingattacks.

ISD, Prange + Grover, MMT + Quantum Walks (QISD),

GJS IND-CPA reduction

Philip Lafrance QC-MDPC KEM

Page 34: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Parameters

Security

Classical Quantum n r w t

80 58 9602 4801 90 84 128 86 19714 9857 142 134 256 154 65542 32771 274 264

Table: Parameter sets for classical and quantum security1.

1Rafael Misoczki, Jean-Pierre Tillich, Nicolas Sendrier, and Paulo S. L. M. Barreto. MDPC-McEliece: New McEliece Variants from Moderate Density Parity-Check Codes, 2012. Cryptology ePrint Archive, Report 2012/409.

Philip Lafrance QC-MDPC KEM

Page 35: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Parameters

Using the (65542, 32771, 274, 264) parameter set:

Security

Classical Quantum Public key Private Key Ciphertext

256 154 4097 548 8226

Table: Data sizes in bytes.

Philip Lafrance QC-MDPC KEM

Page 36: QC-MDPC KEM - NIST€¦ · Using Quasi-Cyclic Moderate Density Parity Check codes. n - codeword length 2. k - cardinality of the code family k, and r = k = n / 2 - dimension and co-dimension

Thank You.

Philip Lafrance QC-MDPC KEM