Abstract

Nowadays, power analysis attacks are becoming more and more sophisticated. Through power analysis attacks, an attacker can obtain sensitive data stored in smart cards or other embedded devices more efficiently than with any other kind of physical attacks. Among power analysis, simple power analysis (SPA) is probably the most effective against elliptic curve cryptosystem, because an attacker can easily distinguish between point addition and point doubling in a single execution of scalar multiplication. To make elliptic curve scalar multiplication secure against SPA attacks, many methods have been proposed using special point representations. In this paper, a simple but efficient SPA-resistant multiscalar multiplication is proposed. The method is to convert the scalar into a nonadjacent form (NAF) representation at first and then constitute it in a new signed digit representation. This new representation is undertaken at a small precomputation cost, as each representation needs just one doubling and 1/2 additions for each bit. In addition, when combined with randomization techniques, the proposed method can also guard against differential power analysis (DPA) attack.

1. Introduction

Since being proposed independently by Koblitz [1] and Miller [2] in the mid 1980s, elliptic curve cryptosystem (ECC) has been widely applied in public key cryptography, especially in pairing cryptosystems [3, 4]. This is due to ECC using a much shorter key size than other traditional public key cryptosystems such as RSA to provide a corresponding level of security. For instance, 160 bit ECC provides about the equivalent level of security as 1024 bit RSA [5]. Due to the shorter key length, higher speed, and lower power consumption, ECC has been attractive for wireless and smart card applications which have limited bandwidth and storage resources. The security of ECC is based on the hardness of the discrete logarithm problem (DLP) on an elliptic curve called elliptic curve discrete logarithm problem (ECDLP) [6]. Given a scalar multiplication , where is an integer, and ,   are the points on an elliptic curve, according to ECDLP, if is large enough, then it is unable to calculate when the values of and are given. When ECC is implemented in the wireless or smart card devices, they are very vulnerable to power analysis attacks [7, 8].

In power analysis attacks, which were proposed by Kocher et al. [8], an attacker can obtain the secret key stored inside a device by monitoring the cryptographic device’s power consumption. Generally speaking, simple power analysis (SPA) [7] and differential power analysis (DPA) [8] are the two main types of power analysis attacks. SPA can observe secret information through analysis on a single execution of a cryptographic operation, while DPA may need many executions and to analyze them using a statistical process. As different operations executed by the device consume different amounts of time and power, the different time and power consumptions can be used to determine which operations were performed in what order. In the case of scalar multiplication, it may be possible for an attacker to distinguish which parts of the operation were performed by a point doubling, and which parts were performed by a point addition, although he has no knowledge about the private keys. With this the attacker can obtain the secret key, from the acquired information, for using as the scalar in the elliptic curve scalar multiplication.

In the past decade, various scalar multiplication algorithms that resist SPA or DPA have been proposed, for example, [917]. In [10], Coron first generalized a DPA attack to the elliptic curve cryptosystem and introduced double-and-add always algorithm to resist SPA and randomization method to resist DPA. Since then, many countermeasures, which are based on randomization and scalar recoding, have been proposed. Reference [11] proposed the randomized addition-subtraction chains method, and [17] introduced the randomized window method. Lee first proposed a SPA-resistant countermeasure based on multiscalar multiplication [13]. Then, [1416] not only introduced multi-scalar multiplication to resist SPA, but also used randomization method to resist DPA. However, those methods provide security at the cost of efficiency. In this paper, we propose a novel efficient SPA-resistant multi-scalar multiplication method and combine it with a randomization method to resist DPA.

The rest of the paper is organized as follows. Section 2 gives a brief introduction to ECC, scalar multiplication, and previous SPA-resistant algorithms. Section 3 describes the proposed scalar multiplication algorithm. Section 4 compares the performance of our strategies with the previous countermeasures. Finally, Section 5 concludes this paper.

2. Preliminaries

2.1. Elliptic Curve Arithmetic

This subsection presents a brief introduction to ECC. For extended details, the reader can refer to [6, 18]. Let be a finite prime field. An elliptic curve over can be defined by the Weierstrass equation: where . The set of points on an elliptic curve and the point at infinity (denoted by ) form an Abelian group under a point addition operation. The formula for computing point operation consists of two basic operations: the elliptic curve addition (ECADD) when computing according to a group addition rule when two points and on the curve are given and is not equal to , and the elliptic doubling (ECDBL) when computing when a point is given. This needs expensive filed inversions in the computation of point operations when using known as affine coordinates to represent the points on the curve . So, the most efficient implementations adopt representations of the form , known as projective coordinates, including standard projective coordinates, Jacobian projective coordinates, Chudnovsky Jacobian coordinates, and Lopez-Dahab projective coordinates [6].

2.2. Scalar Multiplication

Scalar multiplication is the basic operation in ECDSA signature [19] and ECDH key agreement [20] protocols. The operation calculates the multiples of a point ( times), where is a point on curve and is an integer scalar. As the most time consuming operation in the previously mentioned protocols, many algorithms have been proposed to improve the efficiency of scalar multiplication during the past decade. Among them, the nonadjacent form (NAF) [21] is the standard one. An NAF of a positive integer is an expression where , , and no two consecutive digits of   are nonzero. The computation of NAF of a positive integer is described as in Algorithm 1. Then, it is possible to compute the scalar multiplication using NAF method following Algorithm 2.

Input: Positive integer =
Output: , =
(1) i = 0.
(2) While (k > 0) do
(2.1) if (k is odd) then
(2.2)  = 2 − (k mod 4);
(2.3) else
(2.4)  = 0;
(2.5) k = ( )/2;
(2.6) ;
(3)Return (k).

Input: Positive integer ,
Output:
(1) Use Algorithm 1 to compute .
(2) .
(3) For from downto 0 do
(3.1) Q = 2Q.
(3.2) If = 1 then ;
(3.3) If = −1 then ;
(4) Return (Q).

Each positive has a unique NAF. Among all signed binary representations, NAF() has the fewest nonzero digits. It is known that the average density of nonzero bits of  NAF is approximately 1/3. This means that scalar multiplication using NAF needs ECDBL + (/3) ECADD.

2.3. Previous Algorithms
2.3.1. Ciet and Joye’s Algorithm

This algorithm [14] uses the variant of Shamir’s double ladder to compute the multi-scalar multiplication . The main difference is to insert a dummy operation in the computation. So, each loop includes one doubling and one addition, and the operation order is DADADADADA in Algorithm 3. Hence, one point doubling and one point addition per bit is needed.

Input: = ,
   =
Output:
(1) ;
(2)
(3) For from downto 0 do
(3.1) ;
(3.2) c = , ;
(3.3) ;
(4) Return ( ).

2.3.2. Lee’s Algorithm

To resist SPA, Lee improved the simultaneous scalar multiplication [21] in [13]. He changed the values of (, ) when (, ) = (0, 0) to construct another adequate digit pair with at least one non-zero digit. Of course, the adjacent pair (, ) should be modified as well. The transformation rules can be described as in Table 1.

After the transformation, the digit pair cannot be all zero. Therefore, the modified simultaneous scalar multiplication was proposed by Lee to resist SPA; see Algorithm 4. Obviously, the cost of Lee's algorithm is also one point doubling and one point addition per bit.

Input:
Output:
(1) is transformed to as Table 1 rule;
(2) Pre-computation
   ;
   ;
(3) ;
(4) For from downto 0 do
(4.1) ;
(4.2) ;
(5 ) Return ( ).

2.3.3. Zhang, Chen, Xiao’s Algorithm

This algorithm [16] proposes four scalar multiplication algorithms against power analysis. Those algorithms are all based on the highest-weight binary form (HBF) of the scalars and randomization to resist power analysis. Although those four countermeasures have no dummy operations, the efficiency of them is similar to Ciet and Joye’s algorithm. They also almost need one point doubling and one point addition per bit. One of these algorithms can be seen as follows in Algorithm 5.

Input: =
Output:
(1) Select a random ;
;
;
(2) HBF ;
(3) For from 0 downto
If
   ( ) =
(4) Construct a pre-computation table
;
= ; = ;
(5) For from downto 0 do
(5.1) ;
(5.2) ;
(6) Return .

2.3.4. Liu, Tan, and Dai’s Algorithm

Liu et al. also propose a multi-scalar multiplication to resist SPA in [15]. The difference is that they use a joint sparse form (JSF) to represent a pair of integers and process two or three JSF columns each time. Although the processed column number may be different, the algorithm always performs four point doublings and two point additions in each loop. This means that it is not possible for useful information related to the private key to be obtained by the attacker through SPA.

Next, , are selected as a simple example. The JSF of (213, 408) is Then, this algorithm processes the JSF columns as follows: That is to say, it needs four iterations to complete the whole operation; so, sixteen point doubling and eight point addition operations are required. The theoretical analysis and simulation results show that this algorithm needs 1.384 point doublings and 0.692 point additions per bit.

3. The New Algorithm

Based on the algorithms mentioned earlier, a simple but efficient scalar multiplication algorithm is proposed to resist known power analysis attacks in this section. The method first transforms the NAF of the multi-scalar then combines it with the window method and modifies the value of the digit pair with all zero digits; so, the new algorithm can be obtained.

3.1. Scalar Representation

In a scalar multiplication, it can be seen that each bit requires at least a point doubling, while the number of point addition varies in different algorithms. Therefore, the best way to improve the efficiency of the scalar multiplication is to reduce the number of point addition. In this approach, a window method with the NAF form is used to reduce the number of point addition.

First, the window method with the NAF form for a single scalar is described. Let be the window size, the maximum Hamming weight, and the point number of the precomputation table in each window. The NAF of a scalar is denoted by , and generally it can be represented as (2), where is the bit length of the NAF of . When using the window method, it can be represented as , where and bit , in which is the set of all possible -bit parts of the NAF integers. Consider In Table 2, we only list the values of and for from 2 to 6, but from (6), it can be seen that rises by times with the increase of .

Next, the window method with the NAF form for multi-scalar is introduced, where is the window size, is the maximum Hamming weight, and is the point number of pre-computation table in each window (Table 3). Now, in each window, there are two scalars; so, is double , but is much larger than . is the combination of two numbers (, ). Consider From (8), it can be seen that rises exponentially with an increase of . So, in this paper, was selected as the window size.

When and , no point addition is performed. Hence, an attacker can determine this case through SPA. To assist SPA, and should be converted, so that a real point addition happens. This is to say that , and are converted to another digit pair with at least one non-zero digit. In this paper, we select to transform . Of course, the adjacent pair should be considered as well. According to the NAF coding rule, there are five possible cases related to the digit pair . The transformation rules can be described as in Table 4.

After the transformation, the digit pair () adds two more cases, but the pre-computation table only adds one more point due to the different symbol between the two cases.

3.2. Proposed New Multiscalar Multiplication Algorithm

Now, the new algorithm to calculate based on the new representation mentioned earlier can be described. The algorithm has a uniform doubling and adding operation, but no dummy operation.

From Algorithm 6, it can be found that two doublings and one addition are performed in each window. It is assumed that the power consumption of subtraction is the same as the addition. There are fifteen points in the pre-computation table.

Input:
Output:
(1) Compute the NAF form of ;
(2) Add leading 0's in so that the number of bits in
is multiple of 2, ,
;
(3) ;
(4) While do
(4.1) if and = (0, 0)) then
(4.2) if then
(4.3)  set and
;
(4.4) else if then
(4.5)  set
;
(4.6) else if then
(4.7)  set and
;
(4.8) else if then
(4.9)  set and
;
(4.10) else
(4.11)  set and
;
(4.12) else
(4.13) ;
(5) Pre-computation
;
;
   ;
(6) ;
(7) For from downto 0 do
(7.1) ;
(7.2) ;
(7.3) if then
(7.4)  ;
(7.5) else if then
(7.6)  if then
(7.7 )   ;
(7.8) else
(7.9)   ;
(7.10) else
(7.11)  ;
(8) Return .

Next, a simple example that shows how Algorithm 6 works is described, and the NAF of (209, 416) is

After transformation according to Table 4, the new representation of (209, 416) is Then, the process of Algorithm 6 computing is illustrated in Table 5.

3.3. Proposed DPA-Resistant Scalar Multiplication Algorithm

Among the various DPA countermeasures [22], random key splitting is the most common method to resist DPA. The scalar can be split in at least two different ways; one is , and the other is , where is random and the length of is the same of . In this paper, the first way was chosen, where ,  . It can be observed that this method is the same as multi-scalar approach. Then, a similar method as in Algorithm 6 can be used to compute the scalar multiplication. The difference is that the point is equal to . Of course, the transformation rule and pre-computation table are also different. To assist an SPA, and when should be converted, so that a real point addition happens. Algorithm 7 describes this in detail.

Input: P, k
Output: Q = [k]P
(1) Select a random r, ;
(2) Compute the NAF form of ;
(3) Add leading 0's in so that the number of bits in
is multiple of 2,
;
(4) ;
(5) While do
(5.1) set ;
(5.2) if then
(5.3) if then
(5.4)  set and
;
(5.5)  else
(5.6)  set and
;
(5.7) else
(5.8)  ;
(6) Pre-computation
;
(7) if then
    ;
else
;
(8) For from downto 0 do
(8.1) ;
(8.2) ;
(8.3) ;
(8.4) if then
(8.5)  ;
(8.6) else
(8.7)  ;
(9) Return .

It can be seen that there are only four points in the pre-computation table for Algorithm 7, but the program sequence is also DDA. Therefore, due to the uniform operation sequence, it can resist SPA, and to ensure that there is no correlation between two times, a random was inserted. Of course, the attacker cannot obtain any information through DPA.

4. Performance Comparison

In this section, the performance of Algorithm 7 is analyzed and compared with previous algorithms. In Algorithm 7, each loop processes two bits and has two point doubling and one point addition. Each bit needs one point doubling and 1/2 point addition. In order to show the performance of Algorithm 7, a comparison with previous methods is listed in Table 6.

According to [23], one projective elliptic doubling in prime case needs 4S (S denotes module square) and 4M (M denotes module multiplication), and one projective elliptic addition on prime case needs 4S and 12M. We resume [24]. Then, algorithm in [13, 14, 16] needs per bit, and algorithm in [15] needs about , while Algorithm 7 only needs per bit. Hence, it Algorithm 7 can improve performance by at least 25% compared with previous algorithms, and, sacrifices a small amount of memory to store pre-computation points.

5. Conclusion

In this paper, a simple but efficient elliptic scalar multiplication against power analysis attacks has been presented. First, we analyze previous algorithms which can resist SPA or DPA. Then, we present the new multi-scalar multiplication to endure SPA. This algorithm is based on NAF and processes two columns each loop. When computing scalar multiplication , we adopt a random number to split scalar and combine it with the multi-scalar multiplication. So, the new DPA-resistant scalar multiplication algorithm is proposed in this work. The proposed DPA-resistant scalar multiplication algorithm not only can resist SPA and DPA, but also provides good performance at a cost of only a few storage spaces.