Various algorithms are employed to perform modular multiplication. Montgomery .... D. H., âModular Arithmetic in RSA Cryptographyâ, International Journal of.
Asian Research Consortium Asian Journal of Research in Social Sciences and Humanities Vol. 7, No. 2, February 2017, pp. 632-639. ISSN 2249-7315 A Journal Indexed in Indian Citation Index DOI NUMBER: 10.5958/2249-7315.2017.00116.2 Category:Science and Technology
Asian Journal of Research in Social Sciences and Humanities www.aijsh.com
VLSI Implementation of RSA Cryptosystems using Montgomery Multplication with Sum Based Adder G. Narmadha*; Dr. K. Balasubadra** *Assistant Professor, Sethu Institute of Technology, Anna University, Chennai, India. **Professor, R.M.D Engineering College, Anna University, Chennai, India.
Abstract In Public key cryptosystems, RSA is the most commonly used system because of its faster implementation and high security. Modular exponentiation is the vital function in RSA cryptosystems to achieve both encryption and decryption and it can be performed by doing repeated modular multiplications. Various algorithms are employed to perform modular multiplication. Montgomery algorithm is the mostly adopted algorithm to enhance the speed of the multiplication process. The sum based adder (SBA) is involved to perform the addition operation which replaces the other adder architecture already used in the Montgomery modular multiplication algorithm. The proposed methodology is simulated and synthesized using Xilinx 12.1i with Spartan 3 and Virtex 5 FPGA device. The RSA cryptosystems with proposed method yields the better performance compared with the existing design.
Keywords: RSA (Rivest, Shamir, Adleman), SBA (Sum based Adder), FPGA (Field Programmable Gate Array).
632
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
Introduction In communication systems, security issues have become a major concern during data transfer because of the importance of data which is to be transferred. Many hackers tried to retrieve the data from the communication channel either for getting the secrete information or to make money such as electronic transaction over the web. To avoid this situation, many cryptographic algorithms are proposed and implemented. Each and every algorithm gets differed from the other based on the strength of security, complexity and implementation strategies. There are two types of cryptography, one is the private key cryptography and another one is public key cryptography. In private key cryptography, the same key is used for both encryption and decryption that is the sender and receiver use the same key to convert the message in to cipher text and to retrieve the message from the cipher text respectively. So the key should be distributed over the communication channel with high security. Because of the security problems in key sharing, public key cryptography is used. W.Diffie and Hellman introduced an efficient method to share a secret key over unsecured channel and this method becomes the basis for introducing public key cryptography. In public key cryptography, a public key (common key) is used for encryption and a secret key (private key) is used for decryption. Public key cryptography provides authentication, data inequality, confidentiality and non repudiation. Public key cryptography consists of various algorithm such as RSA (Rivest, Shamir, Alleman), Diffie Hellman key exchange algorithm, Digital Signature Standards(DSS) and Elliptic Cuve Cryptography(ECC). The most and widely used algorithm is RSA and for high security, operands sizes should be greater than or equal to 1024 bits. Modular exponentiation plays a vital role in RSA cryptosystem and it is carried out by performing modular multiplication. Montgomery multiplication algorithm [5],[12] is an efficient method among various methods such as multiply and square method[1], fast square method [3] and vedic mathematics which uses urdhva-tiryakbhyam[8]. In Montgomery multiplication algorithm, addition operation should be carried out to perform the modular multiplication. Sum based adder is proposed in order to produce an optimized design which is area and time efficient. Section 2 deals with the RSA cryptosystem, Montgomery algorithm is discussed in section 3. In section 4,sum based adder is discussed. Section 5 gives the detailed performance analysis of proposed method and this paper is concluded in section 6.
2. RSA Cryptosystem RSA algorithm has high security, high complexity and the mostly adopted public key cryptography. It consists of two steps. 1.
Key generation
2.
Encryption / Decryption
2.1 Key Generation The key which is used to encrypt the message is called public key and the key which is used to decrypt the cipher text is called private key(secret key). 633
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
The two keys are generated by the following steps. 1.
Select two large prime numbers A,B
2.
Calculate modules number M = A*B
3.
Compute the Eulers function φ(M) = (A-1)*(B-1)
4.
Choose an integer „e‟ as a public key which satisfies gcd(e, φ(M))= 1, 1< e < φ(M).
5.
Calculate the private key „d‟, d*e=1(mod φ(M))
2.2 Encryption / Decryption During encryption, in the transmitter side, the data sender converts the plain text(P) in to cipher text(C) by using the equation 1 and is shown in Figure 1. C = Pe mod M
...(1)
Figure 1. RSA Enryption During Decryption, the cipher text is converted in to the plain text at the receiver side by using the equation 2 ans is shown in the Figure 2. P = Cd mod M
...(2)
Figure 2. RSA Decryption 634
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
3.
Montgomery Multiplication
In RSA cryptosystems, modular exponentiation takes an important role to calculate both plain text and cipher text by using modular exponentiation and it is performed by doing repeated modular multiplication. Many algorithms are proposed and various architectures are implemented to perform modular multiplication. But Montgomery algorithm is the mostly used algorithm in RSA cryptosystems [5],[12] because of its time consuming features. Montgomery multiplication can be done in two fields, 1. Prime field GF(P) and 2. Binary field GF(2 m). In Montgomery multiplication, the inputs are converted to Montgomery domain, after completing the multiplication process, the results are converted back to the original domain. In this paper, Montgomery multiplication algorithm is modified in order to reduce the division process in each and every step. So the area required to do the multiplication process is reduced. Radix -2 Algorithm for m-bit operands such as A = (am-1,..,a1,a0), B= (bm-1,..,b1,b0) and M is given as: Radix-2 Algorithm S0=0 for i=0 to m-1 if (Si + ai.Y) is even then Si+1: = (Si + ai.Y) else Si+1: = (Si + ai.Y + M) if Sm >= M then Sm: = Sm/2
4. Sumbased Adder Montgomery algorithm is implemented with various adder architecture such as carry save adder [2],[9],[11],[14]. Barrel register full adder[6] and carry propagate adder[7]. Every architecture has its own characteristics and the design parameters such as area computation and time consumptions are also differed. Carry save adder requires large number of gates to implement the design [15]. But most of the Montgomery architectures are implemented using carry save adders with different combinations in order to reduce the time consumption. The proposed sum based adder results in lower area consumption as well as time consumption [16]. So when implementing RSA cryptography with Montgomery multiplication along with sum based adder the better performance in design parameters can be achieved.
635
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
5. Performance Analysis The implementation results for Montgomery algorithm in two fields.1. Prime field and 2. Binary field are shown in Table 1. Montgomery algorithm with prime filed is used for RSA cryptography. The verilog code is developed for RSA encryption which uses Montgomery multiplication with existing and proposed adders. The designs are simulated and synthesised by using Xilinx 12.1i with Spartan 3 xc3s400 FPGA device.
Table 1. Implementation Results for Montgomery Algorithm in Prime and Binary Fields BIT SIZE 8 bit 16 bit 32 bit 64 bit
GF(P) 19 21 24 29
Area (No. of Slices) GF(2m) Dual Field 21 39 19 48 42 98 70 137
GF(P) 36.64 36.2 36.6 37.75
Time (nS) GF(2m) 17.73 20.048 26.282 38.251
Dual Field 47.345 46.044 66.326 70.633
The synthesized results for RSA encryption with various adders such as ripple carry adder (RCA), sum based adder (SBA) and carry select adder (CSA) are given in Table 2& Table 3. The performance chart is shown in Figure 3. Based on the performance, the RSA encryption system with SBA results in better time consumption with the same area which are required by the other designs. The time consumption of CSA is more compared to the SBA & RCA.
Table 2. Time Consumption in nS BIT SIZE 8 bit 16 bit 32 bit 64 bit
RCA 58.267 98.069 176.303 314.564
CSA 58.413 104.59 191.506 362.05
SBA 63.45 101.506 174.527 317.859
Time Consumption (nS)
RSA Encryption 350 250 150 50
RCA CSA 8 bit
16 bit
32 bit
SBA 64 bit
Bit Size Figure 3. Time Comparison 636
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
Table 3. Area Consumption (No. of Slices) BIT SIZE 8 bit 16 bit 32 bit 64 bit
RCA 73 156 315 635
CSA 70 158 318 637
SBA 70 154 314 633
The performance of the proposed methodology is also compared with the other existing designs by synthesizing the design by using Xilinx 12.1i with virtex 5 xc6vlx50t FPGA device. The area (number of slices) consumed for RSA encryption with existing and proposed designs are shown in Table 4.
Table4. RSA Encryption Implementation Results RSA Encryption (1024 Bits) With Proposed Sum Based Adder With Ripple Carry Adder Existing [5] Existing [10] Existing [11] Existing [15]
No. of Slices 14,768 15,360 1,022,752 14,948 4,98,378 22,075
The number of slices required for the proposed deign is low compared to the existing structures. Both the time and area are optimized by using the proposed method for performing RSA encryption. Decryption also can be done with the same method by using the private key along with the generated cipher text.
6. Conclusion Modular exponentiation is an essential part in RSA cryptosystem and it is done by using repeated modular multiplication. Montgomery modular multiplication algorithm is considered as the best solution to perform modular exponentiation. In many existing systems, various adders are used in Montgomery algorithm. In this paper, sum based adder is proposed and implemented with montgomery algorithm. Performance analysis are also done for RSA encryption along with three adder designs such as sum based adder, ripple carry adder and carry select adder. Based on the comparison between different adders, it is known that the encryption process with sum based adder results in better time consumption and also the area. In this paper, optimization is achieved among time and area parameter by using the proposed design.
References Ari Shawkat Tahir, “Design and Implementation of RSA Algorithm using FPGA”, International Journal of Computers and Technology, Vol.14, No.12, September 2015, pp.6361 – 6367.
637
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
Anizha Radhakrishnan, Seena George, “Modified Montgomery modular Multiplier for Cryptosystems”, International Journal of Electronics and Communication Engineering & Technology, Vol.5, No.12, December 2014, pp. 139 – 144. S. Prasanth Kumar, K.J. Jegadish Kumar, B. Partibane, “Efficient Modular Exponentiation Architectures for RSA Algorithm”, International Journal of Engineering Research in Electronic and Communication Engineering, Vol.3, No.5, May 2016, pp. 230 – 234. Sridevi, Manjaiah. D. H., “Modular Arithmetic in RSA Cryptography”, International Journal of Advanced Computer Research, Vol. 4, No. 4, December 2014, pp.973 – 978. Manish Bansal, Amit Kumar, Aakansha Devrari, Abhinav Bhat, “Implementation of Modular Exponentiation using Montgomery Algorithm”, International Journal of Scientific & Engineering Research, Vol.6, No.11, November 2015, pp. 1272 – 1277. S. Ashwini, P. Thirapaiah, “A High – Speed Montgomery Modular Multiplication Algorithm to reduce the energy Consumption based on RSA cryptosystems”, International Journal of Engineering and Computer Science, Vol.4, No.10, October 2015, pp. 14653 – 14658. Ebin Geo Johnson, Neethu K.N, “Modified Modular Multiplier for RSA Cryptosystem using Montgomery Algorithm”, International Journal for Technological Research in Engineering, Vol. 3, No.8, April 2016, pp. 1704 – 1706. Dhanashri R. Kadu, G.P. Dhok, “FPGA Based VLSI Design and its implementation of RSA Cryptosystem Algorithm using Vedic Mathematics”, International Journal of Advanced Innnovative Technology, Vol. 1, No. 2, March 2016, pp. 31 – 37. Fournaris A P, Koufopavlou O, “A New RSA Encryption Architecture and Hardware Implementation based on Optimized Montgomery Multiplication” Rupali Verma, maitreyee Dutta, Renu Vig, “Carry save common multiplicand Montgomery for RSA Cryptosystem”, American Journal of Applied Sciences, Vol. 11(5), 2014, pp. 851 – 856. Deepa Jose, Nathimugil, Abida Begum, “Implementation of Optimized Montgomery modular Multiplier on FPGA”, International Journal of Advanced Research in Biology Engineering Science and Technology, Vol. 2, No. 4, April 2016, pp. 50 – 56. Manasadevi R N, Ravindra P Rajput, “An Efficient Implementation of Montgomery Multiplication”, International Journal of Scientific Research & Development, Vol. 3, No. 7, 2015, pp. 743- 745. Roopa Thejaswini V, Vijaya Nirmala T, “Design of Modified Modular Multipliers for RSA Cryptosystems”, International Journal of Scientific Engineering and Technology Research, Vol. 4, No.12, May 2015, pp. 2253 – 2257. Fournaris A P, Koufopavlou, “Montgomery Modular Multiplier Architectures and Hardware Implementations for an RSA Cryptosystems”. 638
Narmadha & Balasubadra (2017). Asian Journal of Research in Social Sciences and Humanities, Vol. 7, No.2, pp. 632-639.
Ciaran McIvor, Maire McLoone, John V McCanny, “Fast Montgom Processor ery Modular Multiplication and RSA Cryptographic Processor Architectures”. Narmadha G, Balasubadra K, “An Optimized Multiplier for Public Key Cryptography”, Internatinal Journal of Advanced Engineering Technology, Vol. 7, No.1, Jan. – March 2016, pp. 5 – 7.
639