Journal Paper Format
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Control and Automation Vol. 13, No. 2, (2020), pp. 852 - 861 Blockchain-based Wallet System using Virtual Digital Wallet Amit Chaurasia1* Nainka Jain1 Nikhil Varshney1 Hritik Tiwari1 Vivek Kumar1 1Department of Computer Engineering & Application, GLA University Mathura – 281406, Uttar Pradesh. INDIA Abstract In today’s world, virtual currency is something that people always carry with themselves because of security. Security is the main issue in virtual money. So, in this paper, we have discussed such an application which deals with security, privacy, and virtual currency. The application is basically being for online payment. This application uses the concept of Blockchain and Cryptography. Blockchain makes this application decentralized and cryptography provides the security. It is peer-to-peer digital cash that allows online payments to be sent directly from one party to another without going through a financial institution. We have provided a comprehensive description of the details that make this College Wallet an interesting research topic. Keywords: BlockChain, HashCode, Virtual Currency, Android Application. 1. Introduction Virtual currencies have been defined in 2009 by an anonymous person named Satoshi Nakamoto as a decentralized digital peer to peer payment system [1]. Based on this concept we have created an application named - College Wallet. It is an online payment application which is based on the concept of the Blockchain Technology and cryptography system. Keeping liquor money especially while traveling is not saving in today’s world. Nowadays people try to carry virtual money instead of liquor due to any kind of criminality. In banking system, they provide facility online transactions but with charges and they are not enough safe [2]. And any kind of criminality can happen. As we are living in a society where security is everything, with the help of this wallet we will provide an easy way for making safer transactions without any fraud in it. Also, Blockchain is the most secured technology that uses cryptographic algorithms for making transactions. So, the use of such a technology will provide next level of security [3]. Even transactions by using this technology is very cheap. There are minimal charges of every transaction. ISSN: 2005-4297 IJCA 852 Copyright ⓒ 2020 SERSC International Journal of Control and Automation Vol. 13, No. 2, (2020), pp. 852 - 861 Figure 1. Hash Structure Virtual currency is the best solution to this problem which is widely used for transactions between two parties involving any third party [4]. And virtual currencies have great potential to become most widely used for transactions in the future but, it also may be used by criminals to transfer and store illegal money without any control from authorities. So, here in virtual currency, there is the use of cryptography which makes it more secure [5]. The blockchain creation is shown in Figure 1 and the information consist of blockchain node is depicted in Figure 2. And Blockchain makes it decentralized and peer- to-peer i.e., there is no central authority whereas in the banking system there is the involvement of the third party. Cryptography is implemented by using a long string of numbers and letters sent over the network without the inclusion of the third party i.e., bank. Virtual currencies use this approach to save guard the transaction. In addition to security, there are other factors that also comes with these technologies like flexibility and usability [6]. Nowadays, everyone uses mobile phones for communication so it is very feasible for them to use such an application which deals with the security of their money. Figure 2. Block Structure We have built this application for college students. College students can use this application for their daily use, for example, payment in the canteen, to buy tickets for any ISSN: 2005-4297 IJCA 853 Copyright ⓒ 2020 SERSC International Journal of Control and Automation Vol. 13, No. 2, (2020), pp. 852 - 861 fest [7]. In this application network automatically create the public and private key for the user and public is public to everyone whereas the private key is hidden from everyone. And the use of public and private makes it tamper-proof. And it is nothing but a – ‘Cryptocurrency wallets’, is one of three pillars of the Blockchain industry. They are not physical pocket wallets and neither do they hold any real currency. They are software programs that hold the unique address of your digital money. It allows you to interface with various Blockchain in the system and holds your balance. 2. Methods SHA stands for the Special Hash Algorithm. It is a cryptographic hash function used for producing hashes in cryptography. Hashes are used in cryptography as they are very powerful because they are irreversible i.e., they are one-way functions [8]. Anyone can use a hash function to produce a hash corresponding to any input but it is not possible for anyone to get the input from the hash function. Hash is also known as compressed hash functions because the length of the hash generated by the hash function is much smaller than the input to the hash function. The special hash algorithm originates from SHA-1 and after that SHA-2 came into play in 2001. SHA-256 lies under SHA-2. The main difference between SHA-1 and SHA-2 is of the length of the hash generated in SHA-1 is 160 bits (20 bytes) whereas SHA-256 generates an output hash of 256 bits (byte). I. Preimage resistance i.e. it should be very difficult to reverse a hash function [9]. Or we can also think it as suppose the hash generated for any input I1 is H1 then there should not be any input I2 that generates the output hash H1. It gives protection against the attacker who is having hash and trying to get the input. II. Collision Resistance means that it should be a very much difficult task to find the input of any length that results in the same output hash value. This also makes difficult for the attacker to find two input values with the same hash values. RSA is a public-key system (cryptosystem) and is widely used for the transmission of data in a very secure and protected manner. There are two different types of keys one is the encryption key which is public and another key is the decryption key which is also known as the private key and it is kept secret between the sender and the receiver. Because of the use of two different keys, it is a type of asymmetric cryptography algorithm [10]. The RSA is based on the fact that the factorization of a long integer is a very difficult task. The public key has two numbers where one of them is the multiplication of two large prime numbers. The private key is also composed of the same prime numbers. The strength of RSA relies on the key size. On increasing the length of the key, the strength of encryption increases. Therefore, RSA mostly generates key of 1024 bits (128 byte) which is very large and next to impossible to break till now. The RSA works in three parts and these parts are as follows - • Key Generation • Encryption • Decryption ISSN: 2005-4297 IJCA 854 Copyright ⓒ 2020 SERSC International Journal of Control and Automation Vol. 13, No. 2, (2020), pp. 852 - 861 Key Generation- The following steps are performed while generating the keys I. Select two large prime numbers s and t which are not same i.e. distinct. II. Compute n which is equal to s*t. III. φ(n)=φ(s)*φ(t) (φ(s)=s-1 and φ(t)=t-1) IV. Select an integer e which is less than φ and greater than 1 and co-prime to φ. V. Generate a unique integer d, which is greater than 1 and less than φ and also d is inverse of e. VI. Public key = (e, n) VII. Private key= (d, n) VIII. Return public key and private key. Encryption- The encryption in done using the public key generated and the size of the message to be encrypted should be less than n. If the size exceeds then the message is further divided into sub messages. I. Calculate C=Pe mod n II. Return C Decryption-The decryption is done using the private key and the size of cipher text is less than n. I. Calculate P=Cd mod e II. Return P Figure 3. Double Spending Cryptocurrency is a digital resource designed to act as a medium of exchange between transactions [11]. Cryptocurrency uses strong cryptography for securing financial transactions. Cryptocurrency uses Blockchain technology to gain the following features i.e. decentralization, transparency, and immutability. One of the major and the feature that makes it different is the decentralization. Decentralization means that there is no central administrator of the network. The problem of double spending is shown in Figure 3. In Table 1 shows the creation of public and private keys. Every site on this network is called a node in the cryptocurrency network and only those nodes can participate in the network which is part of the network. For any transaction to be completed on the network it must be verified by each and every node [12]. If the malicious user wants to change the date of transaction, then has to change the data from ISSN: 2005-4297 IJCA 855 Copyright ⓒ 2020 SERSC International Journal of Control and Automation Vol. 13, No. 2, (2020), pp. 852 - 861 all of the nodes which is impossible to do because for the attacker needs to get the key of every node and keys are generated by using secured algorithms which takes a lot of time and computational power to break or detect it and this itself is almost impossible task.