REPORT

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

REPORT FOR MAJOR PROJECT

On

Blockchain Assisted Network Security Algorithm


Submitted partially in fulfilment of the requirement
for the award of the degree of

Bachelor of Technology
In
Computer Science and Engineering
Submitted By

Deepanshu Tyagi
Enrollment no. A51405217002

Vikas Jangra
Enrollment No. A51405217001
Under the guidance of

Dr. Vikas Thada


Associate Professor
Department of computer Science and Engineering
Amity University, Haryana

Department of computer Science and Engineering


Amity School of Engineering and Technology
Amity University, Haryana
May 2021
Department of Computer and Engineering

Amity School of Engineering and Technology

Declaration

This is to certify that the thesis entitled “Blockchain Assisted Network Security
Algorithm” is a bona fide record of the independent project/research work done by us, under
the supervision of Dr. Vikas Thada and submitted to Amity University, Haryana in partial
fulfilment for the award of the Degree of Bachelor of Technology in Computer Science
and Engineering. We certify the content of the thesis are authentic, original and free from
plagiarism.

Dated Deepanshu Tyagi

Dated Vikas Jangra


Department of Computer and Engineering

Amity School of Engineering and Technology

Certificate

This is to certify that the thesis entitled “Blockchain Assisted Network Security
Algorithm” is a bona fide record of the independent project/research work done by
Deepanshu Tyagi & Vikas Jangra bearing enrollment number A51405217002 and
A51405217001, respectively, under my supervision.

To the best of my knowledge and believe work done by the candidates is original and has not
been submitted for award of any other degree.

Dated Dr. Vikas Thada

Head

Department of Computer Science & Engineering


Amity School of Engineering and Technology
Amity University, Haryana
ACKNOWLEDGEMENT

Acknowledgement is not a mere obligation but the epitome of humility and the ineptness to all
those who have helped in the completion of this project. We are thankful to Dr. Vikas Thada,
Department of Computer Science and Technology, Amity School of Engineering and Technology
for his constant guidance and encouragement provided in this endeavor. We also thank our
parents for their continued support, understanding and patience without whose support and
understanding this endeavor would never be fruitful. We also thank all our friends for helping us
out in completing this project and helping me in solving various problems encountered during the
progress of this project.

Deepanshu Tyagi Vikas Jangra


Enrollment Number Enrollment Number

A51405217002 A51405217001
ABSTRACT

Making payments over the Internet is a norm of today's world. The conveniences offered by a
swift transaction in a few clicks of a computer mouse are availed of by a many. As the
technology advances, more and more people are attracted towards internet for sharing their
information. A good number of these people uses internet for making payments. With
discounts that comes along with making digital payments the number of people using digital
payments mode is expected to increase in the near future. Although making payments
digitally is easy, it is also very important to keep these transactions fast and secure. For this
matter, in this work, methods have been suggested to make digital transactions more secure
and difficult to breach. Some of these transactions involve sending critical payments card
data over unsecured and often compromised networks.

Ensuring this data does not fall into the wrong hands is the domain of network systems
engineers. However, an additional layer of security can be created by encrypting the data we
send. Although many such systems are already a commonplace in our world, sometimes data
compromises do occur. In this article, such an encryption technique is discussed, employing a
combination of existing algorithms as well as a few new techniques, including, a modified,
location dependent usage of the RSA algorithm, blockchain based data transmission, the AES
encryption technique, as well as simpler techniques; affine and multiple-layer Cross
Language Ciphering
LIST OF FIGURES

Figure No Figure Title Page No

1 A mapping example 3

2 Types of Cryptographic techniques 11

3 Comparison between Blockchain types 12

4 Application of location-based RSA algorithm 16

5 Flowchart of the AES algorithm 17

6 Basic Flow of the Application 19

7 Basic Flowchart of the Implementation 22

8 Card Details Input Screen 23

9 After user entered data 23

10 Output Screen 24

11 Eclipse IDE Output 24

12 Eclipse IDE Output 25

13 When user enters wrong card details 26

14 Output Screen 26
Chapter Number Title of Chapter Page Number

Introduction 1
1.1 Introduction 1
1 1.2 Cryptography and Blockchain 1
1.3 Character Encoding 2
1.4 Objective 3
Literature Review 4
2
Literature Review 4
Methodology 7
3.1 Hardware Requirement 7
3.2 Software Requirement 7
3.2.1 Eclipse IDE 7
3 3.2.2 Java 8 8
3.2.3 Apache Tomcat 8
3.3 Technology Used 10
3.3.1 Cryptography 10
3.3.2 Blockchain 12
Design of Project 14
4.1 Details of the cryptography concept used: 14
4.1.1 RSA Algorithm 14
4
4.1.2 AES Algorithm 17
4.2 Flowchart 19
4.3 Implementation Process 20
Results 23
5
Screen Shots of Project 23
Conclusion and Future Work 27
6 6.1 Conclusion 27
6.2 Future Work 27
References 28
Table of Contents
CHAPTER 1

1.1. INTRODUCTION

Convenient, secure, and instant transfer of funds has been made a reality thanks to
advent of electronic payment methods such as credit cards, debit cards, smart
cards, e-wallets, net banking, etc. People have made payment cards a preferred
option for money payments, whether on-the-go or at home shopping over the
Internet. Globally, the net figure of transactions made using payments cards are
increasing dramatically. Due to the rise of the Asia-Pacific region in particular,
the revenue of the global electronic banking sector is expected to grow by 2
trillion dollars over the next 5 years. More and more people in the developing
world are abandoning cash in favor of more modern and convenient methods,
thanks in part to the advancements made in mobile computing and networking
technologies making them more powerful, accessible and affordable. However,
this also means more people getting duped when the encryption systems in force
behind these technologies are compromised.

A transaction using payments card involves sending critical information over


communication channels prone to identity thefts. Therefore, it is imperative to
deploy secure systems that encrypt the card details transmitted over the internet
that act as another layer of the process of safeguarding the use of payments cards
over the Internet. This manuscript proposes a model for such an encryption
technique. A combination of well-known encryption algorithms as well as novel
cipher techniques has been created to obtain a unique and secure model.

1.2. Cryptography and Blockchain

Cryptography is the technique of securing the communication data through the


utilization of the concepts of information theory and coding with the goal that
only those entities for which the information is intended can access, understand
and process it. The prefix “crypt” in cryptography signifies hidden and suffix
“graphy” signifies writing. Cryptography makes use of mathematical concepts
and set of calculations which are rule based to change messages in manners such
that it becomes very hard to decode the message. Cryptographic techniques have
several applications such as credit and debit card transactions, browsing on the
world wide web, digital signing of documents.

Blockchain is an emerging innovation right now and it has significantly gained


attraction because of its profound security features and as the name suggests it is a
chain of blocks. The security of this technology is due to the features of
cryptographic hash. Here each block contains a Blockchain innovation is made
sure about by fusing the highlights of cryptographic hash. Each block keeps up a
hash value. Further, this hash value likewise relies upon all the past block
contents. All the blocks are structured in a manner like the nodes in the linked list
are structured. A solitary block contains a cryptographic hash of past block, a
timestamp and exchange information. A block is represented as a Merkle tree root
hash. All the blocks follow a similar structure, just the information stored in it
differs. The significant use of blockchain because of which it has gain prevalence
is Bitcoin. In any case, it likewise has different applications. This work centers
around the use of blockchain and encryption algorithms.

1.3. Character Encoding

The input credit card details; the card number, the expiration dates and the card
security codes are encoded one-on-one and onto predetermined characters of the
English alphabet by affine cipher. The corresponding numeric character reference
in Hypertext Markup Language (HTML) for each of the characters is obtained as
per the American Standard Code for Information Interchange (ASCII) table. Here,
a novel ciphering technique is used; the Cross Language Cipher Technique, which
further converts each of the HTML strings for the English Language The input
card details; the card number, the expiration date and the security codes are
encoded one-on-one and onto predetermined characters of the English alphabet by
simple numeric to alphabet substitution cipher. The corresponding markup
numeric character reference (NCR) with a decimal base for each of the characters
is obtained. Here, a new cipher technique is used; the Cross Language Cipher
Technique, which further converts the NCR strings representing characters from
the English Language into those corresponding to characters of other languages,
based on simple transliteration. This is a unique yet simple cipher technique that
adds another layer of complexity. Further, the Cross Language Cipher can be
implemented repeatedly as well as randomly over characters of multiple
languages; able to encompass the entire Universal Character Set (UCS) of the
Unicode standard.

In the model used as an example, the technique converts the NCRs into those
corresponding to the Hindi Language in the UCS, which themselves are mapped
onto the NCRs of the phonetically similar alphabets of the Russian Language.
This marks the end of the encoding technique employed in the model, the result of
which is a string of NCRs with decimal bases.

Fig. 1. A Mapping Example

Numeric to alphabet substitution using a predetermined one-to-one mapping is


conducted for all the numeric details of a payments card; the card number, the
dates, the CVV and other security codes. Any other details already in alphabetic
format, like the cardholder's name undergo monoalphabetic substitution, or may
not be substituted at all. The pre-set pattern of this mapping is a key information
that can be stored in the private key, or, if a fixed pattern is used, this information
need not be encrypted, and be publicly available in the public key.

1.4. Objective
Convenient, and instant transfer of funds have been made possible thanks to the advent of
electronic payment methods such as credit cards, net-banking, debit cards, e-wallets, etc. As
the number of people using these payment methods go up, there is a need to make these
transactions ultra-secure. There occurs a number of fraud cases every day because of the
reason that the communication channel unreliable and is prone to various cyber-attacks. So,
to make these transactions secure use of new technologies like blockchain, cryptography is to
be considered. In this work a robust encryption technique is discussed that employs a
combination of existing security algorithms along with the concepts of blockchain.
CHAPTER 2

Literature Review

Blockchain functions admirably in appropriate framework situations like


scenarios of distributed systems. This can cause advances to change from
centralized to distributed frameworks. In [9], author(s) have utilized this preferred
position of Blockchain in the field of automated swarm frameworks. Initially
author(s) have examined the issues in the current swarm automated frameworks.
The four significant issues are security, decision making, business models and
decision making. At that point, it has been proposed how Blockchain innovation
can resolve these issues. The paper has been closed by posting the future issues
right now.

In [10], author(s) have characterized Blockchain technology in detail - history and


advancement of Blockchain, it's advantages and working. Author(s) have likewise
talked about the need of great importance for research that needs to done in this
emerging field known as blockchain.

In [11], author(s) have introduced a far-reaching survey of Blockchain innovation


portraying the blockchain structure, it's working, difficulties, calculations and
applications.

Healthcare is another significant utilization of Blockchain. Blockchain can end up


being a book for the general public in medicinal services division if it is utilized
productively. There is a requirement for advancing the capacity of clinical reports,
there is a critical requirement for electronic clinical records. In [12], author(s)
have proposed a novel decentralized record Management framework for capacity
of clinical records electronically. The best possible framework MedRec is secure.
Further, framework is interoperable, auditable and available.

In [13] author(s) have proposed a new rendition of Nakamoto's protocol. As per


Nakamoto's protocol, right off the bat, anybody can leave or join the execution of
protocol. Furthermore, the protocol execution is free of the players personality. In
the system proposed by author(s), consistency and enthusiasm properties stay
same as in Nakamoto's convention yet with better computational execution by
giving improved likelihood parameters and this proposed protocol is named as
fruitchain protocol.

In [14], author(s) have presented a theoretical research paper on Blockchain.


Theoretically, with models and applications blockchain concepts have been
presented in great detail.

In [15], author(s) have introduced the specialized parts of Blockchain and Internet
of Things. This work presents diagram, history, design, types, qualities, working,
application and difficulties of Blockchain and Internet of Things.

In [16], author(s) have talked about the significance of Blockchain in banking.


Banking systems faces a ton of security issues. Author(s) list the difficulties and
propose some arrangement in the usage of the Blockchain innovation in the
financial business. Author(s) contend the requirement for the foundation of
Regulatory sandbox for changing the financial framework to determine the issues
of decentralized, self-administering and consent less frameworks.

In [17], author(s) have investigated the Blockchain technology and its


applications, territories which can prompt issues is block chain ideas and
government guidelines in the usage of Blockchain innovation. This work
additionally records the different agencies which are related with Blockchain.

In [18], author(s) have talked about the Blockchain technology and its connected
progressions. Further, uses of Blockchain innovation have been recorded,
primarily concentrating on the application in the field of banking. Author(s) have
examined in detail the working, benefits, issues and difficulties in usage of record
based Blockchain innovation in banking frameworks administrations.

In [19], author(s) have talked about the advancement of bitcoin, it's points of
interest, qualities and need. Further, author(s) clarify the significance of
Blockchain in the accompanying areas - internet of things, banking, digital security
and financial organizations.

Blockchain includes a great deal of security efforts. In [20], author(s) specifies the
significance of Blockchain in supply chain mechanism. Author(s) have proposed a
Blockchain architecture and also portray in detail the dangers related with the in-
supply chain mechanism and afterward depict how Blockchain innovation can be
used to resolve this issue. The proposed arrangements can be stretched out to
different organizations as well.

In [21], author(s) have made presented a peer review of literature on Blockchain


innovation. Alongside it, author(s) have also explained the concepts that are
being used in the current blockchain technology.

In [22], author(s) have considered the supply chain mechanism. Primary


spotlight had been on diminishing the computation costs associated with the
strategy. A cost-effective strategy dependent on cloud computing has been
proposed.

In [23], author(s) have examined the significance of adoption of blockchain technology


in the present-day Industry. Majorly applications of blockchain have been taken into
account and industries that have benefited from it have been highlighted.

In [24], author(s) have raised the concerns of blockchain technology being


susceptible to attacks. Blockchain technology has been proposed as an answer for
this however it has a few constraints. Author(s) have proposed a model by beating
the inadequacies of Blockchain innovation. The methodology depends on smart
home tier. The structure has been clarified in detail and further, shows
demonstrate its security and privacy level.
CHAPTER 3

METHODOLOGY

3.1. Hardware Requirements


A standard performance PC or Laptop.

3.2. Software Requirements


3.2.1 ECLIPSE IDE

In the context of computing, Eclipse is an integrated development environment (IDE) for


developing applications using the Java programming language and other programming
languages such as C/C++, Python, PERL, Ruby etc.

The Eclipse platform which provides the foundation for the Eclipse IDE is composed of
plug-ins and is designed to be extensible using additional plug-ins. Developed using Java,
the Eclipse platform can be used to develop rich client applications, integrated development
environments and other tools. Eclipse can be used as an IDE for any programming language
for which a plug-in is available.

The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used
as a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++
Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing
application using C/C++, the Eclipse Scala plug-in allows Eclipse to be used an IDE to
develop Scala applications and PHP eclipse is a plug-in to eclipse that provides complete
development tool for PHP.

The initial codebase originated from IBM VisualAge.[7] The Eclipse software development
kit (SDK), which includes the Java development tools, is meant for Java developers. Users
can extend its abilities by installing plug-ins written for the Eclipse Platform, such as
development toolkits for other programming languages, and can write and contribute their
own plug-in modules. Since the introduction of the OSGi implementation (Equinox) in
version 3 of Eclipse, plug-ins can be plugged-stopped dynamically and are termed (OSGI)
bundles.

Eclipse software development kit (SDK) is free and open-source software, released under the
terms of the Eclipse Public License, although it is incompatible with the GNU General Public
License. It was one of the first IDEs to run under GNU Classpath and it runs without
problems under IcedTea.

3.2.2 JAVA VERSION "1.8.0_271" OR JAVA 8

Java is a set of computer software and specifications developed by James Gosling at Sun
Microsystems, which was later acquired by the Oracle Corporation, that provides a system
for developing application software and deploying it in a cross-platform computing
environment. Java is used in a wide variety of computing platforms from embedded
devices and mobile phones to enterprise servers and supercomputers. Java applets, which are
less common than standalone Java applications, were commonly run in
secure, sandboxed environments to provide many features of native applications through
being embedded in HTML pages.

Writing in the Java programming language is the primary way to produce code that will be
deployed as byte code in a Java virtual machine (JVM); byte code compilers are also
available for other languages, including Ada, JavaScript, Python, and Ruby. In addition,
several languages have been designed to run natively on the JVM, including Clojure, Groovy,
and Scala. Java syntax borrows heavily from C and C++, but object-oriented features are
modelled after Smalltalk and Objective-C.[11] Java eschews certain low-level constructs such
as pointers and has a very simple memory model where objects are allocated on the
heap (while some implementations e.g. all currently supported by Oracle, may use escape
analysis optimization to allocate on the stack instead) and all variables of object types
are references. Memory management is handled through integrated automatic garbage
collection performed by the JVM.
3.2.3 APACHE TOMCAT

Started in 1999 and developed as an open-source project by the Apache Software Foundation
(ASF), Apache Tomcat is a Java Servlet container, or web container, that provides the
extended functionality to interact with Java Servlets, while also implementing several
technical specifications of the Java platform: JavaServer Pages (JSP), Java Expression
Language (Java EL) and WebSocket.

But what is a Java Servlet? This is software that enables a web server to handle dynamic
Java-based web content using the HTTP protocol. JSP is a similar technology that allows
developers to create dynamic content using HTML or XML documents. In terms of their
ability to enable dynamic content, Java Servlets and JSP are broadly comparable to PHP or
ASP.NET, just based on the Java programming language.

By bringing all these Java-based technologies together, Tomcat offers a “pure Java” web
server environment for running applications built on the Java programming language.

HISTORY

Tomcat started off as a servlet reference implementation by James Duncan Davidson, a


software architect at Sun Microsystems. He later helped make the project open-source and
played a key role in its donation by Sun Microsystems to the Apache Software Foundation.
[11]
The Apache Ant software build automation tool was developed as a side-effect of the
creation of Tomcat as an open source project.

Davidson had initially hoped that the project would become open-sourced and, since many
open-source projects had O'Reilly books associated with them featuring an animal on the
cover, he wanted to name the project after an animal. He came up with Tomcat since he
reasoned the animal represented something that could fend for itself. Although the tomcat
was already in use for another O'Reilly title,[12] his wish to see an animal cover eventually
came true when O'Reilly published their Tomcat book with a snow leopard on the cover in
2003.
3.3 Technology Used
3.3.1 CRYPTOGRAPHY

Cryptography is the technique of securing the communication data through the


utilization of the concepts of information theory and coding with the goal that
only those entities for which the information is intended can access, understand
and process it. The prefix crypt in cryptography signifies hidden and suffix
graphy signifies writing. Cryptography makes use of mathematical concepts and
set of calculations which are rule based to change messages in manners such that
it becomes very hard to decode the message. Cryptographic techniques have
several applications such as credit and debit card transactions, browsing on the
world wide web, digital signing of documents [7].

Features of Cryptography [8]:


1. Integrity: the data or the information cannot be modified by any means
either when it is stored on it is transition between sender and destined
receiver.
2. Confidentiality: the information sent by the sender can only be accessed
by the intended receiver and with the exception of the intended receiver
no other person can ever access it.
3. Authentication: the original identities of the sender and the receiver are
affirmed and also origin and destination of the information is also
affirmed.
4. Non-repudiation: the original sender of the data cannot at any point deny
his or her intention of sending the information at any point after the data
is sent.

Types of Cryptography:
A. Symmetric Key Cryptography: it is an encryption framework where the
sender and the recipient of the data utilize a single key for both the
encryption and decryption of the data or message. These systems are
quicker and less complex but the main issue is that sender and receiver
need to exchange the key used in a very reliable and secure manner
because if the key gets in hand of an intruder, he or she can easily read or
even send messages to the receiver. Some notable examples of symmetric
key cryptographic systems are AES and DES.
B. Hash Functions: in hash functions no key is used for either encryption or
decryption, here for given plaintext message a hash value using a hash
function is calculated and this makes it impossible for contents of the
plaintext to be recovered. Hash functions actually are mathematical
functions, these are designed keeping in mind the problems of collision.
C. Asymmetric Key Cryptography: Under this framework a pair of keys is
utilised for encryption and decryption of the messages. One of the keys is
called as public key and other one is called as private key. Public key is
visible to everyone while private key resides with the receiver. The
message is encrypted with the use of public key and is decrypted with the
use of the private key. Even though public key is visible to everyone only
the intended receiver can see the actual contents of the message because
he alone has the access to the private key.
Fig. 2. Types of Cryptographic techniques

3.3.2 BLOCKCHAIN

The concept of Blockchain was developed by a person or a group of people known by


the Satoshi Nakamoto in the year of 2008. Blockchain is a decentralized distributed
ledger and it works on proof of timestamping scheme. Blockchain maintains a peer-to-
peer network and this network adheres to a set of protocols. Since contents of a block are
dependent on contents of other blocks so to make changes in any of the block, a
consensus of all the blocks is required, for this purpose network protocols are required.
These network protocols also help in creating an agreement between the parties across
this distributed network.

There exist three categories into which Blockchain technology can be


categorized, these are:
A. Public Blockchain: it does not involve any kind of restrictions for
accessing the details of the transaction that were done on the network,
some examples of public blockchain are Ethereum and Blockchain.
B. Private Blockchain: it requires the participants to obtain permission of the
network administrator to join the private blockchain network.
C. Consortium Blockchain: it sits in between the public and the private blockchains
and combines properties of the both and for this reason it is a semi-decentralized
blockchain network.
Fig. 3. Comparison between Blockchain types

Some of the main features of Blockchain are [25][26][27]:


 Distributed systems
 Non corruptible

 Low cost of transactions


 Fully transparent and authentic

 Standard consensus protocols apply to all blocks present in the network


 Decentralized

 Irreversible
 Immutability
Some of the common applications of Blockchain are [28][29][30][31][32]:
 Crypto currency like bitcoin

 Blockchain-Internet of things
 Financial services

 Supply chain
 Cyber security
 Personal identification

 Smart appliances
 Asset management: settlement and trade processing
CHAPTER 4

DESIGN OF PROJECT

4.1. Details of the cryptography concept used:


4.1.1. RSA Algorithm

The most common Public Key Algorithm is RSA [1], named after its inventors
Rivest, Shamir and Adleman. RSA is basically an asymmetric decryption
algorithm. It is asymmetric in the sense that here the public key is distributed all
through the network and the private key which is used for decryption is kept
secret and is not shared to everyone.

Steps Choose involved in Key generation in RSA algorithm [2][3][4]:


1. Choose two large primes, say p and q and compute their product n
as shown n = p * q and compute ϕ = (p-1)*(q-1).
2. Choose an integer e such that 1 < e < ϕ and gcd(e, ϕ) = 1.
3. Compute the exponent d which is secret such that ϕ divides (e*d – 1).
4. Thus the public key is the pair (n,e) and private key is d.
ENCRYPTION

Once the keys are generated Encryption can be done as follow.

If m is the message or data to be transmitted to the receiver, Ciphertext c is computed as:

The above calculation can be done quickly using the concept of Modular Exponentiation.
DECRYPTION
Decryption in RSA can be done as follows:

Thus by doing the above computation the original message “ m” sent by the
sender is obtained at the receiver’s end.

The string is encrypted with a unique form of the RSA encryption algorithm. The
geographic coordinates in the decimal degrees format of the device running the
encryption are used as a reference to obtain the pair of co-prime numbers required
for the algorithm; the greatest prime number smaller than or equal to 𝑥, where 𝑥 is
the figure obtained from when the decimal point is removed from the coordinate.
Doing this for the latitude and the longitude will produce two prime numbers, 𝑝
and 𝑞, i.e., the primes required for the algorithm. In the possible but unlikely
scenario that p and q are equal, the greatest prime preceding 𝑝 is used. The
number of digits used from the coordinate value are only limited by the accuracy
of the location services of the device and can be increased for improved security
by returning a larger prime number.

The result of the last step is a long character string. Another layer of security is
added by implementing blockchain on this string before its final transmission. The
string obtained from the previous step is divided into blocks of a predetermined
number of characters. A block consists of the current hash value, which is the
output of the AES encryption algorithm applied over the following strings: hash
of the previous block, current section of the encrypted string, device timestamp in
milliseconds, as well as a delimiter providing the information for the maximum
length of a section of the encrypted string used in one block. Hence, an encrypted
'block chain' is thus obtained the hash values of which can be plainly transmitted
over unsecure communication channels.

The employment of the combination of these encoding and encryption techniques


in this order provides a simple and ingenious method of encryption.
The algorithm requires two co-primes’ numbers 𝑝 and 𝑞. Using a Java based
Application Programming Interface (API), the details of the location device
running the encryption are retrieved. 𝑝 and 𝑞 are the greatest prime numbers
smaller than or equal to the coordinate figures with their decimal points removed.

Fig. 4. Application of Location based RSA algorithm


4.1.2. AES Algorithm

AES is a block cipher that uses a symmetric key. The data is divided in to blocks
of 128 bits for the encryption process. The size of the key used depends on the
number of rounds. If the number of rounds is 10 key size is 128 bits, if rounds are
12 key size is 192 bits and is the rounds are 14 key size is 256 bits. Here each
round uses a different key and the number of keys that are generated are 1 more
than the number of rounds and here the extra key belongs to the pre round
transformation.

Fig. 5. Flowchart of the AES algorithm


Steps involved in AES algorithm [5][6]:
5. Plain text is entered and it is divided in to 128bit blocks.

6. Now Preround transformation is done.

7. Now either 10, 12 or 14 rounds are performed

7.1 Sub Bytes: Substitution box is applied on the input and is split in
bytes.
7.2 Shift Rows: Rows are now shifted to the left

7.3 Mix Columns: Diffusion is performed

7.4 AddRoundKey
8. Cipher text is generated in this step.
9. Steps 1 to 4 are performed in reverse order to perform decryption to
get
back the plaintext and also the keys are applied in reverse order.
4.2. Flow Chart
Fig. 6. Basic Flow of the application

4.3. Implementation Process

The detailed working steps adopted are described below:


1. The first task involved designing the front end of the system that takes
the input card details from the user. The application receives the
following card details for the validation of the transaction:
a. Credit Card Number

b. CVV (Credit Card Verification Value Number)

2. Using the Luhn Mod 10 algorithm it is determined whether the entered


card number is valid or not.
3. Now a concatenated string is created using the details like credit card
number and cvv received from the user.

4. The input credit card details; the card number, the expiration dates and the
card security codes are encoded one-on-one and onto predetermined
characters of the English alphabet by affine cipher. The corresponding
numeric character reference in Hypertext Markup Language (HTML) for
each of the characters is obtained as per the American Standard Code for
Information Interchange (ASCII) table. Here, a novel ciphering technique
is used; the Cross Language Cipher Technique, which further converts
each of the HTML strings for the English Language characters into those
corresponding to characters of other languages. This is a unique yet
simple cipher technique that adds a layer of added security and
complexity. Further, the Cross Language Cipher can be implemented
repeatedly as well as randomly over characters of multiple languages;
possibly encompassing the entire set of the Unicode standard. In this
particular model used as an example, the technique converts the HTML
numeric character reference into that corresponding to the characters of
the Hindi Language in the UTF-8 standard, which itself is mapped onto
the HTML numeric reference of the phonetically similar alphabets of the
French Language. This marks the end of the unique encoding technique
employed in the model, the result of which is a string of characters in the
HTML numeric reference in the decimal format.

5. This string is now encrypted with a unique form of the RSA encryption
algorithm. The coordinates of the physical location of the device running
the encryption are used as a reference to obtain the prerequisite prime
numbers for the encryption; the greatest prime numbers smaller than or
equal to a given number of digits of the figure denoting each of the
coordinate with the decimal point removed. The number of digits used
from the coordinate value are only limited by the accuracy of the location
services of the device and can be increased for improved security by
returning a larger prime number.
6. The result of the last step is a long character string. Another layer of
security is added by implementing blockchain on this string before its
final transmission. The string obtained from the previous step is divided
into blocks of a predetermined number of characters.

7. A block consists of the current hash value, which is the output of the AES
encryption algorithm applied over the the following strings:
a. hash of the previous block,
b. current section of the encrypted string,
c. device timestamp in milliseconds, as well as a delimiter
providing the information for the maximum length of a section
of the encrypted string used in one block.
Hence, an encrypted 'block chain' is thus obtained the hash values of
which can be plainly transmitted over unsecure communication channels.
Fig. 7. Basic Flowchart of the Implementation
CHAPTER 5
Results:
Screenshots of Working Project

Fig. 8. Card Details Input Screen

Fig. 9. After user entered data


Fig. 10. Output Screen

Fig. 11. Eclipse IDE Output


Fig. 12. Eclipse IDE Output
Fig. 13. When user enters wrong card details

Fig. 14. Output Screen


CHAPTER 6
Conclusion and Future Work
6.1 Conclusion
The current work aims at merging different areas of computer science to create a
state of the encryption technique that can be used for processing of financial
transactions. Even though the developed encryption technique is used for
transactions the core technology is still valid and can be used for data
transmission of any kind through an unreliable data communication channel.

6.2 Future Work

In this work user’s geo location like latitude and longitude were used to get the
prime numbers p and q required in RSA algorithm, for further increase in security
of the encryption technique efforts can be done to get prime numbers that have a
larger length than the ones used currently. Moreover, databases connection to the
application using JDBC can also be done in future for the storage of card details.
This will help in authentication of hundreds of cards at any point of time.
REFERENCES
1. Rivest, R.; Shamir, A.; Adleman, L. (February 1978). "A Method for Obtaining
Digital Signatures and Public-Key Cryptosystems" (PDF). Communications of
the ACM. 21 (2): 120–126.
2. https://en.wikipedia.org/wiki/RSA_(cryptosystem)
3. https://www.di-mgt.com.au/rsa_alg.html
4. www.tutorialspoint.com/cryptography_with_python/
cryptography_with_python_understan ding_rsa_algorithm.htm
5. https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
6. https://www.tutorialspoint.com/cryptography/advanced_encryption_standard.htm
7. https://en.wikipedia.org/wiki/Cryptography
8. https://www.geeksforgeeks.org/cryptography-and-its-types/
9. Esposito, Christian, Alfredo De Santis, Genny Tortora, Henry Chang, and Kim-
Kwang Raymond Choo. "Blockchain: A panacea for healthcare cloud-based
data security and privacy?." IEEE Cloud Computing 5, no. 1 (2018): 31-37.
10. Chatterjee, Rishav, and Rajdeep Chatterjee. "An Overview of the Emerging
Technology: Blockchain." In 2017 3rd International Conference on
Computational Intelligence and Networks (CINE), pp. 126-127. IEEE, 2017.
11. Halaburda, Hanna. "Economic and Business Dimensions: Blockchain
revolution without the blockchain." (2018).
12. Azaria, Asaph, Ariel Ekblaw, Thiago Vieira, and Andrew Lippman.
"Medrec: Using blockchain for medical data access and permission
management." In 2016 2nd International Conference on Open and Big Data
(OBD), pp. 25-30. IEEE, 2016.
13. Cachin, Christian. "Architecture of the hyperledger blockchain fabric." In
Workshop on distributed cryptocurrencies and consensus ledgers, vol. 310.
2016.
14. Nofer, Michael, Peter Gomber, Oliver Hinz, and Dirk Schiereck.
"Blockchain." Business & Information Systems Engineering 59, no. 3 (2017):
183-187.
15. Atlam, Hany F., and Gary B. Wills. "Technical aspects of blockchain and IoT."
(2018).
16. Pass, Rafael, and Elaine Shi. "Fruitchains: A fair blockchain." Proceedings
of the ACM Symposium on Principles of Distributed Computing. ACM, 2017.
17. Michael, JW, Alan Cohn, and Jared R. Butcher. "Blockchain Technology." The
Journal(2018).
18. Peters, Gareth W., and Efstathios Panayi. "Understanding modern banking
ledgers through blockchain technologies: Future of transaction processing and
smart contracts on the internet of money." Banking beyond banks and money.
Springer, Cham, 2016. 239-278.
19. Guo, Ye, and Chen Liang. "Blockchain application and outlook in the banking
industry." Financial Innovation 2, no. 1 (2016): 24.
20. Min, Hokey. "Blockchain technology for enhancing supply chain resilience."
Business Horizons 62, no. 1 (2019): 35-45.
21. Seebacher, Stefan, and Ronny Schüritz. "Blockchain technology as an
enabler of service systems: A structured literature review." In International
Conference on Exploring Ser-vices Science, pp. 12-23. Springer, Cham, 2017.
22. Korpela, Kari, Jukka Hallikas, and Tomi Dahlberg. "Digital supply chain
transformation toward blockchain integration." proceedings of the 50th Hawaii
international conference on system sciences. 2017.
23. Beck, Roman, Michel Avital, Matti Rossi, and Jason Bennett Thatcher.
"Blockchain tech- nology in business and information systems research."
(2017): 381-384.
24. Dorri, Ali, Salil S. Kanhere, Raja Jurdak, and Praveen Gauravaram.
"Blockchain for IoT security and privacy: The case study of a smart home." In
2017 IEEE International Conference on Pervasive Computing and
Communications Workshops (PerCom Workshops), pp. 618-623. IEEE, 2017.
25. https://medium.com/techracers/4-key-features-of-blockchain-5a4aff025d38

26. https://www.finyear.com/Eight-Key-Features-of-Blockchain-and-Distributed-
Ledgers- Explained_a35486.amp.html
27. https://data-flair.training/blogs/features-of-blockchain/amp/

28. https://blockgeeks.com/guides/blockchain-applications/
29. https://blockgeeks.com/guides/blockchain-applications-real-world/

30. https://www.fool.com/amp/investing/2018/04/11/20-real-world-
uses-for- blockchaintechnology.aspx
31. https://medium.com/technology-nineleaps/blockchain-simplified-part-2-
a42161e08762

32. https://execed.economist.com/blog/industry-trends/5-applications-
blockchain-your- business

You might also like