You are on page 1of 4

IJSTE - International Journal of Science Technology & Engineering | Volume 1 | Issue 10 | April 2015

ISSN (online): 2349-784X

Character Based Encryption and Decryption


using Modulo Arithmatic
Dhaval Vegad
UG Student
Department of Computer Science & Engineering
SSIPMT Raipur, CG, India

Husain Ullah Khan


Assistant Professor
Department of Computer Science & Engineering
SSIPMT Raipur, CG, India

Nimesh Ghosh
UG Student
Department of Computer Science & Engineering
SSIPMT Raipur, CG, India

Abstract
In recent years network security has become an important issue. Encryption has come up as a solution, and plays an important
role in information security system. Many techniques are needed to protect the shared data. The present work focus on
cryptography to secure the data while transmitting in the network. Firstly the data which is to be transmitted from sender to
receiver in the network must be encrypted using the encryption algorithm in cryptography. Secondly, by using decryption
technique the receiver can view the original data. In this paper we implemented a simple algorithm for both encryption and
decryption.
Keywords: Encryption, Decryption, ASCII, Plain text, Cipher text
________________________________________________________________________________________________________

I. INTRODUCTION
Cryptography is the practice and study of techniques for secure communication in the presence of third parties (called
adversaries). More generally, it is about constructing and analyzing protocols that overcome the influence of adversaries and
which are related to various aspects in information security such as data confidentiality, data integrity, authentication, and nonrepudiation. Cryptography prior to the modern age was effectively synonymous with encryption, the conversion of information
from a readable state to apparent nonsense.[1] The originator of an encrypted message shared the decoding technique needed to
recover the original information only with intended recipients, thereby precluding unwanted persons to do the same. Since World
War I and the advent of the computer, the methods used to carry out cryptology have become increasingly complex and its
application more widespread. Cryptography includes the following process.[2]

II. HISTORY
The word cryptography comes from the Greek word kryptos, which means hidden and graphein, which means writing. There has
always been a need for exchanging information secretly. History is filled with examples where people have tried to keep
information secret from adversaries. Cryptography, the science of encrypting and decrypting information can be traced back all
the way to year 2000 BC in Egypt.Here it was first used with the help of the standard hieroglyphics in order to communicate
secretly. Julius Caesar (100-44 BC) used a simple substitution cipher which has been named after him today. During the first and
the second war the demand for secrecy increased dramatically and all kinds of new cryptographic techniques evolved.[4]
Todays society has evolved, and the need for more sophisticated methods for protecting data has increased. As the world
becomes more connected, the demand for information and electronic services is growing, and with the increased demand comes
increased dependency on electronic systems. Exchanging sensitive information over the Internet, such as credit card numbers is
common practice. In today's information society, cryptography is one of the main tools for privacy, trust, access control,
electronic payments, corporate security, authentication and many other fields. The use of cryptography is not something used
only by governments and highly skilled Specialists it is available for everyone.[2]
This paper will present some basic knowledge about Cryptography. It will focus on some new approach on text
encryption and description and describe their functions and flaws.

III. ENCRYPTION & DECRYPTION PROCESS


It is the process of converting ordinary information (called plaintext) into unintelligible text (called cipher text). Decryption is
the reverse, in other words, moving from the unintelligible cipher text back to plaintext. A cipher is a pair of algorithms that

All rights reserved by www.ijste.org

57

Character Based Encryption and Decryption using Modulo Arithmatic


(IJSTE/ Volume 1 / Issue 10 / 010)

create the encryption and the reversing decryption. The detailed operation of a cipher is controlled both by the algorithm. Our
algorithm does not use any key, this is a secret (ideally known only to the communicants), usually a short string of characters,
which is needed to decrypt the cipher text. [6]
A. Aalgorithm for Encryption Process:
This algorithm does not use any key (public or private), its just perform simple substitution and arithmetic process.
1) Step 1: Add two random characters at the starting of the text.
2) Step 2: Add two random characters at the ending of the text.
3) Step 3: Calculate length of the resultant text.
4) Step 4: Do (resultant text) mod (4) and increment it by1and store it in Variable shift.
5) Step 5: Calculate the ASCII value of each character.
6) Step 6: Add each ASCII value by the amount shift.
7) Step 7: Store the new characters of each ASCII value in string ENC_text.
8) Step 8: Return ENC_TEXT.
B. Algorithm for Decryption Process:
1)
2)
3)
4)
5)
6)
7)

Step 1: Do (ENC_TEXT) mod (4) and increment it by 1 and store it in variable Shift.
Step 2: Calculate the ASCII value of each character.
Step 3: Subtract each ASCII value by the amount shift.
Step 4: Store the new character of each ASCII value in string DEC_TEXT.
Step 5: Remove two characters from the starting of the DEC_TEXT.
Step 6: Remove two characters from the ending of the DEC_TEXT.
Step 7: Return DEC_TEXT.

IV. DETAILS OF MODULE


By using this algorithm we have made a project, this are the details of the module of our project.
A. Encryption of Text Message:
To encrypt the text message, write your message in the text box and then click on the encrypt button, by clicking on the encrypt
button, the encrypted form of your text message is displayed.
B. Decryption of Text Message:
To decrypt the text message, just click in the decrypt button and the encrypted message written in the text box is again changed
into the meaningful message.
C. Browse the Text Files:
When user wants to encrypt the whole file, then he/she has to click the browse button and retrieve that file from stored address
and the address of that file is also displayed there, and the file which is encrypted, after the successfully completion of the
encryption that file is saved in another new file in a encrypted form.
D. Save the Text Files:
The file which user wants to encrypt can be browse by clicking in the browse button and then encrypt it and after encryption if
user want to save that encrypted file in a new file, it can be done by clicking in the save button, by clicking in the save button a
new file is been created name as out and in that file the original messages encrypted form is saved.

V. DESCRIPTION OF THE ALGORITHM


It is a very simple algorithm, using simple arithmetic operations. For encryption process first add 2 characters at the starting of
the word , and 2 characters at the end of the word , now calculate its total length after that perform modulo operation (4) [as in
this project we have select the number 4 for the modulo operation] then increment the value of modulo operation by 1 and store
it in a variable named as shift, now calculate the ascii value of each character and add the ascii value by the amount stored in

All rights reserved by www.ijste.org

58

Character Based Encryption and Decryption using Modulo Arithmatic


(IJSTE/ Volume 1 / Issue 10 / 010)

shift and Store the new characters of each ascii value in string ENC_text, this is how encryption is done. For decryption
process the operation are just reverse of the encryption process.

VI. FLOW CHART

VII. RESULT
The Encryption and Decryption of message is only be used for .txt format. The messages as well as files both can be encrypted
and decrypted .The user can also select their own files also by browsing the system and the path of that file will be displayed
also, but nobody can alter the location of that file, after encryption process is completed, if the user want to save their file in that
encrypted format only then they has to just click in the save button and their content of the file will be saved in the file named as
out.

VIII. CONCLUSION
This study represents the importance of Encryption of data for storage and transmission. The significance of encrypted data can
be identified in light of the mushrooming applications and globalization of communication. The advantages of encrypting data
manifest themselves in the form of security & confidentiality in real time applications. Encryption of data is of particular
significance in applications like email, e commerce, e-cash where highly vulnerable communication lines is accessed for
transmission of highly volatile data.

REFERENCES
[1]
[2]
[3]

Amrita Sahu ,Yogesh Bahendwar, Swati Verma, Prateek Verma, "Proposed Method of Cryptographic Key Generation for Securing Digital Image,
International Journal of Advanced Research in Computer Science and Software Engineering, Volume 2, Issue 10, October2012.
Akanksha Mathur, "A Research paper: An ASCII value based data encryption algorithm and its comparison with other symmetric data encryption
algorithms", International Journal on Computer Science and Engineering (IJSCE), Vol. 4 No. 09 sep 2012.
Vikas Agrawal, Shruti Agrawal, Rajesh Deshmukh Analysis and Review of Encryption and Decryption for Secure Communication, International Journal
of Scientific Engineering and Research (IJSER) Volume 2 Issue 2, February 2014

All rights reserved by www.ijste.org

59

Character Based Encryption and Decryption using Modulo Arithmatic


(IJSTE/ Volume 1 / Issue 10 / 010)
[4]
[5]
[6]
[7]
[8]

Data Hiding and Retrieval, A.Nath, S.Das, A.Chakrabarti, Proceedings of IEEE International conference on Computer Intelligence and Computer Network
held at Bhopal from 26-28 Nov, 2010.
Ajit Singh and Upasana Jauhari, Data Security by Preprocessing the Text with Secret Hiding, Advanced Computing: An International Journal ( ACIJ ),
Vol.3, No.3, May 2012
Matthew M. Shannon, Forensic Relative Strength Scoring: ASCII and Entropy Scoring,International Journal of Digital Evidence Spring 2004, Volume 2,
Issue 4"
Verma, Sharad Kumar, Ojha, D. B., An application of data encryption technique using random number generator, International Journal of Research
Studies in Computing 2012 April, Volume 1 Number 1, 35-42
Majdi-ul-qdah len hi Hui,Simple Encryption/Decryption Application, International Journal of Computer Science and Security, Volume (1) : Issue (1)

All rights reserved by www.ijste.org

60

You might also like