In cryptography, the McEliece cryptosystem is an asymmetric encryption algorithm developed in 1978 by Robert McEliece. 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.
Contents
- Scheme definition
- Key generation
- Message encryption
- Message decryption
- Proof of message decryption
- Key sizes
- Attacks
- Exhaustive Search
- Information set decoding
- Implementations
- References
The algorithm is based on the hardness of decoding a general linear code (which is known to be NP-hard). 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
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 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. Another paper shows that for quantum computing, key sizes must be increased by a factor of four due to improvements in information set decoding.
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 bench.cr.yp.to). 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.
Scheme definition
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
- Alice selects a binary
( n , k ) -linear codeC capable of correctingt errors. This code must possess an efficient decoding algorithm and generates ak × n generator matrixG for the codeC . - Alice selects a random
k × k binary non-singular matrixS . - Alice selects a random
n × n permutation matrixP . - Alice computes the
k × n matrixG ^ = S G P . - Alice's public key is
( G ^ , t ) ; her private key is( S , G , P ) .
Message encryption
Suppose Bob wishes to send a message m to Alice whose public key is
- Bob encodes the message
m as a binary string of lengthk . - Bob computes the vector
c ′ = m G ^ - Bob generates a random
n -bit vectorz containing exactlyt ones (a vector of lengthn and weightt ) - Bob computes the ciphertext as
c = c ′ + z .
Message decryption
Upon receipt of
- Alice computes the inverse of
P (i.e.P − 1 - Alice computes
c ^ = c P − 1 - Alice uses the decoding algorithm for the code
C to decodec ^ m ^ - Alice computes
m = m ^ S − 1
Proof of message decryption
Note that
The Goppa code
Multiplying with the inverse of
Key sizes
McEliece originally suggested security parameter sizes of
Attacks
A successful attack of an adversary knowing the public key
Exhaustive Search
An attacker may try to find out what
A strategy that does not require
Information set decoding
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). In 2008, Bernstein, Lange and Peters 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. 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.
Implementations
The McEliece cryptosystem has been implemented in the secure Instant Messenger and E-Mail Client http://goldbug.sf.net since the version 3.1 release (McEliece Release).