Abstract
Let \({\mathbb {F}}_{\!q}\) be a finite field and \(E_b\!: y^2 = x^3 + b\) be an ordinary (i.e., non-supersingular) elliptic curve (of j-invariant 0) such that \(\sqrt{b} \in {\mathbb {F}}_{\!q}\) and \(q \not \equiv 1 \, (\mathrm {mod} \ 27)\). For example, these conditions are fulfilled for the curve BLS12-381 (\(b=4\)). It is a de facto standard in the real-world pairing-based cryptography at the moment. This article provides a new constant-time hash function \(H\!: \{0,1\}^* \rightarrow E_b({\mathbb {F}}_{\!q})\) indifferentiable from a random oracle. Its main advantage is the fact that H computes only one exponentiation in \({\mathbb {F}}_{\!q}\). In comparison, the previous fastest constant-time indifferentiable hash functions to \(E_b({\mathbb {F}}_{\!q})\) compute two exponentiations in \({\mathbb {F}}_{\!q}\). In particular, applying H to the widely used BLS multi-signature with m different messages, the verifier should perform only m exponentiations rather than 2m ones during the hashing phase.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Since its invention in the early 2000s, pairing-based cryptography [8] has become more and more popular every year, for example in secure multi-party computations. One of the latest reviews of standards, commercial products and libraries for this type of cryptography is represented in [15, Sect. 4.1].
Let \({\mathbb {F}}_{\!q}\) be a finite field of \(\mathrm {char}({\mathbb {F}}_{\!q}) > 3\) and \(E_b\!: y^2 = x^3 + b\) be an elliptic \({\mathbb {F}}_{\!q}\)-curve whose the j-invariant is 0. The priority is given to the curves \(E_b\), because the pairing computation on them is the most efficient (see [8, Sect. 4]). The paper’s focus is on ordinary curves, because supersingular ones pose special challenges for security by virtue of [8, Remark 2.22]. And according to [18, Example V.4.4] the ordinariness of \(E_b\) results in the restriction \(q \equiv 1 \ (\mathrm {mod} \ 3)\), i.e., \(\omega := \root 3 \of {1} \in {\mathbb {F}}_{\!q}\), where \(\omega \ne 1\). Today, the most popular pairing-friendly curve in the industry is the Barreto–Lynn–Scott curve BLS12-381 [22, Sect. 2.1] for which \(\lceil \log _2(q) \rceil = 381\).
Many pairing-based protocols (for example, the BLS multi-signature [2, Sect. 3], [3]) use a hash function of the form \(H\!: \{0,1\}^* \rightarrow E_b({\mathbb {F}}_{\!q})\). There is the regularly updated draft [9] (see also [8, Sect. 8]) on the topic of hashing to elliptic curves. Due to [9, Sect. 10] it is highly desirable and often inevitable that H is indifferentiable from a random oracle [4, Definition 2] and constant-time, that is the computation time of its value is independent of an input argument.
Almost all such previously proposed hash functions are obtained as the composition \(H := e^{\otimes 2} \circ {\mathfrak {h}}\) of a hash function \({\mathfrak {h}}\!: \{0,1\}^* \rightarrow {\mathbb {F}}_{\!q}^2\) and the tensor square
of some map \(e\!: {\mathbb {F}}_{\!q} \rightarrow E_b({\mathbb {F}}_{\!q})\). Such a map is often called encoding. In this case the indifferentiability of H follows from [4, Theorem 1] if \({\mathfrak {h}}\) is indifferentiable and \(e^{\otimes 2}\) is admissible in the sense of [4, Definition 4].
The fastest known encodings to the curves \(E_b\) are Elligator 2 [1, Sect. 5] and the Wahby–Boneh “indirect” map [22] (building on the simplified SWU map [4, Sect. 7]). Both (resp. H) can be implemented with the cost of one (resp. two) exponentiation(s) in \({\mathbb {F}}_{\!q}\) whenever \(q \not \equiv 1 \, (\mathrm {mod} \ 8)\). The other quite famous Icart encoding [11] is available if and only if \(q \equiv 2 \ (\mathrm {mod} \ 3)\), i.e., it is useless in the pairing context. The Icart approach is based on the fact that under the mentioned condition there is a unique cubic root \(\root 3 \of {a} \in {\mathbb {F}}_{\!q}\) given \(a \in {\mathbb {F}}_{\!q}\). Nevertheless, as is shown by this article, the cubic root ideology also works (in a completely different way) in the opposite case \(q \equiv 1 \ (\mathrm {mod} \ 3)\).
This article essentially improves our ideas from [12]. There provided that \(\sqrt{b}\in {\mathbb {F}}_{\!q}\) we construct one more encoding e whose the tensor square \(e^{\otimes 2}\) is admissible. Moreover, e equally requires only one exponentiation in \({\mathbb {F}}_{\!q}\). However in this work (also for \(\sqrt{b}\in {\mathbb {F}}_{\!q}\)) we directly provide an admissible map \(h\!: {\mathbb {F}}_{\!q}^2 \rightarrow E_b({\mathbb {F}}_{\!q})\) approximately with the same cost as e and such that \(h(t,t) = \pm e(t)\). In other words, the tensor square is superfluous in this situation and hence we get rid of one exponentiation in \({\mathbb {F}}_{\!q}\). Let us also remark that h is given by quite simple formulas with small coefficients unlike the Wahby–Boneh encoding.
The same idea is applicable to the famous SWU (Shallue–van de Woestijne–Ulas) encoding [8, Sect. 8.3.4] with the cost of two exponentiations in \({\mathbb {F}}_{\!q}\). It is based on the seminal work [19, Lemma 3] of Skałba, where the author derives a map \({\mathbb {F}}_{\!q}^2 \rightarrow E({\mathbb {F}}_{\!q})\) for any elliptic \({\mathbb {F}}_{\!q}\)-curve E of \(j(E) \ne 0\). The research society refused this map, because it is determined by fairly cumbersome formulas in comparison with those of the SWU encoding. This article restores justice by implicitly showing that the result of Skałba is more valuable than its refinements of Shallue, van de Woestijne, and Ulas. Nevertheless, it still remains open the existence question of an indifferentiable hash function to the ordinary curve E with the cost of one exponentiation in \({\mathbb {F}}_{\!q}\).
2 Geometric results
As mentioned above, we are only interested in \(q \equiv 1 \ (\mathrm {mod} \ 3)\), i.e., \(\omega := \root 3 \of {1} \in {\mathbb {F}}_{\!q}^*\), where \(\omega \ne 1\). Consider the two different cubic \({\mathbb {F}}_{\!q}\)-twists \(E_b^{(j)}\) (for \(j \in \{1,2\}\)) of the given curve \(E_b = E_b^{(0)}\). There is on \(E_b^{(i)} \subset {\mathbb {A}}^{\!2}_{(x_i,y_i)}\) (for \(i \in \{0,1,2\}\)) the \({\mathbb {F}}_{\!q}\)-automorphism \([\omega ](x_i,y_i) := (\omega x_i, y_i)\) of order 3. Take the quotient \(T := (E_b \!\times \! E_b^{(1)} \!\times \! E_b^{(2)})/[\omega ]^{\times 3}\) with respect to the diagonal action of \([\omega ]\). This is a Calabi–Yau threefold according to [14, Sect. 1.3]. By the way, the SWU encoding (as well as Skałba’s map) deals with another Calabi–Yau \({\mathbb {F}}_{\!q}\)-threefold.
Without loss of generality, suppose that \(\root 3 \of {b}\not \in {\mathbb {F}}_{\!q}\). In the opposite case, one can start from \(E_b^{(1)}\) or \(E_b^{(2)}\) (see details in Appendix). Under our assumption, the elliptic curves are determined by the equations \(E_b^{(i)}\!: y^2_i = b^ix_i^3 + b \simeq _{{\mathbb {F}}_{\!q}} E_{b^{2i + 1}}\). The next lemma is proved in a similar way as [5, Lemma 2.1].
Lemma 1
At least up to a birational \({\mathbb {F}}_{\!q}\)-isomorphism, T has the affine model
where \(t_j := x_j/x_0\).
We can look at T as a curve in \({\mathbb {A}}^{\!3}_{(y_0,y_1,y_2)}\) given as the intersection of two quadratic surfaces over \({\mathbb {F}}_{\!q}(t_1, t_2)\), where the latter denotes the rational function field in two variables \(t_1, t_2\) over the constant field \({\mathbb {F}}_{\!q}\). Nevertheless, below it will be more convenient to work over the subfield \(F := {\mathbb {F}}_{\!q}(s_1, s_2)\), where \(s_j := t_j^3\).
Throughout the paper we rely on some Magma calculations [13] that can be verified in the free calculator on the official site of this computer algebra system.
Lemma 2
[13] T/F is an elliptic curve having a short Weierstrass form \(W\!: y^2 = x^3 + a_4x + a_6\) with the coefficients
In particular, the discriminant and j-invariant of W equal
Theorem 1
[13] There is a point \(\psi \in W(F)\) with the coordinates
It corresponds to a point \(\varphi \in T(F)\) whose the coordinates are the irreducible fractions \(y_i(t_1,t_2) := \mathrm {num}_i/\mathrm {den}\), where
Moreover, \(\sum _{i=0}^2 y_i(t_1,t_2) + \sqrt{b} = 0\).
It is remarkable that the functions \(y_i(t,t)\) are nothing but (up to the minus sign) those from [12, Theorem 1]. Besides, the important case \(b=4\) gives
In other words, \(T/{\mathbb {F}}_{\!q}\) is an elliptic threefold whose the elliptic fibration is the projection to \(t_1, t_2\). In these terms, \(\varphi \!: {\mathbb {A}}^{\!2}_{(t_1,t_2)} \dashrightarrow T\) is an \({\mathbb {F}}_{\!q}\)-section of the given fibration. In particular, \(\mathrm {Im}(\varphi )\) is a rational \({\mathbb {F}}_{\!q}\)-surface. In turn, W is a global minimal Weierstrass form for T. These and other notions of the theory of elliptic threefolds see, e.g., in [10]. For completeness, the much simpler theory of elliptic surfaces is well represented in [17].
If the point \(\phi _0 := \big ( \sqrt{b}, \sqrt{b}, \sqrt{b}\,\big )\) is chosen as the neutral element of the Mordell–Weil group T(F), then as shown in [13] its 2-torsion subgroup \(T(F)[2] = \{ \phi _i \}_{i=0}^3\), where
The next theorem clarifies why \(\psi \) has the simplest coordinates among infinite order points from W(F).
Theorem 2
Consider F as the rational function field \(k_1(s_2)\) (resp. \(k_2(s_1))\) over the constant field \(k_1 := {\mathbb {F}}_{\!q}(s_1)\) (resp. \(k_2 := {\mathbb {F}}_{\!q}(s_2))\). Then, taking into account the lattice structure with respect to the height pairing,
Proof
Since \(T/k_j\) is obviously a rational surface, \(W/k_j\) is also so. With the help of [13] we get that the singular fibers of the Kodaira–Néron model of \(W/k_j\) have the types \(\mathrm {I}_2, \mathrm {I}_2, \mathrm {I}_2, \mathrm {I}_0^*\) in Kodaira’s notation. Consequently \(W\big ( \overline{k_1}(s_2) \big ) \simeq W\big ( \overline{k_2}(s_1) \big ) \simeq \mathrm {A}_1^{\!*} \oplus ({\mathbb {Z}}/2)^2\) according to [17, Table 8.2]. Further, [13] allows to compute the canonical height of \(\psi \), which turns out to equal 1/2. This is also the minimal norm of the lattice \(\mathrm {A}_1^{\!*}\). Thus the theorem is proved. \(\square \)
We do not claim that \(T(F)/T(F)_{\mathrm {tor}} = \langle \varphi \rangle \) with respect to \(\phi _0\) as the neutral element of T(F), because this point does not correspond to that at infinity on W/F. We chose \(\phi _0\) just to describe T(F)[2] in a more canonical way.
For the sake of compactness we put
Denote by \(\mathrm {Num}_i\) (resp. \(\mathrm {Den}\)) the homogenization of \(\mathrm {num}_i\) (resp. \(\mathrm {den}\)) with respect to a new variable \(t_0\). For \(y \in {\mathbb {F}}_{\!q}\) consider on \({\mathbb {P}}^2_{(t_0:t_1:t_2)}\) the pencil of the \({\mathbb {F}}_{\!q}\)-sextics
and the \({\mathbb {F}}_{\!q}\)-conics \(D_{i,y} := \pi (C_{i,y})\), where
Also, let \(L_i\!: t_i = 0\),
and \({\mathbf {Q}}_k := \pi ^{-\!1}(Q_k)\), where
Below we formulate a few simple lemmas, which are readily checked. By the way, the indices \(i \pm 1\) will always mean the operations ± modulo 3.
Lemma 3
The order 3 projective \({\mathbb {F}}_{\!q}\)-transformations
give the isomorphisms
as well as
It is worth noting that the curves \(D_{i,\pm \sqrt{b}}\) (and hence \(C_{i,\pm \sqrt{b}}\)) are reducible over \({\mathbb {F}}_{\!q}\). Indeed,
Lemma 4
There are the following equalities. First,
Second,
for \(y \ne \pm \sqrt{b}\). Third,
also for \(y \ne \pm \sqrt{b}\).
Lemma 5
The set of singular points
Moreover, \(R_i \in C_{i,\beta }\) is an ordinary point of multiplicity 3 and all other singularities are cusps regardless of y.
Theorem 3
For \(y \ne \pm \sqrt{b}\) the curves \(C_{i,y}\) are absolutely irreducible.
Proof
The cases \(y \in \{ \beta , \infty \}\) are immediately processed by Magma [13]. In compliance with Lemma 5 for another y the curve \(C_{i,y}\) has only 3 cusps, hence it has no more than 3 different absolutely irreducible components \(F_0, F_1, F_2\). Consider the transformations
Since they are of order 3, for any \(k, \ell , m \in \{0,1,2\}\), \(\ell \ne m\) the case , is not possible, otherwise \(F_\ell = F_m\). Also, given \(\ell \) note that for all k if and only if \(F_\ell \) is a Fermat cubic or the line \(L_m\) for some m. Consequently either \(F_0, F_1\) are Fermat cubics or \(F_0, F_1, F_2\) are conics conjugate by \(\chi _k\) for some (or, equivalently, any) k.
It is checked in [13] that the second case does not occur. In the first one, we obtain the decomposition \(D_{i,y} = \pi (F_0) \cup \pi (F_1)\) into lines. However it is easily shown that the discriminant of the conic \(D_{i,y}\) equals \(\pm 4b^6(y - \sqrt{b})(y + \sqrt{b})^2\), hence it is non-degenerate for \(y \ne \pm \sqrt{b}\). \(\square \)
Hereafter we assume that \(y \ne \pm \sqrt{b}\). Let \(\sigma _{i,y}\!: C^\prime _{i,y} \rightarrow C_{i,y}\) be the corresponding normalization morphisms. As is well known,
Further, we have the coverings \(\pi _{i,y} := \pi \circ \sigma _{i,y} \!: C^\prime _{i,y} \rightarrow D_{i,y}\) whose the Galois group is clearly isomorphic to \(({\mathbb {Z}}/3)^2\).
Theorem 4
For \(y \notin \{\beta , \infty \}\) the geometric genus \(g(C_{i,y}) = 7\). Also, \(g( C_{i, \beta }) = 4\), \(g(C_\infty ) = 1\).
Proof
Denote by \(r_y\) the number of ramified points \(Q \in D_{i,y}\). Since \(\pi _{i,y}\) is a Galois covering, the well defined ramification index \(e_Q \in \{3,9\}\) (see, e.g., [20, Corollary 3.7.2]). It is obvious that \(Q \in L_k\) for some \(k \in \{0,1,2\}\). Moreover, the case \(e_Q = 9\) may occur only for \(Q \in \{R_k\}_{k=0}^2\). From Lemmas 3, 4 it follows that
Moreover, \(R_{i-1}, R_{i+1} \notin D_{i,y}\), but \(R_i \in D_{i,y}\) if and only if \(y = \beta \). Therefore \(r_{y} = 5\) for \(y \notin \{\beta , \infty \}\), \(r_{\beta } = 4\), and \(r_{\infty } = 3\). Besides, according to Lemma 5 for all points \(Q \in D_{i,y} \cap (\cup _{k=0}^2L_k)\) we have \(e_{Q} = 3\). Applying the Riemann–Hurwitz formula [18, Theorem II.5.9] to \(\pi _{i,y}\), we eventually obtain \(g(C_{i,y}) = 3r_y - 8\). \(\square \)
3 New hash function
This paragraph clarifies how the \({\mathbb {F}}_{\!q}\)-section \(\varphi \!: {\mathbb {A}}^{\!2}_{(t_1,t_2)} \dashrightarrow T\) from Theorem 1 results in a constant-time map \(h\!: {\mathbb {F}}_{\!q}^2 \rightarrow E_b({\mathbb {F}}_{\!q})\). First of all, for \(a \in {\mathbb {F}}_{\!q}^*\) denote by \( \big ( \frac{a}{q} \big )_{\!3} := a^{(q-1)/3}\) the cubic residue symbol, which is trivially a group homomorphism \({\mathbb {F}}_{\!q}^* \rightarrow \{\omega ^i\}_{i=0}^2\).
Lemma 6
[7, Remark 2.3] An element \(a \in {\mathbb {F}}_{\!q}^*\) is a cubic residue if and only if \( \big ( \frac{a}{q} \big )_{\!3} = 1\). Moreover, in this case
To be definite, we put \(\omega := \big ( \frac{b}{q} \big )_{\!3} \) (\(\ne 1\) by our assumption). Also, let us consider only \(q \not \equiv 1 \, (\mathrm {mod} \ 27)\).
Letting \(g_i := y_i^2 - b\) for \(i \in \{0,1,2\}\), we get \(T\!: \big \{ g_j = b^j g_0 t_j^3 \) for \(j \in \{1,2\}\). It is obvious that \(\big \{\! \big ( \frac{g_i}{q} \big )_{\!3} \big \}_{\!i=0}^{\!2} = \{\omega ^i\}_{i=0}^2\) whenever \(g_i, t_j \in {\mathbb {F}}_{\!q}^*\). Besides, denote by \(n \in \{0,1,2\}\) the position number of an element \(t_1 \in {\mathbb {F}}_{\!q}^*\) in the set \(\big \{ \omega ^i t_1 \big \}_{i=0}^{2}\) ordered with respect to some order in \({\mathbb {F}}_{\!q}^*\). For example, if q is a prime, then this can be the usual numerical one.
One of crucial components of h is the auxiliary map
Unfortunately, in this form the value of \(h^\prime \) is computed with the cost of two exponentiations in \({\mathbb {F}}_{\!q}\): the first for \( \big ( \frac{g_0}{q} \big )_{\!3} \) and the second for \(\root 3 \of {g_i}\). Instead, we give an equivalent definition of \(h^\prime \) (up to the automorphisms \([\omega ]^i\)).
-
The case \(q \equiv 4 \ (\mathrm {mod} \ 9)\). Under this assumption
$$\begin{aligned} \Big ( \frac{\omega }{q} \Big )_{\!3} = \omega ^{(q-1)/3} = \omega ^{(q-4)/3} \!\cdot \!\omega = \omega ^{3(q-4)/9} \!\cdot \!\omega = \omega . \end{aligned}$$Let \(\theta := g_0^{(8q-5)/9}\) and \(c_j := \root 3 \of {(b/\omega )^j} \in {\mathbb {F}}_{\!q}^*\). We obtain
$$\begin{aligned} g_j = b^j g_0 t_j^3 = (c_j\theta t_j)^3 \qquad \mathrm {if} \qquad \theta ^3 = \omega ^j g_0, \ \mathrm {i.e.}, \ \Big ( \frac{g_0}{q} \Big )_{\!3} = \omega ^{3-j}. \end{aligned}$$It is easily shown that
$$\begin{aligned} \begin{aligned} h^\prime \!: T({\mathbb {F}}_{\!q}) \rightarrow E_b({\mathbb {F}}_{\!q})\qquad h^\prime (y_0, y_1, y_2, t_1, t_2) = {\left\{ \begin{array}{ll} \begin{array}{lll} \!\! \big ( \omega ^n \theta ,\, y_0 \big ) &{}\quad \text {if}\quad \theta ^3 = g_0, \\ \!\! \big ( c_1 \theta t_1,\, y_1 \big ) &{}\quad \text {if}\quad \theta ^3 = \omega g_0, \\ \!\! \big ( c_2 \theta t_2,\, y_2 \big ) &{}\quad \text {if}\quad \theta ^3 = \omega ^2 g_0. \end{array} \end{array}\right. } \end{aligned} \end{aligned}$$Since
$$\begin{aligned} \theta ^3 = g_0^{-(q-4)/3} = g_0^{q-1 - (q-4)/3} = g_0^{(2q+1)/3} = g_0^{2(q-1)/3} \!\cdot \!g_0, \end{aligned}$$this map is well defined everywhere on \(T({\mathbb {F}}_{\!q})\). It is worth noting that \(\theta \) can be computed with the cost of one exponentiation in \({\mathbb {F}}_{\!q}\) even if \(g_0\) is given as a fraction u/v for \(u \in {\mathbb {F}}_{\!q}\), \(v \in {\mathbb {F}}_{\!q}^*\). Indeed,
$$\begin{aligned} \theta = (u/v)^{(8q-5)/9} = u^{(8q-5)/9} \!\cdot \!v^{(q-4)/9} = u^3 (u^8v)^{(q-4)/9}. \end{aligned}$$(2) -
The case \(q \equiv 10 \ (\mathrm {mod} \ 27)\) (relevant for BLS12-381). Take any \(\zeta := \root 9 \of {1} \in {\mathbb {F}}_{\!q}^*\) such that \(\zeta ^3 = \omega \). In this case
$$\begin{aligned} \Big ( \frac{\zeta }{q} \Big )_{\!3} = \zeta ^{(q-1)/3} = \omega ^{(q-1)/9} = \omega ^{(q-10)/9} \!\cdot \!\omega = \omega ^{3(q-10)/27} \!\cdot \!\omega = \omega . \end{aligned}$$Let \(\theta := g_0^{(2q+7)/27}\) and \(c_j := \root 3 \of {(b/\zeta )^j} \in {\mathbb {F}}_{\!q}^*\). Given \(i \in \{0,1,2\}\) we obtain
$$\begin{aligned} g_j = b^j g_0 t_j^3 = (c_j\theta t_j)^3/\omega ^i \qquad \mathrm {if} \qquad \theta ^3 = \omega ^i \zeta ^j g_0, \ \mathrm {i.e.}, \ \Big ( \frac{g_0}{q} \Big )_{\!3} = \omega ^{3-j}. \end{aligned}$$It is easily shown that
$$\begin{aligned} \begin{aligned} h^\prime \!: T({\mathbb {F}}_{\!q}) \rightarrow E_b({\mathbb {F}}_{\!q}) \qquad h^\prime (y_0, y_1, y_2, t_1, t_2) = {\left\{ \begin{array}{ll} \begin{array}{lll} \!\! \big ( \omega ^n \theta / \zeta ^i,\, y_0 \big ) &{}\quad \text {if}\quad \exists i\!: \theta ^3 = \omega ^i g_0, \\ \!\! \big ( c_1 \theta t_1 / \zeta ^i,\, y_1 \big ) &{}\quad \text {if}\quad \exists i\!: \theta ^3 = \omega ^i \zeta g_0, \\ \!\! \big ( c_2 \theta t_2 / \zeta ^i,\, y_2 \big ) &{}\quad \text {if}\quad \exists i\!: \theta ^3 = \omega ^i \zeta ^2 g_0. \end{array} \end{array}\right. } \end{aligned} \end{aligned}$$Since
$$\begin{aligned} \theta ^3 = g_0^{(2q+7)/9} = g_0^{2(q-1)/9} \!\cdot \!g_0, \end{aligned}$$this map is well defined everywhere on \(T({\mathbb {F}}_{\!q})\). It is worth noting that \(\theta \) can be computed with the cost of one exponentiation in \({\mathbb {F}}_{\!q}\) even if \(g_0\) is given as a fraction u/v for \(u \in {\mathbb {F}}_{\!q}\), \(v \in {\mathbb {F}}_{\!q}^*\). Indeed,
$$\begin{aligned} \begin{aligned} \theta&= (u/v)^{(2q+7)/27} = u^{(2q+7)/27} \!\cdot \!v^{q-1 - (2q+7)/27} = u^{(2q+7)/27} \!\cdot \!v^{(25q - 34)/27} = \\&= u \!\cdot \!u^{2(q-10)/27} \!\cdot \!v^3 v^{5(5q - 23)/27} = uv^8 (u^2 v^{25})^{(q - 10)/27}. \end{aligned} \end{aligned}$$(3)
The cases \(q \equiv 7 \ (\mathrm {mod} \ 9)\) and \(q \equiv 19 \ (\mathrm {mod} \ 27)\) are processed in a similar way. To be definite, throughout the rest of the article we will deal with the modified version of \(h^\prime \). Finally, we come to the map desired
We emphasize that in the definition of \(h^\prime \) (a fortiori, in \(\varphi \)) the cubic residue symbol does not appear. Further, by returning the value of h in (weighted) projective coordinates, we entirely avoid inversions in the field. Besides, the constants \(\omega \), \(c_j\) (and \(\zeta \), \(\zeta ^{-\!1} = \zeta ^8\) if \(q \equiv 10 \ (\mathrm {mod} \ 27)\)) are found once at the precomputation stage. By the way, in the formulas (2), (3) we take \(u := \mathrm {num}_0^2 - b\!\cdot \!\mathrm {den}^2\) and \(v := \mathrm {den}^2\). Calculating the value \(\theta \) every time no matter whether \(t_0t_1uv = 0\) or not, we eventually obtain
Remark 1
When \(q \not \equiv 1 \, (\mathrm {mod} \ 27)\), the map h is computed in constant time, namely in that of one exponentiation in \({\mathbb {F}}_{\!q}\).
4 Indifferentiability from a random oracle
Theorem 5
For any point \(P \in E_b({\mathbb {F}}_{\!q}) \setminus \{\pm P_0, \mathcal {O}\}\) we have
Proof
All the inequalities follow from the Hasse–Weil–Serre bound [20, Theorem 5.3.1] for the number of \({\mathbb {F}}_{\!q}\)-points on a projective non-singular absolutely irreducible \({\mathbb {F}}_{\!q}\)-curve.
First, suppose that \(h(t_1, t_2) = \pm P_0\). Then \(t_1t_2 = 0\) or \(\theta = g_0 = 0\). In the first case, \(h(0, t_2) = h(t_1, 0) = P_0\). In the second one, \((1:t_1:t_2) \in C_{0,\pm \sqrt{b}}\). These curves decompose as \(C_{0,\sqrt{b}} = L_0 \cup F_0\) and \(C_{0,-\sqrt{b}} = F_1 \cup F_2\), where \(F_k\) are Fermat cubics (cf. the equations (1)). The latter are obviously elliptic curves (of j-invariant 0). In accordance with Lemma 4 we have \((C_{0,\pm \sqrt{b}} \cap C_\infty )({\mathbb {F}}_{\!q}) = \emptyset \). Note also that \((F_1 \cap F_2)({\mathbb {F}}_{\!q}) = (L_i \cap F_k)({\mathbb {F}}_{\!q}) = \emptyset \) for all \(i,k \in \{0,1,2\}\).
In turn, \((C_\infty \cap L_k)({\mathbb {F}}_{\!q}) = \emptyset \) according to Lemma 4, hence \(h^{-\!1}(\mathcal {O}) = C_\infty ({\mathbb {F}}_{\!q})\). Besides, \(\mathrm {Sing}(C_\infty )({\mathbb {F}}_{\!q}) = \emptyset \) (see Lemma 5). As a result, we obtain the bijection . Finally, the geometric genus \(g(C_\infty ) = 1\) by virtue of Theorem 4.
Now take \(P = (x,y) \in E_b({\mathbb {F}}_{\!q}) \setminus \{\pm P_0, \mathcal {O}\}\). The case \(y = \beta \) does not occur, because \(\beta ^2 - b = 8b\) is not a cubic residue in \({\mathbb {F}}_{\!q}\). In compliance with Lemmas 3, 4 we see that
for all \(i,k \in \{0,1,2\}\). Besides, the x-coordinates of \(h(t_1, t_2)\) and \(h(\omega t_1, t_2)\) (resp. \(h(t_1, \omega t_2)\)) are always different if \(i \in \{0,1\}\) (resp. \(i = 2\)), because \(\theta (t_1, t_2) = \theta (\omega t_1, t_2) = \theta (t_1, \omega t_2)\). Therefore
Since \(\# h^{-\!1}\big ( [\omega ]^i(P) \big ) = \# h^{-\!1}\big ( [\omega ]^{i+1}(P) \big )\), we obtain
Consequently,
Further, \(\#C_{i,y}({\mathbb {F}}_{\!q}) = \#C_{i+1,y}({\mathbb {F}}_{\!q})\) according to Lemma 3. Thus
and hence
At the same time, Theorem 4 says that \(g(C_{i,y}) = 7\). Besides, \(\mathrm {Sing}(C_{i,y})({\mathbb {F}}_{\!q}) = \emptyset \) (see Lemma 5). As a result, . We eventually obtain
The theorem is proved. \(\square \)
Corollary 1
The map \(h\!: {\mathbb {F}}_{\!q}^2 \rightarrow E_b({\mathbb {F}}_{\!q})\) is surjective at least for \(q \geqslant 211\).
Corollary 2
The distribution on \(E_b({\mathbb {F}}_{\!q})\) defined by h is \(\epsilon \)-statistically indistinguishable from the uniform one [4, Definition 3], where \(\epsilon := 16q^{-1/2} + O(q^{-1})\).
Proof
For any point \(P \in E_b({\mathbb {F}}_{\!q})\) put
If \(P \not \in \{\pm P_0, \mathcal {O}\}\) from Theorem 5 we obtain
Similarly,
Thus
The corollary is proved. \(\square \)
For \(t_2 \in {\mathbb {F}}_{\!q}\) consider the encoding \(h_{t_2}\!: {\mathbb {F}}_{\!q} \rightarrow E_b({\mathbb {F}}_{\!q})\) of the form \(h_{t_2}(t_1) := h(t_1,t_2)\). By definition, \(h_0(t_1) = P_0\) for any \(t_1 \in {\mathbb {F}}_{\!q}\). Nevertheless, by analogy with [12, Theorem 2] we can prove the next lemma. Its main difference is that \(h_{t_2}(t_1) = h_{t_2}(\omega t_1)\) whenever \(\root 3 \of {g_2} \in {\mathbb {F}}_{\!q}\), hence 10 appears instead of 6.
Lemma 7
For \(t_2 \in {\mathbb {F}}_{\!q}^*\) and \(P \in E_b({\mathbb {F}}_{\!q})\) we have \(\#h_{t_2}^{-\!1}(P) \leqslant 10\) and hence \(q/10 \leqslant \#\mathrm {Im}(h_{t_2})\).
By this lemma [4, Algorithm 1] still works well in the case of h. Indeed, for \(P \in E_b({\mathbb {F}}_{\!q})\) pick uniformly at random \(t_2 \in {\mathbb {F}}_{\!q}\) and then find uniformly at random \(t_1 \in h_{t_2}^{-\!1}(P)\). For instance, when \(P \not \in \{\pm P_0, \mathcal {O}\}\), the latter consists in computing a non-zero \({\mathbb {F}}_{\!q}\)-root (if any) of the polynomial \(C_{i, y} \in {\mathbb {F}}_{\!q}[t_1]\) of degree 6 for i chosen randomly. The shape of \(C_{i, y}\) allows to do this with the help of successive extraction of the square and cubic roots. We eventually obtain
Remark 2
The map h is samplable [4, Definition 4].
Remarks 1, 2 and Corollary 2 imply that h is admissible in the sense of [4, Definition 4]. Finally, using [4, Theorem 1], we establish
Corollary 3
Consider the composition \(H := h \circ {\mathfrak {h}} \!: \{0,1\}^* \rightarrow E_b({\mathbb {F}}_{\!q})\) of a hash function \({\mathfrak {h}}\!: \{0,1\}^* \rightarrow {\mathbb {F}}_{\!q}^2\) and h. The hash function H is indifferentiable from a random oracle if \({\mathfrak {h}}\) is so.
References
Bernstein D.J., Hamburg M., Krasnova A., Lange T.: Elligator: elliptic-curve points indistinguishable from uniform random strings. In: ACM SIGSAC Conference on Computer & Communications Security, pp. 967–980 (2013).
Boneh D., Gentry C., Lynn B., Shacham H.: Aggregate and verifiably encrypted signatures from bilinear maps. In: Biham E (ed.) Advances in Cryptology—EUROCRYPT 2003, LNCS, 2656, pp. 416–432. Springer, Berlin (2003).
Boneh D. et al.: BLS signatures, https://datatracker.ietf.org/doc/draft-irtf-cfrg-bls-signature (2020).
Brier E., et al.: Efficient indifferentiable hashing into ordinary elliptic curves. In: Rabin T. (ed) Advances in Cryptology—CRYPTO 2010, LNCS, 6223, pp. 237–254. Springer, Berlin (2010).
Catanese F., Oguiso K., Verra A.: On the unirationality of higher dimensional Ueno-type manifolds. Revue Roumaine de Mathématiques Pures et Appliquées 60(3), 337–353 (2015).
Cho G.H., Koo N., Ha E., Kwon S.: New cube root algorithm based on the third order linear recurrence relations in finite fields. Des. Codes Cryptogr. 75(3), 483–495 (2015).
Dudeanu A., Oancea G.-R., Iftene S.: An x-coordinate point compression method for elliptic curves over Fp. In: 12th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, pp. 65–71 (2010).
El Mrabet N., Joye M.: Guide to Pairing-Based Cryptography. Cryptography and Network Security Series. Chapman and Hall/CRC, New York (2017).
Faz-Hernandez A. et al.: Hashing to elliptic curves, https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/ (2021).
Hulek K., Kloosterman R.: Calculating the Mordell-Weil rank of elliptic threefolds and the cohomology of singular hypersurfaces. Ann. l’Institut Fourier 61(3), 1133–1179 (2011).
Icart T.: How to hash into elliptic curves. In: Halevi S. (ed.) Advances in Cryptology—CRYPTO 2009, LNCS, 5677, pp. 303–316. Springer, Berlin (2009).
Koshelev D.: Efficient indifferentiable hashing to elliptic curves \(y^2 = x^3 + b\) provided that \(b\) is a quadratic residue. ePrint IACR (2020/1070).
Koshelev D.: Magma code, https://github.com/dishport/Indifferentiable-hashing-to-ordinary-elliptic-curves-of-j-0-with-the-cost-of-one-exponentiation (2021).
Oguiso K., Truong T.T.: Explicit examples of rational and Calabi-Yau threefolds with primitive automorphisms of positive entropy. J. Math. Sci. Univ. Tokyo 22, 361–385 (2015).
Sakemi Y., Kobayashi T., Saito T., Wahby R. S.: Pairing-friendly curves, https://datatracker.ietf.org/doc/draft-irtf-cfrg-pairing-friendly-curves (2021).
Sarkar P.: Computing square roots faster than the Tonelli–Shanks/Bernstein algorithm. ePrint IACR (2020/1407).
Schütt M., Shioda T.: Mordell-Weil Lattices, A Series of Modern Surveys in Mathematics, vol. 70. Springer, Singapore (2019).
Silverman J.: The Arithmetic of Elliptic Curves, Graduate Texts in Mathematics, vol. 106. Springer, New York (2009).
Skalba M.: Points on elliptic curves over finite fields. Acta Arithmetica 117(3), 293–301 (2005).
Stichtenoth H.: Algebraic Function Fields and Codes, Graduate Texts in Mathematics, vol. 254. Springer, Berlin (2009).
Vlasov A.: EIP-2539: BLS12-377 curve operations https://eips.ethereum.org/EIPS/eip-2539 (2020).
Wahby R.S., Boneh D.: Fast and simple constant-time hashing to the BLS12-381 elliptic curve. IACR Trans. Cryptogr. Hardw. Embed. Syst. 4, 154–179 (2019).
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by A. Enge.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix (the case \(\root 6 \of {b} \in {\mathbb {F}}_{\!q}^*\))
Appendix (the case \(\root 6 \of {b} \in {\mathbb {F}}_{\!q}^*\))
In this case, without lost of generality, we can clearly suppose that \(b = 1\). By abuse of notation, let us continue to denote by b an element such that \(\sqrt{b} \in {\mathbb {F}}_{\!q}\), but \(\root 3 \of {b} \not \in {\mathbb {F}}_{\!q}\). Obviously, it always exists. Therefore the cubic \({\mathbb {F}}_{\!q}\)-twists of the curve \(E_1\) (including the trivial one) are determined by the equations \(E_1^{(i)}\!: y^2_i = b^ix_i^3 + 1 \simeq _{{\mathbb {F}}_{\!q}} E_{b^{2i}}\) and hence the Calabi–Yau threefold T (now denoted by \(T^\prime \)) has the affine model
where \(t_j := x_j/x_0\).
Looking at T from Lemma 1 and at \(T^\prime \) as the corresponding elliptic \({\mathbb {F}}_{\!q}(t_1, t_2)\)-curves, we obtain the isomorphism
Consequently, \(\varphi := \chi (\varphi )\) is an \({\mathbb {F}}_{\!q}(t_1, t_2)\)-point on \(T^\prime \) (for the old \(\varphi \) from Theorem 1) and the map \(h\!: {\mathbb {F}}_{\!q}^2 \rightarrow E_1({\mathbb {F}}_{\!q})\) is defined in the same way as in Sect. 3. It is worth emphasizing that all results of the paper remain true modulo minor modifications. For example, the case \(y = \beta = -3\) occurs in proving the analogue of Theorem 5, that is the estimate of \(\#h^{-\!1}(\omega ^i 2, -3)\) should be slightly different from that of \(\#h^{-\!1}(P)\) for a general point \(P \in E_1({\mathbb {F}}_{\!q})\). Nevertheless, the admissibility property of h is still fulfilled.
The content of this appendix is relevant for the curve BLS12-377 [21] popular in some blockchains. It is defined over the field \({\mathbb {F}}_{\!q}\) such that
where \(2 \not \mid n \in {\mathbb {N}}\). Although Elligator 2 and the Wahby–Boneh encoding are formally applicable to this curve, (in contrast to the new map h) they are not implemented by means of one exponentiation in \({\mathbb {F}}_{\!q}\), because \(q \equiv 1 \ (\mathrm {mod} \ 8)\). Instead, one can utilize the constant-time version [9, Appendix I.4] of the Tonelli–Shanks algorithm (cf. [16]) for extracting a square root in \({\mathbb {F}}_{\!q}\), but it is more costly than an exponentiation.
Rights and permissions
About this article
Cite this article
Koshelev, D. Indifferentiable hashing to ordinary elliptic \({\mathbb {F}}_{\!q}\)-curves of \(j=0\) with the cost of one exponentiation in \({\mathbb {F}}_{\!q}\). Des. Codes Cryptogr. 90, 801–812 (2022). https://doi.org/10.1007/s10623-022-01012-8
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10623-022-01012-8
Keywords
- Cubic residue symbol and cubic roots
- Hashing to ordinary elliptic curves of j-invariant 0
- Indifferentiability from a random oracle
- Pairing-based cryptography