A Secure Network Communication Protocol Based On Text
A Secure Network Communication Protocol Based On Text
64 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 6, No. 12, 2015
As it is mentioned earlier in this paper, an encryption key is date attacks. In their work, steganography algorithm is based
used to encrypt images, text, and sounds. Image encryption on DNA algorithm and is used to hide a secret key. This secret
techniques focus on encrypting a digital image in a specific key is distributed among two parties once a network
format (e.g. png, bmp, etc.) into an unreadable image with the communication is established.
same image format using a specific encryption key.
Krishna [13] proposed a new mathematical model in which
One of the techniques used for image encryption is based the output of the Elliptic Curve Cryptography (EEC) algorithm,
on dividing the image into blocks and then encrypting those a variable value, and a dynamic time stamp are used to
blocks using an encryption algorithm, the following are generate the cipher text. They compared the results from their
examples of this technique. proposed model with the results from RSA and ECC
algorithms. The results from their work showed that the
Nithin, Anupkumar, and Hegde [6] proposed and evaluated security strength of their proposed model is more than RSA
an image encryption algorithm (called FEAL) that is based on and ECC's security strength.
the DES encryption algorithm. The algorithm divides the
original image into a number of blocks (16×16 blocks). Later Other techniques for text encryption are proposed. These
encryption and decryption algorithms are performed using 12 techniques are used to encrypt text into musical notes.
keys of size 16-bit. Images used in this algorithm are gray scale Examples of other techniques are presented next.
images of size 256×256 resolution.
Dutta, Chakraborty, and Mahanti [14] proposed a novel
AliBaniYounes, and Janta [7] proposed an encryption method for encrypting a text into musical notes. In their work,
algorithm based on dividing an image into blocks. These they used MATLAB in which 26 alphabets and 0 to 9 numbers
blocks are then rearranged into a transformed image (using are considered as -12 to 23 as musical notes. A sender encrypts
their proposed transformation algorithm) and then the the text message into musical notes and sends it to a receiver.
transformed image is encrypted using the Blowfish algorithm. The receiver, when receiving the encrypted message, decrypts
Their work showed that increasing the number of blocks by the musical notes into the original text message (i.e. the plain
decreasing the block's size resulted in a lower correlation and text).
higher entropy.
Yamuna, Sankar, Ravichandran, and Harish [15] proposed
Divya, Sudha, and Resmy [8] proposed a simple encryption an encryption algorithm based on the transformation of a text
algorithm based on dividing the image into 8 × 8 blocks. In message into musical notes. The encryption algorithm consists
their method, they proposed to encrypt a portion of a given of two phases; in the first phase, the text message is encrypted
image instead of encrypting the whole image to make the into a traditional Indian music. In the second phase of
encryption process faster. In their algorithm, the resulting encryption, the Indian music notes are encrypted again into
blocks are transformed from the spatial domain to frequency western music notes.
domain using the Discrete Cosine Transform (DCT). A
Dutta, Kumar, and Chakraporty [16] proposed an
selected DCT coefficients are then encrypted and XORed with
encryption algorithm that encrypts a text message into musical
random bits to make it difficult for hackers to guess the
notes. The text characters of a message are replaced by
original message.
mathematically generated musical notes. These musical notes
M.Mishra, P. Mishra, Adhikary, and Kumar [9] proposed a and the seed value for encryption/decryption key are sent to the
new method for image encryption based on Fibonacci and receiver using the RSA algorithm.
Lucas series.
The reset of this paper is organized as follows. Section II
Different techniques are used for encrypting text messages presents the related work. Section III presents our work,
into an unreadable form. Examples of this technique are including research methodology, experiments, and analysis of
presented next. the proposed algorithm. Finally, section IV presents the
conclusions and future work.
Singh and Gilhotra [10] proposed an encryption algorithm
based on the concept of arithmetic coding. In this algorithm, a II. RELATED WORK
given word in a text is transformed into a floating point
between 0 and 1. The resulting floating number is then Bh, Chandravathi, and PRoja [17] presented Koblitz's
transformed into a binary number that is in turn encrypted to method and used it to map a message to a point in the
another binary number, and then the resulting binary number is implementation of Elliptic Curve Cryptography [18, 19]. A
converted to a decimal number. given character in a text is mapped into its ASCII code, and
then this ASCII code is encrypted into a point on a curve.
Huang, Chi Lee, and Hwang [11] proposed a novel
encryption algorithm. This algorithm generates n2+n common Singh and Gilhorta [5] proposed an encryption algorithm
secret keys in one session. It is based on the difficulty of which is based on the transformation of a word of text into a
calculating discrete logarithms problem. floating point number (n) where, 1 ≥ n ≥ 0. The resulting
floating point number (n) is then encrypted into a binary
Torkaman, Kazazi, and Rouddini [12] proposed a hybrid number (b), and then (b) is encrypted using an encryption key.
cryptosystem which is a combination of public and private
cryptography. Their technique is based on a combination of Kumar, Azam, and Rasool [20] proposed a new technique
cryptographic and steganography techniques. This algorithm of data encryption. In this technique, three random numbers are
provides a secure communication while defeating the up to generated, say (D1), (D2), and D3. The random number D1 is
65 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 6, No. 12, 2015
used for rows transformation in a matrix (V). D2 is used for B. Data Sample
columns transformation, and D3 is converted into a binary The data sample is created and stored in a notepad file. The
number. Rows and columns transformation is based on the data sample is shown Fig. 2.
value of the individual bits of that binary number. Three
operations are defined in order to perform the matrix
transformation namely, circular left shift, circular right shift,
and reverse operation.
Abusukhon and Talib [21], and Abusukhon, Talib, and Issa
[22] proposed the Text-to-Image Encryption algorithm (TTIE).
In their algorithm, a given text file is encrypted into an image.
Each individual character in the text file is transformed into an
individual pixel (a pixel with a specific color). Each pixel in
the resulting image consists of three integers; namely, Red,
Green, and Blue, and each integer represent a specific color
density. Having a matrix of integers, they were able to perform
columns and rows shuffling making it difficult for hackers to
guess the plain text (i.e. the original text message).
Abusukhon [23] investigated using block cipher encryption
with TTIE encryption algorithm. In their work, the plain text is
divided into number of blocks say {b1, b2…bn}, and then each
block is encrypted into an image. All images from all blocks
are combined into one image. This image represents the plain Fig. 2. Tested data
text.
C. Research Methodology and Evaluation
Abusukhon, Talib, and Nabulsi [24] analyzed the
encryption time for the TTIE encryption algorithm. They The plain text shown in Fig. 2 is allocated at the client
divided the total time of their experiment into six parts. The node. The client node encrypts the plain text using the
results from their work showed that the most significant time is proposed algorithm (BCEA), produces a bar code image, and
the time required to store the encrypted data into the hard disk. then the resulting image is sent to the server. The server
decrypts the received image and then displays the plain text
Abusukhon, Talib, and Almimi [25] proposed the message. To evaluate our system; the plain text message is
Distributed Text-to-Image Encryption Algorithm (DTTIE) in checked and compared with the original one (i.e. the message
order to improve the speed of the TTIE algorithm when a large sent by the client).
scale data collection is used. They proposed to distribute the
Text-to-Image Encryption Algorithm (TTIE) proposed in [21, D. Our Experiment
22] among seven nodes, where each node encrypts a partition In this experiment, encryption and decryption algorithms, a
of the data collection. They evaluated the speed up of their client code, and a server code are built from scratch using java.
system when a large data collection (5.77 Giga Bytes) is used. The system architecture is shown in Fig. 3.
Our work differs from the work presented in [21, 22, 23,
24, 25]. In their work, each letter in the plain text is encrypted
and mapped into one colored pixel ( for example, letter '"a" is
represented as red pixel, letter "b" is represented as green pixel
and so on). In this paper, each letter is encrypted into a black
bar. Each black bar consists of a specific number of black
pixels. In this paper we propose the Bar Code Encryption
Algorithm (BCEA).
III. OUR WORK
In this paper, Java NetBeans is used as a vehicle to carry
out our experiments. All algorithms are implemented in Java,
and build from scratch including encryption and decryption
algorithms, client code, and the server code.
A. Machine Specifications
Our experiments are carried out using a single machine
with the following specifications; processor Intel (R) core
(TM)2, Duo CPU T5870 @ 2.00GHz, installed memory
(RAM) 2.00GB operating system Windows 7 Ultimate and Fig. 3. The system architecture
hard disk 24.5 GB (free space).
66 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 6, No. 12, 2015
In this experiment, the plain text shown in Fig. 2 is placed Fig. 4. The Barcode image results from running the BCEA algorithm
on the client side. The client uses the proposed encryption
algorithm (BCEA) for encrypting the plain text. The output of Using the proposed algorithm (BCEA), each letter from the
the BCEA algorithm is an image of type ".png" as shown in plain text is encrypted into one bar. Each bar consists of a
Fig.4. number of black pixels and has a specific length (the bar's
length is measured in pixels). For example, in our experiment
the letter "a" is encrypted as one bar of length = 10 black
pixels. Letter "b" is encrypted as another bar of length = 20
pixels, and so on. We leave two white bars between each two
black bars in order to clarify the bar code shape.
To verify our algorithm, the client encrypts the sample
shown in Fig. 2, and then the encrypted text (.png file) is sent
to the server. The server decrypts the .png file, and gets the
original message shown in Fig. 5.
Encrypting the plain text into a bar code image makes it
difficult for hackers to guess that each black bar in the image
represents a specific letter from the plain text.
The main steps of encryption and decryption for BCEA
algorithms are described in Fig. 6 (a) and (b).
67 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 6, No. 12, 2015
// System set up
1. Determine the minimum size (X) and the maximum size (Y) of the bar.
2. Select an integer number between (X) and (Y) for each letter in the alphabet set [A to Z].
//This number represents the bar length corresponding to a specific letter.
// letter A 10 black Pixels, letter B 20 black pixels and so on.
// do the encryption
3. Read the plain text and store it in an array of characters (chr)
4. For (int i=1; i< = chr.length; i++)
{
Read chr [i] // read a letter (L) from chr
Search for the bar length (L) correspond to the current letter
Create a black bar whose length is (L) // (see step 2)
Draw the bar on the result image (. png)
Draw two white bars on the image // in order to separate the black bars from each other
}
_______________________________________________________________
If the extracted bar is a white bar then ignore // discard white bars since they do not
//represent any letter from the plain text
Else
Calculate the bar length // count the number of black pixels
Search for the bar length and retrieve the corresponding letter
OriginaMessage = OriginalMessage + the current letter // + means concatenation
Fig. 6. The main steps of encryption and decryption for the BCEA algorithm
68 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 6, No. 12, 2015
Fig. 7. Measuring the efficiency of (BCEA) encryption algorithm In our experiment, we use the key permutation where the
letter "a" is represented as a bar of length equals 10 black
To achieve our goal, five data collection are generated pixels, the letter "b" is represented as a bar of length equals 20
randomly. The first data collection consists of 100 groups and black pixels and so on, Table 1 shows one of the key
each group contains 100 text files. Each text file consists of 10 permutations.
words and each word consists of seven characters generated
randomly from the alphabet list. The second data collection TABLE I. POSSIBLE KEY PERMUTATION
consists of 200 groups, and the third data collection consists of
Letter a b c d … z
300 groups and so on. As shown in Fig. 7, the encryption time Bar length (in
is proportional to collection size. 10 20 30 40 … 260
pixels)
E. Analysis of the proposed algorithm (BCEA)
IV. CONCLUSIONS AND FUTURE WORK
In this section, the maximum number of permutations
(How many times a hacker may try before guessing the In this paper, a novel encryption algorithm, the Bar Code
encryption key and getting the original text) is calculated. Encryption Algorithm (BCEA), is proposed and tested. The
BCEA is based on encrypting the plain text into a bar code
The image resulting from the BCEA algorithm is a matrix image, where each letter in the plain text is encrypted into
of integers (M) having (R) rows and (C) columns. Suppose that black bar consists of a specific number of black pixels.
the maximum row length (i.e. the number of columns in a row)
is (mR), and the maximum number of rows is (nR); then the The decryption algorithm is also tested where the plain text
length of each bar in the image is limited by (mR). Each letter (the original message) is produced from the bar code image.
(L) from the plain text is encrypted as one bar and thus it Also, in section III-D, we measured the efficiency of the
allocates one row of the matrix (M) regardless the bar length. (BCEA) on encryption time, where different sizes of data
collections are used.
The maximum number of key permutations (the range or
the domain from which a key is picked out) is limited to (mR). Section III-E showed that the maximum number of key
permutations is limited by the maximum row length (mR) of
The number of letters (nL) in the plain text is limited to the resulting image.
(nR). In other words, the number of letters in the plain text is
limited by the maximum image size supported by Netbeans (in The (BCEA) algorithm could be used for e-mail
this paper). Thus, the maximum number of key permutations encryption, off-line data encryption, as well as online data
(P) provided by the BCEA is calculated as shown in (1). encryption. For example, it can be used as a logistics barcode
system (in packaging system), or as online Quick Response
(QR) barcode for E-commerce.
In future, we propose to investigate the efficiency of the
(BCEA) algorithm when a huge data size (multi Gigabytes) is
Thus, suppose that mR = 1000 pixels, then P is calculated used as well as to compare the efficiency of our proposed
as follows. algorithm with the efficiency of other algorithms such as the
TTIE algorithm with respect to the encryption time.
P (1000, 26) = (1000×999×998…×974!) / 974!
= 7.2 e +77.
69 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 6, No. 12, 2015
ACKNOWLEDGMENT [13] A.V. Krishna, “Time stamp based ECC encryption and decryption”. The
International Arab Journal of Information Technology. Vol. 11, No. 3.
We would like to acknowledge and extend our heartfelt pp 276-281, 2014.
gratitude to Al-ZaytoonahUniversity of Jordan. [14] S. Dutta, S. Chakraborty, and N.C. Mahanti, “A novel method of
hiding message using musical notes”. The International Journal of
REFERENCES
Computer Applications . Vol. 1, No. 16. pp 76-79, 2010.
[1] K..Lakhtaria“Protecting computer network with encryption technique: a [15] M. Yamuna, A. Sankar, S.Ravichandran, and V. Harish, “Encryption of
study”, International Journal of u- and e-service, Science and a Binary String using music notes and graph theory”. International
Technology, Vol. 4, No. 2, pp 43-52, 2011.
Journal of Engineering and Technology (IJET). Vol. 5, No. 3. pp 2920-
[2] A.Chan,“A security framework for privacy-preserving data aggregation 2925, 2013.
in wireless sensor networks”, ACM transactions on sensor networks, [16] S. Dutta, C. Kumar, and S. Chakraporty, “A Symmetric Key algorithm
Vol. 7, No. 4, 2011. [Available online for cryptography using music”. International Journal of Engineering and
at: http://individual.utoronto.ca/aldar/paper/2011/cda- journal- Technology (IJET). Vol. 5, No. 3. pp 3109- 3115,2013.
tosn.pdf]. Accessedon 25-03-2015.
[17] P. Bh, D. Chandravathi, P.PRoja, “Encoding and decoding of a message
[3] S. Goldwasser, S.Micali, R. L.Rivest, “A digital signature scheme
in the implementation of Elliptic Curve cryptography using Koblitz’s
secure against adaptive chosen-message attacks”, SIAM Journal of
method”, International Journal of Computer Science and Engineering,
Computing Vol. 17, No.2, pp 281-308,1998.
Vol. 2, No. 5, pp 1904-1907, 2010.
[4] B. Zaidan, A.Zaidan, A. Al-Frajat, and H. Jalab, “On the differences
[18] N. Koblitz, “Elliptic Curve cryptosystems”, Mathematics of computation
between hiding information and cryptography techniques: an overview”, Vol. 48, No. 177, pp 203-209, 1987.
Journal of Applied Sciences Vol. 10, No. 15, pp 1650-1655,2010.
[19] N. Koblitz,“A course in number theory and cryptography”. 2'nd. ed.
[5] A. Singh, R. Gilhorta, “Data security using private key encryption Springer-Verlag, 1994.
system based on arithmetic coding”, International Journal of Network
Security and its Applications (IJNSA) Vol. 3, No. 3, pp. 58-67,2011. [20] K.M. Kumar, M.S.Azam, S.Rasool, “Efficient digital encryption
algorithm based on matrix scrambling technique”, International Journal
[6] N. Nithin,M.B. Anupkumar , G. P. Hegde,“Image encryption based on
of Network Security and its Applications (IJNSA) Vol. 2, No. 4, pp 30-
FEAL algorithm”. International Journal of Advances in Computer 41,2010.
Science and Technology, Vol.2, No.3, pp 14-20,2013.
[21] A. Abusukhon, M.Talib, “A novel network security algorithm based on
[7] M. Ali BaniYounes, A. Jantan, “Image encryption using block-based Private Key encryption”, International Conference on Cyber Security,
transformation algorithm”. International Journal of computer science Cyber Warfare and Digital Forensic. Kuala Lumpur, Malaysia, 2012.
(IJCS). Vol.35 No. 1. pp 407-415, 2008.
[22] A. Abusukhon, M. Talib, and O. Issa, “Secure network communication
[8] V.V Divya, S.K. Sudha, andV.R. Resmy, “Simple and secure image based on text to image encryption”, International Journal of Cyber-
encryption”. International Journal of Computer Science Issues (IJCSI). Security and Digital Forensics (IJCSDF), The Society of Digital
Vol. 9, No. 3, pp 286-289, 2012.
Information and Wireless Communications (SDIWC) Vol. 1, No. 4, pp
[9] M. Mishra, P. Mishra, M.C. Adhikary, S. Kumar, “Image encryption 263-271, 2012.
using Fibonacci-Lucas Transformation”. International Journal on
[23] A. Abusukhon, “Block cipher encryption for Text-to-Image Encryption
Cryptography and Information Security (IJCIS). Vol.2, No.3, pp 131-
algorithm”, International Journal of Computer Engineering and
141, 2012.
Technology (IJCET) Vol. 4, pp 50-58, 2013.
[10] A. Singh, andR. Gilhotra, “ Data security using private key encryption
[24] A. Abusukhon, M. Talib, and M. Nabulsi, “Analyzing the efficiency of
system based on arithmetic coding”. International Journal of Network
Text-to-Image Encryption algorithm”, International Journal of
Security and its Applications (IJNSA). Vol. 3, No. 3, pp 58-67,2011.
Advanced Computer Science and Applications ( IJACSA ) Vol. 3, No.
[11] L. Huang, C. Chi Lee, and M. Hwang, “A n2+n MQV key agreement 11, pp 35 – 38,2012.
protocol”. The International Arab Journal of Information Technology.
[25] A. Abusukhon, M. Talib, and H. Almimi, “Distributed Text-to-Image
Vol. 10, No. 2, pp 137-142,2013.
Encryption algorithm”, International Journal of Computer Applications
[12] M.R.N. Torkaman, N.S.Kazazi, and A. Rouddini, “Innovative approach Vol. 106, No. 1. [Available online at :
to improve Hybrid Cryptography by using DNA steganography”. http://research.ijcaonline.org/volume106/number1/pxc3899518.pdf ].
International Journal on New Computer Architectures and Their Accessed on 25-03-2015,2014.
Applications (IJNCAA). Vol.2 No. 1, pp 224, 235,2012.
70 | P a g e
www.ijacsa.thesai.org