Cryptanalysis of The Original McEliece
Cryptanalysis of The Original McEliece
net/publication/225156488
CITATIONS READS
58 606
2 authors:
All content following this page was uploaded by Anne Canteaut on 26 May 2014.
1 Introduction
K. Ohta and D. Pei (Eds.): ASIACRYPT’98, LNCS 1514, pp. 187–199, 2000.
c Springer-Verlag Berlin Heidelberg 2000
188 A. Canteaut and N. Sendrier
By definition the public key is therefore a generator matrix for an other linear
code C 0 which is equivalent to C. A ciphertext in McEliece cryptosystem then
corresponds to a word of the public code C 0 with t corrupted positions.
Niederreiter proposed a dual version of this system [Nie86] where the public-
key is a parity-check matrix H 0 of a code C 0 equivalent to the secret code. A
plaintext m is here an n-bit vector of weight t and the associated ciphertext x
corresponds to the syndrome of m relatively to the public code, x = mH 0t .
McEliece and Niederreiter cryptosystems are actually equivalent from the se-
curity point of view when set up for corresponding choices of parameters [LDW94].
But for given parameters Niederreiter cipher presents many advantages. First of
all it allows a public key in systematic form at no cost for security whereas this
Cryptanalysis of the Original McEliece Cryptosystem 189
would reveal a part of the plaintext in McEliece system. The public key in Nie-
derreiter system is then (n − k)/n times smaller than in McEliece version. The
systematic form of the public matrix H 0 and the low-weight of vector m signifi-
cantly reduce the computational cost involved in the encryption in Niederreiter
system. For [1024,524,101]-binary codes its transmission rate, i.e. the number of
information symbols divided by the number of transmitted symbols, is smaller
that in McEliece system. Another disadvantage of McEliece system is that it
is easy to recover the plaintext if it has been encrypted twice with the same
public-key. On the contrary Niederreiter cipher is deterministic since encrypting
a given plaintext always leads to the same ciphertext.
Table 1 sums up the characteristics of these systems when they both use
[1024,524,101]-binary codes. It then shows that it is preferable to use the version
proposed by Niederreiter.
We give for information the values corresponding to the RSA system with
a 1024-bit modulus n = pq when the public exponent is 17 — we here suppose
that RSA encryption and decryption uses Karatsuba’s method for large integer
multiplication. These results point out that these public-key systems run much
faster than RSA (about 50 times faster for encryption and 100 times faster for
decryption). Their main disadvantages are the size of the public key and the lack
of related signature scheme.
The first class of attacks imposes some conditions on the family of secret codes Γ .
For given length, dimension and minimal distance the family Γ must be large
enough to avoid any enumeration. This aims at protecting the system from the
attack which consists in enumerating all the elements of Γ until a code equivalent
to the public code is found. This can be performed with an algorithm due to
Sendrier [Sen96] which is able to determine from two generator matrices whether
they correspond to equivalent codes and then to recover the permutation. A
second condition is that a generator or parity-check matrix of a permutation
equivalent code gives no information about the structure of the secret code, that
means that the fast decoding algorithm requires some parameters of the secret
code besides a generator matrix G0 . This dismisses many families of codes like
generalized Reed-Solomon codes [SS92] or concatenated codes [Sen94,Sen95].
But the family of irreducible Goppa codes is well-suited to such systems
insofar as at present there exists no algorithm which is able to compute the
characteristic parameters of a Goppa code from one of its permuted generator
matrix. This class can even be extended to all [1024,524,101]-binary Goppa codes
defined by a monic square-free polynomial of degree 50 in GF (1024)[X] which
has no root in GF (1024). The cardinality of Γ is then 2498.5 . In the case where the
used family of codes satisfies the above properties, the equivalent code C 0 defined
by the public key presents no visible structure; recovering a plaintext from the
corresponding ciphertext then comes down to decoding any linear code.
Initialization:
Randomly choose an information set I and apply a Gaussian elimination in
order to obtain a systematic generator matrix (Idk , Z)I .
1. Randomly split I in two subsets I1 and I2 where |I1 | = bk/2c and |I2 | =
dk/2e. The rows of Z are then split in two parts Z1 and Z2 . Randomly select
a σ-element subset L of the redundant set J = N \ I.
3. Using the hash table consider all pairs of linear combinations (Λ1 , Λ2 ) such
that Λ1|L = Λ2|L and check whether wt((Λ1 + Λ2 )|J\L ) = w − 2p.
4 Theoretical Running-Time
We give here an explicit and computable expression for the work factor of this
algorithm, i.e. the average number of elementary operations it requires. This
analysis is essential in particular for finding the values of parameters p and σ
which minimize the running-time of the algorithm.
Proposition 1. The stochastic process {Xi }i∈N associated with the algorithm
is an homogeneous Markov chain.
Proof. The selections I, I1 , I2 and L corresponding to the i-th iteration only
depend on the previous information window since I1 , I2 and L are randomly
chosen. We then have for all i and for all (u0 , u1 , · · · , ui ) ∈ E,
P r[Xi = ui /Xi−1 = ui−1 , Xi−2 = ui−2 , · · · X0 = u0 ] = P r[Xi = ui /Xi−1 = ui−1 ]
Cryptanalysis of the Original McEliece Cryptosystem 193
Furthermore this probability does not depend on the iteration. Hence there exists
a matrix P such that :
∀i ∈ N, ∀(u, v) ∈ E 2 , P r[Xi = v/Xi−1 = u] = Pu,v
The Markov chain {Xi }i∈N is therefore completely determined by its initial
probability vector π0 = (P r[X0 = u])u∈E and its transition matrix P . Both
of these quantities can be easily determined as two successive information sets
differ from only one element.
Proposition 2. The transition matrix P of the homogeneous Markov chain as-
sociated with the algorithm is given by:
k − u n − k − (w − u) u w − u
Pu,u = × + × for all u 6∈ {(2p)S , (2p)F }
k n−k k n−k
u n − k − (w − u)
Pu,u−1 = × for all u 6= 2p + 1
k n−k
k−u w−u
Pu,u+1 = × for all u 6= 2p − 1
k n−k
Pu,v = 0 for all v ∈
/ {u − 1, u, u + 1}
k − 2p n − k − (w − 2p) 2p w − 2p
P(2p)F ,(2p)F = (1 − β) × + ×
k n−k k n−k
2p + 1 n − k − (w − (2p + 1))
P2p+1,(2p)F = (1 − β) ×
k n−k
k − (2p − 1) w − (2p − 1)
P2p−1,(2p)F = (1 − β) ×
k n−k
2p + 1 n − k − (w − (2p + 1))
P2p+1,(2p)S =β ×
k n−k
k − (2p − 1) w − (2p − 1)
P2p−1,(2p)S =β ×
k n−k
k − 2p n − k − (w − 2p) 2p w − 2p
P(2p)F ,(2p)S =β × + ×
k n−k k n−k
P(2p)S ,(2p)S = 1 and P(2p)S ,u = 0 for all u 6= (2p)S
2p
k−2p
n−k−w+2p
p k/2−p σ
where β = P r[Xi = (2p)S / |I ∩ supp(e)| = 2p] = k
n−k
k/2 σ
The initial probability vector π0 is
w
n−w
u k−u
π0 (u) = n
if u 6∈ {(2p)F , (2p)S }
k
w
n−w
(1 − β) 2p k−2p
π0 ((2p)F ) = n
k
w
n−w
β 2p k−2p
π0 ((2p)S ) = n
k
194 A. Canteaut and N. Sendrier
The only persistent space of this Markov chain, i.e. a maximal state subset
which cannot be left once it is entered, exactly corresponds to the success space
S. Since this subset contains only one state which is an absorbing state, i.e. a
state which once entered is never left, this chain is by definition an absorbing
chain. A basic property of absorbing Markov chains with a finite state space is
that, no matter where the process starts, the probability that the process is in
an absorbing state after n steps tends to 1 as n tends to infinity. We then deduce
that our algorithm converges.
Proposition 3. [KS60] If {Xi }i∈N is a finite absorbing Markov chain with tran-
sition matrix P , and Q is the sub-stochastic matrix corresponding to transitions
among the transient states — the non-persistent states —, i.e. Q = (Pu,v )u,v∈F
then (Id − Q) has an inverse R called the fundamental matrix of the chain and
∞
X
R= Qm = (Id − Q)−1 .
m=0
Proof.
∞
X
E(N ) = nP r[Xn ∈ S and Xn−1 ∈ F]
n=0
∞ n−1
X X
= P r[Xn ∈ S and Xn−1 ∈ F]
n=0 m=0
∞ X X
X
= P r[Xm = v / X0 = u]
m=0 u∈F v∈F
X ∞
X X X X
= π0 (u) (Qm )u,v = π0 (u) Ru,v
u∈F v∈F m=0 u∈F v∈F
Theorem 2. The variance of the number of iterations N required until {Xi }i∈N
reaches the success state is given by:
!2
X X X
V (N ) = π0 (u) (2Ru,v − δu,v )Ev (N ) − π0 (u)Eu (N )
u∈F v∈F u∈F
where δi,j is the Kronecker symbol and Eu (N ) is the average number of iterations
performed by the process when it starts in state u, i.e.
X
Eu (N ) = Ru,v
v∈F
2. The average number of pairs (Λ1 , Λ2 ) such that (Λ1 + Λ2 )|L = 0 is equal to
2
p )
(k/2
2σ . For each of them we perform 2p − 1 additions of (n − k − σ)-bit words
for computing (Λ1 + Λ2 )|J\L and a weight-checking.
3. We need K(p k/2 p + 2σ ) more operations to perform the dynamic memory
allocation where K is the size of a computer word (K=32 or 64).
4. The average work factor involved in the pivoting procedure for updating
matrix Z is 12 k(n − k).
Hence the average number of elementary operations performed at each iteration
is:
k/2 2
k/2 p k/2 σ k(n − k)
Ωp,σ = 2pσ + 2p(n − k − σ) σ + K p +2 + (2)
p 2 p 2
55 39.52
3 3
54 3 3 19.76
3
3
3
53 3 9.88
log2 (Wopt ) 3 CPU
(months)
52 3 4.94
51 3 2.47
50
0.02 0.04 0.06 0.08 0.1 0.12
success rate (%)
Fig. 1. Computational effort required for cryptanalyzing McEliece cryptosystem as a
function of the proportion of messages successfully decrypted: the CPU time is given
for 10 workstations DEC alpha at 433 MHz in parallel.
6 Conclusion
We have then proved that the security of McEliece cipher is insufficient when its
original parameters are used. But this public-key system is still a valid alterna-
tive to RSA once its parameters are modified. For example if the secret key is
chosen amongst the Goppa codes of length 2048, dimension 1608 and minimum
distance 81, the average work factor of our attack is roughly 2100 . Even with
these parameters the performance of McEliece cipher remains much better than
the one of RSA: the costs of encryption and decryption per information bit with
Niederreiter’s version are respectively 45 times and 70 times lower than with
RSA-1024. But the huge size of the public-key (more than 88000 bytes in this
case) may often dissuade from using this cipher.
Cryptanalysis of the Original McEliece Cryptosystem 199
References
CC98. A. Canteaut and F. Chabaud. A new algorithm for finding minimum-weight
words in a linear code: application to McEliece’s cryptosystem and to narrow-
sense BCH codes of length 511. IEEE Transactions on Information Theory,
IT-44(1):367–378, 1998.
KS60. J.G. Kemeny and J.L. Snell. Finite Markov chains. Springer-Verlag, 1960.
LB88. P.J. Lee and E.F. Brickell. An observation on the security of McEliece’s
public-key cryptosystem. In C.G. Günter, editor, Advances in Cryptology -
EUROCRYPT’88, number 330 in Lecture Notes in Computer Science, pages
275–280. Springer-Verlag, 1988.
LDW94. Y.X. Li, R.H. Deng, and X.M. Wang. On the equivalence of McEliece’s and
Niederreiter’s public-key cryptosystems. IEEE Transactions on Information
Theory, IT-40(1):271–273, 1994.
Leo88. J.S. Leon. A probabilistic algorithm for computing minimum weights of
large error-correcting codes. IEEE Transactions on Information Theory,
34(5):1354–1359, 1988.
McE78. R.J. McEliece. A public-key cryptosystem based on algebraic coding theory.
JPL DSN Progress Report, pages 114–116, 1978.
Nie86. H. Niederreiter. Knapsack-type cryptosystems and algebraic coding theory.
Problems of Control and Information Theory, 15(2):159–166, 1986.
Omu72. J.K. Omura. Iterative decoding of linear codes by a modulo-2 linear pro-
gramm. Discrete Math, (3):193–208, 1972.
Sen94. N. Sendrier. On the structure of a randomly permuted concatenated code.
In P. Charpin, editor, EUROCODE 94 - Livre des résumés, pages 169–173.
INRIA, 1994.
Sen95. N. Sendrier. On the structure of a randomly permuted concatenated code.
Technical Report RR-2460, INRIA, January 1995.
Sen96. N. Sendrier. An algorithm for finding the permutation between two equivalent
binary codes. Technical Report RR-2853, INRIA, April 1996.
SS92. V.M. Sidelnikov and S.O. Shestakov. On cryptosystems based on generalized
Reed-Solomon codes. Diskretnaya Math, 4:57–63, 1992.
Ste89. J. Stern. A method for finding codewords of small weight. In G. Cohen
and J. Wolfmann, editors, Coding Theory and Applications, number 388 in
Lecture Notes in Computer Science, pages 106–113. Springer-Verlag, 1989.
Ste93. J. Stern. A new identification scheme based on syndrome decoding. In D.R.
Stinson, editor, Advances in Cryptology - CRYPTO’93, number 773 in Lec-
ture Notes in Computer Science, pages 13–21. Springer-Verlag, 1993.
Vér95. P. Véron. Problème SD, Opérateur Trace, schémas d’identification et codes
de Goppa. PhD thesis, Université de Toulon et du Var, 1995.
vT94. J. van Tilburg. Security-analysis of a class of cryptosystems based on linear
error-correcting codes. PhD thesis, Technische Universiteit Eindhoven, 1994.