Client Server Chat Application - JMEST

1y ago
8 Views
2 Downloads
735.21 KB
6 Pages
Last View : 5m ago
Last Download : 3m ago
Upload by : Nadine Tse
Transcription

Journal of Multidisciplinary Engineering Science and Technology (JMEST)ISSN: 2458-9403Vol. 3 Issue 7, July - 2016Client Server Chat ApplicationM. A. MiocUniversity Stefan cel Mare SuceavaIntegrated Center for research, development and innovation inAdvanced Materials, Nanotechnologies, and Distributed Systems – MANSiDSuceava, Romaniammioc@cs.upt.roAbstract—Nowadays it is a continuousincreasing of the networks interconnectionswhich generates a growing necessity to keep theinformation secure from the eavesdroppersattacks and also from the hackers. Despite thefact that the scientific fundamentals of CodingTheory are already known for years it is importantto present some researches from this area. Thedevelopment of Coding Theory producedsuccessful applications in Cryptography, in ErrorDetecting and Correcting Codes and in WirelessCommunication Systems. This paper describes aresearch based on developing a client server chatapplication. The originality of this work is givenby the encryption part of this implementation. So,the encryption part through the encryptionpassword logon, encryption and sendingmessages keeps them safe from client to client.Keywords—cryptography; security; ciphers;plaintext; algorithm; encryption; decryption.I.INTRODUCTIONIn cryptography, RSA is a cryptographic algorithmwith public keys, first algorithm used for encryptingand also for electrical signature. Algorithm wasdeveloped in 1977 and published in 1978 by RonRivest, Adi Shamir and Leonard Adleman at MIThaving the name composed from all three authorsinitials [2].In 1978, in the Communications of Association forComputing Machinery (ACM) some specific methodsfor obtaining Digital Signatures and Public-KeyCryptosystems were presented by the same team [2].RSA is a block encrypting algorithm. This means thatthe initial text (clear text), but also an encrypted textare numbers between 0 and -1, with a chosen n. Amessage longer than log. n is split in segments of thecorresponding length, named blocks, which areencrypted one by one. Also, as cryptographicalgorithm with public keys, it functions based on apair of keys mathematically connected to each other:a public key, well known to all involved parts, and asecret key, known only by its keeper. RSA is usedonly at the beginning of communication, fortransmitting the secret communication key, which isthen used in a secret key algorithm, like 3DES orAES.AES (Advanced Encryption Standard), known alsoby the name of Rijndael, is a standard algorithm forblocks symmetric encrypting, used today on a largedomain of applications and adopted as standard bythe Governmental American Association NIST. Thenew standard algorithm developed by the two Belgiancryptographs, Joan Daemen and Vincent Rijmenbecame the officially AES and newt to NIST forselection under the name of Rijndael [7].In the advanced proposal NIST, the two authors ofthe algorithm Rijndael have defined a blockencrypting algorithm having the independent lengthsfor the block and for the key of 128 bits, 192 bits, or256 bits.AES specification standardizes all 3dimensions possible for the length of the key, butrestricts the block length at 128 bits. Input and outputof encrypting and decrypting algorithm is a block of128 bits. In FIPS number 197, AES operations aredefined under the form of matrix operations, wherethe key and the block are written in matrix format. Atthe beginning of cipher run, the block is copied in atable named state having first 4 bites on the firstcolumn, then the next 4 on the second continuing inthe same way till all table is completed.II. APPLICATION DESCRIPTIONThe application is composed of a server thatconnects all users logged in the application. In orderto begin a chat the program must be ran and theserver should be started. In developing this researchthe main principles from the Handbook AppliedCryptography were respected [3]. Some otherspecific researches are done in many other domainsas military [4], medicine [5] and commerce as well.Another problem is how to choose the mostconvenient algorithm for a specific application [6]. Forthis goal a comparison of the most frequently usedEncryption Algorithms is important to be taken intoaccount [9].www.jmest.orgJMESTN423516945218

Journal of Multidisciplinary Engineering Science and Technology (JMEST)ISSN: 2458-9403Vol. 3 Issue 7, July - 2016Fig. 4 UserName and Password part 2 – Client consoleFig. 1 Server startOnce the server is started, we can introduce theusers in the application, by opening 1, 2 or multipleusers. For this we search in project folder and wechose the path “ \ChatServer\Client\bin\Debug” andthere we start the executable Client.Fig. 5 UserName and Password part 3 – Error messageFig. 2 Executable ClientThe user must log in to the application with aUserName and an existing Password from theapplication. If the Password does not exist in theapplication, an error message will be shown and allmessaging fields will become inactive. For loggingin, a text file is created, where the names of allregistered users are defined (name:daniela ; pswd:daniela; Name: ion; Pswd: ionel ). UserName andpassword of existing users are saved in a textdocument from ChatServer “name passwd.txt”separated by comma, password being under hashedformat.Password is encrypted with the hashing method,more specifically MD5CryptoServiceProvider() hasbeen used. In the moment when user enters a nameand password, and clicks LogIn, a method call isperformed in which all registered users of theapplication are returned and cached in a Dictionary(name, password), then the hashing of the inputpassword is performed and a check is done on thename, password existing pairs. If the password iffound, then the program is continued, otherwise textfield for name and password are reseted and an errormessage is shown.Fig. 6 UserName and Password part 4 – Login codeFig. 3 UserName and Password part 1 – name passwd.txtwww.jmest.orgJMESTN423516945219

Journal of Multidisciplinary Engineering Science and Technology (JMEST)ISSN: 2458-9403Vol. 3 Issue 7, July - 2016The same is for the server interface where allconnected users will be visible.Fig. 10 Server Interface – Available usersFig. 7 Encryption and error message codeHashing method (returns encrypted password asstring):For messages encrypting there have been usedtwo tipes of encrypting: asymethrical encrypting witha public key and RSA private key and symethricalAES encrypting. Both modalities have been usedgiven RSA is the most secure encrypting method, buthas the inconvenience that it can not be used on longmessages. AES does the encrypting of the messageswhile RSA is used to encrypt the key and the VI ofAES in order to send them both to the receiver of themessage. Below methods defined for this behaviourhave been described:We create the publical key and the private key andwe save them in xml files. For Server we have thefolder ServerKeys, and each connected client willhave a folder ClientKeys.Fig. 8 Hashing password codeIf multiple users are connected, each of them willsee the others in the graphical interface he wasprovided with, and can choose between all of themthe one he wants to start a chat with.Fig. 11 ServerKeys FolderGeneration of RSA key and caching in XML filesis done by the code below.Fig. 9 Client Interface – Available usersFig. 12 Generation of RSA key and caching in XML fileswww.jmest.orgJMESTN423516945220

Journal of Multidisciplinary Engineering Science and Technology (JMEST)ISSN: 2458-9403Vol. 3 Issue 7, July - 2016Encrypting and decrypting with RSA is done bythe code below.Fig. 15 Decrypting with AESFig. 13 Generation of RSA key and caching in XML files.Encrypting and decrypting with AES is done bythe code below.Message transmission occurs in the followingmanner. User logs in, user creates its own public keyand private RSA key and caches them locally, whilethe public key is forwarded to the server. Serverwrites the public key in an xml format file, caches itinside a directory and forwards all public keys to theother users connected at that time. Server will storeall public keys of all users.For being able to communicate each user willselect from the list another user, will write themessage. In the moment user will choose sendoption from the chat panel, the message will beencrypted using AES encrypting method, then byusing the destinations public key RSA algorithm isapplied to the AES message, the key and the VI.These data are now transmitted to the Server. Serverreceives the data, does not perform any action otherthan transferring them to the destination (name of thedestination is also transmitted in order for the Serverto be able to forward the message). The destinationdecrypts the data with the private key, then using thekey and the VI it decrypts the whole AES encryptedmessage.Fig. 14 Encrypting with AESwww.jmest.orgJMESTN423516945221

Journal of Multidisciplinary Engineering Science and Technology (JMEST)ISSN: 2458-9403Vol. 3 Issue 7, July - 2016Fig. 19 Exit code for server shutdownIII. CONCLUSIONSFig. 16 Conversations as shown to the usersFig. 17 Send message codeThe set of RSA keys are valid only during theprogram execution, once closed, the keys will nolonger be valid. On a different connection new setsof keys will be created for the connected Client whichwill overwrite the existing ones inside the xml files.The server will be closed by selection of STOPbutton from the available interface having thefollowing implementation:In this paper there has been presented aresearch containg the development of anapplication client server on the chat.In our own day it has a particularimportance to study different types ofimplementations which can increase thesecurity in communication.A special interest can be observed increating some possibilities to protect ourselfduring the transmition of messages. Thewhole project consists on two speciffic parts:a first one which developed the client servercommumication and the second onecontaining the encryption. While the first partconsists much more in putting togethersome wellknown methods, the second partis the original part of this research. Wecombined modality through AES encryptionmessages and sent encrypted and the keymessage through a secure channel usingRSA public key and private key. I also savedlocally keys to all customers and wedistributed among them by using the Serverand save them in a local encrypted file. (Filethat contains only the password hash sites).IV. ACKNOWLEDGEMENTThe infrastructure used for this work waspartially supported by the project IntegratedCenter for research, development and innovationin Advanced Materials, Nanotechnologies, andDistributed Systems for fabrication and nal Program for Increase of theEconomic Competitiveness co-funded from theEuropean Regional Development Fund.Fig. 18 Stop Server codeREFERENCESwhich will stop the Server functioning, will delete thelist of names from the graphical interface, and if usernow will chose EXIT, Server will completely shutdown.[1] Rivest R., A. Shamir, L .Adleman, A methodfor Obtaining Digital Signatures and Public-KeyCryptosystems, Communications of the ACM 21,pp.120-126, 1978.www.jmest.orgJMESTN423516945222

Journal of Multidisciplinary Engineering Science and Technology (JMEST)ISSN: 2458-9403Vol. 3 Issue 7, July - 2016[2] The Original RSA Patent as filed with theU.S. Patent Office by Rivest; Ronald L. (Belmont,MA), Shamir Adi (Cambridge, MA), Adleman;Leonard M. (Arlington, MA), December 14, 1977.[3] Menezes A.J., van Oorschot P.C,VanstoneS.A.:Handbook of Applied Cryptography.The CRCPress series on discrete mathematics and itsapplications. CRC Press, 2000 N. W. CorporateBlvd., Boca Raton, FL 33431/9868, USA,1997.[4] Gibson T., An architecture for Flexible MultiSecurity Domain Networks, USA.[5] Haque M. M., Pathan A.-S. K., Hong C. S.,Securing U-Healthcare Sensor Networks usingPublic Key Based Scheme, ICACTFebruary 17-20, 2008, pp. 1108-1111.2008,[6] Vimalathithan R., M. L. tational Intelligence, TRANSACTIONS onCOMPUTERS, Issue 6, Volume 10, July 2011, pp210-219[7] Daemen J., Rijmen V., "The Design ofRijndael: AES - The Advanced EncryptionStandard", Springer-Verlag, 2002.[8] M. A. Mioc, S. G. Pentiuc – Comparisonbetween AES, Camellia and SEED, JMEST(Journal of Multidisciplinary Engineering Scienceand Technology) Vol.2 – Issue 12 (December –2015).www.jmest.orgJMESTN423516945223

Client Server Chat Application M. A. Mioc University Stefan cel Mare Suceava Integrated Center for research, development and innovation in Advanced Materials, Nanotechnologies, and Distributed Systems - MANSiD Suceava, Romania mmioc@cs.upt.ro Abstract—Nowadays it is a continuous increasing of the networks interconnections

Related Documents:

X-LIVEAGENT-API-VERSION The Salesforce API version for the request. The system-generated ID used to identify the Chat session on the Chat servers. This . To create a new Chat session, you must call the SessionId request. Create a Chat Visitor Session To create or reestablish a chat visitor session using the Chat REST API, you must make .

Chat forestier ou chat domestique ? Etudier la répartition du chat forestier d'Euro pe en France pose d'emblée le problème de la distinction avec le chat domestique (voir l'annexe 2 en fin d'arti-cle). Le chat forestier est autochtone en France continentale (Vigne et al., 1999), mais il vit en sympatrie avec le chat domes-

Demand 155 Setting Up Siebel Chat for Languages Not Su pported by Default by Oracle Contact On Demand 156 Appendix A: Siebel Chat Deployment Using Third-Party Chat Solutions Deployment of Siebel Chat Using Third-Party Chat Solutions 157 Appendix B: Methods for Customizing Siebel Chat Process

Journal of Multidisciplinary Engineering Science and Technology (JMEST) ISSN: 3159-0040 Vol. 2 Issue 6, June - 2015 . www.jmest.org JMESTN42350149 1254

rework can be utilized by management to evaluate how quality has been managed and to discover problems within the manufacturing process. Journal of Multidisciplinary Engineering Science and Technology (JMEST) ISSN: 3159-0040 Vol. 2 Issue 4, April - 2015 www.jmest.org JMESTN42350578 613 .

Journal of Multidisciplinary Engineering Science and Technology (JMEST) ISSN: 2458-9403 Vol. 6 Issue 2, February - 2019 www.jmest.org JMESTN42352758 9450

8 Monday 9 Tuesday 10 Wednesday 11 Thursday 12 Friday 13 Saturday 14 Sunday MOSAIC Life Engagement Calendar Snack-n-Chat Snack-n-Chat Snack-n-Chat Snack-n-Chat Snack-n-Chat Snack-n-Chat April 8 - 14, 2019 Draw a Bird Day National Library Day National Siblin

Beverages COCKTAILS Belgian Pilsner - Draft 8 Stella Artois 5% IBU tbd Japanese Pilsner 10 Coedo Ruri Premium 5% IBU tbd Japanese Black Lager 10 Coedo Shikkoku 5% IBU tbd Kona Wailua Wheat 7 Hawaii, USA 5.2% IBU 15 Kona Hanalei Island IPA 7 Hawaii, USA 4.5% IBU tbd Prosecco, Avissi 11/49 Veneto-Italy