FPGA Implementation of Elliptic Curve Cryptoprocessor for Perceptual Layer of the Internet of Things

Today’s developing era data and information security plays an important role in unsecured communication between Internet of Things (IoT) elements. In IoT, data are transmitted in plaintext for many reasons. One of the most common reason is the availability of hardware. Many IoT products are inexpensive components with limited memory and computational resources. Such devices might be unable to support the computationally intense cryptographic functions of asymmetrical cryptography. If designers considered the privacy implications of unencrypted data, they have limited options for encryption because of the hardware platform. Therefore the designers have to create their own security protocols or implement stripped-down versions of existing security protocols. The second option has a better chances. Evidence recommends such a modified protocol would run efficiently on small devices. Elliptic Curve Cryptography (ECC) is used to ensure complete protection against the security risks such as confidentiality, integrity, privacy and authentication by implementing an Elliptic Curve Cryptoprocessor. The work focuses on high-performance Elliptic Curve Cryptoprocessor design, optimized for Field Programmable Gate Array (FPGA) implementation, using the concept of asymmetric and hash algorithms. A novel cryptographic algorithm consisting of matrix mapping methodology and hidden generator point theory is to be applied for encryption/decryption between the sender and receiver whereas Elliptic Curve Digital Signature Algorithm (ECDSA) designed using Keccak Secured Hash Algorithm (SHA) algorithm is applied for the validation of the encrypted data. The proposed Cryptoprocessor operates at a minimum period of 6.980 ns and maximum frequency of 143.276 MHz. This work focuses on the practicability of public key cryptography implementation for devices connected in the perceptual layer of IoT.


Introduction
Internet of Things (IoT) is a global network of interoperable devices.The physical things generally connected in the perceptual layer are Wireless Sensor Networks (WSNs), Radio Frequency Identification (RFIDs), etc., [1].According to the IoT concept, these algorithm becomes difficult.Thus an attacker can exploit a weakness in an IoT devices.Therefore cryptographic techniques are applied to protect the data stored, processed and shared, between the devices [3], [4].A cryptoprocessor is constructed on FPGA using the concept of asymmetrical cryptography and hash algorithm.Cryptographic algorithm consisting of matrix mapping methodology and hidden generator point concept is applied for encryption/decryption whereas modified ECDSA using Keccak SHA-3 algorithm is applied for validation of the encrypted data.A novel version of data security method based on ECC-SHA combinational is implemented on FPGA for Internet of Things devices [5].An introduction to IoT is provided in section II and the novel Elliptic Curve Cryptoprocessor implementation in section III, modified Elliptic Curve Digital Signature algorithm in section IV.The Proposed cryptoprocessor is provided in section V and the implementation of proposed cryptoprocessor in performed in section VI.The simulation results of Cryptoprocessor are explained in section VII and result analysis in section VIII.The conclusion is discussed in section IX and is followed by references.

Internet of Things
The concept of IoT was explained in 1999 by Kenn Ashton and was defined as a dynamic global network infrastructure by International Telecommunication Union (ITU) and International Energy Research Centre (IERC) [6].The idea of IoT was evolved from the concept of Internet.From the research it is said that by 2020 around 50 billion devices will be interconnected with each other.It is considered as an emerging field and is specified in the Gartner's IT hype cycle shown in Figure 1.IoT are different from the existing distributed system because of limited connectivity.
In the IoT scenarios, constellation of wireless devices having a number of key properties such as mobility, wireless, embedded use, diversity and scale; that yields several vulnerabilities related to security.In the nonsecure channel, challenges related to security have to be tackled for devices as well as the information [7].The devices connected in the IoT have their own security requirements, thus in the IoT to ensure confidentiality, authentication, integrity encryption of the information and authentication has to be provided.The internal architecture of IoT is built based on the security deficiency.As shown in the Figure 2, IoT is normally considered as three layered architecture consisting of the perception or perceptual layer, the network layer and the application layer [8].The bottom layer is the perception layer or perceptual layer that receives the information through WSNs and RFIDs and passes this information to the middle layer.The middle layer is the network layer which process the information received from the perception layer.The top most layer is the Application layer which generally processes enormous data [9], [10].This layer segregates the information based on the devices.These enormous data are managed through cloud computing.IoT security is primarily a management issue involving a highly efficient cryptographic algorithms providing confidentiality, integrity, and authenticity [19].

Novel Elliptic Curve Cryptography Protocol
The normal ECC primitive protocols are configured with the points on the Elliptic Curve, a generator point 'G' is selected publicly available and distributed over the network by the Certificate Authority (CA) [11], [12].In these protocols, the requirement of CA makes it difficult to implement security.The information shared by the CA can be breached by the intruders, making the network susceptible to MIM attack.
Hence to elucidate this exposure and to secure the network against MIM attacks, maintaining the security for each session of communication between the two nodes without a common generator point is suggested.Therefore a generator point is shared only between the devices connected to communicate.This concept is implemented in the ECC primitive protocols [21], [23].

Initialization Stage
Let us consider two nodes shown in Figure 3 in the WSN.It is assumed that both nodes i.e, sender and receiver select their generator points, GS and GR individually apart from the private keys, KS and KR.The inverse of the private keys KS -1 and KR -1 are also computed.
Once the keys are initialized, the sender generates public key PSA and using the Eq. ( 1) and receiver generates public key PRA using the Eq. ( 2) (2) Both the public keys PSA and PRA exchanged after multiplying it with the inverses of private keys.The key transmitted to the receiver is specified in the Eq. ( 3) and the key received by the sender is specified in the Eq. ( 4) PSB = PRAKS -1 = KR -1 GRKS -1 (3) PRB = PSAKR -1 = KS -1 GSKR -1 (4) The keys of the sender and the receiver are multiplied again to generate PSC and PRC given in Eq. ( 5) and Eq. ( 6) as PSC=PRBKS=KS -1 GSKR -1 KS =GSKR -1  (5) PRC=PSBKR=KR -1 GRKS -1 KR= GRKS -1 (6) When PSC and PRC received by the individuals, they are multiplied with KS and KR to obtain GR and GS.

Figure 3. Computational process for Generator point
The sender computes the receiver's generator point in Eq. (7) as PRC*KS=KS -1 *GR*KS=GR (7) The receiver computes the sender's generator in Eq. ( 8) as PSC*KR=KR -1 *GS*KR=GS (8) The generator points GS and GR are added to generate a common generator points between the sender and receiver given in Eq. ( 9) as G = GS + GR (9) Hence the sender and receiver exchanges information between them and generated using 'G' and computing P, 2P….. kP.

Authorization Stage
The nodes must share a secret key for encryption and decryption.This key must be generated by the process  The public key and the private keys of the transmitter are PS and KS whereas for receiver PR and KR.The sender generates PSR and transmits it to receiver, similarly receiver generates PRS and transmits it to sender.The sender then generates KSR in Eq. ( 10) and the receiver generates KRS in Eq. ( 11) as KSR =PSRPRS (10) KRS =PRSPSR (11) The key for ECC process is specified in Eq. ( 12) as K= KRS + KSR (12)

Novel Cryptographic Algorithm
The Elliptic Curve Cryptography is implemented using matrix mapping methodology.In matrix mapping method the alphanumeric characters are mapped on to the points of the Elliptic Curve are represented in the form of m x n matrix.The points in the matrix form are multiplied with a non-singular matrix and is explained in steps below.It is assumed that both the sender and the receiver of the message to know non-singular matrix A.
Step 1: The original message M of length n is taken for consideration and transformation of the alphanumeric characters into points on Elliptic Curve represented in Eq. ( 13).
Step 3: The resulting set of points is given in Eq. ( 25) as Step 4: This Elliptic Curve point mapped message is remapped with ASCII characters to get back the original information.The receiver performs inverse of matrix selected and the resultant of the inverse matrix and decrypted data are considered to compute the Elliptic Curve mapped message M.This Elliptic Curve point mapped message is remapped with ASCII characters to get back the original information The decryption process is verified as

Modified Elliptic Curve Digital Signature Algorithm
.In the proposed ECDSA model hidden generator point concept is applied to authenticate the encrypted message communicated between the devices connected in the perceptual layer of IoT [13], [14].
Considering two nodes as sender and receiver in the WSN.These nodes have individual generator points, GS and GR with their unique private keys, KS and KR.After initializing the keys generation process, both devices exchange the generator points GS and GR and generate a common generator point by the initialization process explained in sub section 3.1.Hence the sender and receiver exchanges information between them by considering common generator point 'G' and computing P, 2P, 3P….. kP [17].[18].
The sensor nodes must securely share a key before encryption.The shared secret key is generated and refreshed between the sender and receiver.The public key of sender and receiver are PS and PR. are exchanged using DHKE process and a key is generated by the method explained in the section 3.
Considering the generator point 'G' and key 'K', scalar multiplication is performed to compute KG provided in Eq. ( 26), to be applied for signature generation and signature verification process.Hence v=r The improved ECDSA scheme reduce the computational cost while keeping the same security as original ECDSA.They are suitable for the users who have limited compute capacity [15], [16].

Proposed Elliptic Curve Cryptoprocessor
With the development of Integrated Circuits technology, WSN is growing strong and is widely used in special fields.As it has limited energy, communication and storage resources, encryption and authentication protocols must be improved [20], [22].In the proposed cryptoprocessor the security of information transmitted by devices in the IoT is implemented.This cryptoprocessor plays a major part by applying methods such as key generation using Diffie Hellman Key Exchange process and hidden generator concept requiring exchange of messages during the transmission of data.
Considering two nodes as sender and receiver in the WSN.These nodes have individual generator points, GS and GR with their unique private keys, KS and KR.After initializing the keys generation process, both devices exchange the generator points GS and GR and generate a common generator point by the initialization process explained in sub section 3.1.Hence the sender and receiver exchanges information between them by considering common generator point 'G' and computing P, 2P, 3P….. kP.
The sensor nodes must securely share a key before encryption.The shared secret key is generated and refreshed between the sender and receiver.The public key of sender and receiver are PS and PR. are exchanged using DHKE process and a key is generated by the method explained in the sub section 3.2.
Considering the generator point 'G' and key 'K', scalar multiplication is performed to compute KG provided in Eq. ( 27), to be applied for encryption/decryption and signature generation and verification process.In the proposed Cryptoprocessor transmitter model represented in Figure 5, by considering the value of KG, the plain data is encrypted by applying proposed ECC encryption process to generate cipher data.The cipher data is applied to proposed ECDSA protocol for signature generation.The hash function SHA-3 Keccak algorithm is considered for generating signature.The two ECC primitive protocols outputs i.e., encrypted data and signature are mutually combined in transmitter before transmission.

Figure 6. Cryptoprocessor Receiver
In the proposed Cryptoprocessor receiver model represented in Figure 6.The combined data i.e., the encrypted data and signature are separated in the receiver verification and decryption process.Considering the value of KG, the cipher data is applied to proposed ECDSA protocol for signature verification.If the signature is verified the cipher data is decrypted by applying proposed ECC decryption process to generate plain data else the cipher data is discarded.The hash function SHA-3 Keccak algorithm is considered for verifying the signature.

Implementation of Proposed Elliptic Curve Cryptoprocessor
The hardware implementation proposed Cryptoprocessor model was realized in Verilog HDL and simulation carried out using ISim simulation tool in XILINX for verifying its functional correctness.For validating the functional correctness Xilinx 14.3 synthesis tool used to do synthesis.The wireless sensor nodes in the network transfer or exchange information between the nodes.The input data to be transmitted in hexadecimal form DA2A806A1F4A1F4A1F4A1F4A1F0652D9. The 128 bits of data divided into 16 blocks and is encrypted using modified ECC algorithm with matrix mapping methodology.
In the initial stage, a generator point 'G' is computed individually by the sender and receiver.The sender has the choice to choose an Elliptic Curve, represented as Y1 2 =(X1 3 +3X1+4) mod 43, where a=3, b=4 and p=43.To find out the points on an Elliptic Curve we compute Y1 2 mod 43 for Y1= 0 to 43 and compute Y1 2 =(X1 3 +3X1+4) mod 43 for X1= 0 to 43.Considering the values the elliptic points available on the curve a generation point GA = (30, 41) was selected.
The shared generator point is calculated by generating the sender's secret key KS as 13 and receiver's secret key KR as 25.Generator point between two nodes for each communication session is generated and common generator point is calculated based on the proposed method and is generated as GC = GA + GB = (14, 34) + (21, 18) = (12, 1) = G Considering G = P = (12, 1), scalar point multiplication is performed to calculate 2P, 3P,………up to 256P, and are mapped with the hexadecimal equivalent representation, 00 to FF, where each block is of 8 bits.The scalar multiplication is performed by point addition and point doubling process.The hexadecimal characters are than mapped to the scalar multiplied points.
The hexadecimal equivalent of the individual block is mapped to a scalar multiple of the generator point and is represented in a matrix form.Let M be the matrix form of key of length n =16 and is given in Eq. ( 28 A 4*4 matrix is selected in Eq. ( 29) such that |A| ±1 The mapping is accomplished by multiplying the nonsingular matrix with the message matrix to get Q matrix represented in the Eq.(30) as In modified Diffie Hellman key exchange process a random number KS is generated by sender is 13 and a random number KR generated by receiver is 25.The signature of A for message M is the pair (r, s) = (d3, 565d) The Receiver receives the cipher text and the ciphertext (C1i, C2i) is decrypted using Eq. ( 16) and Eq. ( 17) to get Q matrix specified in Eq. ( 32 Consider the inverse of the non-singular matrix specified in Eq. ( 33) In the receiver the message in the form of Elliptic Curve points are calculate by multiplying the inverse of nonsingular matrix with the decoded Q matrix.The message is de-mapped to get back the information in the Hexadecimal formatshown in Eq. (34

Simulation Results of Cryptoprocessor
The proposed cryptoprocessor transmitter and receiver was realized in Verilog HDL and simulation carried out using ISim simulation tool in XILINX for verifying its functional correctness.For validating the functional correctness Xilinx 14.3 synthesis tool used to do synthesis.The top module, block diagram and the expanded block diagram of the proposed cryptoprocessor transmitter generated are shown in the Figure 7 to Figure 9 and proposed cryptoprocessor receiver generated are shown in the Figure 10 to Figure 12.The simulation result of the transmitter block is presented in Figure 13 and receiver block is presented in Figure 14.The proposed cryptoprocessor was realized in Verilog HDL and simulation carried out using ISim simulation tool in XILINX for verifying its functional correctness.For validating the functional correctness Xilinx 14.3 synthesis tool used to do synthesis.The top module, block diagram and expanded block diagram of the proposed cryptoprocessor is generated and is as shown in the Figure 15 to Figure 17.The simulation result of the transmitter block is presented in Figure 18.

Result Analysis of Cryptoprocessor
The cryptoprocessor transmitter and receiver are synthesized and the device utilization summary, timings summary and memory utilization is tabulated in Table 1.The hardware implementation of Elliptic Curve Cryptoprocessor transmitter and receiver has been implemented.The transmitter and receiver are designed using Verilog HDL, and implemented on a Genesys Virtex-5 5XC5VLX50T-1FF1136 FPGA Development board by XILINX to evaluate the area and speed.The transmitter operates at a frequency of 151.366MHz and performs the encryption operation in 6.606 ns.The receiver operates at a frequency of 140.089MHz and performs the encryption operation in 7.138 ns.The proposed cryptoprocessor is synthesized and the device utilization summary, timings summary and memory utilization is tabulated in Table 2.The hardware implementation of proposed Cryptoprocessor has been implemented in this chapter.The Cryptoprocessor is designed using Verilog HDL, and implemented on a Genesys Virtex-5 5XC5VLX50T-1FF1136 FPGA Development board by XILINX to evaluate the area and speed.The system operates at a frequency of 143.276 MHz and performs the operation in 6.980 ns.

Conclusion
Elliptic Curve Cryptoprocessor and the parameters used for devices connected in the perceptual layer of IoT are briefly reviewed and the structure combining ECC and ECDSA has been presented.To overcome MIM attack and secure the unsecured channel, ECC primitive protocols were modified using a matrix mapping methodology and hidden generator point concept.It also focused on generating a unique shared key for each session of communication between the two nodes in unsecured channel.The information transmitted was validated by adding a signature to the data.The two ECC primitive protocols (a novel Elliptic Curve Cryptosystem and modified ECDSA) mutually enhance the performance of Cryptoprocessor.These ECC primitive protocols are suitable for the devices having limited compute capability.The proposed Elliptic Curve Cryptoprocessor was implemented on a Genesys Virtex-5 5XC5VLX50T-1FF1136 FPGA Development board by XILINX.It operates at a minimum period of 6.980 ns and maximum frequency of 143.276 MHz.Thus the proposed hardware assisted approach makes asymmetrical cryptography practicable on resource constrained devices connected in the perceptual layer of IoT.

Figure 2 .
Figure 2. Security Architecture of IoT

EAI
Endorsed Transactions on Security and Safety 05 2018 -10 2018 | Volume 5 | Issue 15 | e4 FPGA Implementation of Elliptic Curve Cryptoprocessor for Perceptual Layer of the Internet of Things shown in the Figure4for every session of transmission between the sender and receiver.Thus authorization has to be provided for transmission.

Figure 4 .
Figure 4. Computational process for Key

EAI
Endorsed Transactions on Security and Safety 05 2018 -10 2018 | Volume 5 | Issue 15 | e4 FPGA Implementation of Elliptic Curve Cryptoprocessor for Perceptual Layer of the Internet of Things

Table 2
Synthesis Summary of Proposed Cryptoprocessor