Abstract
Because pairings have many applications, many hardware and software pairing implementations can be found in the literature. However, the parameters generally used have been invalidated by the recent results on the discrete logarithm problem over pairing friendly elliptic curves (Kim and Barbulescu in CRYPTO 2016, volume 9814 of lecture notes in computer science, Springer, Berlin, pp 543–571, 2016). New parameters must be generated to insure enough security in pairing based protocols. More generally it could be useful to generate nice pairing parameters in many real-world applications (specific security level, resistance to specific attacks on a protocol, database of curves). The main purpose of this paper is to describe explicitly and exhaustively what should be done to generate the best possible parameters and to make the best choices depending on the implementation context (in terms of pairing algorithm, ways to build the tower field, \(\mathbb {F}_{p^{12}}\) arithmetic, groups involved and their generators, system of coordinates). We focus on low level implementations, assuming that \(\mathbb {F}_p\) additions have a significant cost compared to other \(\mathbb {F}_p\) operations. However, our results are still valid if \(\mathbb {F}_p\) additions can be neglected. We also explain why the best choice for the polynomials defining the tower field \(\mathbb {F}_{p^{12}}\) is only dependent on the value of the BN parameter u mod small integers (like 12 for instance) as a nice application of old elementary arithmetic results. This should allow a faster generation of this parameter. Moreover, we use this opportunity to give some new slight improvements on \(\mathbb {F}_{p^{12}}\) arithmetic (in a pairing context).
Similar content being viewed by others
References
Acar, T., Lauter, K.E., Naehrig, M., Shumow, D.: Affine pairings on ARM. In: Abdalla, M., Lange, T. (eds.) Pairing-Based Cryptography—Pairing 2012, Volume 7708 of Lecture Notes in Computer Science, pp. 203–209. Springer, Berlin (2012)
Aranha, D., Karabina, K., Longa, P., Gebotys, C.H., López, J.: Faster explicit formulas for computing pairings over ordinary curves. In: Advances in Cryptology EUROCRYPT 2011, Volume 6632 of LNCS, pp. 48–68. Springer, Berlin (2011)
Aranha, D.F., Barreto, P.S.L.M., Longa, P., Ricardini, J.E.: The realm of the pairings. In: Lange, T., Lauter, K., Lisonek, P. (eds.) Selected Areas in Cryptography—SAC 2013, Volume 8282 of Lecture Notes in Computer Science, pp. 3–25. Springer, Berlin (2014)
Barbulescu, R., Gaudry, P., Joux, A., Thomé, E.: A heuristic quasi-polynomial algorithm for discrete logarithm in finite fields of small characteristic. In: EUROCRYPT 2014, Volume 8441 of Lecture Notes in Computer Science, pp. 1–16. Springer, Berlin (2014)
Barreto, P.S.L.M., Costello, C., Misoczki, R., Naehrig, M., Pereira, G.C.C.F., Zanon, G.: Subgroup security in pairing-based cryptography. In: LATINCRYPT 2015, Volume 9230 of Lecture Notes in Computer Science, pp. 245–265. Springer, Berlin (2015)
Barreto, P.S.L.M., Galbraith, S.D., hEigeartaigh, C.O., Scott, M.: Efficient pairing computation on supersingular abelian varieties. In: IACR Cryptology ePrint Archive, p. 375 (2004)
Barreto, P.S.L.M., Kim, H.Y., Lynn, B., Scott, M.: Efficient algorithms for pairing-based cryptosystems. In: CRYPTO 2002, Volume 2442 of LNCS, pp. 354–368. Springer, Berlin (2002)
Barreto, P.S.L.M., Naehrig, M.: Pairing-friendly elliptic curves of prime order. In: Proceedings of SAC 2005, Volume 3897 of LNCS, pp. 319–331. Springer, Berlin (2006)
Barrett, P.: Implementing the Rivest Shamir and Adleman public key encryption algorithm on a standard digital signal processor. In: Proceedings on Advances in Cryptology—CRYPTO ’86, pp. 311–323. Springer, London (1987)
Boneh, D. Franklin, M.K.: Identity-based encryption from the Weil pairing. In: CRYPTO 2001, Volume 2139 of Lecture Notes in Computer Science, pp. 213–229. Springer, Berlin (2001)
Boneh, D., Gentry, C., Waters, B.: Collusion resistant broadcast encryption with short ciphertexts and private keys. In: CRYPTO 2005, Volume 3621 of Lecture Notes in Computer Science, pp. 258–275. Springer, Berlin (2005)
Cheung, R.C.C., Duquesne, S., Fan, J., Guillermin, N., Verbauwhede, I., Yao, G.X.: FPGA implementation of pairings using residue number system and lazy reduction. In: Cryptographic Hardware and Embedded Systems—CHES 2011, Volume 6917 of LNCS, pp. 421–441. Springer, Berlin (2011)
Chung, J., Hasan, M.A.: Asymmetric squaring formulae. In: 18th Symposium on Computer Arithmetic, IEEE Conference Publications, pp. 113–122. Montpellier (2007)
Cohen, H., Frey, G., Avanzi, R., Doche, C., Lange, T., Nguyen, K., Vercauteren, F.: Handbook of Elliptic and Hyperelliptic Curve Cryptography, 2nd edn. Chapman & Hall/CRC, London (2012)
Costello, C., Lange, T., Naehrig, M.: Faster pairing computations on curves with high-degree twists. In: Nguyen, P.Q, Pointcheval, D. (eds.) Public Key Cryptography PKC 2010, Volume 6056 of Lecture Notes in Computer Science, pp. 224–242. Springer, Berlin (2010)
Cox, D.A.: Primes of the Form \(x^2+ny^2\). Wiley, New York (1989)
Devegili, A.J., O’Eigeartaigh, C., Scott, M., Dahab, R.: Multiplication and squaring on pairing-friendly fields. IACR Cryptology ePrint Archive, page 471, (2006)
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-Based Cryptography - Pairing 2007. Pairing 2007. Lecture Notes in Computer Science, vol. 4575, pp. 197–207. Springer, Berlin (2007)
Duquesne, S., Ghammam, L.: Memory-saving computation of the pairing final exponentiation on BN curves. Groups Complexity Cryptology 8(1), 75–90 (2016)
Fuentes-Castañeda, F., Knapp, E., Rodríguez-Henríquez, F.: Faster hashing to \({\mathbb{G}}_2\). In: Selected Areas in Cryptography—18th International Workshop, pp. 412–430. Toronto, Revised Selected Papers (2011)
Geovandro, C.C.F.P., Simplício Jr., M.A., Naehrig, M., Barreto, P.S.L.M.: A family of implementation-friendly BN elliptic curves. J. Syst. Softw. 84(8), 1319–1326 (2011)
Giraud, C., Verneuil, V.: Atomicity improvement for elliptic curve scalar multiplication. In: Gollmann, D., Lanet, J.-L., Iguchi-Cartigny, J. (eds.) Smart Card Research and Advanced Application, Volume 6035 of Lecture Notes in Computer Science, pp. 80–101. Springer, Berlin (2010)
Granger, R., Scott, M.: Faster squaring in the cyclotomic subgroup of sixth degree extensions. In: Public Key Cryptography—PKC 2010, 13th International Conference on Practice and Theory in Public Key Cryptography, Paris. Proceedings, pp. 209–223 (2010)
Grewal, G., Azarderakhsh, R., Longa, P., Hu, S., Jao, D.: Efficient implementation of bilinear pairings on ARM processors. In: Knudsen, L.R., Huapeng, W. (eds.) Selected Areas in Cryptography, Volume 7707 of Lecture Notes in Computer Science, pp. 149–165. Springer, Berlin (2013)
Guillevic, A.: Kim–Barbulescu Variant of the Number Field Sieve to Compute Discrete Logarithms in Finite Fields. EllipticNews blog (2016). https://ellipticnews.wordpress.com/2016/05/02/
Heß, F.: Pairing lattices. In: Proceedings of Pairing 2008, Volume 5209 of LNCS, pp. 18–38 (2008)
Hess, F., Smart, N.P., Vercauteren, F.: The eta pairing revisited. IEEE Trans. Inf. Theory 52(10), 4595–4602 (2006)
Joux, A.: A new index calculus algorithm with complexity l(1/4+o(1)) in small characteristic. In: Lange, T., Lauter, K., Lisonk, P0 (eds.) Selected Areas in Cryptography—SAC 2013, Volume 8282 of Lecture Notes in Computer Science, pp. 355–379. Springer, Berlin (2014)
Karabina, K.: Squaring in cyclotomic subgroups. Math. Comput. 82(281), 555–579 (2013)
Kim, T., Barbulescu, R.: Extended tower number field sieve: a new complexity for the medium prime case. In: CRYPTO 2016, Volume 9814 of Lecture Notes in Computer Science, pp. 543–571. Springer, Berlin (2016)
Knuth, D.E.: The Art of Computer Programming: Seminumerical Algorithms, vol. 2, 3rd edn. Addison-Wesley Longman Publishing Co., Inc, Boston (1997)
Koblitz, N., Menezes, A.: Pairing-based cryptography at high security levels. Cryptogr. Coding 3796, 13–36 (2005)
Lauter, K.E., Montgomery, P.L., Naehrig, M.: An analysis of affine coordinates for pairing computation. In: Joye, M., Miyaji, A., Otsuka, A. (eds.) Pairing-Based Cryptography—Pairing 2010—4th International Conference, Yamanaka Hot Spring, Japan. Proceedings, Volume 6487 of Lecture Notes in Computer Science, pp. 1–20. Springer, Berlin (2010)
Le, D.-P., Tan, C.H.: Speeding up ate pairing computation in affine coordinates. In: Kwon, T., Lee, M.-K., Kwon, D. (eds.) Information Security and Cryptology ICISC 2012, Volume 7839 of Lecture Notes in Computer Science, pp. 262–277. Springer, Berlin (2013)
Lee, E., Lee, H.-S., Park, C.-M.: Efficient and generalized pairing computation on abelian varieties. IEEE Trans. Inf. Theory 55(4), 1793–1803 (2009)
Lidl, R., Niederreiter, H.: Finite Fields. Cambridge University Press, Cambridge (1997)
Lim, C.H., Lee, P.J.: A key recovery attack on discrete log-based schemes using a prime order subgroup. In: CRYPTO 1997, pp. 249–263. Springer, Berlin (1997)
Matsuda, S., Kanayama, N., Heß, F., Okamoto, E.: Optimised versions of the Ate and twisted Ate pairings. IEICE Trans. 92–A(7), 1660–1667 (2009)
Menezes, A., Sarkar, P., Singh, S.: Challenges with assessing the impact of nfs advances on the security of pairing-based cryptography. Cryptology ePrint Archive, Report 2016/1102 (2016). http://eprint.iacr.org/2016/1102
Microsoft Research. MSR ECCLib v2.0. 2015
Miller, S.V.: The Weil pairing, and its efficient calculation. J. Cryptol. 17(4), 235–261 (2004)
Montgomery, P.L.: Speeding the Pollard and elliptic curve methods of factorization. Math. Comput. 48(177), 243–264 (1987)
Montgomery, P.L.: Modular multiplication without trial division. Math. Comput. 44(170), 519–521 (1985)
Naehrig, M., Niederhagen, R., Schwabe, P.: New software speed records for cryptographic pairings. In: LATINCRYPT 2010, Volume 6212 of LNCS, pp. 109–123. Springer, Berlin (2010)
Nogami, Y., Akane, M., Sakemi, Y., Katou, H., Morikawa, Y.: Integer variable chi-based ate pairing. In: Pairing-Based Cryptography—Pairing 2008, pp. 178–191 (2008)
National Institute of Standard and Technology. Key Management (2007)
Rondepierre, F.: Revisiting atomic patterns for scalar multiplications on elliptic curves. In: Francillon, A., Rohatgi, P. (eds.) Smart Card Research and Advanced Applications, Volume 8419 of Lecture Notes in Computer Science, pp. 171–186. Springer, Berlin (2014)
Scott, M., Barreto, P.S.L.M.: Compressed pairings. In: Advances in cryptology—CRYPTO 2004, Volume 3152 of Lecture Notes in Computer Science, pp. 140–156. Springer, Berlin (2004)
Scott, M., Benger, N., Charlemagne, M., Perez, L.J.D., Kachisa, E.J.: On the final exponentiation for calculating pairings on ordinary elliptic curves. In: Pairings 2009, Volume 5671 of LNCS, pp. 78–88. Springer, Berlin (2009)
Stam, M., Lenstra, A.K.: Efficient subgroup exponentiation in quadratic and sixth degree extensions. In: Cryptographic Hardware and Embedded Systems—CHES 2002, 4th International Workshop, pp. 318–332. Redwood Shores, Revised Papers (2002)
Unterluggauer, T., Wenger, E.: Efficient pairings and ECC for embedded systems. In: Batina, L., Robshaw, M. (eds.) Cryptographic Hardware and Embedded Systems CHES 2014, Volume 8731 of Lecture Notes in Computer Science, pp. 298–315. Springer, Berlin (2014)
Vercauteren, F.: Optimal pairings. IEEE Trans. Inf. Theory 56, 455–461 (2009)
Author information
Authors and Affiliations
Corresponding author
Additional information
This work was supported in part by French projects ANR-12-BS01-0010-01 “PEACE”, ANR-12-INSE-0014 “SIMPATIC” and by the LIRIMA MACISA Project.
Appendices
A Details for the new improvements of \(\mathbb {F}_{p^{12}}\) arithmetic given in Sect. 3.9
1.1 A.1 Multiplications by \(\xi -1\) in Karatsuba operations
The Karatsuba multiplication of \(x_0{\scriptstyle +}x_1\beta {\scriptstyle +}x_2\beta ^2\) by \(y_0{\scriptstyle +}y_1\beta {\scriptstyle +}y_0\beta ^2\) in \(\mathbb {F}_{p^{3i}}\) can be evaluated as
As in \(\mathbb {F}_{p^{2i}}\), one of the multiplications by \(\xi \) of the formula given in Sect. 3.3.1 is replaced by a multiplication by \(\xi -1\). Of course, this trick also applies to \(\mathbb {F}_{p^{2i}}\) and \(\mathbb {F}_{p^{3i}}\) Karatsuba squarings.
In the cases considered in Sect. 3.8, this improvement is only interesting in the intermediate fields (\(\mathbb {F}_{p^4}/\mathbb {F}_{p^2}\) or \(\mathbb {F}_{p^6}/\mathbb {F}_{p^2}\)) and allows to save some \(\mathbb {F}_p\) additions for each Karatsuba multiplication or squaring in \(\mathbb {F}_{p^4}\) or \(\mathbb {F}_{p^6}\) in the cases given in Table 10.
Remark 11
This trick is more interesting in the case 2, 2, 3 that in the case 2, 3, 2. Indeed, a Karatsuba multiplication in \(\mathbb {F}_{p^{12}}\) requires 6 multiplications at the middle level in the case 2, 2, 3 (and then \(6m_{2,\xi }\) are replaced by \(6m_{2,\xi -1}\)) but only 3 in the case 2, 3, 2. Of course, this remark also applies to sparse \(\mathbb {F}_{p^{12}}\) multiplications and to \(\mathbb {F}_{p^{12}}\) squarings.
Let us now give the details of the saving obtained if traces are precomputed in the three situations described in Sect. 3.9.2.
1.2 A.2 Use of precomputed traces in \(\mathbb {F}_{p^{12}}\) squarings
As explained in Sect. 3.3, the Chung–Hasan method for \(\mathbb {F}_{p^{3i}}\) squarings computes
Then \(x_0, 2x_1\) and \(x_2\) are each used in two \(\mathbb {F}_{p^i}\) operations. If Karatsuba or complex arithmetic is used for these \(\mathbb {F}_{p^i}\) operations, \(3\mathbf {A}_{i/2}\) can then be saved by precomputing \(x_0, 2x_1\) and \(x_2\) traces. In fact, one can do even better, depending on the way to build \(\mathbb {F}_{p^{12}}\).
Case 2,3,2. We saw in Sect. 3.6 that a \(\mathbb {F}_{p^{12}}/\mathbb {F}_{p^6}\) squaring is usually performed using the Karatsuba method:
Then the Chung–Hasan squaring in \(\mathbb {F}_{p^6}\) is used 3 times. Moreover the \(\mathbb {F}_{p^6}/\mathbb {F}_{p^2}\) traces of \(c_0, c_1\) and \(c_0+c_1\) (which costs \(2\mathbf {A}_2\) each) are necessary but the latter is the sum of the 2 others so that one additional \(\mathbf {A}_2\) can be saved. Hence, if the Karatsuba method is used in \(\mathbb {F}_{p^2}\), \(11\mathbf {A}_1\) can be saved in \(\mathbf {S}_{12}\) thanks to trace precomputations (9 from \(\mathbb {F}_{p^6}/\mathbb {F}_{p^2}\) Chung–Hasan over Karatsuba squaring and 2 from \(\mathbb {F}_{p^{12}}/\mathbb {F}_{p^6}\) Karatsuba over Chung–Hasan squaring). If the Karatsuba method is not used in \(\mathbb {F}_{p^2}\), only the 2 last ones can be saved.
Case 2, 2, 3. We saw that computing \((c_0+c_1\gamma +c_2\gamma ^2)^2\) with the Chung–Hasan method, \(c_0, c_1\) and \(c_2\in \mathbb {F}_{p^4}\) are used twice, so that precomputing their \(\mathbb {F}_{p^4}/\mathbb {F}_{p^2}\) traces \(t_i\) saves \(3\mathbf {A}_2\). But their \(\mathbb {F}_{p^2}\) components are of course also used twice (in the same operations) and precomputing their \(\mathbb {F}_{p^2}/\mathbb {F}_p\) traces is then interesting if the Karatsuba/complex method is used in \(\mathbb {F}_{p^2}\). Moreover, in \(\mathbb {F}_{p^4}\) operations, the \(t_i\) play the same role as the \(\mathbb {F}_{p^2}\) components so that precomputing their traces is also interesting. Finally, if Karatsuba is used in \(\mathbb {F}_{p^2}\), \(15\mathbf {A}_1\) can be saved in \(\mathbf {S}_{12}\) thanks to trace precomputations (6 from the \(\mathbb {F}_{p^4}/\mathbb {F}_{p^2}\) traces of the \(c_i\), 6 from the \(\mathbb {F}_{p^2}/\mathbb {F}_p\) traces of the \(\mathbb {F}_{p^2}\) components of the \(c_i\) and 3 from the \(\mathbb {F}_{p^2}/\mathbb {F}_p\) traces of the \(\mathbb {F}_{p^4}/\mathbb {F}_{p^2}\) traces of the \(c_i\)). If Karatsuba is not used in \(\mathbb {F}_{p^2}\), only the first \(6\mathbf {A}_1\) can be saved.
1.3 A.3 Use of precomputed traces in \(\mathbb {F}_{p^{12}}\) sparse multiplications
The sparse multiplication involved in the Miller loop for the optimal Ate pairing involves schoolbook steps which will take advantage of precomputed traces. Again, the savings are dependent on the way to build \(\mathbb {F}_{p^{12}}\).
Case 2,3,2. Looking at Formula (3) given in Sect. 3.6.2, we can see that
-
\(b_0\) is used in 3 \(\mathbb {F}_{p^2}\) multiplications. Precomputing its trace then saves \(2\mathbf {A}_1\),
-
\(b_1\) and the third component of \(c_1\) are used in 2 \(\mathbb {F}_{p^2}\) multiplications during the sparse product \((b_1+b_3\beta )c_1\), so \(2\mathbf {A}_1\) can be saved,
-
The same holds for the sparse product \((b_0+b_1+b_3\beta )(c_0+c_1)\),
-
\(b_3\) is used twice in each of these sparse products, so \(3\mathbf {A}_1\) can be saved by precomputing \(tr_{\mathbb {F}_{p^2}/\mathbb {F}_p}(b_3)\).
Finally, \(9\mathbf {A}_1\) can be saved in the sparse multiplication if traces are precomputed (assuming that the Karatsuba method is used for \(\mathbb {F}_{p^2}\) multiplications)
Case 2, 2, 3. Looking at formula (4) given in Sect. 3.7.2, we can see that
-
\(b_0+b_3\beta \) is used in 2 \(\mathbb {F}_{p^4}\) multiplications. Precomputing its trace (\(b_0+b_3\)) saves \(\mathbf {A}_2\),
-
As a consequence of the previous point, \(b_0, b_3\) and \(b_0+b_3\) are used in 2 \(\mathbb {F}_{p^2}\) multiplications, so \(3\mathbf {A}_1\) can be saved,
-
\(b_3\) is also used in the \(\mathbb {F}_{p^4}\) product \((c_0+c_1)(b_0+b_1+b_3\beta )\) which saves one additional \(\mathbf {A}_1\),
-
\(b_1\) is used in 4 \(\mathbb {F}_{p^2}\) multiplications (\(c_2b_1\) and \(c_1b_1\)) so \(3\mathbf {A}_1\) can be saved,
-
\(c_2\) is used twice (in \(c_2b_1\) and in \(c_2(b_0+b_3\beta )\)) so its \(\mathbb {F}_{p^2}\) coefficients are used twice each which saves \(2\mathbf {A}_1\).
Finally, \(11\mathbf {A}_1\) can be saved in the sparse multiplication if traces are precomputed (assuming that the Karatsuba method is used for \(\mathbb {F}_{p^2}\) multiplications, otherwise only \(2\mathbf {A}_1\) are saved).
In all considered cases, the saving obtained is around \(10\%\) of the total number of additions in \(\mathbb {F}_{p^{12}}\) operations which is not negligible if the relative cost of an addition compared to a multiplication in \(\mathbb {F}_p\) is not small.
1.4 A.4 Use of precomputed traces in the final exponentiation
Full multiplications in \(\mathbb {F}_{p^{12}}\) are only used in the final exponentiation. If the implemented exponentiation parses the exponent from left to right (which is usually the case), then the multiplication steps are performed with one constant term c. Hence, we can precompute and store all the traces depending only on c. Since the Karatsuba method is used at all levels of the extension tower (except in \(\mathbb {F}_{p^2}\) if \(\mathbf {A}_1>0.33\mathbf {M}_1\)), we will significantly reduce the number of required additions, whatever the way to build \(\mathbb {F}_{p^{12}}\).
Case 2,3,2.
-
\(\mathbf {M}^{{\scriptscriptstyle K}}_{12}\) requires the \(\mathbb {F}_{p^{12}}/\mathbb {F}_{p^6}\) trace of c, thus \(\mathbf {A}_6\) can be saved if this trace is precomputed. It also requires \(3\mathbf {M}^{{\scriptscriptstyle K}}_6\) by a constant term (the 2 coordinates of c and its trace).
-
Each \(\mathbf {M}^{{\scriptscriptstyle K}}_6\) involving a constant term b requires 3 sums of 2 coordinates of b, thus \(3\mathbf {A}_2\) can be saved if these sums are precomputed. Hence \(9\mathbf {A}_2\) are saved at this level. Each \(\mathbf {M}^{{\scriptscriptstyle K}}_6\) also requires \(6\mathbf {M}_2\) by a constant term (the 3 coordinates of b and the 3 sums of 2 coordinates).
-
Each \(\mathbf {M}^{{\scriptscriptstyle K}}_2\) involving a constant term a requires the \(\mathbb {F}_{p^2}/\mathbb {F}_p\) trace of a, thus one \(\mathbf {A}_1\) can be saved if this trace is precomputed. Hence \(18\mathbf {A}_1\) can be saved at this level when the Karatsuba method is used for \(\mathbf {M}_2\).
Case 2, 2, 3.
-
\(\mathbf {M}^{{\scriptscriptstyle K}}_{12}\) requires 3 sums of 2 coordinates of c, thus \(3\mathbf {A}_4\) can be saved if these sums are precomputed. It also requires \(6\mathbf {M}^{{\scriptscriptstyle K}}_4\) by a constant term (the 3 coordinates of c and the 3 sums of 2 coordinates).
-
Each \(\mathbf {M}^{{\scriptscriptstyle K}}_4\) involving a constant term b requires the \(\mathbb {F}_{p^4}/\mathbb {F}_{p^2}\) trace of b, thus one \(\mathbf {A}_2\) can be saved if this trace is precomputed. Hence \(6\mathbf {A}_2\) are saved at this level. Each \(\mathbf {M}^{{\scriptscriptstyle K}}_4\) also requires \(3\mathbf {M}_2\) by a constant term (the 2 coordinates of b and its trace).
-
Again, one \(\mathbf {A}_1\) can be saved for each \(\mathbf {M}^{{\scriptscriptstyle K}}_2\) involving a constant term if its trace is precomputed. Hence \(18\mathbf {A}_1\) can be saved at this level when Karatsuba is used for \(\mathbf {M}_2\).
In both cases, \(42\mathbf {A}_1\) can be saved for each multiplication in \(\mathbb {F}_{p^{12}}\) involving a constant term if its traces are precomputed. This is about \(20\%\) of the total number of additions in \(\mathbf {M}_{12}\) which is significant if the relative cost of an addition compared to a multiplication in \(\mathbb {F}_p\) is not small. If \(\mathbf {A}_1>0.33\mathbf {M}_1\), the schoolbook method is used for \(\mathbb {F}_{p^2}\) multiplication and only \(24\mathbf {A}_1\) can be saved.
B Appendix
In this appendix, we give tables summarizing complexities for \(\mathbb {F}_{p^{12}}\) arithmetic if \(\mu \ne -1\) (see Sect. 3.10 for more details) (Tables 11, 12, 13, 14, 15, 16).
Rights and permissions
About this article
Cite this article
Duquesne, S., El Mrabet, N., Haloui, S. et al. Choosing and generating parameters for pairing implementation on BN curves. AAECC 29, 113–147 (2018). https://doi.org/10.1007/s00200-017-0334-y
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00200-017-0334-y