Skip to main content

Memory Optimization Techniques for Computing Discrete Logarithms in Compressed SIKE

  • Conference paper
  • First Online:
Post-Quantum Cryptography (PQCrypto 2021)

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

Included in the following conference series:

Abstract

The supersingular isogeny-based key encapsulation (SIKE) suite stands as an attractive post- quantum cryptosystem with its relatively small public keys. Public key sizes in SIKE can further be compressed by computing pairings and solving discrete logarithms in certain subgroups of finite fields. This comes at a cost of precomputing and storing large discrete logarithm tables. In this paper, we propose several techniques to optimize memory requirements in computing discrete logarithms in SIKE, and achieve to reduce table sizes by a factor of 4. We implement our techniques and verify our theoretical findings.

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 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.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

Similar content being viewed by others

Notes

  1. 1.

    This technique was originally introduced by the authors of this paper; implemented in SIKE round 3 [2]; and recently reused in [12].

  2. 2.

    https://github.com/microsoft/PQCrypto-SIDH/commit/e990bc6784c68426f69ac11ada3dd5fbfed8b714.

  3. 3.

    https://github.com/microsoft/PQCrypto-SIDH/commit/e990bc6784c68426f69ac11ada3dd5fbfed8b714.

  4. 4.

    The case when \(w\not \mid e\) requires more attention as explained in [15].

References

  1. Avizienis, A.: Signed-digit number representations for fast parallel arithmetic. IEEE Trans. Electron. Comput. EC-10, 389–400 (1961)

    Google Scholar 

  2. Azarderakhsh, R., et al.: Supersingular isogeny key encapsulation. In: Submission to the 3rd Round of the NIST Post-Quantum Standardization project (2020)

    Google Scholar 

  3. Azarderakhsh, R., et al.: Supersingular isogeny key encapsulation. Submission to the 2nd Round of the NIST Post-Quantum Standardization project (2019)

    Google Scholar 

  4. Azarderakhsh, R., et al.: Supersingular Isogeny Key Encapsulation. SIKE Team (2020). https://sike.org/

  5. Azarderakhsh, R., Jao, D., Kalach, K., Koziel, B., Leonardi, C.: Key compression for isogeny-based cryptosystems. In: Proceedings of the 3rd ACM International Workshop on ASIA Public-Key Cryptography, pp. 1–10 (2016)

    Google Scholar 

  6. Costello, C., Jao, D., Longa, P., Naehrig, M., Renes, J., Urbanik, D.: Efficient compression of SIDH public keys. In: Coron, J.-S., Nielsen, J.B. (eds.) EUROCRYPT 2017, Part I. LNCS, vol. 10210, pp. 679–706. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-56620-7_24

    Chapter  Google Scholar 

  7. De Feo, L., Jao, D., Plût, J.: Towards quantum-resistant cryptosystems from super singular elliptic curve isogenies. J. Math. Cryptology, 8(3), 209–247 (2014)

    Google Scholar 

  8. Gustavo, H.M., Zanon, M.A., Simplicio, G.C.C.F., Pereira, J.D., Paulo, S.L.M.B.: Faster Key Compression for Isogeny-Based Cryptosystems: IEEE Trans. Comput. 68, 688–701 (2018)

    Google Scholar 

  9. Longa, P.: SIDH Library. https://github.com/microsoft/PQCrypto-SIDH

  10. Naehrig, M., Renes, J.: Dual isogenies and their application to public-key compression for isogeny-based cryptography. In: Galbraith, S.D., Moriai, S. (eds.) ASIACRYPT 2019, Part II. LNCS, vol. 11922, pp. 243–272. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-34621-8_9

    Chapter  Google Scholar 

  11. Pereira, G., Doliskani, J., Jao, D.: x-only point addition formula and faster compressed SIKE. J. Cryptographic Eng. 1–13 (2020). https://doi.org/10.1007/s13389-020-00245-4

  12. Pereira, G., Barreto, P.: Isogeny-based key compression without pairings. In: International Conference on Practice and Theory of Public-Key Cryptography (PKC). Springer (2021)

    Google Scholar 

  13. Pohlig, S., Hellman, M.: An improved algorithm for computing logarithms over \(GF(p)\) and its cryptographic significance. IEEE Trans. Inf. Theory 24, 106–110 (1978)

    Article  MathSciNet  Google Scholar 

  14. Rubin, K., Silverberg, A.: Compression in finite fields and torus-based cryptography. SIAM J. Comput. 37, 1401–1428 (2008)

    Article  MathSciNet  Google Scholar 

  15. Zanon, G.H.M., Simplicio, M.A., Pereira, G.C.C.F., Doliskani, J., Barreto, P.S.L.M.: Faster isogeny-based compressed key agreement. In: Lange, T., Steinwandt, R. (eds.) PQCrypto 2018. LNCS, vol. 10786, pp. 248–268. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-79063-3_12

    Chapter  Google Scholar 

Download references

Acknowledgements

The authors would like to thank the SIKE team members for their comments on the paper and support with integrating our results into the official SIKE suite. G. Pereira is supported in part by NSERC, CryptoWorks21, Canada First Research Excellence Fund, Public Works and Government Services Canada, and by the National Research Council Canada and University of Waterloo Collaboration Center (NUCC) program 927517.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Koray Karabina .

Editor information

Editors and Affiliations

Appendices

A The Pohlig-Hellman Algorithm with width-w Windows

Given an instance \(\mathbb {G}_{\ell , e}\), g, and \(h\in \mathbb {G}\) of a discrete logarithm problem (DLP) in \(\mathbb {G}_{\ell , e}\), Pohlig-Hellman algorithm (PH) [13] uses width-w windows and computes \(d=\log _{g}{h}\) as follows. Let w be a positive integer with \(w\mid e\)Footnote 4, define \(m = \lceil {e/w}\rceil \), and write the exponent d in base \(L = \ell ^w\) as \(d = \sum _{i=0}^{m-1}{D_iL^i}\), \(D_i\in [0,L)\). Define the sequence \(h_k = g^{\sum _{i=k}^{m-1}{D_iL^i}}\), which satisfies

$$\begin{aligned} h_0=h,\quad h_{k+1} = h_k g^{-D_kL^k},\quad h_k^{L^{m-1-k}} = \left( g^{L^{m-1}}\right) ^{D_k},\ k=0,\ldots ,m-2. \end{aligned}$$
(5)

Note that \(D_k = \log _{\rho }{h_k^{L^{m-1-k}}}\in [0,L)\), where \(\rho = g^{L^{m-1}}\) generates a group \(\mathbb {G}_{\ell , w}\) of order \(\ell ^{w}\). In PH, a table \(T\) of elements are precomputed and stored such that \(T[k][D] = g^{-DL^k}\), for \(0\le k \le m-1\) and \(0\le D< L\). Note that the table \(T\) consists of \(m\cdot L\) elements of \(\mathbb {G}_{\ell , e}\). One computes \(h_0^{L^{m-1}}\), and determines \(D_0\) by looking up the last row \(T[m-1]\) of T. For \(k=1,\ldots ,m-1\), first \(h_k = h_{k-1}T[k-1][D_{k-1}]\) is computed (one multiplication), and then \(h_k^{L^{m-1-k}}\) is computed (\((m-1-k)\) exponentiations by L), and \(D_k\) is determined by looking up the row \(T[m-1]\). Once \(D_0, \ldots , D_{m-1}\) are known, \(d = \sum _{i=0}^{m-1}{D_iL^i}\) can be recovered.

As previously observed in the literature [8, 15], the steps of the above PH algorithm can be associated with subgraph of a directed graph \(\mathcal {T}_{e,w}\). The vertices of \(\mathcal {T}_{e,w}\) are labeled as \(\varDelta _{j,k}\) for \(0 \le k \le m-1\) and \(0 \le j \le m-1-k\), with \(\varDelta _{0,0}\) being the top-most vertex and \(\varDelta _{j,k}\) being the vertex lying at the end of the path starting at \(\varDelta _{0,0}\) and following j many left edges and k many right edges. The vertices \(\varDelta _{m-1-k,k}\) for \(0 \le k \le m-1\) are referred to as leaves, and \(\varDelta _{0,0}\) is the root. We make a correspondence between vertices \(\varDelta _{j,k}\) of \(\mathcal {T}_{e,w}\) and elements of \(\mathbb {G}_{\ell ,e}\) by associating \(\varDelta _{j,k}\) with \(h_k^{L^j}\), and it will be convenient to use “\(=\)” for this association: \(\varDelta _{j,k} = h_k^{L^j}, \text{ for } 0\le k \le m-1 \text{ and } 0\le j \le m-1-k\) In particular, the root \(\varDelta _{0,0}\) is associated with the input \(h_0=h\) to the DLP, and the leaves \(\varDelta _{m-1-k,k}\) correspond to the elements \(h_k^{L^{m-1-k}}\) used to determine \(D_k\). The outgoing edges of non-leaf vertices \(\varDelta _{j,k}\) can then be interpreted as group operations in \(\mathbb {G}_{\ell ,e}\) as follows: \( \text{ left } \text{ traversal: } \varDelta _{j,k}\rightarrow \varDelta _{j+1,k} = \varDelta _{j,k}^L; \text{ right } \text{ traversal: } \varDelta _{j,k}\rightarrow \varDelta _{j,k+1} = \varDelta _{j,k}\cdot g^{-D_kL^{j+k}}. \)

Note that an edge with a positive slope in \(\mathcal {T}_{e,w}\) (a left traversal) corresponds to exponentiation by L, and an edge with a negative slope in \(\mathcal {T}_{e,w}\) (a right traversal) corresponds to a multiplication by a group element, assuming access to the lookup table \(T\), as previously defined.

One can notice that the computational steps in the generalized PH algorithm correspond to traversing a spanning subgraph S of \(\mathcal {T}_{e,w}\), where the edge set of S consists of all the positive slope edges of \(\mathcal {T}_{e,w}\), and all negative slope edges of the form \(\{\varDelta _{0,k}, \varDelta _{0,k+1}\}\) for \(k=0,\ldots ,m-1\). One can do better by assigning weights \(\mathfrak {p}\) (the cost of exponentiation by \(\ell ^w\) in \(\mathbb {G}_{\ell , e}\)) and \(\mathfrak {q}\) (the cost of multiplication in \(\mathbb {G}_{\ell , e}\)) to the edges of \(\mathcal {T}_{e,w}\) with positive and negative slopes, respectively, and determining an optimal strategy (originally introduced in the context of isogeny computation [7] and then extended to discrete logarithms [8]) to minimize the cost of solving DLP. Such strategies are typically represented in linear form as a list of positive integers of length m. This yields a recursive algorithm to solve discrete logarithms; see Algorithm 6.3 in [15].

B Torus-based Representations

We summarize the torus-based compressed representation of elements of \(\mathbb {G}\) as detailed in [14]. Elements of \(\mathbb {G}\) written in the form \(a+bi\) are said to be in standard representation, and we must have \(a^2 + b^2 = 1\) (see Sect. 2). When \(b\ne 0\), one can write \(a+bi = (\alpha + i)/(\alpha - i)\), where \(\alpha := (a+1)/b\). Since taking \(\alpha =0\) produces \(a+bi=-1+0i\), we can represent cyclotomic subgroup elements with a single element in \(\mathbb {F}_p\) as follows:

$$\begin{aligned} \mathbb {G}= \{1\} \cup \left\{ \frac{\alpha + i}{\alpha - i}:\ \alpha \in \mathbb {F}_p\right\} . \end{aligned}$$
(6)

Under this correspondence, we define the compression function \(C : \mathbb {G}\setminus \lbrace 1,-1 \rbrace \rightarrow \mathbb {F}_p\) as \(C(a+bi):=(a+1)/b\). Group operations respect compressed representation of elements in \(\mathbb {G}\) in the following sense: If \(C(a+bi)=\alpha \) and \(C(c+di)=\beta \), then we have \(C((a+bi)^{-1}) = -\alpha \), and

$$\begin{aligned} C((a+bi)\cdot (c+di))&= {\left\{ \begin{array}{ll} (\alpha \beta -1)/(\alpha +\beta ) &{} \alpha +\beta \ne 0\\ 1 &{} \alpha +\beta = 0 \end{array}\right. } \end{aligned}$$

Compressed representations inherit a projective representation as follows. For \(x,y \in \mathbb {F}_p\) not both zero, if we define , then we can write the identity element as \(1 = [1 : 0]\) (the point at infinity), and for any [x : y] with \(y\ne 0\) we have \([x:y]=[x/y : 1]\). In other words, we can rewrite (6) as

$$\begin{aligned} \mathbb {G}= \{[1:0]\} \cup \{[\alpha :1]:\ \alpha \in \mathbb {F}_p\} =\{[x:y]:\ x,y\in \mathbb {F}_p\text { not both } 0 \}. \end{aligned}$$
(7)

Note that the compression function C is undefined for \(1,-1 \in \mathbb {F}_p\), but these elements are represented in projective coordinates as [1 : 0] and [0 : 1], respectively. Passing from regular to projective representation is easy, but the reverse direction requires at least an inversion in \(\mathbb {F}_p\): for \(a+bi \not = -1\) and \(x^2 + y^2 \not =0\) we have

$$\begin{aligned} a+bi \longmapsto [a+1 : b], \quad [x :y] \longmapsto \dfrac{x^2 - y^2}{x^2 + y^2} + \dfrac{2xy}{x^2+y^2}i \end{aligned}$$

We summarize the group operations of \(\mathbb {G}\) in projective coordinates in Table 3. Each formula can be directly verified by converting to the regular representations of the involved elements using the above mappings.

Table 3. Summary of operations and their costs for elements of \(\mathbb {G}\) in projective coordinates. Here, \(x,y,z,t,\alpha , a,b \in \mathbb {F}_p\) with x and y not both 0, z and t not both 0, and \(a^2 + b^2 = 1\).

C Proofs

Below is a proof of Theorem 3.

Proof

Given \(1\ne h\), we first determine the least positive integer k such that \(h^{\ell ^k}=1\), by performing k exponentiations by \(\ell \) in \(\mathbb {G}_{\ell , w}\). We also store the intermediate values \(h_i = h^{\ell ^{k-i}}\), \(i=0,\ldots ,k\), in an array \(H = [h_0=1, h_1, \ldots , h_k=h]\). By Theorem 2, there is a unique path \(P_{0,k} = v_{0,0}, v_{1,i_1}, \ldots , v_{j,i_{k}}\) in \(\mathcal {G}_{\ell , w}\) such that \(v_{j,i_j}\in V_j\) and \(h_j=g_{j,i_j}\) for \(j=0,\ldots ,k\). By the proof of Theorem 2, \(i_1\in \{0,\ldots ,(\ell -2)\}\) can be determined as the integer satisfying \(h_1 = g_{1,i_1}\), and we set \(s_1=i_1+1\). Next, we inductively assume that \(i_{j-1}\) and \(s_{j-1}\) are already known for some \(2\le j\le w\). By the definition of \(E_j\), and the fact that \(v_{j-1,i_{j-1}}v_{j,i_j}\in E_j\), \(i_j = \ell \cdot i_{j-1} + s_j\) for some \(s_j\in \{0,\ldots ,(\ell -1)\}\). Since \(i_{j-1}\) is already known, the value of \(s_j\) (and \(i_j\)) can be determined as the integer satisfying \(h_j = g_{j, i_j} = g_{j,\ell \cdot i_{j-1}+s_j}\). As a result, we can recover all \(i_j\) and \(s_j\) for all \(j=1,\ldots ,k\), where \(s_1=i_1+1\) and \(i_{j} = \ell \cdot i_{j-1}+s_j\). To prove the last claim of our theorem, we need to show \(d = v_{k,i_k}\), because \(h = h_k = g_{k,i_k} = \rho ^{v_{k, i_k}}\). For \(k=1\), Theorem 3 yields \(d = s_1\ell ^{w-1}\), and it follows from (2) that \(v_{1,i_1} = (i_1+1)\ell ^{w-1} = s_1\ell ^{w-1}=d\), as required. In the following, we assume that \(k\ge 2\). Using (1)–(3), we write

$$\begin{aligned} v_{k,i_k}&= \frac{v_{k-1, i_{k-1}}}{\ell } + s_{k}\ell ^{w-1} = \frac{v_{k-2, i_{k-2}}}{\ell ^2} + s_{k-1}\ell ^{w-2} + s_{k}\ell ^{w-1}\\&=\frac{v_{1, i_{1}}}{\ell ^{k-1}} + s_{2}\ell ^{w-k+1} + \cdots + s_{k}\ell ^{w-1} =s_1\ell ^{w-k} + s_{2}\ell ^{w-k+1} + \cdots + s_{k}\ell ^{w-1}\\&= \ell ^{w-k}\sum _{j=1}^{k}{s_j\ell ^{j-1}} = d, \text { which finishes the proof.} \end{aligned}$$

D Algorithms

figure a
figure b
figure c
figure d
figure e

Rights and permissions

Reprints and permissions

Copyright information

© 2021 National Research Council of Canada

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hutchinson, A., Karabina, K., Pereira, G. (2021). Memory Optimization Techniques for Computing Discrete Logarithms in Compressed SIKE. In: Cheon, J.H., Tillich, JP. (eds) Post-Quantum Cryptography. PQCrypto 2021. Lecture Notes in Computer Science(), vol 12841. Springer, Cham. https://doi.org/10.1007/978-3-030-81293-5_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-81293-5_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-81292-8

  • Online ISBN: 978-3-030-81293-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics