cryptographie basée sur les codes correcteurs … · pierre-louis cayrel cryptographie basée sur...

27
Code- based crypto Error- correcting codes Encryption with codes Signature with codes Identification with codes Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique Laboratoire Hubert Curien, UMR CNRS 5516, Bâtiment F 18 rue du professeur Benoît Lauras 42000 Saint-Etienne France [email protected] 8 juin 2015 Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 1/23

Upload: buiminh

Post on 15-Sep-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Cryptographie basée sur les codes correcteurs d’erreurs etarithmétique

Laboratoire Hubert Curien, UMR CNRS 5516,Bâtiment F 18 rue du professeur Benoît Lauras

42000 Saint-EtienneFrance

[email protected]

8 juin 2015

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 1/23

Page 2: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 2/23

Page 3: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Syndrome decoding problem

1 Input.H : matrix of size r × nS : vector of Fr

2t : integer

2 Problem. Does there exist a vector e of Fn2 of weight t such that :

Problem NP-completeE.R. BERLEKAMP, R.J. MCELIECE and H.C. VAN TILBORG 1978

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 3/23

Page 4: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 4/23

Page 5: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Linear codes : representation

most used in error correction

error correcting codes for which redundancy depends linearly on theinformationcan be defined by a generator matrix :

c is a word of the code C if and only if :

Figure : G : generator matrix in systematic form

The generator matrix G :

is a r × n matrix;

rows of G form a basis for the code C.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23

Page 6: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

The parity check matrix H is orthogonal to G :

it’s a r × n matrix;

it’s the generator matrix of the dual;the code C is the kernel of H.

c ∈ C if and only if Hc = 0.

s = H · c′ = H · c +H · e is the syndrome of the error.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 6/23

Page 7: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Code based cryptosystems+ advantages :

faster than RSA ;not based on number theory problem (PQ secure) ;does not need cryptoprocessors ;based on hard problem (syndrome decoding problem ...)

– disadvantages :size of public keys (few hundred bits...)

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 7/23

Page 8: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 8/23

Page 9: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Niederreiter encryption-scheme

Private key :C a [n, r , d ] code which corrects t errors,H′ a parity check matrix of C,a r × r invertible matrix Q,a n × n permutation matrix P.

Public key : H = QH′P.

Encryption :φn,t : m 7→ e, with e of weight t .e 7→ y = He

Decryption : decode (use the secret key to find e)Q−1y = (Q−1Q)H′Pe in Pe, then P−1Pe gives e.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 9/23

Page 10: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

From cryptosystem to signature scheme

PKC→ signature.RSA yesMcEliece and Niederreiter no directly

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 10/23

Page 11: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Code-based signature scheme

Problem: McEliece and Niederreiter not invertible.if we take y ∈ Fn

2 random and a code C[n, k , d ] for which we are able todecode d/2 errors, it is almost impossible to decode y in a word of C.

Solution:the hash value has to be decodable !

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 11/23

Page 12: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

CFS : ideaN. COURTOIS, M. FINIASZ, N. SENDRIER. How to Achieve une McEliece-Based Digital Signature Scheme. ASIACRYPT 2001:157-174.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 12/23

Page 13: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

CFS : ideaN. COURTOIS, M. FINIASZ, N. SENDRIER. How to Achieve une McEliece-Based Digital Signature Scheme. ASIACRYPT 2001:157-174.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 13/23

Page 14: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

CFS signature scheme : choice of the codes

we need a dense family of codes : Goppa codesbinary Goppa codes

t smallthe probability for a random element to be decodable(in a ball of radius t centered on the codewords) is ≈ 1

t!

we take n = 2m,m = 16, t = 9.

we have 1 chance over 9! = 362880 to have a decodable word.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 14/23

Page 15: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

cons :decode several words (t!) before to find a good one

70 times slower than RSAt small leads to very big parameters

public key of 1 MB

⇒ new PK size : several MB, time to sign : several weeks ...

change of representation : structured codes (smaller parameters) and aGPU to have a signature in less than 2 minutes ...

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 15/23

Page 16: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Stern identification schemeJ. STERN. A new identification scheme based on syndrome decoding. Crypto 93, Lecture Notes in Computer Science 773 (1993),

Springer-Verlag, 13-21.

zero-knowledge,

the security is based on the syndrome decoding problem.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 16/23

Page 17: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

The protocol

generate a random matrix H of size r × nwe choose an integer t which is the weight

this is the public key (H, t)each user receive e of n bits and weight t .

this is the private keyeach user compute : S = He.

just once for H fixedS is public

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 17/23

Page 18: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

A wants to prove to B that she knows the secret but she doesn’t want todivulgate it.

The protocol is on λ rounds and each of them is defined as follows.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 18/23

Page 19: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 19/23

Page 20: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 20/23

Page 21: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 21/23

Page 22: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Change of representation : Replace the random matrix H by :.

Let ` be an integer.

a random double circulant matrix `× 2` H is defined as :

H = (I|A) ,

where A is a cyclic matrix, of the form :

A =

a1 a2 a3 · · · a`

a` a1 a2 · · · a`−1...

......

......

a2 a3 a4 · · · a1

,

where (a1, a2, a3, · · · , a`) is a random vector of F`2.

Store H needs only ` bits.

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 22/23

Page 23: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 23/23

Page 24: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Information Set Decoding

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 24/23

Page 25: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

Information Set Decoding

Information Set Decoding

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 25/23

Page 26: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

φ : m 7→ x with x of weight t

This application is called a constant weight encoder.

Enumerative coding:

φ−1 : Wn,t −→

[0,

(nt

)[

(i0, i1, . . . , it−1) 7−→

(i01

)+

(i12

)+ · · ·+

(it−1

t

)

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 26/23

Page 27: Cryptographie basée sur les codes correcteurs … · Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 5/23. Code-based crypto Error-correcting

Code-basedcrypto

Error-correctingcodes

Encryptionwith codes

Signaturewith codes

Identificationwith codes

How to choose the weight for an optimal complexity ?

Pierre-Louis CAYREL Cryptographie basée sur les codes correcteurs d’erreurs et arithmétique 27/23