The present invention relates to a scalar multiplication system, a scalar multiplication device, a scalar multiplication method, and a program.
In an encryption scheme using elliptic curve cryptography or pairing-based cryptography, the computational cost of scalar multiplication/multi-scalar multiplication on an elliptic curve is dominant. For this reason, various methods for efficiently executing scalar multiplication/multi-scalar multiplication have been proposed.
The methods for efficiently executing scalar multiplication/multi-scalar multiplication can be roughly divided into a method using a pre-computation table and a method not using a pre-computation table. A method using a pre-computation table is called scalar multiplication/multi-scalar multiplication with precomputation (or scalar multiplication/multi-scalar multiplication with online precomputation), and a w-NAF method, a window method, a sliding window method, and the like are known. In addition, a method for executing pre-computation processing in scalar multiplication with precomputation using the Co—Z method is also known (Non-Patent Literature 1). Note that the Co—Z method is a method for efficiently computing elliptic curve point addition in Jacobian coordinates.
However, in the conventional scalar multiplication/multi-scalar multiplication with precomputation using the Co—Z method, for example, it is necessary to perform elliptic curve point addition in Jacobian coordinates without using the Co—Z method in part of the processing, or it is necessary to convert the Jacobian coordinates to the affine coordinates. For this reason, some of the elliptic curve point additions become inefficient, or an extra computational cost is incurred for conversion of the coordinates.
An embodiment of the present invention has been made in view of the above points, and an object thereof is to efficiently execute scalar multiplication/multi-scalar multiplication with precomputation.
In order to achieve the above object, a scalar multiplication device according to an embodiment is a scalar multiplication system that computes a scalar multiplication for a point on an elliptic curve, the scalar multiplication system including: a pre-computation unit that computes a pre-computation table T including d points eiP having the same Z coordinate in Jacobian coordinates using elliptic curve point addition or elliptic curve point doubling according to a Co—Z method for a point P on the elliptic curve and d integers ei(i∈[1, d]); a conversion unit that converts a scalar value k into a scalar value k′ expressed as k′=k0′20+k1′21+ . . . +kn−1′2n−1 (ki′∈{0, ±ei, . . . , ±ed}); and an evaluation unit that uses the pre-computation table T and the scalar value k′ to compute a scalar multiplication k′P using the elliptic curve point addition according to the Co—Z method.
The scalar multiplication/multi-scalar multiplication with precomputation can be executed efficiently.
Hereinafter, one embodiment of the present invention will be described. In the present embodiment, a scalar multiplication device 10 capable of efficiently executing scalar multiplication/multi-scalar multiplication with precomputation using the Co—Z method will be described. Note that the scalar multiplication device 10 according to the present embodiment can be implemented by various devices such as a general-purpose server, a personal computer (PC), a smartphone, a tablet terminal, an embedded device, and a wearable device, for example.
<Preparation>
First, several terms, concepts, and the like will be prepared.
For a prime number p and a positive integer c, a finite field is Fq where q=pc. Note that, although F would be written in an outline letter (blackboard bold) to be accurate, it is written as “F” in the text of the specification.
For an elliptic curve E defined on the finite field Fq, a set of Fq-rational points on the elliptic curve is defined as follows:
E(Fq)={(x,y)∈E|x,y∈Fq}∪O
where O is an infinite point.
At this time, it is known that E(Fq) forms an additive group. That is, in E(Fq), the elliptic curve point addition R=P+Q (where P≠±Q) and the elliptic curve point doubling R=2P can be computed for any P, Q∈E(Fq). Furthermore, the infinite point O is the zero element of the additive group, and P+O=P is satisfied for any point P∈E(Fq). Hereinafter, the elliptic curve point addition and the elliptic curve point doubling are also referred to as point addition and point doubling, respectively.
<<Coordinates>>
Affine coordinates are coordinates in which a point P∈E(Fq) on an elliptic curve is expressed as P=(x, y) (x, y∈Fq). On the other hand, Jacobian coordinates are coordinates in which a point P∈E(Fq) on an elliptic curve is expressed as P=(X, Y, Z) (X, Y, Z∈Fq). The point P=(X, Y, Z) (where Z≠0) in the Jacobian coordinates can be converted into a point in the affine coordinates by computation of (X/Z2, Y/Z3)=(x, y). Hereinafter, the X coordinate, the Y coordinate, and the Z coordinate of an arbitrary point P∈E(Fq) on the elliptic curve in the Jacobian coordinates are expressed as PX, PY, and PZ, respectively.
<<Co-Z Method>>
Let the expressions of points P, Q∈E(FQ) on the elliptic curve in the Jacobian coordinates be P=(PX, PY, PZ), Q=(QX, QY, QZ). At this time, the Co—Z method is a method capable of efficiently computing the elliptic curve point addition P+Q if PZ=QZ.
By using the Co—Z method, the following elliptic curve point addition can be efficiently computed in the Jacobian coordinates.
(R,P′,t)←P+Q
where the point R is an addition result of P+Q, the point P′ is a point equivalent to P and satisfying P′z=RZ (that is, the Z coordinate of P′ is the same as that of R), and t is an auxiliary output satisfying RZ=tPZ.
Similarly, by using the Co—Z method, the following elliptic curve point doubling can be efficiently computed in the Jacobian coordinates.
(R,P′,t)←2P
where the point R is a result of 2P, the point P′ is a point equivalent to P and satisfying P′Z=RZ, and t is an auxiliary output satisfying RZ=tPZ.
Note that for details of the Co—Z method, refer to, for example, Non-Patent Literature 1, Reference Literature 1 “N. Meloni, “New Point Addition Formulae for ECC Applications,” WAIFI 2007, LNCS 4547, pp. 189-201, 2007”, and the like.
<<Scalar Multiplication/Multi-Scalar Multiplication>>
Scalar multiplication on the elliptic curve is a computation that obtains, for a point P∈E(Fq) on the elliptic curve and an integer k of 0 or greater, kP expressed as follow:
Multi-scalar multiplication is an extension of the scalar multiplication, and is a computation that obtains, for m points P0, . . . , and Pm−1 on the elliptic curve and m integers k0, . . . , km−1 of 0 or greater, the following.
Each scalar value ki is an n-bit binary number expressed as follow:
At this time, a binary method is known as an algorithm of the most basic multi-scalar multiplication. This algorithm is a method that does not use a pre-computation table.
<<Scalar Multiplication/Multi-Scalar Multiplication with Precomputation>>
Hereinafter, in order to simplify the description, scalar multiplication with precomputation will be described. As described above, since multi-scalar multiplication is an extension of scalar multiplication, the following description can be easily extended to multi-scalar multiplication.
In the scalar multiplication with precomputation, a result kP of the scalar multiplication is computed by the following three processes for a point P∈E(Fq) and a scalar value k.
Pre-computation processing: For a point P∈E(Fq) and d integers ei, . . . , ed, points eiP (i∈[1, d]) are computed, to set a pre-computation table T={eiP, . . . , edP}.
Scalar value conversion processing: A scalar value k is converted into a scalar value k′ expressed as k0′20+k1′21+ . . . +kn−1′2n−1. Here, ki′∈{0, ±e1, . . . , ±ed}.
That is, in the scalar value conversion processing, in a case where 2 is a base, a mantissa corresponding to 2i (where i∈[0, n−1]) is ki′, and k is expressed as (kn−1′, . . . , k0′) in a numerical notation, each digit is converted into a value k′ of 0 or ±ei (i∈[1, d]).
Evaluation processing: k′P is computed by elliptic curve point addition and elliptic curve point doubling using the pre-computation table T and the scalar value k′.
A w-NAF method is known as one of methods for executing scalar multiplication with precomputation at a high speed.
In the pre-computation processing, P[i]←P and A←2P are initialized for i=1 (line 1), and then P[2i+1]←A+P[2i−1] is set while increasing i by 1 from i=1 to i=2w−2−1 (lines 2 to 4). Accordingly, the pre-computation table T={P[1], P[3], . . . , P[2w−1−1]}={P, 3P, . . . , (2w−1−1)P} is obtained.
In the scalar value conversion processing, the scalar value k is converted into k′=k0′20+k1′21+ . . . +kn−1′2n−1 (where ki′∈{0, ±1, ±3, . . . , ±(2w−1−1)}) (line 5).
In the evaluation processing, after initialization of R←O (line 6), the procedures of lines 8 to 15 are repeated while decreasing i by 1 from i=n−1 to i=0 (line 7). In the procedures of lines 8 to 15, after setting R←2R (line 8), if ki′≠0 and ki′>0, then R is updated by R←R+P[ki′] (line 11), if ki′≠0 and ki′≤0, then R is updated by R←R−P[−ki′] (line 13), and in other cases, nothing is performed.
<Scalar Multiplication/Multi-Scalar Multiplication with Precomputation According to Present Embodiment>
Next, scalar multiplication/multi-scalar multiplication with precomputation according to the present embodiment will be described. Hereinafter, in order to simplify the description, the scalar multiplication with precomputation according to the present embodiment will be mainly described. As described above, since multi-scalar multiplication is an extension of scalar multiplication, the following description can be easily extended to multi-scalar multiplication.
In the scalar multiplication according to the present embodiment, the elliptic curve point addition and the elliptic curve point doubling according to the Co—Z method are used to create the pre-computation table T in which the Z coordinates of all the points e1P, . . . , edP computed in the pre-computation processing have the same value. This makes it possible to efficiently compute elliptic curve point addition according to the Co—Z method even in the evaluation processing. The scalar value conversion processing is similar to the conventional scalar multiplication with precomputation (for example, a conventional w-NAF method, sliding window method, or the like).
<<Pre-Computation Processing>>
A point P∈E(Fq) and d points computed by the pre-computation processing is set as {P(=e1P), e2P, . . . , edP}. Further, it is assumed that eiP can be computed as follows with ‘a’ being a natural number.
e
i
P←e
i−1
P+aP or eiP←2e−1P
Each eiP may be a negative point as appropriate.
At this time,
In the pre-computation processing illustrated in
Next, the procedures of lines 5 to 10 are repeated while increasing i by 1 from i=2 to i=d (line 4). In the procedures of lines 5 to 10, if elliptic curve point addition is performed, then, when AZ≠P[i−1]Z, A is converted into a point whose Z coordinate is the same as P[i−1] (line 6), and (P[i], A, ti)←A+P[i−1] is set (line 7). On the other hand, if elliptic curve point doubling is performed, then (P[i], B, ti)←2P[i−1] is set (line 9). Note that elliptic curve point addition according to the Co—Z method is used in line 7, and elliptic curve point doubling according to the Co—Z method is used in line 9.
Subsequently, after setting s←td (line 12), the procedures of lines 14 to 17 are repeated while decreasing i by 1 from i=d−1 to i=1 (line 13). In the procedures of lines 14 to 17, P[i]X←P[i]X·s2, P[i]Y, P[i]Y·s3, P[i]Z←P[i]Z·s, and s←s·ti are performed. Accordingly, the Z coordinates of each P[i]=(P[i]X, P[i]Y, P[i]Z) are the same.
Finally, the pre-computation table T={P[1], P[e2], . . . , P[ed])=(P, e2P, . . . , edP} is output (line 19).
In addition, in the elliptic curve point addition according to the Co—Z method, ti2 and ti3 can be computed without a computational cost instead of ti. Therefore, the efficiency can be improved by directly computing s2 and s3 without sequentially computing s2 and s3 in lines 14 and 15 of the pre-computation processing illustrated in
In addition, in a case where the pre-computation processing illustrated in
<<Scalar Value Conversion Processing>>
As described above, the scalar value conversion processing of scalar multiplication with precomputation according to the present embodiment is similar to the conventional scalar value conversion processing of scalar multiplication with precomputation. Note that, in the case of application to the multi-scalar multiplication k0P0+ . . . +km−1 Pm−1, it is sufficient to perform the scalar value conversion processing on each ki(i∈[0, m−1]).
<<Evaluation Processing>>
Assume that the pre-computation table is T, and the scalar value after scalar value conversion is k′=k0′20+k1′21+ . . . +kn−1′2n−1 (where ki′∈{0, ±e1, . . . , ±ed}). At this time,
In the evaluation processing illustrated in
Note that the evaluation processing illustrated in
<Hardware Configuration of Scalar Multiplication Device 10>
Next, a hardware configuration of the scalar multiplication device 10 according to the present embodiment will be described with reference to
As illustrated in
The input device 101 is, for example, a keyboard, a mouse, a touch panel, various buttons, or the like. The display device 102 is, for example, a display, a display panel, or the like. Note that the scalar multiplication device 10 may not include at least one of the input device 101 and the display device 102.
The external I/F 103 is an interface with an external device such as a recording medium 103a. Examples of the recording medium 103a include a compact disc (CD), a digital versatile disk (DVD), a secure digital memory card (SD memory card), a Universal Serial Bus (USB) memory card, and the like.
The communication I/F 104 is an interface for connecting the scalar multiplication device 10 to a communication network. The processor 105 is any of various arithmetic/logic devices such as a central processing unit (CPU) and a micro processing unit (MPU). The memory device 106 is any of various storage devices such as a hard disk drive (HDD), a solid state drive (SSD), a random access memory (RAM), a read only memory (ROM), and a flash memory.
Since the scalar multiplication device 10 according to the present embodiment has the hardware configuration illustrated in
<Functional Configuration of Scalar Multiplication Device 10>
Next, a functional configuration of the scalar multiplication device 10 according to the present embodiment will be described with reference to
As illustrated in
The pre-computation processing unit 201 executes pre-computation processing by the algorithm illustrated in
The scalar value conversion processing unit 202 converts the scalar value k into a scalar value k′ by conventional scalar value conversion processing of scalar multiplication with precomputation.
The evaluation processing unit 203 executes evaluation processing by the algorithm illustrated in
<Flow of Scalar Multiplication with Precomputation>
Next, a flow of scalar multiplication with precomputation according to the present embodiment will be described with reference to
First, the pre-computation processing unit 201 executes pre-computation processing by the algorithm illustrated in
Next, as an example of scalar multiplication with precomputation according to the present embodiment, a case where the present embodiment is applied to the w-NAF method will be described.
<<Pre-Computation Processing>>
In the pre-computation processing illustrated in
Next, after setting
s←t
2
w−2 [Math. 4]
and Z←P[2w−1−1]Z (lines 5 and 6), the procedures of lines 8 to 11 are repeated while decreasing i by 1 from i=2w−2−1 to i=1 (line 7). In the procedures of lines 8 to 11, P[2i−1]X←P[2i−1]X·s2, P[2i−1]Y←P[2i−1]Y·s3, and P[2i−1]Z←Z and s←s·ti are performed.
Finally, the pre-computation table T={P[1], P[3], . . . , P[2w−1−1]}={P, 3P, . . . , (2w−1−1) P} is output (line 13).
<<Evaluation Processing>>
In the evaluation processing illustrated in
In the evaluation processing illustrated in
<Comparison with Conventional Method>
Here, the scalar multiplication with precomputation using the Co—Z method described in Non-Patent Literature 1 is compared with the scalar multiplication with precomputation executed by the scalar multiplication device 10 according to the present embodiment.
Non-Patent Literature 1 describes a method in which pre-computation processing is performed using a Co—Z method, and then two types of evaluation processing are performed using a pre-computation table created by the pre-computation processing. The first method is a method of computing a result of scalar multiplication by using elliptic curve point addition and elliptic curve point doubling of the Jacobian coordinates in the evaluation processing using the pre-computation table as it is. The second method is a method in which the points constituting the pre-computation table are converted from Jacobian coordinates to affine coordinates, and then, in the evaluation processing, a result of the scalar multiplication is computed by the elliptic doubling of the Jacobian coordinates and the elliptic curve point addition in the mixed coordinates using the Jacobian coordinates and the affine coordinates as inputs.
In the first method described in Non-Patent Literature 1, the Co—Z method is used in the pre-computation processing, and thus the speed is high. On the other hand, the elliptic curve point addition in the evaluation processing is the elliptic curve point addition in the normal Jacobian coordinates not using the Co—Z method, and thus the speed is low. On the other hand, in the second method, similarly, the pre-computation processing is performed at a high speed, and elliptic curve point addition in the mixed coordinates at a high speed can be used also in the evaluation processing. However, it is necessary to convert the points constituting the pre-computation table to the affine coordinates. The conversion from the Jacobian coordinates into the affine coordinates requires multiplication and inverse calculation on Fq for one point, which is inefficient.
On the other hand, in the scalar multiplication with precomputation executed by the scalar multiplication device 10 according to the present embodiment, the Z coordinates of the points constituting the pre-computation table are converted into the same value using the properties of the Co—Z method, so that coordinate conversion can be performed by performing multiplication on Fq for one point several times. In addition, in the evaluation processing, the coordinate conversion and the elliptic curve point addition according to the Co—Z method can be computed at the same computational cost as the computation of the mixed coordinates.
Therefore, the scalar multiplication with precomputation executed by the scalar multiplication device 10 according to the present embodiment solves the disadvantage of the scalar multiplication with precomputation described in Non-Patent Literature 1, and the scalar multiplication can be computed at a higher speed.
As described above, the scalar multiplication device 10 according to the present embodiment can efficiently compute the scalar multiplication with precomputation as compared with the conventional method. In addition, since the multi-scalar multiplication is an extension of the scalar multiplication, the scalar multiplication device 10 according to the present embodiment can also efficiently compute the multi-scalar multiplication in substantially the same way.
Note that elliptic curve cryptography is used, for example, when secure communication such as SSL/TLS is performed. In addition, the pairing-based cryptography is used, for example, when constructing advanced functional cryptography such as ID-based encryption or functional encryption. Therefore, the scalar multiplication device 10 according to the present embodiment can be applied to, for example, a device, an apparatus, or a system that performs communication by SSL/TLS or the like, or can be applied to a device, an apparatus, a system, or the like that performs key generation, encryption, decryption, or the like by ID-based encryption, functional encryption, or the like.
The present invention is not limited to the embodiments specifically disclosed as above, and various modifications and changes, combinations with known technique, and the like can be made without departing from the scope of the claims.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2021/000684 | 1/12/2021 | WO |