Using an RSA Accelerator for Modular Inversion

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3659)


We present a very simple new algorithm for modular inversion. Modular inversion can be done by the extended Euclidean algorithm. We substitute the extended Euclidean algorithm by a standard (non-extended) Euclidean algorithm that works on integers of approximately double the length of the modulus. This substitution can be very useful on smart card coprocessors, since in some cases computations with longer numbers than necessary can be done at no extra cost. Many smart card coprocessors have been designed for the RSA algorithm of, say, 1024 bits length. On the other hand, elliptic curve algorithms work with much smaller numbers, and modular inversion is a much more important primitive in elliptic curve cryptography than in RSA cryptography. On one smart card coprocessor the new algorithm is more than twice as fast as the classical algorithm.


Smart card coprocessor modular inversion Euclidean algorithm 


  1. 1.
    Blake, I.F., Seroussi, G., Smart, N.P.: Elliptic Curves in Cryptography. London Mathematical Society Lecture Note Series, vol. 265. Cambridge University Press, Cambridge (1999)zbMATHGoogle Scholar
  2. 2.
    Chevallier-Mames, B., Joye, N., Paillier, P.: Faster Double-Size Modular Multiplication from Euclidean Multipliers. In: Walter, C.D., Koç, Ç.K., Paar, C. (eds.) CHES 2003. LNCS, vol. 2779, pp. 214–227. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Cohen, H., Miyaji, A., Ono, T.: Efficient Elliptic Curve Exponentiation using Mixed Coordinates. In: Ohta, K., Pei, D. (eds.) ASIACRYPT 1998. LNCS, vol. 1514, pp. 51–65. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  4. 4.
    Fischer, W., Seifert, J.-P.: Increasing the Bitlength of a Crypto-coprocessor. In: Kaliski Jr., B.S., Koç, Ç.K., Paar, C. (eds.) CHES 2002. LNCS, vol. 2523, pp. 71–81. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  5. 5.
    Hankerson, D., Menezes, A., Vanstone, S.: Guide to Elliptic Curve Cryptography. Springer, Heidelberg (2004)zbMATHGoogle Scholar
  6. 6.
    Jebelean, T.: A Generalization of the Binary GCD Algorithm. In: Bronstein, M. (ed.) ACM International Symposium on Symbolic and Algebraic Computation, Kiev, Ukraine, pp. 111–116. ACM Press, New York (1993)Google Scholar
  7. 7.
    Joye, M., Paillier, P.: GCD-Free Algorithms for Computing Modular Inverses. In: Walter, C.D., Koç, Ç.K., Paar, C. (eds.) CHES 2003. LNCS, vol. 2779, pp. 243–253. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Knuth, D.E.: The Art of Computer Programming, 3rd edn. Seminumerical Algorithms, vol. 2. Addison-Wesley, Reading (1997)Google Scholar
  9. 9.
    Lehmer, D.H.: Euclid’s Algorithm for Large Numbers. American Mathematical Monthly 45, 227–233 (1938)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Lenstra, A.K., Verheul, E.R.: Selecting Cryptographic Key Sizes. J. Cryptology 14(4), 255–293 (2001)zbMATHMathSciNetGoogle Scholar
  11. 11.
    Lórencz, R.: New Algorithm for Classical Modular Inverse. In: Kaliski Jr., B.S., Koç, Ç.K., Paar, C. (eds.) CHES 2002. LNCS, vol. 2523, pp. 57–70. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Nakada, K.: Data Processor and Microcomputer. US Patent No. 5, 961, 578 (October 5, 1999)Google Scholar
  13. 13.
    Paillier, P.: Low-Cost Double-Size Modular Exponentiation or How to Stretch Your Cryptoprocessor. In: Imai, H., Zheng, Y. (eds.) PKC 1999. LNCS, vol. 1560, pp. 223–234. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  14. 14.
    Quisquater, J.-J.: Encoding System according to the so-called RSA Method, by means of a Microcontroller and Arrangement Implementing this System. US Patent No. 5166978 (November 24, 1992)Google Scholar
  15. 15.
    Sedlak, H.: The RSA Cryptography Processor. In: Price, W.L., Chaum, D. (eds.) EUROCRYPT 1987. LNCS, vol. 304, pp. 95–105. Springer, Heidelberg (1988)Google Scholar
  16. 16.
    Sorenson, J.P.: Two Fast GCD Algorithms. Journal of Algorithms 16, 110–144 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Sorenson, J.P.: An Analysis of the Generalized Binary GCD Algorithm,
  18. 18.
    Stein, J.: Computational Problems Associated with Racah Algebra. Journal of Computational Physics 1, 397–405 (1967)zbMATHCrossRefGoogle Scholar
  19. 19.
    Symes, D., Seal, D.J.: A System for Performing Modular Multiplication. UK Patent GB 2352309 A (January 24, 2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  1. 1.Giesecke & Devrient GmbHMunichGermany

Personalised recommendations