Next Article in Journal
Combining Pixel Swapping and Simulated Annealing for Land Cover Mapping
Next Article in Special Issue
An Efficient Certificateless Aggregate Signature Scheme for Blockchain-Based Medical Cyber Physical Systems
Previous Article in Journal
Phenosafranin-Based Colorimetric-Sensing Platform for Nitrite Detection Enabled by Griess Assay
Previous Article in Special Issue
Designing Efficient Sinkhole Attack Detection Mechanism in Edge-Based IoT Deployment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Elliptic Curve Cryptography for Wireless Sensor Networks Using the Number Theoretic Transform

Computer Engineering Department, Faculty of Engineering and Natural Sciences, Bahcesehir University, 34353 Istanbul, Turkey
*
Author to whom correspondence should be addressed.
Sensors 2020, 20(5), 1507; https://doi.org/10.3390/s20051507
Submission received: 15 January 2020 / Revised: 21 February 2020 / Accepted: 23 February 2020 / Published: 9 March 2020
(This article belongs to the Special Issue Security and Privacy in Wireless Sensor Network)

Abstract

:
We implement elliptic curve cryptography on the MSP430 which is a commonly used microcontroller in wireless sensor network nodes. We use the number theoretic transform to perform finite field multiplication and squaring as required in elliptic curve scalar point multiplication. We take advantage of the fast Fourier transform for the first time in the literature to speed up the number theoretic transform for an efficient realization of elliptic curve cryptography. Our implementation achieves elliptic curve scalar point multiplication in only 0.65 s and 1.31 s for multiplication of fixed and random points, respectively, and has similar or better timing performance compared to previous works in the literature.

1. Introduction

Wireless sensor network (WSN) technology is a widespread and enabling technology that has been rapidly penetrating our daily lives. It has environmental applications such as temperature, humidity, pressure and fire monitoring [1,2], health applications such as patient monitoring [3], military applications such as enemy detection and reconnaissance [4], and applications to smart cities such as in smart grids [5]. Securing WSN applications is an important task since sensitive information they communicate should be kept confidential from malicious third parties. A sensor node, which is a single unit of a WSN, is a tiny, cheap and constrained embedded system that is usually equipped with a simple microcontroller. Cryptographic solutions are needed for applications running on constrained microcontrollers on sensor nodes [6,7,8,9,10,11,12,13]. However, due to the complex nature of cryptographic algorithms and the constrained nature of WSN nodes, e.g., their CPU power and memory size limitations, it is a challenge to implement cryptographic algorithms efficiently on WSN nodes [14,15,16,17,18].
Among different types of cryptosystems, symmetric key cryptography comes forward as a good choice to be used for WSNs due to its simplicity and efficiency. However, for many WSN applications, the distribution of the private key between sensor nodes remains as a problem that needs to be addressed. Public key cryptography (PKC) [19] provides a solution to the key distribution problem, yet it is considered computationally expensive for constrained WSN nodes. On the other hand, previous works prove PKC to be applicable on constrained WSN nodes for solving the key distribution problem [20,21,22,23,24]. Elliptic curve cryptography (ECC) [25,26] is a popular option for PKC. It requires a 160-bit or longer key to be considered secure, while the same level of security can be achieved with much longer key sizes with other PKC algorithms, e.g., a 1024-bit key is needed to achieve the same level of security using the RSA cryptosystem [27]. In this work, we realize an efficient implementation of ECC for solving the key distribution problem in WSNs. We present a novel implementation of ECC over an optimal extension field [28,29] by using Edwards curves [30] and the number theoretic transform [31].
The underlying finite field has a significant influence on the performance of an ECC implementation. An optimal extension field [28,29] is a finite field G F ( p m ) where p is a pseudo-Mersenne prime of the form p = 2 k c , k is the processor word size and log 2 | c | < k 2 . Since the coefficients of a finite field element fit in a single processor word in an optimal extension field, no multi-precision arithmetic is needed and elliptic curve point operations can be achieved efficiently. Furthermore, an irreducible field generating polynomial of the form P ( x ) = x m w , where w is a small integer, is used in an optimal extension field, which allows the result of a finite field multiplication operation to be reduced efficiently with only linear complexity.
The number theoretic transform (NTT), also known as the discrete Fourier transform over a finite field, has long been known for its applications in signal processing and communications [32,33,34,35,36,37]. Recently, the use of the NTT has been explored to speed up multiplication of large operands as they appear in RSA [38], fully homomorphic encryption [39,40,41,42] and post-quantum cryptography [43,44,45,46,47,48,49,50] algorithms. However, the application of the NTT for ECC has been considered impractical and widely neglected due to much shorter operands used in ECC arithmetic. There are only a few existing ECC implementations in the literature that use the NTT and they use only partial NTT computations to achieve finite field multiplication. Efficient low-area hardware implementations of ECC are given in [51,52] where finite field arithmetic is achieved in the frequency domain and partial NTT computations are performed for the modular reduction operation after a finite field multiplication. Using the same approach, in [20] an efficient implementation of ECC is presented for constrained microcontrollers. NTT-based multiplication is in general considered efficient only for large operands and believed to be not feasible for constrained microcontrollers. However, it also has the unique advantage of requiring only a linear number of word multiplications which we take advantage of in this work. Our target platform, i.e., MSP430, is a constrained microcontroller with a 16-bit RISC architecture and used widely in WSN nodes. While there is an on-board hardware multiplier on the MSP430, a word multiplication operation using the hardware multiplier still takes 14 clock cycles. Whereas, a word addition on the same microcontroller takes only a single clock cycle. Hence, by reducing the number of performed word multiplications and exchanging them with simpler operations such as addition, the speed of finite field multiplication can be significantly improved.
With this work, we use the NTT to implement finite field multiplication. We show that NTT-based finite field multiplication is feasible for small operand sizes and can be taken advantage of to speed up ECC on WSN nodes. We introduce novel implementations of the forward and inverse NTT computations over a finite field which exploit the Fast Fourier Transform (FFT) [53,54]. Edwards curves, introduced in [30], are a new form for elliptic curves which provide efficient formulae for elliptic curve point arithmetic. In our ECC implementation, we use the optimal extension field G F ( ( 2 13 1 ) 13 ) and Edwards curves with our improved formulae for point arithmetic that take advantage of NTT-based finite field multiplication.
Our Main Contribution: We present a novel realization of ECC which uses Edwards curves for point arithmetic and the NTT for the underlying finite field multiplication and squaring operations. To the best of our knowledge, our work presents the first realization of ECC using the Fast Fourier Transform (FFT) [53,54] to speed up NTT computations. Our implementation achieves similar or faster timings for ECC scalar point multiplication compared to existing implementations in the literature and proves that NTT-based arithmetic is feasible for ECC implementations on constrained devices such as WSN nodes.
The paper continues as follows. In Section 2, we explain ECC using Edwards curves and also give a detailed explanation of finite field multiplication in G F ( ( 2 13 1 ) 13 ) using the NTT. In Section 3, we give the details of our optimized implementation of ECC point multiplication which uses our improved Edwards curves formulae for point arithmetic and NTT-based finite field multiplication/squaring over G F ( ( 2 13 1 ) 13 ) . In Section 4, we present our implementation results and comparisons with the existing work in the literature. Finally, Section 5 includes our conclusion.

2. Background

2.1. Finite Field Multiplication Using the NTT

In elliptic curve cryptography, a large number of multiplication and squaring operations are performed in a finite field. Elements of the finite field G F ( p m ) are typically represented in the time domain as polynomials of degree m 1 with coefficients in G F ( p ) [55,56]. For instance, a ( x ) G F ( p m ) is represented as a ( x ) = i = 0 m 1 a i x i = a 0 + a 1 x + a 2 x 2 + + a m 1 x m 1 , where a i G F ( p ) for 0 i m 1 . Multiplication of two G F ( p m ) elements, e.g., a ( x ) and b ( x ) , is achieved typically by computing the polynomial product
c ( x ) = a ( x ) · b ( x ) mod p
followed by the modular reduction
c ( x ) = c ( x ) mod P ( x ) ,
where P ( x ) is the irreducible field generating polynomial. Please note that if the field generating polynomial can be selected as the binomial x m 2 , the cost of the modular reduction computation becomes negligible. Due to the convolution theorem, the classical polynomial multiplication operation in the time domain, e.g., the computation of c ( x ) = a ( x ) · b ( x ) mod p , which has quadratic complexity, is equivalent to the simple pairwise multiplication of the corresponding frequency domain sequence coefficients which has only linear complexity [53]. Thus, the complexity of polynomial multiplication can be reduced by performing this computation in the frequency domain.
The coefficients of a G F ( p m ) element form a time domain sequence. To perform the polynomial multiplication of two G F ( p m ) elements in the frequency domain, the time domain sequences for the two G F ( p m ) elements should be transformed into their corresponding frequency domain sequences. This conversion is achieved by using the NTT [31]. After the polynomial multiplication operation is completed in the frequency domain, the result can be converted back to the time domain by using the inverse NTT computation. Algorithm 1 gives an overview of how polynomial multiplication can be achieved in the frequency domain.
Algorithm 1: Polynomial Multiplication in the Frequency Domain Using the NTT
 Input: ( a ) and ( b ) , the time domain sequences for a ( x ) , b ( x ) G F ( p m )
 Output: ( c ) , the time domain sequence for c ( x ) = a ( x ) · b ( x ) mod p
1 ( A ) N T T ( ( a ) )      //Compute the NTT of (a)
2 ( B ) N T T ( ( b ) )      //Compute the NTT of (b)
3 ( C ) P C M ( ( A ) , ( B ) )   //Pairwise Coefficient Multiplication
4 ( c ) I N T T ( ( C ) )     //Compute the inverse NTT of (C’)
5 Return ( c )
A finite field element a ( x ) G F ( p m ) can be converted to its d-element frequency domain sequence representation, where d m , in two steps as explained below:
  • Represent a ( x ) = a 0 + a 1 x + a 2 x 2 + + a m 1 x m 1 as the following time domain sequence
    ( a ) = ( a 0 , a 1 , a 2 , , a m 1 , 0 , 0 , , 0 )
    by appending d m zeros at the end.
  • Obtain the frequency domain sequence representation ( A ) = ( A 0 , A 1 , A 2 , , A d 1 ) for a ( x ) by performing the following NTT computation over ( a ) :
    A j = i = 0 d 1 a i r i j mod p , 0 j d 1 ,
    where r is a d t h primitive root of unity.
Please note that in order to obtain the time domain sequence ( a ) back from the frequency domain sequence ( A ) , the inverse NTT computation can be used as follows:
a i = 1 d · j = 0 d 1 A j r i j mod p , 0 i d 1 .
In Algorithm 1, since c ( x ) = a ( x ) · b ( x ) mod p may have up to 2 m 1 coefficients, representing it in the frequency domain with a sequence of length shorter than 2 m 1 may result in its value being corrupted. Therefore, for Algorithm 1 to always generate the correct result, one should have d 2 m 1 as the NTT length. We now describe with an example the execution of Algorithm 1 for computing c ( x ) = a ( x ) · b ( x ) mod p where a ( x ) , b ( x ) G F ( p 13 ) . As described in (1), the polynomials a ( x ) = a 0 + a 1 x + a 2 x 2 + + a 12 x 12 and b ( x ) = b 0 + b 1 x + b 2 x 2 + + b 12 x 12 are first converted into their corresponding 26-element time domain sequence representations as
( a ) = ( a 0 , a 1 , a 2 , a 3 , a 4 , a 5 , a 6 , a 7 , a 8 , a 9 , a 10 , a 11 , a 12 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
and
( b ) = ( b 0 , b 1 , b 2 , b 3 , b 4 , b 5 , b 6 , b 7 , b 8 , b 9 , b 10 , b 11 , b 12 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) .
Secondly, the NTT is applied to ( a ) and ( b ) , as described in (2), to obtain the following frequency domain sequences:
( A ) = ( A 0 , A 1 , A 2 , , A 23 , A 24 , A 25 ) ,
( B ) = ( B 0 , B 1 , B 2 , , B 23 , B 24 , B 25 ) .
Thirdly, the coefficients of ( A ) and ( B ) are pairwise multiplied in the frequency domain, i.e., by computing C i = A i B i mod p for 0 i 25 , and thus the following sequence is obtained in the frequency domain:
( C ) = ( C 0 , C 1 , C 2 , C 3 , C 4 , C 5 , , C 21 , C 22 , C 23 , C 24 , C 25 ) ,
which corresponds to c ( x ) = a ( x ) · b ( x ) mod p in the time domain. Finally, the inverse NTT is applied to ( C ) , as described in (3), to obtain the following time domain sequence for c ( x ) = a ( x ) · b ( x ) mod p :
( c ) = ( c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , , c 21 , c 22 , c 23 , c 24 , 0 ) .
Please note that since c ( x ) is a polynomial of degree 24, c 25 is zero and the first 25 coefficients of ( c ) give us the polynomial c ( x ) = a ( x ) · b ( x ) mod p , given as follows:
c ( x ) = c 0 + c 1 x + c 2 x 2 + + c 22 x 22 + c 23 x 23 + c 24 x 24 .
As a final step in G F ( p 13 ) multiplication, the polynomial c ( x ) needs to be reduced modulo the field generating polynomial by computing c ( x ) = c ( x ) mod P ( x ) , which has only linear complexity.

2.2. Elliptic Curve Cryptography Using Edwards Curves

The main operation in ECC is scalar point multiplication, i.e., computing s · P for an integer s and a point P on the elliptic curve. ECC scalar point multiplication involves performing several ECC point addition and doubling operations. To achieve ECC point multiplication, the binary method [57] can be used, where the bits of the scalar s are scanned one bit at a time starting with the most significant bit, and for each scanned bit, a point doubling operation is performed, in addition to a point addition operation if the scanned bit is 1. However, the binary method is both inefficient and vulnerable against simple power analysis [58]. As an alternative to the binary method, and in order to help mitigate its drawbacks, the NAF4 and Comb methods can be used for ECC scalar point multiplication of random and fixed points, respectively. NAF4 and Comb require computing a significantly reduced number point additions and doublings compared to the binary method [59].
Edwards curves, proposed in [30], are a new form for elliptic curves and defined by the following equation:
x 2 + y 2 = c 2 ( 1 + d x 2 y 2 ) .
The ECC point addition of the two distinct points P 1 and P 2 on an Edwards curve is computed as
P 3 ( x 3 , y 3 ) = P 1 ( x 1 , y 1 ) + P 2 ( x 2 , y 2 ) ,
where x 3 = x 1 y 2 + y 1 x 2 c ( 1 + d x 1 x 2 y 1 y 2 ) and y 3 = y 1 y 2 x 1 x 2 c ( 1 d x 1 x 2 y 1 y 2 ) .
The ECC point doubling operation on the point P 1 ( x 1 , y 1 ) on an Edwards curve is computed as
P 2 ( x 2 , y 2 ) = 2 · P 1 ( x 1 , y 1 ) ,
where x 2 = 2 x 1 y 1 c x 1 2 + y 1 2 and y 2 = ( y 1 2 x 1 2 ) c 2 c 2 ( x 1 2 + y 1 2 ) .
The above ECC point operations can be achieved in projective coordinates [59,60,61] to avoid costly inversions. For the Edwards curve x 2 + y 2 = c 2 ( 1 + d x 2 y 2 ) , with c = 1 , d random and d · c 4 1 , the formulae for ECC point doubling and addition in projective coordinates over prime fields are given in Algorithms 2 and 3, respectively [62].
Algorithm 2: Elliptic curve point doubling in projective coordinates over prime fields using Edwards curves [62]
Input: P 1 ( X 1 : Y 1 : Z 1 )
Output: P 2 ( X 2 : Y 2 : Z 2 ) = 2 · P 1
1 T 1 X 1 , T 2 Y 1 , T 3 Z 1        9 T 2 T 1 T 2
2 T 4 T 1 + T 2               10 T 4 T 4 T 5
3 T 1 T 1 2                 11 T 3 T 5 T 3
4 T 2 T 2 2                 12 T 1 T 3 · T 4
5 T 3 T 3 2                 13 T 3 T 3 · T 5
6 T 4 T 4 2                 14 T 2 T 2 · T 5
7 T 3 2 · T 3                15 T 2 T 1 , Y 2 T 2 , Z 2 T 3
8 T 5 T 1 + T 2               16 Return ( X 2 : Y 2 : Z 2 )
Algorithm 3: Elliptic curve point addition in projective coordinates over prime fields using Edwards curves [62]
Input: P 1 ( X 1 : Y 1 : Z 1 ) and P 2 ( X 2 : Y 2 : Z 2 )
Output: P 3 ( X 3 : Y 3 : Z 3 ) = P 1 + P 2
1 T 1 X 1 , T 2 Y 1 , T 3 Z 1 , T 4 X 2 , T 5 Y 2 ,   12 T 8 d · T 8
   T 6 Z 2                      13 T 2 T 2 T 1
2 T 3 T 3 · T 6                    14 T 2 T 2 · T 3
3 T 7 T 1 + T 2                   15 T 3 ( T 3 ) 2
4 T 8 T 4 + T 5                   16 T 1 T 3 T 8
5 T 1 T 1 · T 4                    17 T 3 T 3 + T 8
6 T 2 T 2 · T 5                    18 T 2 T 2 · T 3
7 T 7 T 7 · T 8                    19 T 3 T 3 · T 1
8 T 7 T 7 T 1                   20 T 1 T 1 · T 7
9 T 7 T 7 T 2                   21 X 3 T 1 , Y 3 T 2 , Z 3 T 3
10 T 7 T 7 · T 3                   22Return ( X 3 : Y 3 : Z 3 )
11 T 8 T 1 · T 2

3. Our ECC Implementation Using the NTT and Edwards Curves

We implement ECC over an optimal extension field [29,63], namely G F ( p m ) with the Mersenne prime field characteristic p = 2 13 1 and the prime field extension degree m = 13 . Please note that ECC over a prime extension field of the form G F ( p m ) is considered secure when the finite field is sufficiently large and its extension degree m is a prime number [59]. We select the field characteristic p such that polynomial coefficients fit in a single processor word, in our case a 16-bit word, eliminating the need for performing multiprecision arithmetic. We use the binomial x 13 2 as the field generating polynomial which facilitates efficient modular reduction. For finite field multiplication and squaring, we use the NTT and use the approach described in Algorithm 1. For NTT computations, we use the NTT length of d = 26 and the 26th primitive root of unity as r = 2 . We use the FFT [53,54,64] to speed up NTT computations. For ECC point doubling and addition, we use our improved versions of Algorithms 2 and 3, respectively. Finally, we use the NAF and Comb methods, with a 4-bit window, to perform ECC scalar point multiplication with random and fixed points, respectively [59].

3.1. Finite Field Multiplication and Squaring in G F ( ( 2 13 1 ) 13 ) with the NTT

As explained in Algorithm 1, polynomial multiplication, which is the main operation in G F ( ( 2 13 1 ) 13 ) multiplication, can be achieved using the NTT in three stages: (1) Forward NTT Computation, (2) Pairwise Coefficient Multiplication, (3) Inverse NTT Computation. We apply the FFT [53,54,64] to speed up our NTT and inverse NTT computations.
Forward NTT for Converting G F ( ( 2 13 1 ) 13 ) Elements to the Frequency Domain:
As described in (2), the frequency domain sequence representation ( A ) = ( A 0 , A 1 , A 2 , , A 25 ) of a ( x ) G F ( ( 2 13 1 ) 13 ) is obtained by computing the NTT of the corresponding 26-element time domain sequence ( a ) = ( a 0 , a 1 , a 2 , , a 12 , 0 , 0 , , 0 ) as
A j = i = 0 25 a i r i j mod p , 0 j 25 ,
where p = 2 13 1 . The above NTT computation can be optimized by applying the FFT as
A j = i = 0 12 a 2 i ( r 2 ) i j + r j i = 0 12 a 2 i + 1 ( r 2 ) i j mod p
and
A j + 13 = i = 0 12 a 2 i ( r 2 ) i j r j i = 0 12 a 2 i + 1 ( r 2 ) i j mod p ,
for 0 j 12 [64]. Please note that the first summations in (7) and (8) are the same NTT computation. Likewise, the second summations in (7) and (8) are also the same NTT computation. Both NTT computations are of length 13. Hence, using the FFT, the computation in (6), which is a 26-element NTT computation, is reduced to the computation of roughly two 13-element NTT computations. Since a i = 0 for 13 i 25 , we compute the summations in (7) and (8) only for i running from 0 to 6 in the first NTT computation, and from 0 to 5 in the second. Our optimized algorithm for computing the forward NTT of a ( x ) G F ( ( 2 13 1 ) 13 ) on the MSP430 is given in Algorithm 4.
Algorithm 4: Forward NTT Computation on the MSP430 Using the FFT
Sensors 20 01507 i001
We implement Algorithm 4 with an assembly routine and optimize it by using microcontroller registers as much as possible to minimize the number of memory read/write operations. For the additions in lines 4 , 9 , 14 and 21, there is no need to do modular reduction after every addition. We reduce the number of modular reductions by accumulating the sums and deferring modular reduction as much as possible.
Multiplication of a G F ( 2 13 1 ) element with a power of 2, e.g., in lines 7 and 19 of Algorithm 4, corresponds to a bitwise left rotation of the G F ( 2 13 1 ) element. For instance, for R G F ( 2 13 1 ) , 2 j R mod 2 13 1 can be computed by rotating the bits of R by j mod 13 bits to the left. We realize multiplications of G F ( 2 13 1 ) elements with powers of 2 with an optimized assembly routine.
Please note that for multiplying two distinct G F ( ( 2 13 1 ) 13 ) elements with Algorithm 1, Algorithm 4 needs to be executed twice, i.e., once for each input operand to obtain its frequency domain sequence representation. On the other hand, for squaring a G F ( ( 2 13 1 ) 13 ) element, Algorithm 4 needs to be executed only once for the single input operand. Hence, squaring using Algorithm 1 is faster than multiplication.
Pairwise Coefficient Multiplication of G F ( ( 2 13 1 ) 13 ) Elements in the Frequency Domain:
Polynomial multiplication of two G F ( ( 2 13 1 ) 13 ) elements can be achieved in the frequency domain with only linear complexity by multiplying pairwise their frequency domain sequence coefficients. Let a ( x ) , b ( x ) G F ( ( 2 13 1 ) 13 ) , and let ( A ) = ( A 0 , A 1 , , A 25 ) and ( B ) = ( B 0 , B 1 , , B 25 ) be their 26-element frequency domain sequence representations obtained using Algorithm 4. The following 26 pairwise coefficient multiplications generate the 26-element frequency domain sequence representation (C’) of the product c ( x ) = a ( x ) · b ( x ) mod p :
C i = A i B i mod p , 0 i 25 .
The frequency domain sequence ( C ) can be converted back to the time domain, by applying the inverse NTT, to give us the coefficients of the polynomial product c ( x ) = a ( x ) · b ( x ) mod p .
The multiplications in (9) are the only G F ( p ) multiplications required for computing the polynomial product c ( x ) = a ( x ) · b ( x ) mod p in the NTT-based multiplication approach. Please note that only 26 coefficient multiplications are performed here, which is significantly less than the 169 coefficient multiplications required in the classical schoolbook method for multiplication.
Inverse NTT for Converting the Frequency Domain Product to a Time Domain G F ( ( 2 13 1 ) 13 ) Element:
As described in (3), the time domain sequence representation ( c ) = ( c 0 , c 1 , c 2 , , c 25 ) of c ( x ) = a ( x ) · b ( x ) mod p can be obtained by computing the inverse NTT of the corresponding 26-element frequency domain sequence ( C ) = ( C 0 , C 1 , C 2 , , C 23 , C 24 , C 25 ) as follows
c j = 1 26 i = 0 25 C i r i j mod p , 0 j 25 .
The above inverse NTT computation can be optimized by applying the inverse FFT as
c j = i = 0 12 C 2 i ( r 2 ) i j + r j i = 0 12 C 2 i + 1 ( r 2 ) i j mod p
and
c j + 13 = i = 0 12 C 2 i ( r 2 ) i j r j i = 0 12 C 2 i + 1 ( r 2 ) i j mod p ,
for 0 j 12 [64]. Please note that the first summations in (11) and (12) are the same inverse NTT computation. Likewise, the second summations in (11) and (12) are the same inverse NTT computation. Furthermore, both inverse NTT computations are of length 13. Hence, using the inverse FFT, the computation of (10), which is a 26-element inverse NTT computation, is reduced to the computation of roughly two 13-element inverse NTT computations. Since c 25 = 0 , we compute the second summations in (11) and (12) only for i running from 0 to 11. Our inverse FFT algorithm for computing the inverse NTT of ( C ) , the frequency domain sequence corresponding to c ( x ) = a ( x ) · b ( x ) mod p , and for obtaining c ( x ) = c ( x ) mod P ( x ) , where P ( x ) = x 13 2 , is given in Algorithm 5.
Please note that, unlike in the inverse NTT computation in Algorithm 1, in Algorithm 5 (lines 35 42 ) we embed the modular reduction of c ( x ) = a ( x ) · b ( x ) mod p by the field generating polynomial P ( x ) = x 13 2 . Hence, for a ( x ) , b ( x ) G F ( ( 2 13 1 ) 13 ) , while the output of Algorithm 1 is a polynomial of degree 24 (with 25 coefficients in G F ( 2 13 1 ) , the output of Algorithm 5 is an element of G F ( ( 2 13 1 ) 13 ) with 13 coefficients.
Similar to our implementation of Algorithm 4, we implement Algorithm 5 with an assembly routine and optimize it by using microcontroller registers exhaustively to minimize the number of memory read/write operations. We reduce the number of performed modular reductions in lines 4 , 9 , 14 , 19 , 24 , 29 , 34 and 40 of Algorithm 5 by accumulating the sums and deferring the modular reduction computation as much as possible.
Division of a G F ( 2 13 1 ) element by a power of 2, e.g., in lines 7 , 17 , 27 and 38 of Algorithm 5, can be achieved with a bitwise right rotation. For instance, for R G F ( 2 13 1 ) , R / 2 j mod 2 13 1 can be computed by rotating the bits of R by j mod 13 bits to the right. We realize this bitwise rotation operation with an optimized assembly routine.
Algorithm 5: Inverse NTT Computation on the MSP430 Using the FFT
Sensors 20 01507 i002

3.2. ECC Point Arithmetic with NTT Based Multiplication and Squaring

For ECC operations, we use the Edwards curve x 2 + y 2 = c 2 ( 1 + d x 2 y 2 ) , with c = 1 , d random and d · c 4 1 , over the 169-bit prime extension field G F ( ( 2 13 1 ) 13 ) , and use our optimized versions of the elliptic curve point addition and doubling formulae given in Algorithms 2 and 3. We improve Algorithms 2 and 3 by taking advantage of NTT-based multiplication and squaring operations. Our improved algorithms are given in Algorithms 6 and 7.
Algorithm 6: Elliptic curve point doubling in projective coordinates over prime fields using Edwards curves and NTT-based multiplication/squaring
Input: P = ( X 1 : Y 1 : Z 1 ) , R 1 and R 2 are temporary registers.
Output: 2 P = ( X 2 : Y 2 : Z 2 )
1 R 1 N T T ( X 1 ) + N T T ( Y 1 ) / / N T T s s t o r e d   8 R 1 R 1 R 2
2 R 1 R 1 2                       9 Z 1 R 2 Z 1
3 X 1 X 1 2                       10 X 2 Z 1 · R 1 / / N T T o f Z 1 s t o r e d
4 Y 1 Y 1 2                       11 Z 2 Z 1 · R 2 / / N T T o f R 2 s t o r e d
5 Z 1 2 Z 1 2                      12 Y 2 Y 1 · R 2
6 R 2 X 1 + Y 1                    13Return ( X 2 : Y 2 : Z 2 )
7 Y 1 X 1 Y 1
Algorithm 6 is a reordered and optimized version of Algorithm 2. It takes advantage of NTT-based finite field multiplication and squaring computations. In line 1 of the algorithm, the NTTs of X 1 and Y 1 are computed, and then added in the frequency domain to find the NTT of R 1 = X 1 + Y 1 . The computed NTTs of X 1 , Y 1 and R 1 are stored. The stored frequency domain representations of X 1 , Y 1 and R 1 are used in lines 2 4 (marked bold) for the three finite field squarings. Please note that for these three finite field squarings, a total number of only two forward NTT computations are performed, i.e., N T T ( X 1 ) and N T T ( Y 1 ) in line 1, instead of three as required in Algorithm 1. Furthermore, in line 10, the computed NTT of Z 1 is stored and reused in line 11 (marked bold). Similarly, in line 11, the computed NTT of R 2 is stored and reused in line 12 (marked bold). Please note that each time the stored result of an NTT computation is reused, a forward NTT computation is saved in Algorithm 1.
Algorithm 7: Elliptic curve point addition in projective coordinates over prime fields using Edwards curves and NTT-based multiplication/squaring
Input: P = ( X 1 : Y 1 : Z 1 ) , Q = ( X 2 : Y 2 : Z 2 ) , R 1 and R 2 are temporary registers.
Output: P + Q = ( X 3 : Y 3 : Z 3 )
1 Z 1 Z 1 · Z 2                   11 Y 1 Y 1 X 1 / / N T T o f Y 1 s t o r e d
2 R 1 N T T ( X 1 ) + N T T ( Y 1 ) / / N T T s s t o r e d   12 Y 1 Y 1 · Z 1
3 R 2 N T T ( X 2 ) + N T T ( Y 2 ) / / N T T s s t o r e d   13 Z 1 Z 1 2
4 R 1 R 1 · R 2                   14 X 1 Z 1 R 2
5 X 1 X 1 · X 2                   15 Z 1 Z 1 + R 2
6 Y 1 Y 1 · Y 2                   16 Y 3 Y 1 · Z 1 / / N T T o f Z 1 s t o r e d
7 R 1 R 1 X 1                  17 Z 3 Z 1 · X 1 / / N T T o f X 1 s t o r e d
8 R 1 R 1 Y 1                   18 X 3 X 1 · R 1
9 R 1 R 1 · Z 1 / / N T T o f Z 1 s t o r e d      19Return ( X 3 : Y 3 : Z 3 )
10 R 2 d · X 1 · Y 1 / / N T T s o f X 1 a n d Y 1 s t o r e d
Algorithm 7 is a reordered and optimized version of Algorithm 3. It takes advantage of NTT-based finite field multiplication and squaring computations. In lines 2 3 of the algorithm, the NTTs of X 1 , X 2 , Y 1 and Y 2 are computed and stored. Only two addition operations are performed in the frequency domain on the stored NTTs to readily obtain the NTTs of R 1 = X 1 + Y 1 and R 2 = X 2 + Y 2 . The NTTs of R 1 and R 2 are also stored. The stored NTTs of R 1 , R 2 , X 1 , X 2 , Y 1 and Y 2 are readily used in lines 4 6 (denoted with bold color) for the three finite field multiplication computations. Thus, for three finite field multiplications, a total number of only four forward NTT computations are performed, instead of six as required in Algorithm 1. Furthermore, in lines 11 13 of the algorithm, the stored NTTs of Y 1 , X 1 and Z 1 are reused (marked bold). Similarly, in line 16, the NTT of Z 1 is computed and stored. The stored NTT of Z 1 is reused in line 17 (marked bold). Likewise, in line 17, the NTT of X 1 is computed and stored, and reused in line 18 (marked bold).

4. Implementation Results

We use Texas instrument’s MSP430 microcontroller, which is commonly used in wireless sensor nodes, and select version MSP430F1611 [65]. Our target device, MSP 430 F 1611 , is a 1-series low power microcontroller which runs at 8 MHz clock frequency, and has a 48 kB flash memory in addition to a 10 kB RAM. We develop our code in the C language but also use the assembly language for computationally intensive and/or commonly performed operations. We use the IAR Workbench IDE as our development environment [66]. We obtain timings by using the IAR Workbench IDE’s clock cycle counter in debug mode. The detailed timing figures for our ECC implementations are given in Table 1.
In Table 2 and Figure 1, we present our timings for ECC random point multiplication on the MSP430F1611 as well as the timings of the related work in the literature on the same microcontroller. Liu et al.’s work, which uses a 159-bit Montgomery curve, presents the fastest timing for random point multiplication on the MSP430 microcontroller [67]. They use the Montgomery ladder method and achieve random point multiplication in 3,460,000 clock cycles which is equivalent to 0.48 s at 8 MHz clock frequency. Gouvêa et al.’s work, which uses the 160-bit curve secp160r1 that has a slightly smaller elliptic curve group order than ours, achieves ECC random point multiplication in 0.58 s [68]. Our previous ECC implementation over G F ( ( 2 13 1 ) 13 ) on the MSP430F149, a similar microcontroller to the MSP430F1611, achieves random point multiplication in 1.55 s [20]. Please note that our ECC random point multiplication implementation in this work, which exploits the NTT-based finite field multiplication/squaring and the FFT, is more than 18 % faster than our previous implementation on the same elliptic curve. Wang et al.’s implementation of elliptic curve random point multiplication over a 160-bit elliptic curve has a timing value of 3.51 s which is significantly worse than our timing result [69]. In a later work, the same authors improve their timing to 1.60 s; however, their new implementation is still 22 % slower than our work [24]. Please note that the timing figure for our ECC implementation is for a 169-bit elliptic curve with a higher security level, whereas the others’ works use the smaller ordered 159-bit and 160-bit elliptic curves.
In Table 3 and Figure 2, we present our timings for ECC fixed point multiplication on the MSP430F1611 as well as the timings of the related work in the literature on the same microcontroller. Liu et al.’s work, which uses a 159-bit twisted Edwards curve, presents the fastest timing for fixed point multiplication on the MSP430 microcontroller [67]. They use the Comb method and twisted Edwards curves to achieve fixed point multiplication in 1,920,000 clock cycles which is equivalent to 0.24 s at 8 MHz clock frequency. Gouvêa et al.’s work, which uses the 160-bit elliptic curve secp160r1 and the 4NAF method, achieves ECC fixed point multiplication in 0.52 s [68]. Liu et al.’s timing for 160-bit ECDSA signature generation (considered to have around the same timing value as elliptic curve fixed point multiplication) is 1.58 s, which is twice slower than our implementation that uses a larger 169-bit elliptic curve. Wang et al.’s work on the same microcontroller achieves elliptic curve fixed point multiplication in 1.44 s over a 160-bit elliptic curve. Wenger et al.’s implementation of elliptic curve fixed point multiplication on a 160-bit elliptic curve takes 8,779,931 clock cycles which is equivalent to 1.09 s at 8 MHz clock frequency [70]. Szczechowiak et al.’s work achieves elliptic curve fixed point multiplication in 0.72 s using a 160-bit elliptic curve over a prime field [22] and in 1.04 s using a 163-bit elliptic curve over a binary field [22]. Our timing for elliptic curve fixed point multiplication over a larger ordered 169-bit elliptic curve is slightly better than their results. Please note that the timing figure for our ECC implementation is for a 169-bit elliptic curve with a higher security level, whereas the others’ works use the the smaller ordered 159-bit, 160-bit and 163-bit elliptic curves.

5. Conclusions

We implemented ECC on the MSP430 microcontroller, which is a widely used microcontroller in WSNs, by using Edwards curves for point arithmetic and the number theoretic transform for the underlying finite field multiplication and squaring operations. In our work, we realized a novel implementation of the fast Fourier transform over G F ( ( 2 13 1 ) 13 ) to speed up the number theoretic transform on the MSP430 microcontroller. Furthermore, for the point addition and doubling operations on Edwards curves, we introduced optimized formulae where some arithmetic operations are eliminated by taking advantage of the number theoretic transform. Our ECC implementation resulted in comparable or better timing values than the existing work in the literature on the same microcontroller. Please note that the techniques introduced in this paper can be applied to ECC implementations over other elliptic curves with more efficient formulae for point arithmetic. We identify the application of the introduced techniques to ECC implementations on other elliptic curves, such as Montgomery curves or twisted Edwards curves, as directions for future research.

Author Contributions

Conceptualization, S.B.; Methodology, S.B. and U.G.; Software, U.G.; Validation, U.G.; Investigation, S.B. and U.G.; Writing—original draft preparation, S.B. and U.G.; Writing—review and editing, S.B. and U.G.; Supervision, S.B. All authors have read and agreed to the published version of the manuscript

Funding

This work was supported by the Scientific and Technological Research Council of Turkey (TÜBİTAK) under Grant No. 215E208.

Acknowledgments

The authors would like to thank the anonymous reviewers whose valuable comments and suggestions helped improve the quality of this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Pottie, G.J.; Kaiser, W.J. Wireless integrated network sensors. Commun. ACM 2000, 43, 51–58. [Google Scholar] [CrossRef]
  2. Chong, C.Y.; Kumar, S.P. Sensor networks: Evolution, opportunities, and challenges. Proc. IEEE 2003, 91, 1247–1256. [Google Scholar] [CrossRef] [Green Version]
  3. Baronti, P.; Pillai, P.; Chook, V.W.; Chessa, S.; Gotta, A.; Hu, Y.F. Wireless sensor networks: A survey on the state of the art and the 802.15. 4 and ZigBee standards. Comput. Commun. 2007, 30, 1655–1695. [Google Scholar] [CrossRef]
  4. Yick, J.; Mukherjee, B.; Ghosal, D. Wireless sensor network survey. Comput. Netw. 2008, 52, 2292–2330. [Google Scholar] [CrossRef]
  5. De Souza, R.W.R.; Moreira, L.R.; Rodrigues, J.J.P.C.; Moreira, R.R.; de Albuquerque, V.H.C. Deploying wireless sensor networks–based smart grid for smart meters monitoring and control. Int. J. Commun. Syst. 2018, 31, e3557. [Google Scholar] [CrossRef]
  6. Perrig, A.; Szewczyk, R.; Tygar, J.D.; Wen, V.; Culler, D.E. SPINS: Security protocols for sensor networks. Wirel. Netw. 2002, 8, 521–534. [Google Scholar] [CrossRef]
  7. Wang, Y.; Attebury, G.; Ramamurthy, B. A survey of security issues in wireless sensor networks. IEEE Commun. Surv. Tutorials. 2006, 8, 2–23. [Google Scholar] [CrossRef] [Green Version]
  8. Chen, X.; Makki, K.; Yen, K.; Pissinou, N. Sensor network security: A survey. IEEE Commun. Surv. Tutor. 2009, 11, 52–73. [Google Scholar] [CrossRef] [Green Version]
  9. Ozdemir, S.; Xiao, Y. Secure data aggregation in wireless sensor networks: A comprehensive overview. Comput. Netw. 2009, 53, 2022–2037. [Google Scholar] [CrossRef]
  10. Roman, R.; Alcaraz, C.; Lopez, J. A survey of cryptographic primitives and implementations for hardware-constrained sensor network nodes. Mobile Netw. Appl. 2007, 12, 231–244. [Google Scholar] [CrossRef]
  11. Li, M.; Lou, W.; Ren, K. Data security and privacy in wireless body area networks. IEEE Wirel. Commun. 2010, 17, 51–58. [Google Scholar] [CrossRef]
  12. Yu, Y.; Li, K.; Zhou, W.; Li, P. Trust mechanisms in wireless sensor networks: Attack analysis and countermeasures. J. Netw. Comput. Appl. 2012, 35, 867–880. [Google Scholar] [CrossRef]
  13. He, D.; Kumar, N.; Chilamkurti, N. A secure temporal-credential-based mutual authentication and key agreement scheme with pseudo identity for wireless sensor networks. Inf. Sci. 2015, 321, 263–277. [Google Scholar] [CrossRef]
  14. Akyildiz, I.; Su, W.; Sankarasubramaniam, Y.; Cayirci, E. Wireless sensor networks: A survey. Comput. Netw. 2002, 38, 393–422. [Google Scholar] [CrossRef] [Green Version]
  15. Buratti, C.; Conti, A.; Dardari, D.; Verdone, R. An Overview on Wireless Sensor Networks Technology and Evolution. Sensors 2009, 9, 6869–6896. [Google Scholar] [CrossRef] [Green Version]
  16. Chandrakasan, A.; Amirtharajah, R.; Cho, S.; Goodman, J.; Konduri, G.; Kulik, J.; Rabiner, W.; Wang, A. Design considerations for distributed microsensor systems. In Proceedings of the IEEE 1999 Custom Integrated Circuits Conference, San Diego, CA, USA, 19 May 1999; pp. 279–286. [Google Scholar]
  17. Zhou, Y.; Fang, Y.; Zhang, Y. Securing wireless sensor networks: A survey. IEEE Commun. Surv. Tutor. 2008, 10, 6–28. [Google Scholar] [CrossRef]
  18. Feng, D.; Jiang, C.; Lim, G.; Cimini, L.J.; Feng, G.; Li, G.Y. A survey of energy-efficient wireless communications. IEEE Commun. Surv. Tutor. 2013, 15, 167–178. [Google Scholar] [CrossRef]
  19. Diffie, W.; Hellman, M. New directions in cryptography. Inf. Theory IEEE Trans. 1976, 22, 644–654. [Google Scholar] [CrossRef] [Green Version]
  20. Gülen, U.; Baktır, S. Elliptic Curve Cryptography on Constrained Microcontrollers Using Frequency Domain Arithmetic. In International Conference on Computational Science and Its Applications; Springer: New York, NY, USA, 2014; pp. 493–506. [Google Scholar]
  21. Gulen, U.; Baktir, S. Elliptic-curve cryptography for wireless sensor network nodes without hardware multiplier support. Secur. Commun. Netw. 2016, 9, 4992–5002. [Google Scholar] [CrossRef]
  22. Szczechowiak, P.; Oliveira, L.B.; Scott, M.; Collier, M.; Dahab, R. NanoECC: Testing the limits of elliptic curve cryptography in sensor networks. In Wireless Sensor Networks; Springer: New York, NY, USA, 2008; pp. 305–320. [Google Scholar]
  23. Gouvêa, C.P.L.; López, J. Software implementation of pairing-based cryptography on sensor networks using the MSP430 microcontroller. In Progress in Cryptology-INDOCRYPT 2009; Springer: New York, NY, USA, 2009; pp. 248–262. [Google Scholar]
  24. Wang, H.; Li, Q. Efficient implementation of public key cryptosystems on mote sensors (short paper). In Information and Communications Security; Springer: New York, NY, USA, 2006; pp. 519–528. [Google Scholar]
  25. Koblitz, N. Elliptic Curve Cryptosystems. Math. Comput. 1987, 48, 203–209. [Google Scholar] [CrossRef]
  26. Miller, V. Uses of Elliptic Curves in Cryptography. In Advances in Cryptology—CRYPTO ’85; Williams, H.C., Ed.; Springer: Berlin, Germany, 1986; Volume LNCS 218, pp. 417–426. [Google Scholar]
  27. Rivest, R.L.; Shamir, A.; Adleman, L. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef]
  28. Bailey, D.V.; Paar, C. Optimal Extension Fields for Fast Arithmetic in Public-Key Algorithms. In Advances in Cryptology—CRYPTO ’98; Krawczyk, H., Ed.; Springer: Berlin, Germany, 1998; Volume LNCS 1462, pp. 472–485. [Google Scholar]
  29. Bailey, D.V.; Paar, C. Efficient arithmetic in finite field extensions with application in elliptic curve cryptography. J. Cryptol. 2001, 14, 153–176. [Google Scholar] [CrossRef]
  30. Edwards, H.M. A normal form for elliptic curves. Bull. Am. Math. Soc. 2007, 44, 393–422. [Google Scholar] [CrossRef] [Green Version]
  31. Pollard, J.M. The Fast Fourier Transform in a Finite Field. Math. Comput. 1971, 25, 365–374. [Google Scholar] [CrossRef]
  32. Lawrence, B. Application of the fast Fourier number theoretic transform to radar. In Proceedings of the 1991 IEEE National Radar Conference, Los Angeles, CA, USA, 12–13 March 1991; pp. 137–141. [Google Scholar] [CrossRef]
  33. Nussbaumer, H.J. Digital Filtering Using Complex Mersenne Transforms. IBM J. Res. Dev. 1976, 20, 498–504. [Google Scholar] [CrossRef]
  34. Shakaff, A.Y.M.; Pajayakrit, A.; Holt, A.G.J. Practical implementations of block-mode image filters using the Fermat number transform on a microprocessor-based system. IEE Proc. G-Electron. Circuits Syst. 1988, 135, 141–154. [Google Scholar] [CrossRef]
  35. Xu, S.; Dai, L.; Lee, S.C. Autocorrelation analysis of speech signals using Fermat number transform (FNT). IEEE Trans. Signal Proc. 1992, 40, 1910–1914. [Google Scholar] [CrossRef]
  36. Madre, G.; Baghious, E.H.; Azou, S.; Burel, G. Fast pitch modelling for CS-ACELP coder using fermat number transforms. In Proceedings of the 3rd IEEE International Symposium on Signal Processing and Information Technology, Darmstadt, Germany, 17 December 2003; pp. 765–768. [Google Scholar] [CrossRef]
  37. Toivonen, T.; Heikkilä, J. Video filtering with Fermat number theoretic transforms using residue number system. IEEE Trans. Circuits Syst. Video Technol. 2006, 16, 92–101. [Google Scholar] [CrossRef]
  38. Wang, W.; Huang, X. A novel fast modular multiplier architecture for 8192-bit RSA cryposystem. In Proceedings of the 2013 IEEE High Performance Extreme Computing Conference (HPEC), Waltham, MA, USA, 10–12 September 2013; pp. 1–5. [Google Scholar] [CrossRef]
  39. Cao, X.; Moore, C.; O’Neill, M.; O’Sullivan, E.; Hanley, N. Optimised Multiplication Architectures for Accelerating Fully Homomorphic Encryption. IEEE Trans. Comput. 2016, 65, 2794–2806. [Google Scholar] [CrossRef] [Green Version]
  40. Cao, X.; Moore, C.; O’Neill, M.; Hanley, N.; O’Sullivan, E. High-Speed Fully Homomorphic Encryption Over the Integers. In Financial Cryptography and Data Security; Böhme, R., Brenner, M., Moore, T., Smith, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 169–180. [Google Scholar]
  41. Van Dijk, M.; Gentry, C.; Halevi, S.; Vaikuntanathan, V. Fully Homomorphic Encryption over the Integers. In Advances in Cryptology–EUROCRYPT 2010; Gilbert, H., Ed.; Springer: Berlin/Heidelberg, Germany, 2010; pp. 24–43. [Google Scholar]
  42. Feng, X.; Li, S. Accelerating an FHE Integer Multiplier Using Negative Wrapped Convolution and Ping-Pong FFT. IEEE Trans. Circuits Syst. II: Express Briefs 2019, 66, 121–125. [Google Scholar] [CrossRef]
  43. Pöppelmann, T.; Güneysu, T. Towards Efficient Arithmetic for Lattice-Based Cryptography on Reconfigurable Hardware. In Progress in Cryptology–LATINCRYPT 2012; Hevia, A., Neven, G., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 139–158. [Google Scholar]
  44. Lyubashevsky, V.; Peikert, C.; Regev, O. On Ideal Lattices and Learning with Errors over Rings. J. ACM 2013, 60, 43:1–43:35. [Google Scholar] [CrossRef]
  45. Güneysu, T.; Lyubashevsky, V.; Pöppelmann, T. Practical Lattice-Based Cryptography: A Signature Scheme for Embedded Systems. In Cryptographic Hardware and Embedded Systems–CHES 2012; Prouff, E., Schaumont, P., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 530–547. [Google Scholar]
  46. Aguilar-Melchor, C.; Barrier, J.; Guelton, S.; Guinet, A.; Killijian, M.O.; Lepoint, T. NFLlib: NTT-Based Fast Lattice Library. In Topics in Cryptology-CT-RSA 2016; Sako, K., Ed.; Springer: Cham, Switzerland, 2016; pp. 341–356. [Google Scholar]
  47. Liu, Z.; Pöppelmann, T.; Oder, T.; Seo, H.; Roy, S.S.; Güneysu, T.; Groädl, J.; Kim, H.; Verbauwhede, I. High-Performance Ideal Lattice-Based Cryptography on 8-Bit AVR Microcontrollers. ACM Trans. Embed. Comput. Syst. 2017, 16, 117:1–117:24. [Google Scholar] [CrossRef]
  48. Sinha Roy, S.; Verbauwhede, I. Ring-LWE Public Key Encryption Processor. In Lattice-Based Public-Key Cryptography in Hardware; Springer: Singapore, 2020; pp. 65–81. [Google Scholar]
  49. Seo, H.; Liu, Z.; Park, T.; Kwon, H.; Lee, S.; Kim, H. Secure Number Theoretic Transform and A Speed Record for Ring-LWE Encryption on Embedded Processors. In Information Security and Cryptology–ICISC 2017; Kim, H., Kim, D.C., Eds.; Springer: Cham, Switzerland, 2018; pp. 175–188. [Google Scholar]
  50. Feng, X.; Li, S.; Xu, S. RLWE-Oriented High-Speed Polynomial Multiplier Utilizing Multi-lane Stockham NTT Algorithm. IEEE Trans. Circuits Syst. II Express Briefs 2019, 1. [Google Scholar] [CrossRef]
  51. Baktir, S.; Kumar, S.; Paar, C.; Sunar, B. A State-of-the-art Elliptic Curve Cryptographic Processor Operating in the Frequency Domain. Mobile Netw. Appl. 2007, 12, 259–270. [Google Scholar] [CrossRef] [Green Version]
  52. Mentens, N.; Batina, L.; Baktır, S. An Elliptic Curve Cryptographic Processor Using Edwards Curves and the Number Theoretic Transform. In International Conference on Cryptography and Information Security in the Balkans; Springer: New York, NY, USA, 2014; pp. 94–102. [Google Scholar]
  53. Burrus, C.S.; Parks, T.W. DFT/FFT and Convolution Algorithms.; John Wiley & Sons: London, UK, 1985. [Google Scholar]
  54. Tolimieri, R.; An, M.; Lu, C. Algorithms for Discrete Fourier Transform and Convolution.; Springer: New York, NY, USA, 1989. [Google Scholar]
  55. McEliece, R.J. Finite Fields for Computer Scientists and Engineers; Springer: New York, NY, USA, 2012; Volume 23. [Google Scholar]
  56. Lidl, R.; Niederreiter, H. Introduction to Finite Fields and Their Applications; Cambridge University Press: Cambridge, UK, 1994. [Google Scholar]
  57. Menezes, A.J.; Van Oorschot, P.C.; Vanstone, S.A. Handbook of Applied Cryptography; CRC press: Boca Raton, FL, USA, 1996; Chapter 14; pp. 610–613. [Google Scholar]
  58. Kocher, P.C. Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems. In Proceedings of the Advances in Cryptology—CRYPTO ’96. LNCS, Santa Barbara, CA, USA, 18–22 August 1996. [Google Scholar]
  59. Hankerson, D.; Menezes, A.J.; Vanstone, S. Guide to Elliptic Curve Cryptography; Springer: New York, NY, USA, 2003. [Google Scholar]
  60. Enge, A. Elliptic Curves and Their Applications to Cryptography: An Introduction; Springer: New York, NY, USA, 2012. [Google Scholar]
  61. Blake, I.; Seroussi, G.; Smart, N. Elliptic Curves in Cryptography; London Mathematical Society Lecture Notes Series 265; Cambridge University Press: Cambridge, UK, 1999. [Google Scholar]
  62. Bernstein, D.J.; Lange, T. Faster addition and doubling on elliptic curves. In Advances in Cryptology– ASIACRYPT 2007; Springer: New York, NY, USA, 2007; pp. 29–50. [Google Scholar]
  63. Bailey, D.V.; Paar, C. Optimal extension fields for fast arithmetic in public-key algorithms. In Annual International Cryptology Conference; Springer: New York, NY, USA, 1998; pp. 472–485. [Google Scholar]
  64. Baktır, S. Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography. Ph.D. Thesis, Worcester Polytechnic Institute, Worcester, MA, USA, 2008. [Google Scholar]
  65. MSP430x1xx Family User’s Guide. Available online: http://www.ti.com/lit/ug/slau049f/slau049f.pdf (accessed on 8 March 2020).
  66. IAR Embedded Workbench IDE. Available online: https://www.brown.edu/Departments/Engineering/Courses/En164/EWARM_UserGuide.ENU.pdf (accessed on 8 March 2020).
  67. Liu, Z.; Großschädl, J.; Li, L.; Xu, Q. Energy-efficient elliptic curve cryptography for MSP430-based wireless sensor nodes. In Australasian Conference on Information Security and Privacy; Springer: New York, NY, USA, 2016; pp. 94–112. [Google Scholar]
  68. Gouvêa, C.P.; Oliveira, L.B.; López, J. Efficient software implementation of public-key cryptography on sensor networks using the MSP430X microcontroller. J. Cryptogr. Eng. 2012, 2, 19–29. [Google Scholar] [CrossRef]
  69. Wang, H.; Sheng, B.; Li, Q. Elliptic curve cryptography-based access control in sensor networks. Int. J. Secur. Netw. 2006, 1, 127–137. [Google Scholar] [CrossRef] [Green Version]
  70. Wenger, E.; Werner, M. Evaluating 16-bit processors for elliptic curve cryptography. In Smart Card Research and Advanced Applications; Springer: New York, NY, USA, 2011; pp. 166–181. [Google Scholar]
  71. Liu, A.; Ning, P. TinyECC: A Configurable Library for Elliptic Curve Cryptography in Wireless Sensor Networks. In Proceedings of the 7th International Conference on Information Processing in Sensor Networks, IEEE Computer Society, IPSN ’08, Washington, DC, USA, 22–24 April 2008; pp. 245–256. [Google Scholar]
Figure 1. Comparison for random point multiplication timings.
Figure 1. Comparison for random point multiplication timings.
Sensors 20 01507 g001
Figure 2. Comparison for fixed point multiplication timings.
Figure 2. Comparison for fixed point multiplication timings.
Sensors 20 01507 g002
Table 1. Our timings for G F ( ( 2 13 1 ) 13 ) arithmetic and ECC operations on MSP430F1611 @ 8 MHz.
Table 1. Our timings for G F ( ( 2 13 1 ) 13 ) arithmetic and ECC operations on MSP430F1611 @ 8 MHz.
Operation Timing
Forward NTT(Algorithm 4) 0.21  ms
Inverse NTT(Algorithm 5) 0.44  ms
NTT Squaring 0.78  ms
NTT Multiplication 1.02  ms
ECC Point Doubling(Algorithm 6) 5.63  ms
ECC Point Addition(Algorithm 7) 9.64  ms
NAF4 ECC Random Point Multiplication 1.31  s
Comb4 ECC Fixed Point Multiplication 0.65  s
Table 2. Timings for ECC random point multiplication.
Table 2. Timings for ECC random point multiplication.
MicrocontrollerFieldMethodTiming
MSP430F1611 @ 8 MHz [67] F P 159 Montgomery ladder 0.48  s
MSP430F1611 @ 8 MHz [68] F P 160 4NAF 0.58  s
MSP430F1611 @ 8 MHz (This work) F ( 2 13 1 ) 13 4NAF 1.31  s
MSP430F149   @ 8 MHz [20] F ( 2 13 1 ) 13 4NAF 1.55  s
MSP430F1611 @ 8 MHz [24] F P 160 - 1.60  s
MSP430F1611 @ 8 MHz [69] F P 160 - 3.51  s
Table 3. Timings for ECC fixed point multiplication.
Table 3. Timings for ECC fixed point multiplication.
MicrocontrollerFieldMethodTiming
MSP430F1611 @ 8 MHz [67] F P 159 Comb 0.24  s
MSP430F1611 @ 8 MHz [68] F P 160 4NAF 0.52  s
MSP430F1611 @ 8 MHz (This work) F ( 2 13 1 ) 13 Comb 0.65  s
MSP430F1611 @ 8 MHz [22] F P 160 Comb 0.72  s
MSP430F1611 @ 8 MHz [22] F 2 163 Comb 1.04  s
MSP430F1611 @ 8 MHz [70] F P 160 - 1.09  s
MSP430F1611 @ 8 MHz [24] F P 160 Sliding Window 1.44  s
MSP430F1611 @ 8 MHz [71] F P 160 Sliding window 1.58  s

Share and Cite

MDPI and ACS Style

Gulen, U.; Baktir, S. Elliptic Curve Cryptography for Wireless Sensor Networks Using the Number Theoretic Transform. Sensors 2020, 20, 1507. https://doi.org/10.3390/s20051507

AMA Style

Gulen U, Baktir S. Elliptic Curve Cryptography for Wireless Sensor Networks Using the Number Theoretic Transform. Sensors. 2020; 20(5):1507. https://doi.org/10.3390/s20051507

Chicago/Turabian Style

Gulen, Utku, and Selcuk Baktir. 2020. "Elliptic Curve Cryptography for Wireless Sensor Networks Using the Number Theoretic Transform" Sensors 20, no. 5: 1507. https://doi.org/10.3390/s20051507

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop