wrapped rsa cryptography check on window executable using reconfigurable hardware

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 291 WRAPPED RSA CRYPTOGRAPHY CHECK ON WINDOW EXECUTABLE USING RECONFIGURABLE HARDWARE Rahul Jassal 1 1 (Department of Computer Science & Applications, P.U.S.S.G.R.C/ Panjab University, Hoshiarpur, India, [email protected]) 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 a rchitecture, Moxa_usbcable, RSA algorithm, Virtex FPGA, Encryption Simulation I. 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 INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET) ISSN 0976 – 6367(Print)  ISSN 0976 – 6375(Online) Volume 3, Issue 3, October - December (2012), pp. 291-299  © IAEME: www.iaeme.com/ijcet.asp Journal Impact Factor (2012): 3.9580 (Calculated by GISI) www.jifactor.com IJCET © I A E M E

Upload: iaeme-publication

Post on 04-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 1/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 

291

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, [email protected])

ABSTRACT

The paper presents secure system RSA cryptography model using FPGA based hardwaredongle to prevent from extracting secret information about the software. Half side of thesimulation is executing on hardware side and a further result is decrypted software side. RSAcalculation architecture is proposed for FPGA that addresses the issues of scalability, flexibleperformance of public key crypto systems.

Keywords: - Finite field architecture, Moxa_usbcable, RSA algorithm, Virtex FPGA,Encryption Simulation

I.  INTRODUCTION 

Data transmit over wireless network is in the air and not curbed to any wire. Due to this it iseffortless for a hacker to nose around into the information that is being transferred over thewireless network. To prevent this there is a necessitate to encrypt the data in a way that it canonly 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. Allantivirus and security suites do is offer that additional layer of prevention. If we were cleverenough to avoid all the evident threats by not clicking on that very oddly named.exe file orexecuting that mail attachment, we wouldn’t need a security suite, would we? It is widelyknown that security issues play a crucial role in the majority of computer and communicationsystems [1]. An innermost tool for achieving software protection is Cryptography.Cryptography algorithms are most proficiently implemented in routine hardware than insoftware running on general purpose processors. Hardware implementations are of tremendous value in case of high performance, security and active systems. Traditional ASICsolutions have the well known drawback of reduced flexibility compared to softwaresolutions.

1.1 LEGITIMATE VS. PIRATED MARKETGlobally, businesses and consumers will spend more than $300 billion on PC software overthe next four years, according to IDC estimates

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING

& TECHNOLOGY (IJCET) ISSN 0976 – 6367(Print) ISSN 0976 – 6375(Online)

Volume 3, Issue 3, October - December (2012), pp. 291-299 © IAEME: www.iaeme.com/ijcet.asp Journal Impact Factor (2012): 3.9580 (Calculated by GISI)

www.jifactor.com 

IJCET

© I A E M E

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 2/9

International Journal of Comp

6367(Print), ISSN 0976 – 6375(O

1.  Given the current piracyalmost $200 billion wort

Since up-to-the-minute security

high degree of elasticity with

protection degrees of all the te

capable solution which combin

traditional hardware is the imp

devices such as FPGAs [2]. FP

which can be programmed in-sy

add in any set of rules change

design, fabrication and testing re

2.0 FPGA PROGRAMMING

Both the layers for hardware anextracting secret information, man attack is underway. Here in taccepts input message with enhandover to module for speedequivalent cipher text and the cshown here is a Xilinx operated

uter Engineering and Technology (IJCET),

line) Volume 3, Issue 3, October-December (201

292

rates, IDC predicts that, during the same fouof software will be pirated.

protocols are ever more becoming algorithm a

respect to the cryptography algorithms is d

hniques are based on hardness of arithmetic

s high flexibility with the speed and physic

lementation of cryptographic algorithms on r

GAs are hardware devices whose purpose is

stem. An FPGA accomplishment can be merel

without the need for pricey and time consu

quired in case of ASICs

software is not compromised to make the systore ever for ideal software it is extremely hardhe diagram the flowchart is shown for hardwacrypt keys which is synchronized with clocp execution and this in continuation is repeatlosing figure depicts pin used for this dongle.partan3 kit where the bit file is tuned [6].

SSN 0976 –

), © IAEME 

r-year period,

utonomous, a

esirable. The

problems. A

l security of 

econfigurable

not fixed and

upgraded to

ing physical

m rigid fromto detect thate side FPGA

and furtherd for gettingThe Figure 3

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 3/9

International Journal of Comp

6367(Print), ISSN 0976 – 6375(O

The 8 bit on display is tuned f 

followsProduct Category: - ALL, Famil

Speed: - 4, Top level Source Typ

Whenever there is question

communication network this pu

with sufficiently long keys, th

communications among high p

guarantees the strong cryptogr

semiconductor technology and

algorithms in sound time even

built encryption to ensure priva

Consequently, this transition hasuch as online banking and s

routinely rely on high-perform

phones, and ultra-portable devic

uter Engineering and Technology (IJCET),

line) Volume 3, Issue 3, October-December (201

293

r cipher text. The following properties for thi

: - Spartan3, Device: - XC3S200, Package: -

e: - HDL, Synthesis Tool: - XST (VHDL/Verilog

of securing or authenticating secret data

blic key cryptography is extensively used. W

se algorithms are believed to be unbreakabl

rformance computers that required elevated c

phic algorithms were first introduced. Now,

hardware design have made it promising to

n user systems, thus enabling the mass-marke

y and authenticity of individuals’ personal co

s enabled the proliferation of a variety of sehopping. Examples of consumer electronics

ance public key cryptography are Blu-ray p

s.

SSN 0976 –

), © IAEME 

s FPGA is as

T256 

)

on a public

hen deployed

. For secure

onfidentiality

advances in

xecute these

use of well-

munications.

ure services,devices that

layers, smart

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 4/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 

294

In addition, low cost cryptographic engines are mainstream components in laptops, servers

and personal computers. A key requirement for all these hardware devices is that they must

be affordable. As a result, they commonly implement a straightforward design architecture

that 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 protection

3.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

problem

3.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

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 5/9

International Journal of Comp

6367(Print), ISSN 0976 – 6375(O

  Compute nA = p

  Compute ϕ(nA)=

  Find an exponent

  Find dA such that  Publish nA and e

  Encryption: EA(M) = M  Decryption: DA(C) = Cd

4.0 DESIGN INTERFACE

This is the very first screen desi

unused port or user can go for n

uploads the bit file into the

communication. For testing pur

value between a certain limit an

this RSA implementation, As sdecrypted data is shown in resp

colors each time the user switc

yellow. So for public key authe

that is this time our machine w

the digital signatures s, the us

verification that s will produce t

4.1 RSA Introduced

Since RSA, was introduced insound communication channels

insecure communication mediu public key authentication withprivate key, thus creating what ito the client, which verifies itimplementing public key authenkey (n, e) and private key (n, d).e and d are computed such that,_ (md)e mod n _(me)d mod n.

uter Engineering and Technology (IJCET),

line) Volume 3, Issue 3, October-December (201

295

×qA

(p-1)A x (q-1)A

eA such that (eA, ϕ(nA)) = 1

dA×eA ≡ 1 (mod ϕ(nA))

A ≡ C (mod nA)A ≡ M (mod nA)

ned for testing the interface the interfacing port

ew port for the communication, the initiate ha

spartan3 kit with the specified parameters

ose user declared a Random number class in

d first and second value reserved for any 2 k 

on as focus changes to encrypted text box thctive boxes. The small three text boxes is of t

es to next level the color of the boxes change

ntication the module sends a unique message

ich signs it with some private key say k and u

r can authenticate the identity of server usi

e original message.

1977, and has been widely used for establisand for authenticating the identity of service p

ms. In the authentication scheme, the servelients by signing a unique message from thecalled a digital signature [4]. The signature isusing the server’s known public key The

tication requires the construction of a suitableHere n is the product of two distinct big primeor any given message m, the following identityo authenticate a message m, the server attache

SSN 0976 –

), © IAEME 

might be any

dware button

required for

.NET for any

ys values for

encrypt andhree different

to red green

m to a server

on receiving

ng (n, e) for

ing safe androviders over

r implementslient with itsthen returnedrocedure forair of public

numbers, andholds true: ma signature s

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 6/9

International Journal of Comp

6367(Print), ISSN 0976 – 6375(O

to the original message and trankey with the following computassociated with the server canauthentic by checking that: m _

4.2 Flowchart

4.3 Working and Architecture

The RSA class inside .NET moinitialized with the required parto maintain a dongle check if dorunning on the shell side and if under the umbrella of XML. ARSA layer and through classesfor presence of the dongle, nextthe process that user wants to shmodule kill the process otherwican make a list of some processrestrict on dongle bases

4.4 RSA BASED THRESHOLRSA is a highly secure, public k key to encrypt and decrypt a mepublic key that is released publikept secret. The public key is usit. It is very difficult to find out

uter Engineering and Technology (IJCET),

line) Volume 3, Issue 3, October-December (201

296

mits the pair. The server generates s from m usation: s _ md mod n. Anyone who knows tthen verify that the message m and its signe mod n.

dule is wrapped with FPGA programming. Spmeters as specified in bit file and data get uplngle is already connected then user checks forome process is running we kill the process and, suppose that if dongle is not connected aga

of Serial Port, a check is maintained throughhile the process status in Task Manager is che

oot is there or its entry is already there in datae the entry with new name is saved into the ds that he/she want to kept into the database a

CRYPTOGRAPHY (RSA-TC)ey encryption algorithm which uses a public k sage. In public crypto systems there are two dily so anyone can find it, and a private key is td to encrypt the message, and private key is uhat private key is used for a public key.

SSN 0976 –

), © IAEME 

ing its privatee public keyature s were

artan3 kit getaded, next isny process isthis all done

in it goes forTS and CTSked if any of ase the .NETatabase. Userd make them

y and privateferent keys: ahe one that ised to decrypt

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 7/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 

297

4.5 RSA ENCRYPTION RESULT

In this paper an RSA calculation architecture is proposed for FPGAs that addresses the issues

of scalability, flexible performance, and silicon efficiency for the hardware acceleration of 

Public Key crypto systems. Using techniques based around Montgomery math for

exponentiation, 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 = 9600SerialPort1.Parity = Ports.Parity.NoneSerialPort1.DataBits = 8

Dim Flag As BooleanDim Reg As Integer = 1SerialPort1.RtsEnable = TrueTry

SerialPort1.Open()Flag = SerialPort1.CtsHoldingIf Flag = False Then

SerialPort1.Close()Response.Redirect("Default.aspx")

End If Catch ex As Exception

SerialPort1.Close()

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 8/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 

298

End TryIf (phi Mod cnt <> 0) Then

flag = 0carry = lcm(cnt, phi)gcd1 = cnt * phi / carry

d = Dcomponent(cnt, phi)encript = System.Math.Pow(Double.Parse(carry1), 7) Mod nDim signfEncpt = encriptDim dcompnt As DoubleWhile ((7 * dcompnt) Mod phi <> 1)

dcompnt = dcompnt + 1End WhileTxt_FChk2 = dcompntDim arr(1) As Bytearr(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_byteDim signop As Integer = Double.Parse(carry1)signum = parity_chk(decript_byte, signop)parity = shared_chk(decript_byte, signum)'SerialPort1.Close()Return parityBoredum(parity)

5.0 CONCLUSION

This is one way out for wrapping RSA layer using .NET using hardware Spartan3 kit on awindow based application. One can make restrict some applications with their ProcessId’s entry into the database with the help of dongle. One can embed such initiators withany web based applications or games for let them stop for execution until and unless userwithdraws 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 of 

computer Science, vol.19 (1), 2006

[3] P. Montgomery, “Modular multiplication without trial division, “Mathematics of 

Computation, No.44, pp.519-521,1985.

7/30/2019 Wrapped Rsa Cryptography Check on Window Executable Using Reconfigurable Hardware

http://slidepdf.com/reader/full/wrapped-rsa-cryptography-check-on-window-executable-using-reconfigurable-hardware 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 

299

[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 RSA

Cryptosystem”, Proceedings of 19th international conference on Advanced Information

networking and Applications, 2005

[6] M. McLoone and J. V. McCanny, “Rijndael FPGA implementation utilizing look-up

tables,” 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] For

 javax.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-Key

Cryptosystems. Communications of the ACM, Vol. 21 (2), pp.120–126.1978. Previously

released 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.