Skip to main content

Computing Optimal 2-3 Chains for Pairings

  • Conference paper
  • First Online:
Progress in Cryptology -- LATINCRYPT 2015 (LATINCRYPT 2015)

Part of the book series: Lecture Notes in Computer Science ((LNSC,volume 9230))

Abstract

Using double-base chains to represent integers, in particular chains with bases 2 and 3, can be beneficial to the efficiency of scalar multiplication and the computation of bilinear pairings via (a variation of) Miller’s algorithm. For one-time scalar multiplication, finding an optimal 2-3 chain could easily be more expensive than the scalar multiplication itself, and the associated risk of side-channel attacks based on the difference between doubling and tripling operations can produce serious complications to the use of 2-3 chains.

The situation changes when the scalar is fixed and public, as in the case of pairing computations. In such a situation, performing some extra work to obtain a chain that minimizes the cost associated to the scalar multiplication can be justified as the result may be re-used a large number of times. Even though this computation can be considered “attenuated” over several hundreds or thousands of scalar multiplications, it should still remain within the realm of “practical computations”, and ideally be as efficient as possible.

An exhaustive search is clearly out of the question as its complexity grows exponentially in the size of the scalar. Up to now, the best practical approaches consisted in obtaining an approximation of the optimal chain via a greedy algorithm, or using the tree-based approach of Doche and Habsieger, but these offer no guarantee on how good the approximation will be. In this paper, we show how to find the optimal 2-3 chain in polynomial time, which leads to faster pairing computations. We also introduce the notion of “negative” 2-3 chains, where all the terms (except the leading one) are negative, which can provide near-optimal performance but reduces the types of operations used (reducing code size for the pairing implementation).

This research was supported by FONDECYT grant 1151326 (Chile).

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Aranha, D.F., Karabina, K., Longa, P., Gebotys, C.H., López, J.: Faster explicit formulas for computing pairings over ordinary curves. In: Paterson, K.G. (ed.) EUROCRYPT 2011. LNCS, vol. 6632, pp. 48–68. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  2. 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–369. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  3. Blake, I.F., Murty, V.K., Xu, G.: Refinements of Miller’s algorithm for computing the weil/tate pairing. J. Algorithms 58, 134–149 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  4. Blake, I.F., Seroussi, G., Smart, N.P.: Advances in Elliptic Curve Cryptography. London Mathematical Society Lecture Note Series, vol. 317. Cambridge University Press, Cambridge (2005)

    Book  MATH  Google Scholar 

  5. Bernstein, D.J., Birkner, P., Lange, T., Peters, C.: Optimizing double-base elliptic-curve single-scalar multiplication. In: Srinathan, K., Rangan, C.P., Yung, M. (eds.) INDOCRYPT 2007. LNCS, vol. 4859, pp. 167–182. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  6. A. Capuñay. Multibase Scalar Multiplications in Cryptographic Pairings. preprint, 2015

    Google Scholar 

  7. Ciet, M., Joye, M., Lauter, K., Montgomery, P.L.: Trading inversions for multiplications in elliptic curve cryptography. Des. Codes Crypt. 39(2), 189–206 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  8. Dimitrov, V.S., Imbert, L., Mishra, P.K.: Efficient and secure elliptic curve point multiplication using double-base chains. In: Roy, B. (ed.) ASIACRYPT 2005. LNCS, vol. 3788, pp. 59–78. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  9. Dimitrov, V.S., Jullien, G.A., Miller, W.C.: An algorithm for modular exponentiation. Inform. Process. Lett. 66(3), 155–159 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  10. Doche, C., Habsieger, L.: A tree-based approach for computing double-base chains. In: Mu, Y., Susilo, W., Seberry, J. (eds.) ACISP 2008. LNCS, vol. 5107, pp. 433–446. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Eisenträger, K., Lauter, K., Montgomery, P.L.: Fast elliptic curve arithmetic and improved weil pairing evaluation. In: Joye, M. (ed.) CT-RSA 2003. LNCS, vol. 2612, pp. 343–354. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  12. Miller, V.S.: The Weil pairing, and its efficient calculation. J. Crypt. 17(4), 235–261 (2004)

    Article  MATH  Google Scholar 

Download references

Acknowledgements

The authors would like to thanks the anonymous referees for their useful comments and suggestions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nicolas Thériault .

Editor information

Editors and Affiliations

Appendices

A Proofs of Lemmas and Theorems

Proof

(Corollary 1 ). Since the tables process the updates from the values of \(n_{i,j}\), \(n_{i-1,j}\) and \(n_{i,j-1}\), and not \(\overline{n}_{i,j}\), \(\overline{n}_{i-1,j}\) and \(\overline{n}_{i,j-1}\), we must use Eq. 4, hence the distinctions between the cases \(n_{i-1,j}=0\) vs. \(n_{i-1,j}>0\) and \(n_{i,j-1}=0\) vs. \(n_{i,j-1}>0\).

Applying Lemma 3 to the cases \(n_{i-1,j}=0\) and \(n_{i,j-1}=0\) (with Eqs. 5 and 6) is straightforward.

To complete Table 1 we deal with two cases: If \(n_{i,j}=n_{i-1,j}\), then \(n_{i,j}=\overline{n}_{i-1,j}+2^{i-1}3^j\) and \(\overline{n}_{i,j}=n_{i-1,j}-2 \cdot 2^{i-1}3^j=\overline{n}_{i-1,j}-2^{i-1}3^j\). If \(n_{i,j}=n_{i-1,j}+2^{i-1}3^j\), then \(n_{i,j}=\overline{n}_{i-1,j}+2 \cdot 2^{i-1}3^j\) and \(\overline{n}_{i,j}=n_{i-1,j}-2^{i-1}3^j=\overline{n}_{i-1,j}\). We can then apply Lemma 3 to each case.

To complete Table 2 we deal with three cases: If \(n_{i,j}=n_{i,j-1}\), then \(n_{i,j}=\overline{n}_{i,j-1}+2^i3^{j-1}\) and \(\overline{n}_{i,j}=n_{i,j-1}-3 \cdot 2^{i-1}3^j=\overline{n}_{i-1,j}-2 \cdot 2^{i-1}3^j\). If \(n_{i,j}=n_{i,j-1}+2^i3^{j-1}\), then \(n_{i,j}=\overline{n}_{i,j-1}+2 \cdot 2^i3^{j-1}\) and \(\overline{n}_{i,j}=n_{i,j-1}-2 \cdot 2^{i-1}3^j=\overline{n}_{i-1,j}-2^{i-1}3^j\). If \(n_{i,j}=n_{i,j-1}+2 \cdot 2^i3^{j-1}\), then \(n_{i,j}=\overline{n}_{i,j-1}+3 \cdot 2^i3^{j-1}\) and \(\overline{n}_{i,j}=n_{i,j-1}-2^{i-1}3^j=\overline{n}_{i-1,j}\). We can then apply Lemma 3 to each case.   \(\square \)

Proof

(Lemma 4 ). We observe that \(\mathscr {C}_{0,0}=0=\overline{\mathscr {C}}_{0,0}\) (since \(n_{0,0}=0=\overline{n}_{0,0}\)), so at the “starting point” of the algorithm both chains exist. The result is then easily obtained by (double) induction. Table 1 ensures that at least one of the two chains exist when going from position \((i-1,j)\) to position (ij), and Table 2 ensures that at least one of the two chains exist when going from position \((i,j-1)\) to position (ij).    \(\square \)

Proof

(Theorem 1 ). From Definitions 45, and 6, neither \(C_{i,j}\) nor \(2^i3^j+\overline{C}_{i,j}\) can be a chain for n if \(i < i_j\). We now show that chains \(C_{i,j}\) and \(2^i3^j+\overline{C}_{i,j}\) need not be considered for \(i > i_j\).

Let C be a chain with largest term \(2^i3^j\) with \(i>i_j\), and let \(\pm 2^a 3^b\) be its first term with \(a>a_b\) (using the same definition as \(i_j\)). We define to subchains: \(C_{low}=C_{a,b}\) or \(\overline{C}_{a,b}\) (depending on the sign of its largest term), and \(C_{high}\) which consists of all the terms which are multiples of \(2^a 3^b\). Due to the growth in a 2-3 chain (by factors of 2 and 3), any chain with terms bounded above by \(2^r3^s\) represents a number between \(-(2^r3^s-1)\) and \(2^r3^s-1\). Since none of the terms in \(C_{high}\) can affect the remainder modulo \(2^a3^b\), \(C_{low}\) must then represent either n or \(n-2^a3^b\). If \(C_{low}\) represents n, then it is a better chain than C. If \(C_{low}\) represents \(n-2^a3^b\), then \(2^a3^b+C_{low}\) is a better chain than C unless they are equal.

We can therefore restrict the search of a minimal chain for n to chains of the form \(C_{i,j}\) and \(2^i3^j+\overline{C}_{i,j}\) where \(i=i_j\). From Lemma 2, all subchains of a minimal chain must also be minimal, so we can restrict ourselves to the chains \(C_j\) and \(\overline{C}_j\) produced by Algorithm 2.    \(\square \)

Proof

(Theorem 2 ). Since \(0 \le i \le \lceil \log _2(n+1) \rceil \) and \(0 \le j \le m \le \lceil \log _3(n+1) \rceil \), there are clearly \(O((\log n)^2)\) steps in Algorithm 2. The operations performed at each step is easily bounded by \(O((\log n)^2)\) bit operations. The algorithm produces \(2(\lceil \log _3(n+1) \rceil +1)\) chains (\(C_j\) and \(\overline{C}_j\)), each consisting in a sum of at most \(\lceil \log _2(n+1) \rceil +1\) terms of size bounded by 2n, from which the result follows directly.    \(\square \)

B Update Tables for Optimal Chains

Table 3. Possible sources of \({C_{i,j}}^{(k)}\) when multiplying by 2 (\({C_{i,j}}^{(3)}\) not possible)
Table 4. Possible sources of \({\overline{C}_{i,j}}^{(k)}\) when multiplying by 2 (\({\overline{C}_{i,j}}^{(3)}\) not possible)
Table 5. Possible sources of \({C_{i,j}}^{(k)}\) when multiplying by 3 (\({C_{i,j}}^{(2)}\) not possible)
Table 6. Possible sources of \({\overline{C}_{i,j}}^{(k)}\) when multiplying by 3 (\({\overline{C}_{i,j}}^{(2)}\) not possible)
Table 7. Cost updates for \({C_{i,j}}^{(k)}\) and \({\overline{C}_{i,j}}^{(k)}\)

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Capuñay, A., Thériault, N. (2015). Computing Optimal 2-3 Chains for Pairings. In: Lauter, K., Rodríguez-Henríquez, F. (eds) Progress in Cryptology -- LATINCRYPT 2015. LATINCRYPT 2015. Lecture Notes in Computer Science(), vol 9230. Springer, Cham. https://doi.org/10.1007/978-3-319-22174-8_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-22174-8_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-22173-1

  • Online ISBN: 978-3-319-22174-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics