McEliece cryptosystem

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In cryptography, the McEliece cryptosystem is an asymmetric encryption algorithm developed in 1978 by Robert McEliece.[1] It was the first such scheme to use randomization in the encryption process. The algorithm has never gained much acceptance in the cryptographic community, but is a candidate for "post-quantum cryptography", as it is immune to attacks using Shor's algorithm and — more generally — measuring cost states using Fourier sampling.[2]

The algorithm is based on the hardness of decoding a general linear code (which is known to be NP-hard[3]). For a description of the private key, an error-correcting code is selected for which an efficient decoding algorithm is known, and which is able to correct errors. The original algorithm uses binary Goppa codes (subfield codes of geometric Goppa codes of a genus-0 curve over finite fields of characteristic 2); these codes are easy to decode, thanks to an efficient algorithm due to Patterson.[4] The public key is derived from the private key by disguising the selected code as a general linear code. For this, the code's generator matrix is perturbated by two randomly selected invertible matrices and (see below).

Variants of this cryptosystem exist, using different types of codes. Most of them were proven less secure; they were broken by structural decoding. On the other hand, Wang [5] proposed a secure McEliece scheme based on any efficient linear code, the hardness of Wang's variants depend on the NP-hardness of decoding random linear code.

McEliece with Goppa codes has resisted cryptanalysis so far. The most effective attacks known use information-set decoding algorithms. A 2008 paper describes both an attack and a fix.[6] Another paper shows that for quantum computing, key sizes must be increased by a factor of four due to improvements in information set decoding.[7]

The McEliece cryptosystem has some advantages over, for example, RSA. The encryption and decryption are faster (for comparative benchmarks see the eBATS benchmarking project at For a long time, it was thought that McEliece could not be used to produce signatures. However, a signature scheme can be constructed based on the Niederreiter scheme, the dual variant of the McEliece scheme. One of the main disadvantages of McEliece is that the private and public keys are large matrices. For a standard selection of parameters, the public key is 512 kilobits long. This is why the algorithm is rarely used in practice. One exceptional case that used McEliece for encryption is the Freenet-like application Entropy.[8]

Scheme definition[edit]

McEliece consists of three algorithms: a probabilistic key generation algorithm which produces a public and a private key, a probabilistic encryption algorithm, and a deterministic decryption algorithm.

All users in a McEliece deployment share a set of common security parameters: .

Key generation[edit]

  1. Alice selects a binary -linear code capable of correcting errors. This code must possess an efficient decoding algorithm and generates a generator matrix for the code .
  2. Alice selects a random binary non-singular matrix .
  3. Alice selects a random permutation matrix .
  4. Alice computes the matrix .
  5. Alice's public key is ; her private key is .

Message encryption[edit]

Suppose Bob wishes to send a message m to Alice whose public key is :

  1. Bob encodes the message as a binary string of length .
  2. Bob computes the vector .
  3. Bob generates a random -bit vector containing exactly ones (a vector of length and weight )[1]
  4. Bob computes the ciphertext as .

Message decryption[edit]

Upon receipt of , Alice performs the following steps to decrypt the message:

  1. Alice computes the inverse of (i.e. ).
  2. Alice computes .
  3. Alice uses the decoding algorithm for the code to decode to .
  4. Alice computes .

Proof of message decryption[edit]

Note that , and that is a permutation matrix, thus has weight at most .

The Goppa code can correct up to errors, and the word is at distance at most from . Therefore, the correct code word is obtained.

Multiplying with the inverse of gives , which is the plain text message.

Key sizes[edit]

McEliece originally suggested security parameter sizes of ,[1] resulting in a public key size of 524*(1024-524) = 262,000 bits[clarification needed]. Recent analysis suggests parameter sizes of for 80 bits of security when using standard algebraic decoding, or when using list decoding for the Goppa code, giving rise to public key sizes of 520,047 and 460,647 bits respectively.[6] For resiliency against quantum computers, sizes of with Goppa code were proposed, giving the size of public key of 8,373,911 bits.[9]


A successful attack of an adversary knowing the public key but not the private key results in deducing plaintext from some intercepted ciphertext . Such attempts must be infeasible. This section discusses attack strategies against the McEliece cryptosystem described in the literature.

Brute force[edit]

An attacker may try to find out what is, and so be able to use the Sardinas–Patterson algorithm.[citation needed] This is unlikely to succeed for large values of n and t, since there are just too many possibilities for , and .

A strategy that does not require is based on the concept of information set decoding. McEliece mentioned a simple form of this attack: selecting k of the n coordinates randomly in hope that none of the k are in error (i.e., for none of the selected coordinates the vector has a 1-bit), and under this assumption calculate m. However, if the parameters k, n and t are carefully chosen, the probability of no error in this set of k elements is , and thus is negligible.

Information set decoding[edit]

Information set decoding algorithms have turned out to be the most effective attacks against the McEliece and Niederreiter cryptosystems. Various forms have been introduced. An effective method is based on finding minimum- or low-weight codewords (see, for example, Canteaut & Sendrier 1998[10]). In 2008, Bernstein, Lange and Peters[6] described a practical attack on the original McEliece cryptosystem, based on finding low-weight code words using an algorithm published by Jacques Stern in 1989.[11] Using the parameters originally suggested by McEliece, the attack could be carried out in 260.55 bit operations. Since the attack is embarrassingly parallel (no communication between nodes is necessary), it can be carried out in days on modest computer clusters.


  1. ^ a b c McEliece, Robert J. (1978). "A Public-Key Cryptosystem Based On Algebraic Coding Theory" (PDF). DSN Progress Report 44: 114–116. Bibcode:1978DSNPR..44..114M. 
  2. ^ Dinh, Hang; Moore, Cristopher; Russell, Alexander (2011). Rogaway, Philip, ed. McEliece and Niederreiter cryptosystems that resist quantum Fourier sampling attacks. Advances in cryptology—CRYPTO 2011. Lecture Notes in Computer Science. Heidelberg: Springer. pp. 761–779. doi:10.1007/978-3-642-22792-9_43. ISBN 978-3-642-22791-2. MR 2874885. 
  3. ^ Berlekamp, Elwyn R.; McEliece, Robert J.; Van Tilborg, Henk C.A. (1978). "On the Inherent Intractability of Certain Coding Problems". IEEE Transactions on Information Theory. IT-24: 384–386. doi:10.1109/TIT.1978.1055873. MR 0495180. 
  4. ^ N. J. Patterson (1975). "The algebraic decoding of Goppa codes". IEEE Transactions on Information Theory. IT-21: 203–207. doi:10.1109/TIT.1975.1055350. 
  5. ^ Yongge Wang (2015). "Random Linear Code Based Public Key Encryption Scheme RLCE". Cryptology ePrint Archive. 2015/298: 1–12. 
  6. ^ a b c Bernstein, Daniel J.; Lange, Tanja; Peters, Christiane (8 August 2008). "Attacking and defending the McEliece cryptosystem". Proc. 2nd International Workshop on Post-Quantum Cryptography. Lecture Notes In Computer Science 5299: 31–46. doi:10.1007/978-3-540-88403-3_3. 
  7. ^ Bernstein, Daniel J. (2010). Sendrier, Nicolas, ed. Grover vs. McEliece (PDF). Post-quantum cryptography 2010. Lecture Notes in Computer Science. Berlin: Springer. pp. 73–80. doi:10.1007/978-3-642-12929-2_6. ISBN 978-3-642-12928-5. MR 2776312. 
  8. ^ "1978 Cryptosystem Resists Quantum Attack". MIT Technology Review. 2010-08-18. 
  9. ^ Daniel Augot; et al. (2015-09-07). "Initial recommendations of long-term secure post-quantum systems" (PDF). PQCRYPTO: Post-Quantum Cryptography for Long-Term Security. 
  10. ^ Ohta, Kazuo; Pei, Dingyi (1998). Ohta, Kazuo; Pei, Dingyi, eds. "Cryptanalysis of the Original McEliece Cryptosystem". Advances in Cryptology — ASIACRYPT’98. Lecture Notes in Computer Science 1514: 187–199. doi:10.1007/3-540-49649-1. 
  11. ^ Jacques Stern (1989). "A method for finding codewords of small weight". Coding Theory and Applications. Lecture Notes in Computer Science (Springer Verlag) 388: 106–113. doi:10.1007/BFb0019850. 

External links[edit]