New Software Speed Records for Cryptographic Pairings

  • Michael Naehrig
  • Ruben Niederhagen
  • Peter Schwabe
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6212)


This paper presents new software speed records for the computation of cryptographic pairings. More specifically, we present details of an implementation which computes the optimal ate pairing on a 257-bit Barreto-Naehrig curve in only 4,470,408 cycles on one core of an Intel Core 2 Quad Q6600 processor.

This speed is achieved by combining 1.) state-of-the-art high-level optimization techniques, 2.) a new representation of elements in the underlying finite fields which makes use of the special modulus arising from the Barreto-Naehrig curve construction, and 3.) implementing arithmetic in this representation using the double-precision floating-point SIMD instructions of the AMD64 architecture.


Pairings Barreto-Naehrig curves ate pairing AMD64 architecture modular arithmetic SIMD floating-point instructions 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The GNU MP bignum library, (accessed March 31, 2010)
  2. 2.
    MPFQ - a finite field library, (accessed March 31, 2010)
  3. 3.
    Arène, C., Lange, T., Naehrig, M., Ritzenthaler, C.: Faster pairing computation. Cryptology ePrint Archive, Report 2009/155, to appear in the Journal of Number Theory (2010),
  4. 4.
    Barker, E., Barker, W., Burr, W., Polk, W., Smid, M.: Recommendation for key management - part 1: General (revised). Published as NIST Special Publication 800-57 (2007),
  5. 5.
    Barreto, P.S.L.M.: A survey on craptological pairing algorithms. Journal of Craptology 7 (2010),
  6. 6.
    Barreto, P.S.L.M., Galbraith, S.D., Ó’ hÉigeartaigh, C., Scott, M.: Efficient pairing computation on supersingular abelian varieties. Designs, Codes and Cryptography 42(3), 239–271 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Barreto, P.S.L.M., Kim, H.Y., Lynn, B., Scott, M.: Efficient algorithms for pairing-based cryptosystems. In: Yung, M. (ed.) CRYPTO 2002. LNCS, vol. 2442, pp. 354–368. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  8. 8.
    Barreto, P.S.L.M., Lynn, B., Scott, M.: Efficient implementation of pairing-based cryptosystems. Journal of Cryptology 17(4), 321–334 (2004)zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Barreto, P.S.L.M., Naehrig, M.: Pairing-friendly elliptic curves of prime order. In: Preneel, B., Tavares, S. (eds.) SAC 2005. LNCS, vol. 3897, pp. 319–331. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Bernstein, D.J.: qhasm: tools to help write high-speed software, (accessed March 31, 2010)
  11. 11.
    Bernstein, D.J.: Floating-point arithmetic and message authentication, Document ID: dabadd3095644704c5cbe9690ea3738e (2004),
  12. 12.
    Bernstein, D.J.: Curve25519: new Diffie-Hellman speed records. In: Yung, M., Dodis, Y., Kiayias, A., Malkin, T.G. (eds.) PKC 2006. LNCS, vol. 3958, pp. 207–228. Springer, Heidelberg (2006) Document ID: 4230efdfa673480fc079449d90f322c0, CrossRefGoogle Scholar
  13. 13.
    Boneh, D., Di Crescenzo, G., Ostrovsky, R., Persiano, G.: Public key encryption with keyword search. In: Cachin, C., Camenisch, J.L. (eds.) EUROCRYPT 2004. LNCS, vol. 3027, pp. 506–522. Springer, Heidelberg (2004)Google Scholar
  14. 14.
    Devegili, A.J., Scott, M., Dahab, R.: Implementing cryptographic pairings over Barreto-Naehrig curves. In: Takagi, T., Okamoto, T., Okamoto, E., Okamoto, T. (eds.) Pairing 2007. LNCS, vol. 4575, pp. 197–207. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Smart, N. (ed): ECRYPT2 yearly report on algorithms and keysizes (2008-2009). Technical report, ECRYPT II – European Network of Excellence in Cryptology, EU FP7, ICT-2007-216676 (2009) (published as deliverable D.SPA.7),
  16. 16.
    Fan, J., Vercauteren, F., Verbauwhede, I.: Faster \(\mathbb{F}_p\)-arithmetic for cryptographic pairings on Barreto-Naehrig curves. In: Clavier, C., Gaj, K. (eds.) CHES 2009. LNCS, vol. 5747, pp. 240–253. Springer, Heidelberg (2009), CrossRefGoogle Scholar
  17. 17.
    Fog, A.: Software optimization ressources (2010), (accessed March 31, 2010)
  18. 18.
    Freeman, D., Scott, M., Teske, E.: A taxonomy of pairing-friendly elliptic curves. Journal of Cryptology 23(2), 224–280 (2010)zbMATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Grabher, P., Großschädl, J., Page, D.: On software parallel implementation of cryptographic pairings. In: Avanzi, R.M., Keliher, L., Sica, F. (eds.) SAC 2008. LNCS, vol. 5381, pp. 34–49. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  20. 20.
    Granger, R., Scott, M.: Faster squaring in the cyclotomic subgroup of sixth degree extensions. In: Nguyen, P., Pointcheval, D. (eds.) PKC 2010. LNCS, vol. 6056, pp. 209–223. Springer, Heidelberg (2010),
  21. 21.
    Groth, J., Sahai, A.: Efficient non-interactive proof systems for bilinear groups. In: Smart, N.P. (ed.) EUROCRYPT 2008. LNCS, vol. 4965, pp. 415–432. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  22. 22.
    Hankerson, D., Menezes, A., Scott, M.: Software implementation of pairings. In: Joye, M., Neven, G. (eds.) Identity-Based Cryptography. IOS Press, Amsterdam (2008), Google Scholar
  23. 23.
    Heß, F., Smart, N.P., Vercauteren, F.: The eta pairing revisited. IEEE Transactions on Information Theory 52, 4595–4602 (2006)zbMATHCrossRefGoogle Scholar
  24. 24.
    Lee, E., Lee, H.-S., Park, C.-M.: Efficient and generalized pairing computation on abelian varieties. Cryptology ePrint Archive, Report 2008/040 (2008),
  25. 25.
    Shamus Software Ltd. Multiprecision integer and rational arithmetic C/C++ library, (accessed March 31, 2010)
  26. 26.
    Miller, V.S.: Short programs for functions on curves (Unpublished manuscript) (1986),
  27. 27.
    Miller, V.S.: The Weil pairing, and its efficient calculation. Journal of Cryptology 17, 235–261 (2004)zbMATHCrossRefGoogle Scholar
  28. 28.
    Naehrig, M.: Constructive and Computational Aspects of Cryptographic Pairings. PhD thesis, Technische Universiteit Eindhoven (2009),
  29. 29.
    Naehrig, M., Barreto, P.S.L.M., Schwabe, P.: On compressible pairings and their computation. In: Vaudenay, S. (ed.) AFRICACRYPT 2008. LNCS, vol. 5023, pp. 371–388. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  30. 30.
    Scott, M.: Personal communication (March 2010)Google Scholar
  31. 31.
    Scott, M., Benger, N., Charlemagne, M., Dominguez Perez, L.J., Kachisa, E.J.: On the final exponentiation for calculating pairings on ordinary elliptic curves. In: Shacham, H. (ed.) Pairing 2009. LNCS, vol. 5671, pp. 78–88. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  32. 32.
    Vercauteren, F.: Optimal pairings. IEEE Transactions on Information Theory 56(1) (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Michael Naehrig
    • 1
  • Ruben Niederhagen
    • 2
    • 3
  • Peter Schwabe
    • 3
  1. 1.Microsoft ResearchOne Microsoft WayRedmondUSA
  2. 2.Department of Electrical EngineeringNational Taiwan UniversityTaipeiTaiwan
  3. 3.Department of Mathematics and Computer ScienceTechnische Universiteit EindhovenEindhovenNetherlands

Personalised recommendations