Skip to main content
Log in

Efficient regular modular exponentiation using multiplicative half-size splitting

  • Short Communication
  • Published:
Journal of Cryptographic Engineering Aims and scope Submit manuscript

Abstract

In this paper, we consider efficient RSA modular exponentiations \(x^K \mod N\) which are regular and constant time. We first review the multiplicative splitting of an integer x modulo N into two half-size integers. We then take advantage of this splitting to modify the square-and-multiply exponentiation as a regular sequence of squarings always followed by a multiplication by a half-size integer. The proposed method requires around 16 % less word operations compared to Montgomery-ladder, square-always and square-and-multiply-always exponentiations. These theoretical results are validated by our implementation results which show an improvement by more than 12 % compared approaches which are both regular and constant time.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

References

  1. Rivest, R., Shamir, A., Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 21, 120–126 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  2. Kocher, P.C., Jaffe, J., Jun, B.: Differential power analysis. In: Wiener, M.J. (ed.): Advances in Cryptology–CRYPTO ’99, 19th Annual International Cryptology Conference, Santa Barbara, California, USA, August 15–19, 1999, Proceedings, Lecture Notes in Computer Science, vol. 1666, pp. 388–397. Springer, Berlin (1999)

  3. Mangard, S.: Exploiting Radiated Emissions - EM Attacks on Cryptographic ICs. In: Austrochip 2003, Linz, Austria, October 1st, pp. 13–16 (2003)

  4. Amiel, F., Feix, B., Tunstall, M., Whelan, C., Marnane, W.: Distinguishing Multiplications from Squaring Operations. In: SAC 2008, ser. LNCS, vol. 5381, pp. 346–360. Springer (2009)

  5. Clavier, C., Feix, B., Gagnerot, G., Roussellet, M., Verneuil, V.: Square Always Exponentiation. In: Progress in Cryptology - INDOCRYPT, 2011 ser. LNCS, vol. 7107, pp. 40–57. Springer (2011)

  6. Coron, J.-S.: Resistance against differential power analysis for elliptic curve cryptosystems. In: Koç, Ç.K., Paar, C. (eds.): Cryptographic Hardware and Embedded Systems. First InternationalWorkshop, CHES’99 Worcester, MA, USA, August 12–13, 1999, Proceedings, Lecture Notes in Computer Science, vol. 1717, pp. 292–302. Springer, Berlin (1999)

  7. Joye, M., Yen, S.: The Montgomery Powering Ladder. In: CHES, 20002 ser. LNCS, vol. 2523, pp. 291–302. Springer (2002)

  8. Montgomery, P.: Modular multiplication without trial division. Math. Comput. 44, 519–521 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  9. Negre, C., Plantard, T., Robert, J.: Efficient Modular Exponentiation Based on Multiple Multiplications by a Common Operand. In: 22nd IEEE Symposium on Computer Arithmetic 2015, pp. 144–151 (2015)

  10. Menezes, A., van Oorschot, P., Vanstone, S.: Handbook of Applied Cryptography. CRC Press, Boca Raton (1996)

    Book  MATH  Google Scholar 

  11. Yen, S.-M., Joye, M.: Checking before output may not be enough against fault-based cryptanalysis. IEEE Trans. Comput. 49(9), 967–970 (2000)

    Article  MATH  Google Scholar 

  12. Yen, S.-M., Kim, S., Lim, S., Moon, S.-J.: A Countermeasure against One Physical Cryptanalysis May Benefit Another Attack. In: ICISC, 2001 ser. LNCS, vol. 2288, pp. 414–427. Springer (2001)

  13. Joye, M., Tunstall, M.: Exponent Recoding and Regular Exponentiation Algorithms. In: Progress in Cryptology - AFRICACRYPT, 2009 ser. LNCS, vol. 5580, pp. 334–349. Springer (2009)

  14. Bryant, E., Rambhia, A., Atallah, M. and Rice, J.: Software Trusted Platform Module and Application Security Wrapper,” Jan 2011, US Patent 7,870,399. [Online]. https://www.google.ch/patents/US7870399

  15. Gallant, R., Lambert, R., Vanstone, S.: Faster Point Multiplication on Elliptic Curves with Efficient Endomorphisms. In: Advances in Cryptology-CRYPTO, 2001 ser. LNCS, vol. 2139, pp. 190–200 Springer (2001)

  16. von zur Gathen, J.: Modern Computer Algebra, 3rd edn. Cambridge University Press, Cambridge (2013)

    Book  MATH  Google Scholar 

  17. Bosselaers, A., Govaerts, R. and Vandewalle, J.: “Comparison of Three Modular Reduction Functions,” in Advances in Cryptology-CRYPTO’93, ser. LNCS, vol. 773. Springer, pp. 175–186 (1993)

  18. Papi, M.: “Performance Application Programming Interface (PAPI).” [Online]. Available: http://icl.cs.utk.edu/papi/

Download references

Acknowledgments

This work was supported by PAVOIS ANR 12 BS02 002 02.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christophe Negre.

Appendix

Appendix

Proof of Lemma 1

  • Proof of (i). We prove by induction on i that \((-1)^{i-1}a_i \ge 1\) for all \(i \ge 1\). For \(i=1\) we have \(a_1=1\) which implies \( (-1)^{i-1}a_i=1\) as required. For \(i=2\) we have \(a_2=-q_1a_1\) which implies \((-1)^1a_2=q_1a_1 \ge 1\). Now, we suppose that the inequality holds for \(i-1\) and i , i.e.,

    $$\begin{aligned} (-1)^{i-2}a_{i-1} \ge 1 \quad \text{ and }\quad (-1)^{i-1}a_i \ge 1, \end{aligned}$$
    (9)

    and we prove that the inequality is also true for \(i+1\). We starts with \( (-1)^{i}a_{i+1}\) and replace \(a_{i+1}\) by its expression in terms of \(a_i,a_{i-1},r_i\) and \(r_{i-1}\) in Algorithm 2. We obtain the following:

    $$\begin{aligned} (-1)^{i}a_{i+1}= & {} (-1)^{i} \left( a_{i-1}-\left\lfloor r_{i-1}/r_{i} \right\rfloor a_{i} \right) \\= & {} (-1)^{i} a_{i-1}- \left\lfloor r_{i-1}/r_{i} \right\rfloor (-1)^{i}a_{i}\\= & {} (-1)^{i-2} a_{i-1}+ \left\lfloor r_{i-1}/r_{i} \right\rfloor (-1)^{i-1}a_{i}\\\ge & {} 1 + \left\lfloor r_{i-1}/r_{i} \right\rfloor \qquad {(\hbox {Using}\,(9))} \end{aligned}$$

    Therefore, we have proven by induction that \( (-1)^{i}a_i \ge 1\) for all i.

  • Proof of (ii). We follow the proof of [16]: we express the inductive expression of \(a_i\) and \(r_i\) as a \(2\times 2\) matrix product:

    $$\begin{aligned} \begin{pmatrix} a_{i+1} &{} r_{i+1} \\ a_{i} &{} r_{i} \end{pmatrix} = \begin{pmatrix} -\left\lfloor r_{i-1}/r_{i} \right\rfloor &{} 1\\ 1 &{} 0 \end{pmatrix} \begin{pmatrix} a_{i} &{} r_{i} \\ a_{i-1} &{} r_{i-1} \end{pmatrix}. \end{aligned}$$

    Now since for all i we have \(\det {\begin{pmatrix} -\left\lfloor r_{i-1}/r_{i} \right\rfloor &{} 1\\ 1 &{} 0 \end{pmatrix}} =-1\), we obtain by induction that

    $$\begin{aligned} \det {\begin{pmatrix} a_{i+1} &{} r_{i+1} \\ a_{i} &{} r_{i} \end{pmatrix}}= & {} (-1)^i \det {\begin{pmatrix} a_{1} &{} r_{1} \\ a_{0} &{} r_{0} \end{pmatrix}} \\= & {} (-1)^i \det {\begin{pmatrix} 1 &{} x \\ 0 &{} N \end{pmatrix}} \\= & {} (-1)^iN. \end{aligned}$$

    Finally we obtain that

    $$\begin{aligned} \forall i\ge 0, a_{i+1}r_i - a_i r_{i+1}=(-1)^i N. \end{aligned}$$

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Negre, C., Plantard, T. Efficient regular modular exponentiation using multiplicative half-size splitting. J Cryptogr Eng 7, 245–253 (2017). https://doi.org/10.1007/s13389-016-0134-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13389-016-0134-5

Keywords

Navigation