Skip to main content

Weak Keys for the Quasi-Cyclic MDPC Public Key Encryption Scheme

  • Conference paper
  • First Online:
Progress in Cryptology – AFRICACRYPT 2016 (AFRICACRYPT 2016)

Part of the book series: Lecture Notes in Computer Science ((LNSC,volume 9646))

Included in the following conference series:

Abstract

We analyze a new key recovery attack against the Quasi-Cyclic MDPC McEliece scheme. Retrieving the secret key from the public data is usually tackled down using exponential time algorithms aiming to recover minimum weight codewords and thus constructing an equivalent code. We use here a different approach and give under certain hypothesis an algorithm that is able to solve a key equation relating the public key to the private key. We relate this equation to a well known problem the Rational Reconstruction Problem and therefore propose a natural solution based on the extended Euclidean algorithm. All private keys satisfying the hypothesis are declared weak keys. In the same time we give a precise number of weak keys and extend our analysis by considering all possible cyclic shifts on the private keys. This task is accomplished using combinatorial objects like Lyndon words. We improve our approach by using a generalization of the Frobenius action which enables to increase the proportion of weak keys. Lastly, we implement the attack and give the probability to draw a weak key for all the security parameters proposed by the designers of the scheme.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Belbachir, H., Bouroubi, S., Khelladi, A.: Connection between ordinary multinomials, fibonacci numbers, bell polynomials and discrete uniform distribution. Ann. Math. Inform. 35, 21–30 (2008)

    MathSciNet  MATH  Google Scholar 

  2. Cesaratto, E., Clément, J., Daireaux, B., Lhote, L., Maume-Deschamps, V., Vallée, B.: Regularity of the euclid algorithm, application to the analysis of fast GCD algorithms. J. Symbolic Comput. 44(7), 726 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  3. Davis, P.J.: Circulant Matrices. Pure and applied mathematics. Wiley, New York (1979)

    MATH  Google Scholar 

  4. Faugère, J.C., Otmani, A., Perret, L., de Portzamparc, F., Tillich, J.P.: Folding alternant and goppa codes with non-trivial automorphism groups, submitted, [cs.IT] (2014). arxiv:1405.5101

  5. Gentry, C.: Key recovery and message attacks on NTRU-composite. In: Pfitzmann, B. (ed.) EUROCRYPT 2001. LNCS, vol. 2045, pp. 182–194. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Gould, H.W.: Combinatorial identities: a standardized set of tables listing 500 binomial coefficient summations. Morgantown, W Va (1972)

    Google Scholar 

  7. Gilbert, E.N., Riordan, J.: Symmetry types of periodic sequences. Illinois J. Math. 5, 657–665 (1961)

    MathSciNet  MATH  Google Scholar 

  8. Hamdaoui, Y., Sendrier, N.: A non asymptotic analysis of information set decoding. In: Cryptology ePrint Archive, Report /162 (2013)

    Google Scholar 

  9. Knuth, D.E.: The analysis of algorithms. Actes Congr. Internat. Math. 3, 269–274 (1971). http://cr.yp.to/bib/entries.html#1971/knuth-gcd

    MathSciNet  MATH  Google Scholar 

  10. Lyndon, R.C., Chen, K.T., Fox, R.H.: Free differential calculus, iv. the quotient groups of the lower central series. Ann. Math. 68(1), 81–95 (1958)

    Article  MathSciNet  MATH  Google Scholar 

  11. Landau, E.: Handbuch der Lehre von der Verteilung der Primzahlen. Teubner(1909)

    Google Scholar 

  12. Lehmer, D.H.: Euclid’s algorithm for large numbers. Am. Math. Monthly 45(4), 227–233 (1938)

    Article  MathSciNet  MATH  Google Scholar 

  13. Loidreau, P.: Codes derived from binary goppa codes. Probl. Inf. Transm. 37(2), 91–99 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  14. Lothaire, M.: Algebraic Combinatorics on Words. Encyclopedia of mathematics and its applications. Cambridge University Press, New York (2002)

    Book  MATH  Google Scholar 

  15. Lhote, L., Vallée, B.: Sharp estimates for the main parameters of the euclid algorithm. In: Correa, J.R., Hevia, A., Kiwi, M. (eds.) LATIN 2006. LNCS, vol. 3887, pp. 689–702. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  16. Lhote, L., Vallée, B.: Gaussian laws for the main parameters of the euclid algorithms. Algorithmica 50(4), 497–554 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  17. McEliece, R.J.: A Public-Key System Based on Algebraic Coding Theory, pp. 114–116. Jet Propulsion Lab, DSN Progress Report, 44 (1978)

    Google Scholar 

  18. Möbius, A.F.: Über eine besondere art von umkehrung der reihen. Journal für die reine und angewandte Mathematik 9, 105–123 (1832)

    Article  Google Scholar 

  19. Misoczki, R., Tillich, J.-P., Sendrier, N., Barreto, P.S.L.M.: MDPC-McEliece: New McEliece variants from moderate density parity-check codes. IACR Cryptology ePrint Archive, 409 (2012)

    Google Scholar 

  20. Richomme, G.: Lyndon morphisms. Bull. Belg. Math. Soc. Simon Stevin 10(5), 761–785 (2003)

    MathSciNet  MATH  Google Scholar 

  21. Schönhage, A.: Schnelle Berechnung von Kettenbruchentwicklungen. (German) [Fast calculation of expansions of continued fractions]. ACTA-INFO, 1, 139–144 (1971)

    Google Scholar 

  22. Stehlé, D., Zimmermann, P.: A binary recursive GCD algorithm. In: Buell, D.A. (ed.) ANTS 2004. LNCS, vol. 3076, pp. 411–425. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

Download references

Acknowledgement

We would like to thank the anonymous referees for their careful reading and helpful comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Magali Bardet .

Editor information

Editors and Affiliations

A Appendix

A Appendix

Proof of Theorem 1 First of all we define the variables involved in the theorem. Let \(p,\omega ,k\) be integers, such that \(1\leqslant \omega \leqslant p\) and \( k \leqslant p-\omega \). A finite word w is a Lyndon word if w is strictly smaller for the lexicographical order than all of its cyclic shifts. We denote by \(\mathcal {L}(\mathcal A)\) the set of Lyndon words over an alphabet \(\mathcal A\). Let \(\mathcal {B}\) be a binary alphabet, and \(\mathcal {L}^{\leqslant k}(\mathcal {B},p,\omega )\) the set of all Lyndon words with length p, number of ones equal to \(\omega \) and the longest run of zeros less or equal to k over \(\mathcal {B}\). Let \(\mathcal {A}_k=\{a_0,a_1,\dots ,a_k\}\) be an alphabet. Monoids \(\mathcal {A}_k^*\) and \(\mathcal {B}^*\) are endowed with the lexicographic orders satisfying \(0<1\) and \(a_k<\dots <a_0\). The morphism

$$\begin{aligned} \varphi :\mathcal {A}_k^*&\rightarrow \left( 0^*1\right) ^*\subset \mathcal {B}^* \\ a_i&\rightarrow 0^i1 \end{aligned}$$

is clearly an order preserving isomorphism. We deduce that \(w\in \mathcal {A}_k^*\) is a Lyndon word if and only if \(\varphi (w)\) is a Lyndon word (see [Ric03] for details). Setting \(\psi (a_{l_0}\dots a_{l_{j-1}})=j+\sum \limits _{m=0}^{j-1}l_{m}\) we obtain \(\psi (w)=|\varphi (w)|.\)

If we set \(\mathcal {L}_{\psi }(\mathcal {A}_k,\omega ,p)=\bigg \{l \in \mathcal {L}(\mathcal {A}_k) \quad \bigg |\quad |l|=\omega \text { and }\psi (l)=p\bigg \}\) then

$$\varphi \left( \mathcal {L}_{\psi }(\mathcal {A}_k,\omega ,p)\right) = \mathcal {L}_{}^{\leqslant k}(\mathcal {B},p,\omega ).$$

Hence, it suffices to compute \(\left| \mathcal {L}_{\psi }(\mathcal {A}_k,\omega ,p)\right| .\) We use the fact that the alphabet \(\mathcal {A}_k\) is the generating basis for all words in the free monoid \(\mathcal {A}_k^*.\) In terms of formal series this means

$$\begin{aligned} \sum \limits _{w\in \mathcal {A}_k^{\star }}w=\dfrac{1}{1-\sum \limits _{i=0}^{k}a_i}. \end{aligned}$$
(27)

Then we use the Chen-Fox-Lyndon theorem that states that each word can be uniquely expressed as a decreasing product of Lyndon words [KTC58, Lot02]

$$\begin{aligned} \sum \limits _{w\in \mathcal {A}_k^{\star }}w=\prod \limits _{l \in \mathcal {L}(\mathcal {A}_k)}^{\swarrow }\dfrac{1}{1-l}. \end{aligned}$$
(28)

Sending each letter \(a_{l_m}\) to \(zx^{l_m+1}\) one obtains

$$\begin{aligned} \dfrac{1}{1-z\sum \limits _{i=1}^{k+1}x^i}=\prod \limits _{1\leqslant j \leqslant i}^{\infty }{\bigg ( \dfrac{1}{1-x^iz^j}\bigg )}^{\left| \mathcal {L}_{\psi }(\mathcal {A}_k,j,i)\right| }. \end{aligned}$$
(29)

We apply the logarithm in each side of the equality above and develop using the Taylor expansion. In the resulting formula we compare the coefficient of \(z^\omega x^p\) in the left hand side and the right hand side and obtain

$$\begin{aligned} \sum \limits _{\begin{array}{c} j|\omega \\ \frac{\omega }{j}|p \end{array}}j{\left| \mathcal {L}_{\psi }(\mathcal {A}_k,j,\frac{p}{\omega }j)\right| }=\left( {\begin{array}{c}\omega \\ p-\omega \end{array}}\right) _{k}, \end{aligned}$$
(30)

where \( \left( {\begin{array}{c}\omega \\ p\end{array}}\right) _{k}\) denotes the coefficient of \(x^p\) in \((1+x+x^2+\dots +x^k)^\omega .\)

We rewrite the last equation as

$$\begin{aligned} \sum \limits _{ j|\gcd (\omega ,p) }\frac{\omega }{j}{\left| \mathcal {L}_{\psi }(\mathcal {A}_k,\frac{\omega }{j},\frac{p}{j})\right| }=\left( {\begin{array}{c}\omega \\ p-\omega \end{array}}\right) _{k}, \end{aligned}$$
(31)

and apply the Möbius Inversion [Mob32, Lan09]to find the wanted result.

Proof of Proposition 8 By definition we have:

$$\begin{aligned} P\left( Y_{p,\omega _1,\omega _2}\geqslant p-1\right) =\sum \limits _{\omega _2-1\leqslant k\leqslant p-\omega _1}f_{X_{p,\omega _1}}(k)\left( 1-F_{X_{p,\omega _2}}(p-k-1-1)\right) . \end{aligned}$$

Lemma 3

Let \(\omega \geqslant 2\) and p prime. Then for \(k>\lfloor \frac{p-\omega }{2}\rfloor \) we have

$$\begin{aligned} f_{X_{p,\omega }}(k)=\dfrac{\omega \left( {\begin{array}{c}p-k-2\\ \omega -2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega -1\end{array}}\right) },\quad F_{X_{p,\omega }}(k-1)=1-\dfrac{\omega \left( {\begin{array}{c}p-k-1\\ \omega -1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega -1\end{array}}\right) }. \end{aligned}$$
(32)

For \(k\leqslant \lfloor \frac{p-\omega }{2}\rfloor \) the bounds are

$$\begin{aligned} \dfrac{\omega \left( {\begin{array}{c}p-k-2\\ \omega -2\end{array}}\right) -\left( {\begin{array}{c}\omega \\ 2\end{array}}\right) \left[ \left( {\begin{array}{c}p-2k-1\\ \omega -1\end{array}}\right) -\left( {\begin{array}{c}p-2k-3\\ \omega -1\end{array}}\right) \right] }{\left( {\begin{array}{c}p-1\\ \omega -1\end{array}}\right) }\leqslant f_{X_{p,\omega }}(k)\leqslant \dfrac{\omega \left( {\begin{array}{c}p-k-2\\ \omega -2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega -1\end{array}}\right) }, \end{aligned}$$
(33)
$$\begin{aligned} \dfrac{\omega \left( {\begin{array}{c}p-k-1\\ \omega -1\end{array}}\right) -\left( {\begin{array}{c}\omega \\ 2\end{array}}\right) \left( {\begin{array}{c}p-2k-1\\ \omega -1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega -1\end{array}}\right) }\leqslant 1- F_{X_{p,\omega }}(k-1)\leqslant \dfrac{\omega \left( {\begin{array}{c}p-k-1\\ \omega -1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega -1\end{array}}\right) }. \end{aligned}$$
(34)

For the upper bound, this gives

$$\begin{aligned} P\left( Y_{p,\omega _1,\omega _2}\geqslant p-1\right)&\leqslant \sum \limits _{k=\omega _2-1}^{p-\omega _1} \omega _1\dfrac{\left( {\begin{array}{c}p-k-2\\ \omega _1-2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _1-1\end{array}}\right) }\omega _2 \dfrac{\left( {\begin{array}{c}k\\ \omega _2-1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _2-1\end{array}}\right) } =\dfrac{\omega _1\omega _2\left( {\begin{array}{c}p-1\\ \omega _1+\omega _2-2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _1-1\end{array}}\right) \left( {\begin{array}{c}p-1\\ \omega _2-1\end{array}}\right) }. \end{aligned}$$
(35)

For the lower bound, we separate our sum into three different sums, for \(k\leqslant \lfloor \frac{p-\omega _1}{2}\rfloor \), \(\lfloor \frac{p-\omega _1}{2}\rfloor < k < p-1-\lfloor \frac{p-\omega _2}{2}\rfloor = \lceil \frac{p+\omega _2}{2}\rceil -1\) and \(\lceil \frac{p+\omega _2}{2}\rceil -1\leqslant k \leqslant p-\omega _1\) and use relations (32),  (33) and (34):

$$\begin{aligned}P\left( Y_{p,\omega _1,\omega _2}\geqslant p-1\right)&\geqslant \sum \limits _{k=\omega _2-1}^{p-\omega _1} \omega _1\dfrac{\left( {\begin{array}{c}p-k-2\\ \omega _1-2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _1-1\end{array}}\right) }\omega _2 \dfrac{\left( {\begin{array}{c}k\\ \omega _2-1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _2-1\end{array}}\right) }\\&\quad -\sum \limits _{k=\omega _2-1}^{\lfloor \frac{p-\omega _1}{2}\rfloor } \left( {\begin{array}{c}\omega _1\\ 2\end{array}}\right) \dfrac{\left( {\begin{array}{c}p-2k-1\\ \omega _1-1\end{array}}\right) -\left( {\begin{array}{c}p-2k-3\\ \omega _1-1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _1-1\end{array}}\right) }\omega _2 \dfrac{\left( {\begin{array}{c}k\\ \omega _2-1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _2-1\end{array}}\right) }\\&\quad -\sum \limits _{k=\lceil \frac{p+\omega _2}{2}\rceil -1}^{p-\omega _1} \left( {\begin{array}{c}\omega _2\\ 2\end{array}}\right) \dfrac{\left( {\begin{array}{c}p-k-2\\ \omega _1-2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _1-1\end{array}}\right) }\omega _1 \dfrac{\left( {\begin{array}{c}2k-p+1\\ \omega _2-1\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega _2-1\end{array}}\right) } \end{aligned}$$

We use the relations \(\left( {\begin{array}{c}p-2k-1\\ \omega _1-1\end{array}}\right) -\left( {\begin{array}{c}p-2k-3\\ \omega _1-1\end{array}}\right) = \left( {\begin{array}{c}p-2k-2\\ \omega _1-2\end{array}}\right) +\left( {\begin{array}{c}p-2k-3\\ \omega _1-2\end{array}}\right) \leqslant 2\left( {\begin{array}{c}p-2k-2\\ \omega _1-2\end{array}}\right) \) (as \(\omega _1\geqslant 2\)), \(\dfrac{\omega _1\omega _2}{\left( {\begin{array}{c}p-1\\ \omega _1-1\end{array}}\right) \left( {\begin{array}{c}p-1\\ \omega _2-1\end{array}}\right) } = \dfrac{p^2}{\left( {\begin{array}{c}p\\ \omega _1\end{array}}\right) \left( {\begin{array}{c}p\\ \omega _2\end{array}}\right) }\) and a change of variable \(k\rightarrow p-k-2\) in the last sum to get

$$\begin{aligned} \dfrac{\left( {\begin{array}{c}p\\ \omega _1\end{array}}\right) \left( {\begin{array}{c}p\\ \omega _2\end{array}}\right) }{p^2}P\left( Y_{p,\omega _1,\omega _2}\geqslant p-1\right)&\geqslant \left( {\begin{array}{c}p-1\\ \omega -2\end{array}}\right) -\omega _1\sum \limits _{k=\omega _2-1}^{\lfloor \frac{p-\omega _1}{2}\rfloor } \left( {\begin{array}{c}p-2k-2\\ \omega _1-2\end{array}}\right) \left( {\begin{array}{c}k\\ \omega _2-1\end{array}}\right) \\&\quad -\frac{1}{2}\omega _2\sum \limits _{k=\omega _1-2}^{\lfloor \frac{p-\omega _2}{2}\rfloor -1} \left( {\begin{array}{c}p-2k-3\\ \omega _2-1\end{array}}\right) \left( {\begin{array}{c}k\\ \omega _1-2\end{array}}\right) \end{aligned}$$

Now we use the bound \(\left( {\begin{array}{c}p-2k-2\\ \omega _1-2\end{array}}\right) \left( {\begin{array}{c}k\\ \omega _2-1\end{array}}\right) \leqslant \left( {\begin{array}{c}p-k-2\\ \omega -3\end{array}}\right) \) and the relation from [Gou72] \(\sum _{k=r}^s \left( {\begin{array}{c}a-k\\ b\end{array}}\right) = \left( {\begin{array}{c}a-r+1\\ b+1\end{array}}\right) -\left( {\begin{array}{c}a-s\\ b+1\end{array}}\right) \leqslant \left( {\begin{array}{c}a-r+1\\ b+1\end{array}}\right) \) to get

$$\begin{aligned} \dfrac{\left( {\begin{array}{c}p\\ \omega _1\end{array}}\right) \left( {\begin{array}{c}p\\ \omega _2\end{array}}\right) }{p^2}P\left( Y_{p,\omega _1,\omega _2}\geqslant p-1\right)&\geqslant \left( {\begin{array}{c}p-1\\ \omega -2\end{array}}\right) -\omega _1 \left( {\begin{array}{c}p-\omega _2\\ \omega -2\end{array}}\right) -\frac{1}{2}\omega _2 \left( {\begin{array}{c}p-\omega _1\\ \omega -2\end{array}}\right) \\&\geqslant \left( {\begin{array}{c}p-1\\ \omega -2\end{array}}\right) -\frac{3}{2}\omega _1 \left( {\begin{array}{c}p-\omega _2\\ \omega -2\end{array}}\right) . \end{aligned}$$

if \(\omega _1=\max (\omega _1,\omega _2)\). We finally get the bounds

$$\begin{aligned} 1-\frac{3\omega _1}{2}\dfrac{\left( {\begin{array}{c}p-\omega _2\\ \omega -2\end{array}}\right) }{\left( {\begin{array}{c}p-1\\ \omega -2\end{array}}\right) } \leqslant \dfrac{P\left( Y_{p,\omega _1,\omega _2}\geqslant p-1\right) }{\frac{p^2\left( {\begin{array}{c}p-1\\ \omega -2\end{array}}\right) }{\left( {\begin{array}{c}p\\ \omega _1\end{array}}\right) \left( {\begin{array}{c}p\\ \omega _2\end{array}}\right) }}\leqslant 1. \end{aligned}$$
(36)

We check that the lower bound tends to 1 when \(w_i=O(\sqrt{p\log p}).\)

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Bardet, M., Dragoi, V., Luque, JG., Otmani, A. (2016). Weak Keys for the Quasi-Cyclic MDPC Public Key Encryption Scheme. In: Pointcheval, D., Nitaj, A., Rachidi, T. (eds) Progress in Cryptology – AFRICACRYPT 2016. AFRICACRYPT 2016. Lecture Notes in Computer Science(), vol 9646. Springer, Cham. https://doi.org/10.1007/978-3-319-31517-1_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-31517-1_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-31516-4

  • Online ISBN: 978-3-319-31517-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics