INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING International Journal of Computer Engineering and Technology (IJCET), ISSN 0...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Vol...
Upcoming SlideShare
Loading in...5
×

Wrapped rsa cryptography check on window

357

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
357
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Wrapped rsa cryptography check on window"

  1. 1. INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, (IJCET) & TECHNOLOGY October-December (2012), © IAEMEISSN 0976 – 6367(Print)ISSN 0976 – 6375(Online)Volume 3, Issue 3, October - December (2012), pp. 291-299 IJCET© IAEME: www.iaeme.com/ijcet.aspJournal Impact Factor (2012): 3.9580 (Calculated by GISI) ©IAEMEwww.jifactor.com WRAPPED RSA CRYPTOGRAPHY CHECK ON WINDOW EXECUTABLE USING RECONFIGURABLE HARDWARE Rahul Jassal1 1 (Department of Computer Science & Applications, P.U.S.S.G.R.C/ Panjab University, Hoshiarpur, India, rahulatssgpurchsp@gmail.com) ABSTRACT The paper presents secure system RSA cryptography model using FPGA based hardware dongle to prevent from extracting secret information about the software. Half side of the simulation is executing on hardware side and a further result is decrypted software side. RSA calculation architecture is proposed for FPGA that addresses the issues of scalability, flexible performance of public key crypto systems. Keywords: - Finite field architecture, Moxa_usbcable, RSA algorithm, Virtex FPGA, Encryption SimulationI. INTRODUCTION Data transmit over wireless network is in the air and not curbed to any wire. Due to this it is effortless for a hacker to nose around into the information that is being transferred over the wireless network. To prevent this there is a necessitate to encrypt the data in a way that it can only be deciphered by someone who has the decryption key. While most of this so called. Malicious code exploits holes in the operating system, we as humans are party to blame. All antivirus and security suites do is offer that additional layer of prevention. If we were clever enough to avoid all the evident threats by not clicking on that very oddly named.exe file or executing that mail attachment, we wouldn’t need a security suite, would we? It is widely known that security issues play a crucial role in the majority of computer and communication systems [1]. An innermost tool for achieving software protection is Cryptography. Cryptography algorithms are most proficiently implemented in routine hardware than in software running on general purpose processors. Hardware implementations are of tremendous value in case of high performance, security and active systems. Traditional ASIC solutions have the well known drawback of reduced flexibility compared to software solutions. 1.1 LEGITIMATE VS. PIRATED MARKET Globally, businesses and consumers will spend more than $300 billion on PC software over the next four years, according to IDC estimates 291
  2. 2. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME October December 1. Given the current piracy rates, IDC predicts that, during the same four-year period, the four almost $200 billion worth of software will be pirated.Since up-to-the-minute security protocols are ever more becoming algorithm autonomous, a minutehigh degree of elasticity with respect to the cryptography algorithms is desirable. The cryptographyprotection degrees of all the techniques are based on hardness of arithmetic problems. Acapable solution which combines high flexibility with the speed and physical security oftraditional hardware is the implementation of cryptographic algorithms on reconfigurabledevices such as FPGAs [2]. FPGAs are hardware devices whose purpose is not fixed andwhich can be programmed in-system. An FPGA accomplishment can be merely upgraded to system.add in any set of rules changes without the need for pricey and time consuming physicaldesign, fabrication and testing required in case of ASICs2.0 FPGA PROGRAMMINGBoth the layers for hardware and software is not compromised to make the system rigid fromextracting secret information, more ever for ideal software it is extremely hard to detect thatan attack is underway. Here in the diagram the flowchart is shown for hardware side FPGAaccepts input message with encrypt keys which is synchronized with clock and furtherhandover to module for speed up execution and this in continuation is repeated for getting dequivalent cipher text and the closing figure depicts pin used for this dongle. The Figure 3shown here is a Xilinx operated Spartan3 kit where the bit file is tuned [6]. 292
  3. 3. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME October DecemberThe 8 bit on display is tuned for cipher text. The following properties for this FPGA is as isplayfollowsProduct Category: - ALL, Family: - Spartan3, Device: - XC3S200, Package: - FT256Speed: - 4, Top level Source Type: - HDL, Synthesis Tool: - XST (VHDL/Verilog)Whenever there is question of securing or authenticating secret data on a public herecommunication network this public key cryptography is extensively used. When deployedwith sufficiently long keys, these algorithms are believed to be unbreakable. For securecommunications among high performance computers that required elevated confidentiality ionsguarantees the strong cryptographic algorithms were first introduced. Now, advances insemiconductor technology and hardware design have made it promising to execute thesealgorithms in sound time even on user systems, thus enabling the mass market use of well- hms mass-market wellbuilt encryption to ensure privacy and authenticity of individuals’ personal communications.Consequently, this transition has enabled the proliferation of a variety of secure services, secursuch as online banking and shopping. Examples of consumer electronics devices thatroutinely rely on high-performance public key cryptography are Blu-ray players, smart performance Blu rayphones, and ultra-portable devices. portable 293
  4. 4. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEMEIn addition, low cost cryptographic engines are mainstream components in laptops, serversand personal computers. A key requirement for all these hardware devices is that they mustbe affordable. As a result, they commonly implement a straightforward design architecturethat entails a small silicon footprint and low-power profile.3.0 METHODS OF PROTECTING SOFTWARE Usage of specially coated key diskettes and CDs, passwords and registration numbers Dependence on the Unique Computer Features Software-and-Hardware Protection Based on Dongles Cryptography with dongle protection3.1 DONGLE/HARDWARE KEY Modern dongles include built-in strong encryption and use fabrication techniques designed to thwart reverse engineering Typical dongles also now contain non volatile memory — key parts of the software may actually be stored on the dongle However, security researchers warn that dongles still do not solve the trusted client problem3.2 Design MethodologyThe general design cycle for this work consisted of the following steps: Implementation of RSA encryption algorithm on Java and VB.NET. Implementation of AES encryption algorithm on Java platform. Implementation of RSA Decryption algorithm in VHDL for FPGA (dongle) programming. Implementation of AES Decryption algorithm in VHDL for FPGA (dongle) programming. Serial and USB interface between computer and FPGA (dongle) using UART and USB Protocol in VHDL, VB.NET and Java. Software testing using GUI interface in Java and VB.NET. On line (WEB based) software testing in VB.NET.3.2.1 Hardware and Software Tools used Software Tools: Xilinx ISE and MODELSIM software for FPGA Programming JCreator and jdk1.6 for java platform VB.NET and SQL server MOXA USB cable drivers Hardware Tools: VIRTEX 4 (XC4VFX12) FPGA kit SPARTAN 3 (XC3S200) FPGA kit MOXA USB cable for USB interface RS232 serial cable for serial interface JTAG downloading cable3.2.2 Serial and USB interface between PC and FPGA (dongle): UART Protocol: Universal Asynchronous Receiver Transmitter RS 232 connector : For Serial interfacing MOXA USB 2.0 cable : for USB interfacing Rivest, Shamir and Adleman (1977): use modular arithmetic Setting up by user A[5]: - Find two “large” primes, pA and qA 294
  5. 5. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME October December Compute nA = pA×qA pA Compute ϕ(nA)= (p (nA)= (p-1)A x (q-1)A Find an exponent eA such that (eA, ϕ(nA)) = 1 Find dA such that dA dA×eA ≡ 1 (mod ϕ(nA)) Publish nA and eA Encryption: EA(M) = MeA ≡ C (mod nA) Decryption: DA(C) = CdA ≡ M (mod nA)4.0 DESIGN INTERFACEThis is the very first screen designed for testing the interface the interfacing port might be anyunused port or user can go for new port for the communication, the initiate hardware buttonuploads the bit file into the spartan3 kit with the specified parameters required forcommunication. For testing purpose user declared a Random number class in .NET for anyvalue between a certain limit and first and second value reserved for any 2 keys values forthis RSA implementation, As soon as focus changes to encrypted text box the encrypt anddecrypted data is shown in respective boxes. The small three text boxes is of three different threecolors each time the user switches to next level the color of the boxes changes to red greenyellow. So for public key authentication the module sends a unique message m to a serverthat is this time our machine which signs it with some private key say k and upon receiving signsthe digital signatures s, the user can authenticate the identity of server using (n, e) forverification that s will produce the original message.4.1 RSA IntroducedSince RSA, was introduced in 1977, and has been widely used for establishing safe and andsound communication channels and for authenticating the identity of service providers overinsecure communication mediums. In the authentication scheme, the server implementspublic key authentication with clients by signing a unique message from the client with its clientsprivate key, thus creating what is called a digital signature [4]. The signature is then returned .to the client, which verifies it using the server’s known public key The procedure forimplementing public key authentication requires the construction of a suitable pair of public gkey (n, e) and private key (n, d). Here n is the product of two distinct big prime numbers, ande and d are computed such that, for any given message m, the following identity holds true: m identity_ (md)e mod n _(me)d mod n. To authenticate a message m, the server attaches a signature s 295
  6. 6. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME October Decemberto the original message and transmits the pair. The server generates s from m using its privatekey with the following computation: s _ md mod n. Anyone who knows the public key Anyoneassociated with the server can then verify that the message m and its signature s wereauthentic by checking that: m _ se mod n.4.2 Flowchart4.3 Working and ArchitectureThe RSA class inside .NET module is wrapped with FPGA programming. Spartan3 kit get FPGAinitialized with the required parameters as specified in bit file and data get uploaded, next isto maintain a dongle check if dongle is already connected then user checks for any process isrunning on the shell side and if some process is running we kill the process and this all doneunder the umbrella of XML. And, suppose that if dongle is not connected again it goes forRSA layer and through classes of Serial Port, a check is maintained through RTS and CTSfor presence of the dongle, next while the process status in Task Manager is checked if any ofthe process that user wants to shoot is there or its entry is already there in database the .NETmodule kill the process otherwise the entry with new name is saved into the database. User datacan make a list of some processes that he/she want to kept into the database and make themrestrict on dongle bases4.4 RSA BASED THRESHOLD CRYPTOGRAPHY (RSA (RSA-TC)RSA is a highly secure, public key encryption algorithm which uses a public key and privatekey to encrypt and decrypt a message. In public crypto systems there are two different keys: apublic key that is released publicly so anyone can find it, and a private key is the one that iskept secret. The public key is used to encrypt the message, and private key is used to decrypt message,it. It is very difficult to find out what private key is used for a public key. 296
  7. 7. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME4.5 RSA ENCRYPTION RESULTIn this paper an RSA calculation architecture is proposed for FPGAs that addresses the issuesof scalability, flexible performance, and silicon efficiency for the hardware acceleration ofPublic Key crypto systems. Using techniques based around Montgomery math forexponentiation, the proposed RSA calculation architecture is compared to existing FPGA-based solutions for speed, FPGA utilisation, and scalability[3].4.6 PARITY AND IMPLEMENTATION CHECK SerialPort1.PortName = "COM3" SerialPort1.BaudRate = 9600 SerialPort1.Parity = Ports.Parity.None SerialPort1.DataBits = 8 Dim Flag As Boolean Dim Reg As Integer = 1 SerialPort1.RtsEnable = True Try SerialPort1.Open() Flag = SerialPort1.CtsHolding If Flag = False Then SerialPort1.Close() Response.Redirect("Default.aspx") End If Catch ex As Exception SerialPort1.Close() 297
  8. 8. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME End TryIf (phi Mod cnt <> 0) Then flag = 0 carry = lcm(cnt, phi) gcd1 = cnt * phi / carry d = Dcomponent(cnt, phi) encript = System.Math.Pow(Double.Parse(carry1), 7) Mod n Dim signfEncpt = encript Dim dcompnt As Double While ((7 * dcompnt) Mod phi <> 1) dcompnt = dcompnt + 1 End While Txt_FChk2 = dcompnt Dim arr(1) As Byte arr(0) = Byte.Parse(encript) SerialPort1.Write(arr, 0, arr.Length) Dim decript_byte As Byte decript_byte = SerialPort1.ReadByte SerialPort1.Close() Dim rand_no As Double = Double.Parse(carry1) Txt_FChk2 = decript_byte Dim signop As Integer = Double.Parse(carry1) signum = parity_chk(decript_byte, signop) parity = shared_chk(decript_byte, signum) SerialPort1.Close() Return parity Boredum(parity)5.0 CONCLUSION This is one way out for wrapping RSA layer using .NET using hardware Spartan3 kit on a window based application. One can make restrict some applications with their Process Id’s entry into the database with the help of dongle. One can embed such initiators with any web based applications or games for let them stop for execution until and unless user withdraws dongle check.REFERENCES[1] William Stallings ,“Cryptography and Network Security, Principles and practices”Edition 3d, Pearson Education[2] M.K. Hani, H.Y.Wen, A.Paniandi, “Design and implementation of Private and Publickey Crypto processor for next generation IT Security applications”, Malaysian journal ofcomputer Science, vol.19 (1), 2006[3] P. Montgomery, “Modular multiplication without trial division, “Mathematics ofComputation, No.44, pp.519-521,1985. 298
  9. 9. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME[4]A. Menezes, P.Van Oorschot, and S.Vanstone, “Handbook of applied Cryptography”,CRC Press, 1996[5] R. J. Hwang, F.F.Su, Y.S.Yeh, C.Y. Chen,” An Efficient Decryption Method for RSACryptosystem”, Proceedings of 19th international conference on Advanced Informationnetworking and Applications, 2005[6] M. McLoone and J. V. McCanny, “Rijndael FPGA implementation utilizing look-uptables,” in IEEEWorkshop on Signal Processing Systems, Sept. 2001, pp. 349–360.[7] Daniel Cazzulino, ”Web Programming using VB.NET”[8] Ganelon, “Visual Basic . Net Black Book”[9] www.codeworks.it/net/VBNetRs232.htm[10] msdn2.microsoft.com/en-us/library/a9910312.aspx[11] www.learnasp.com/freebook/learn/cs_dbtable.aspx[12] AES page available via http://www.nist.gov/CryptoToolkit.[13] Computer Security Objects Register (CSOR): http://csrc.nist.gov/csor/.[19] Forjavax.comm package: http://www.stanford.edu/~bsuter/javax.comm-v2 win32.zip[20] R.Rivest, A. Shamir, L. Adleman. A Method for Obtaining Digital Signatures andPublic-KeyCryptosystems. Communications of the ACM, Vol. 21 (2), pp.120–126.1978. Previouslyreleased as an MIT "Technical Memo" in April 1977. Initial Publication of the RSA scheme AUTHORS PROFILE Rahul Jassal is working as Assistant Professor in Department of Computer Science & Application, Panjab University Regional Centre, Hoshiarpur, India. He received Master of Computer Application in year 2007 and clear the UGC-NET examination for subject “Computer Science & Application in the same year. He is with the post from last 5 years. 299

×