Finding short and implementation-friendly addition chains with evolutionary algorithms

Abstract

Finding the shortest addition chain for a given exponent is a significant problem in cryptography. In this work, we present a genetic algorithm with a novel encoding of solutions and new crossover and mutation operators to minimize the length of the addition chains corresponding to a given exponent. We also develop a repair strategy that significantly enhances the performance of our approach. The results are compared with respect to those generated by other metaheuristics for exponents of moderate size, but we also investigate values up to \(2^{255} - 21\). For numbers of such size, we were unable to find any results produced by other metaheuristics which could be used for comparison purposes. Therefore, we decided to add three additional strategies to serve as benchmarks. Our results indicate that the proposed approach is a very promising alternative to deal with this problem. We also consider a more practical perspective by taking into account the implementation cost of the chains: we optimize the addition chains with regards to the type of operations as well as the number of instructions required for the implementation.

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

Fig. 1
Fig. 2
Fig. 3
Fig. 4

References

  1. Bernstein, D.J.: Curve25519: New diffie–hellman speed records. In: Yung, M., Dodis, Y., Kiayias, A., Malkin, T. (eds.) Public Key Cryptography - PKC 2006: 9th International Conference on Theory and Practice in Public-Key Cryptography, New York, USA, April 24–26, 2006. Proceedings, pp. 207–228. Springer Berlin (2006)

  2. Bernstein, D.J., Chuengsatiansup, C., Lange, T., Schwabe, P.: Kummer strikes back: new DH speed records. In: Iwata, T., Sarkar, P. (eds.) Advances in Cryptology-EUROCRYPT 2015. Lecture Notes in Computer Science, vol. 8873, pp. 317–337. Springer-Verlag, Berlin (2014)

  3. Bos, J., Coster, M.: Addition chain heuristics. In: Brassard, G. (ed.) Advances in Cryptology-CRYPTO’89 Proceedings. Lecture Notes in Computer Science, vol. 435, pp. 400–407. Springer, New York (1990)

  4. Clift, N.M.: Calculating optimal addition chains. Computing 91(3), 265–284 (2011)

    MathSciNet  Article  MATH  Google Scholar 

  5. Coron, J.S.: Resistance against differential power analysis for elliptic curve cryptosystems. In: Koç, e., Paar C. (eds.) Cryptographic Hardware and Embedded Systems. Lecture Notes in Computer Science, vol. 1717, pp. 292–302. Springer (1999)

  6. Costello, C., Longa, P.: FourQ: four-dimensional decompositions on a Q-curve over the Mersenne prime. Cryptology ePrint Archive, Report 2015/565 (2015). http://eprint.iacr.org/

  7. Cruz-Corteés, N., Rodriguez-Henriquez, F., Coello Coello, C.: An artificial immune system heuristic for generating short addition chains. IEEE Trans. Evolut. Comput. 12(1), 1–24 (2008)

    Article  Google Scholar 

  8. Cruz-Cortés, N., Rodrguez-Henrquez, F., Juárez-Morales, R., Coello Coello, C.: Finding optimal addition chains using a genetic algorithm approach. In: Hao, Y., Liu, J., Wang, Y., Cheung, Y.m., Yin, H., Jiao, L., Ma, J., Jiao, Y.C. (eds.) Computational Intelligence and Security. Lecture Notes in Computer Science, vol. 3801, pp. 208–215. Springer Berlin (2005)

  9. Domínguez-Isidro, S., Mezura-Montes, E., Osorio-Hernández, L.G.: Addition chain length minimization with evolutionary programming. In: 13th Annual Genetic and Evolutionary Computation Conference, GECCO 2011, Companion Material Proceedings, Dublin, Ireland, July 12–16, 2011, pp. 59–60 (2011)

  10. Domínguez-Isidro, S., Mezura-Montes, E., Osorio-Hernández, L.G.: Evolutionary programming for the length minimization of addition chains. Eng. Appl. Artif. Intell. 37, 125–134 (2015)

  11. Faz-Hernández, A., Longa, P., Sánchez, A.: Efficient and secure algorithms for GLV-based scalar multiplication and their implementation on GLV–GLS Curves. In: Benaloh, J. (ed.) Topics in Cryptology CT-RSA 2014. Lecture Notes in Computer Science, vol. 8366, pp. 1–27. Springer International Publishing (2014)

  12. Flammenkamp, A.: Shortest addition chains (2016). http://wwwhomes.uni-bielefeld.de/achim/addition_chain.html

  13. Galbraith, S., Lin, X., Scott, M.: Endomorphisms for Faster elliptic curve cryptography on a large class of curves. J. Cryptol. 24(3), 446–469 (2011)

    MathSciNet  Article  MATH  Google Scholar 

  14. Gallant, R., Lambert, R., Vanstone, S.: Faster Point multiplication on elliptic curves with efficient endomorphisms. In: Kilian, J. (ed.) Advances in Cryptology CRYPTO 2001. Lecture Notes in Computer Science, vol. 2139, pp. 190–200. Springer, Berlin (2001)

  15. Gordon, D.M.: A survey of fast exponentiation methods. J. Algorithms 27, 129–146 (1998)

    MathSciNet  Article  MATH  Google Scholar 

  16. https://www.random.org/ : RANDOM.ORG (2016). https://www.random.org/

  17. Jakobovic, D., et al.: Evolutionary computation framework (2016). http://gp.zemris.fer.hr/ecf/

  18. Knuth, D.E.: The Art of Computer Programming : Seminumerical Algorithms, vol. 2, 3rd edn. Addison-Wesley Longman Publishing, Boston (1997)

  19. Le, D.P.: Fast quadrupling of a point in elliptic curve cryptography. Cryptology ePrint archive, report 2011/039 (2011). http://eprint.iacr.org/2011/039

  20. León-Javier, A., Cruz-Cortés, N., Moreno-Armendáriz, M., Orantes-Jiménez, S.: Finding minimal addition chains with a particle swarm optimization algorithm. In: Aguirre, A.H., Borja, R.M., Garciá, C.A.R. (eds.) MICAI 2009: Advances in Artificial Intelligence. Lecture Notes in Computer Science, vol. 5845, pp. 680–691. Springer, Berlin (2009)

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

    Google Scholar 

  22. Nedjah, N., de Macedo Mourelle, L.: Minimal addition chain for efficient modular exponentiation using genetic algorithms. In: Hendtlass, T., Ali, M. (eds.) Developments in Applied Artificial Intelligence. Lecture Notes in Computer Science, vol. 2358, pp. 88–98. Springer, Berlin (2002a)

  23. Nedjah, N., de Macedo Mourelle, L.: Minimal addition–subtraction chains using genetic algorithms. In: Yakhno, T. (ed.) Advances in Information Systems. Lecture Notes in Computer Science, vol. 2457, pp. 303–313. Springer (2002b)

  24. Nedjah, N., de Macedo Mourelle, L.: Minimal addition-subtraction sequences for efficient pre-processing in large window-based modular exponentiation using genetic algorithms. In: Liu, J., Cheung, Y.m., Yin, H. (eds.) Intelligent Data Engineering and Automated Learning, Lecture Notes in Computer Science, vol. 2690, pp. 329–336. Springer (2003)

  25. Nedjah, N., de Macedo Mourelle, L.: Finding minimal addition chains using ant colony. In: Yang, Z., Yin, H., Everson, R. (eds.) Intelligent Data Engineering and Automated Learning - IDEAL 2004. Lecture Notes in Computer Science, vol. 3177, pp. 642–647. Springer, Berlin Heidelberg (2004)

  26. Nedjah, N., de Macedo Mourelle, L.: Towards minimal addition chains using ant colony optimisation. J. Math. Model. Algorithms 5(4), 525–543 (2006)

    MathSciNet  Article  MATH  Google Scholar 

  27. Nedjah, N., de Macedo Mourelle, L.: High-performance SoC-based Implementation of modular exponentiation using evolutionary addition chains for efficient cryptography. Appl. Soft Comput. 11(7), 4302–4311 (2011)

    Article  Google Scholar 

  28. Osorio-Hernández, L.G., Mezura-Montes, E., Cortés, N.C., Rodríguez-Henríquez, F.: A genetic algorithm with repair and local search mechanisms able to find minimal length addition chains for small exponents. In: Proceedings IEEE Congress on Evolutionary Computation, Trondheim, Norway, 18–21 May, pp. 1422–1429 (2009)

  29. Picek, S., Coello, C.A.C., Jakobovic, D., Mentens, N.: Evolutionary algorithms for finding short addition chains: going the distance. In: Evolutionary Computation in Combinatorial Optimization-16th European Conference, EvoCOP 2016, Porto, Portugal, March 30–April 1, 2016, Proceedings, pp. 121–137 (2016)

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

    MathSciNet  Article  MATH  Google Scholar 

  31. Rodriguez-Cristerna, A., Torres-Jimenez, J.: A genetic algorithm for the problem of minimal brauer chains. In: Recent Advances on Hybrid Intelligent Systems, Studies in Compter Intelligence, vol. 451, pp. 481–500. Springer Berlin (2013)

  32. Sarkar, A., Mandal, J.: Swarm Intelligence based faster public-key cryptography in wireless communication (SIFPKC). Int. J. Comput. Sci. Eng. Technol. (IJCSET) 3(7), 267–273 (2012)

    Google Scholar 

  33. Stein, W.A., et al.: Sage mathematics software (Version 5.10). The Sage Development Team (2013). http://www.sagemath.org

  34. Thurber, E.G.: On addition chains \(1(mn)\le 1(n)-b\) and lower bounds for \(c(r)\). Duke Math. J. 40(4), 907–913 (1973)

    MathSciNet  Article  MATH  Google Scholar 

  35. Thurber, E.G.: The scholz-brauer problem on addition chains. Pac. J. Math. 49(1), 229–242 (1973)

    MathSciNet  Article  MATH  Google Scholar 

Download references

Acknowledgements

This work has been supported in part by Croatian Science Foundation under the Project IP-2014-09-4882. The second author acknowledges support from CONACyT Project No. 221551. This work was supported in part by the Research Council KU Leuven (C16/15/058) and IOF project EDA-DSE (HB/13/020).

Author information

Affiliations

Authors

Corresponding author

Correspondence to Stjepan Picek.

Sage example with the optimal set of squaring instructions

Sage example with the optimal set of squaring instructions

Here we give an example of the inversion built with \(x^{2^1}, x^{2^3}, x^{2^6}, x^{2^9}\) instructions that has in total 9 multiplications operations (18 multiplication instructions) and 20 squaring instructions. The lines beginning with \(\#\) denote comments.

figuree

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Picek, S., Coello, C.A.C., Jakobovic, D. et al. Finding short and implementation-friendly addition chains with evolutionary algorithms. J Heuristics 24, 457–481 (2018). https://doi.org/10.1007/s10732-017-9340-2

Download citation

Keywords

  • Addition chains
  • Genetic algorithms
  • Cryptography
  • Optimization
  • Implementation