In this section, we present our main results which focuses on the problem of parallelizing Vélu’s formulas for isogeny computations.
An immediate observation is that the two resultants that appear in each of Algorithm 2 and Algorithm 3, which represent the heaviest part of the computation, are completely independent of each other. Therefore, there is a simple way to parallelize the two algorithms in a 2-core implementation by assigning one resultant to each core. We show that these algorithms exhibit a good degree of parallelizability even beyond two cores, by assigning more than one core per resultant. However, doing so requires a new indexing system that allows for a clear separation of the computation between cores, which we introduce in the first subsection.
Additionally, other parts of the algorithms are also apt for parallelization, such as the computation of and where a partial product can be assigned to each core, or the computation of product trees where a subtree can be assigned to each core after a small bit of sequential work. We show also that the computation of point multiples in KPS can be parallelized with our new index system.
After detailing the new index system, provide explicit new algorithms for the square-root Vélu formulas which can be computed by assuming the availability of n-cores, where is a power of two.
3.1. Construction of a New Index System
The main observation that allows us to parallelize the computation of resultants beyond two cores is that they exhibit a multiplicative property. More precisely, if
I can be written as the disjoint union
then
so we can assign one subset
to each of the cores, have them compute one subresultant each, and then multiply them all together. Doing so will require us to modify the sizes of
I and
J: since each resultant computation should have balanced sizes, we now require
. Accordingly, we now need
and
. We will design such an indexing system according to the following lemma.
Lemma 3.
Let be a power of two, ℓ be an odd positive integer and consider the set . If and , then is an index system for S, where
Moreover, if and only if
Proof of Lemma . Suppose that
where
,
and
and
(
t and
can be equal). Then,
so
but this is impossible since
and thus
. Therefore, the map
defined by
is injective. Similarly, the map
is injective and therefore, both have disjoint images.
On the other hand, the sets
and
are both contained in
S. It is clear that the elements in these sets are odd integers. Since for all
,
and
we have the following:
Similarly,
for all
,
and
since the minimum of
I is
when
and the maximum of
J is
when
. □
Note that we have chosen to partition
I into only
subsets because, when
n cores are available, we assign
cores to each of the two resultants. However, when computing point multiples during
KPS we do have all
n cores available for working on the
subsets. Therefore, it will be convenient to further divide each
into two subsets to obtain a total of
n half-sized subsets. Note that some subsets will have fewer elements than others because
need not be a multiple of
n. In practice, this is problematic because it is crucial for each core to perform exactly analogous tasks to guarantee performance. In order to achieve a balanced computation, we will add additional elements to the subsets that are lacking, ensuring that each subset contains the same number of elements, while ignoring redundant multiples in future steps. This idea is inspired by [
22] and the parallelization technique proposed by Costello in [
32] to compute the set
. We provide an example to illustrate this approach.
Example 1. Let and . From the Lemma 3 we get
So and . Instead of this, we can consider the following sets:
So , , and .
We will now demonstrate that the partitioning of the set I, without taking into account the additional elements added to ensure equal-sized subsets, still forms an index system.
Proposition 1.
Let us assume the same conditions of the Lemma 3. Let . If
then In particular, () is an index system for S.
Proof of Proposition 1. If is an even integer, it is clear that , for all and thus . Note that and considering that and I have the same cardinality, we conclude that they are equal. If is an odd integer, all we have that . When , dropping the last element in each , we have . Note that the cardinality of is and the cardinality of is . □
Similarly, we consider a partition of
into
n sets
with
elements,
However, when is not divisible by n, we will add one additional element to each set , ensuring that each subset contains the same number of elements.
The additional elements that were added to balance the size of the sets are not taken into account when calculating the corresponding products for each set.
3.2. Parallelized Algorithms
We now describe the construction of parallelized versions of algorithms KPS, xISOG, and xEVAL assuming that n cores are available, which we refer to as KPS-Parallel, xISOG-Parallel, and xEVAL-Parallel.
The
KPS-Parallel algorithm, presented as Algorithm 4, is based on the new index system from Proposition 1: instead of computing the sets
and
as in the original algorithm,
KPS-Parallel computes the sets
and
, as well as the polynomial product tree for
, by assigning one core to each value of
. Note that the computation of the resultants requires a reciprocal tree for each of the
, so the polynomials
are multiplied pair-wise to obtain the polynomials
. We then compute the residue trees, which are built from the root down: the root is computed for each tree using
cores, and then the two subtrees of each tree are computed in parallel, using two cores per tree, for a total of
n cores. Note that although the computations for the root of the product and reciprocal trees, corresponding to lines 11 and 12 of 4, should only be ran with
cores, we instead have all cores running with half of them repeating the work over dummy arrays
for
. These computations are of course redundant, but ensure that the workload is balanced.
|
Algorithm 4 KPS-Parallel
|
 |
For the algorithms
xISOG-Parallel and
xEVAL-Parallel, the set
J is partitioned into
n subsets
, and each core computes the polynomial product tree corresponding to one subset. The roots of the
n trees are then multiplied together sequentially to obtain the full polynomial
. Next, each core computes one of the subresultants
using the reciprocal trees from
KPS-Parallel, and the subresultants are multiplied sequentially at the end to obtain the two principal resultants. As for the computations related to
, it is also split into subsets
so that each core can compute a subproduct of
, and the subproducts are multiplied together at the end.
|
Algorithm 5 xISOG-Parallel
|
 |
In the next subsection, we present a detailed analysis that estimates the cost of computing the image curve of an isogeny and the evaluation of a point using the procedures
KPS-Parallel+
xISOG-Parallel+
xEVAL-Parallel.
|
Algorithm 6 xEVAL-Parallel
|
 |
3.3. Cost Analysis of the Parallel Square-Root Vélu
In this section, we will provide an estimation of the cost that is expected when performing the
KPS-Parallel,
xISOG-Parallel, and
xEVAL-Parallel procedures, which is analogous to the one presented in sub
Section 2.3 for the sequential algorithms. Recall that for our new index system from sub
Section 3.1 we have
, where
ℓ is the degree of the isogeny and
n represents the number of cores available, while each of the
subsets has a size of
for a total size of
. It follows that
As before, we will ignore rounding errors and assume that
takes the middle value of this range (neglecting the second term), so that
,
, and
for
.
Proposition 2.
The cost of computing the parallel AlgorithmKPS-Parallelwith n cores is
field multiplications.
Proof of Proposition 2. In order to find all the point multiples in
K, we first compute the first
n multiples sequentially and then core
t start from the
t-th multiple and take steps of size
n. This leads to wall-clock time of
point operations, which involve 6 field multiplications each. A similar approach is taken for computing all the multiples in the
sets, while the ones in
are computed sequentially as this is the smallest of the sets. A product tree is constructed for each of the
in parallel, and line 11 involves multiplying two polynomials of degree
b/2. As for the reciprocal trees, we incur the cost of the root node and then just half of the remainder cost since there is one core working on each subtree, so its cost is (
Reciprocal(
b) +
ReciprocalTree(
b))/2, where
Reciprocal(
b) =
blog2(3) +
b + 2log
2(
b) − 2 is the cost of the root node alone. The total cost is then
and the proposition follows after considering the cost functions in the
Appendix A.
□
We now focus on Algorithm 5:xISOG-Parallel which computes the coefficient of the image curve, and on Algorithm 6:xEVAL-Parallel which computes the isogeny evaluation at a specific point.
Proposition 3.
The cost of computing the parallel AlgorithmxISOG-Parallelwith n cores is
field multiplications.
Proof of Proposition 3. We begin by considering the cost of computing the polynomials and in Algorithm 5, where comes from KPS-Parallel. We partition into the subsets of size each, and compute one sub-product tree per subset concurrently. The cost of computing the factors of each subset is given by field multiplications, then a product tree is computed for quadratic polynomials on each core, and the tree roots are multiplied together sequentially to obtain the complete polynomial . This last step involves multiplying together n polynomials of degree each, which we denote as . An identical procedure is used to compute as well.
Using the residue trees from KPS-Parallel, each core then compute a subresultant using a residue tree of size , and the subresultants are multiplied sequentially at a cost of multiplications per resultant.
For each of the , each core computes a subproduct of size b at a cost of multiplications, and then combining the subproducts takes another multiplications.
Finally, we use two cores to compute the ℓ-th power exponentiation in Algorithm for the numerator and denominator concurrently at a cost of about , and the last few products take 10 more multiplications.
The total cost is then
and the proposition follows after considering the cost functions in the
Appendix A. □
Proposition 4.
The cost of computing the parallel AlgorithmxEVAL-Parallelwith n cores is
field multiplications.
Proof. The proof of the current proposition follows a similar structure to the previous proposition, with the main distinction lying in the polynomials
and
. As before, the factors of
can be computed with a cost of
, and only one product tree is needed since
is obtained at no additional cost. For each of
and
, each core is still working with a subset of size
b, but now there is a cost of
b scalar multiplications for computing the factors in a subset,
for the subproduct of each subset, and
for combining the subproducts. There is no exponentiation in this case, and the final steps require only 6 additional multiplications. The total cost is then
and the proposition follows after considering the cost functions in the Appendix. □
The next theorem summarizes our cost analyzis, and follows immediately from the previous propositions.
Theorem 1.
The expected total cost of the algorithmsKPS-Parallel,xISOG-Paralleland twicexEVAL-Parallelexpressed in field multiplications, assuming that two points need to be pushed through the isogeny, is given by
Remark 3. While it may be tempting to compare (6) directly to (5), a direct comparison would be incorrect since the definitions of b (the size of the set J) are different in each case. The fair comparison would be in terms of ℓ, where (5) has , whereas (6) has .