Você está na página 1de 3

International Conference on Electrical, Electronics, and Optimization Techniques (ICEEOT) - 2016

VLSI Implementation of Text to Image Encryption


Algorithm based on Private Key Encryption

Anjali Suresh Remya Ajai A S


Department of Electronics and Communication Department of Electronics and Communication
Amrita School of Engineering Amrita School of Engineering
Kollam, India Kollam, India
anjali.srsh@gmail.com remya.amrita@gmail.com

Abstract— In cryptographic applications, the data sent to a Reprogrammable devices such as Field Programmable Gate
remote host are encrypted at the source machine using an Arrays (FPGAs) are used for hardware implementations of
encryption key and then the encrypted data are sent to the cryptographic algorithms. FPGAs are concurrent and better
destination machine, where it is decrypted to get the original data. suited for real time applications. The required functionalities
Thus the attacker will not have the encryption key which is can be added or removed easily, i.e. they are more flexible.
required to get the original data and so a hacker can do nothing FPGAs provide hardware-timed speed and reliability, but they
with any cryptographic system. Reprogrammable devices such as do not require high volumes to justify the large upfront expense
Field Programmable Gate Arrays (FPGAs) are used for hardware of custom ASIC design.
implementations of cryptographic algorithms. As FPGA devices
progressed both in terms of resources and performance, the latest Reprogrammable silicon also has the same flexibility of
FPGAs provide solutions that are easily customizable for system software running on a processor-based system, but it is not
connectivity, DSP, and data processing applications. In this paper, limited by the number of processing cores available. Unlike
implementation of an efficient cryptographic algorithm is done in processors, FPGAs are truly parallel in nature, so different
Xilinx SPARTEN 3E FPGA. Also the algorithm is analyzed by processing operations do not have to compete for the same
calculating the number of all possible key permutations. resources. Each independent processing task is assigned to a
dedicated section of the chip, and can function autonomously
Keywords—decryption; encryption; FPGAs; image; private key;
without any influence from other logic blocks. As a result, the
text
performance of one part of the application is not affected when
I. INTRODUCTION we add more processing. In this paper an efficient text to image
encryption algorithm based on private key is implemented in
Cryptography, also referred as encipherment is used to FPGA.
convert the plain text to an unreadable form of text. The data to
be sent are encrypted on the sender side using encryption II. RELATED WORKS
algorithm and keys in order to have them hidden and protected
Singh and Gilhorta in [2] proposed encrypting a word of text
from unauthorized access and then sent via the network. when
to a floating point number that lie in range 0 to 1. The floating
the data are received they are decrypted depending on an
point number is then converted into binary number and after
algorithm and keys to retrieve the original data. This way only
that one time key is used to encrypt this binary number. An
the receiver can have the original data.
implementation of Elliptic Curve Cryptography [4] is a public
There are some standard methods which are used with key cryptography using Koblitz's methood [5, 6]. In this work,
cryptography such as private-key (also known as symmetric or each character in a message is encoded by its ASCII code, then
secret key), public-key (also known as asymmetric), hash the ASCII value is encoded to a point on the curve. Each point
functions [1] and digital signature [2]. In private key is encrypted to two cipher text points. They encoded each
cryptography, a single key is used for both encryption and character by its ASCII value.
decryption. It requires that each individual must possess a copy
Kiran in [7] proposed a new technique of data encryption
of the key and the key must be passed over a secure channel to
based on matrix disordering which was relied on generating
the other individual [3]. Private-key algorithms are very fast
random numbers used for row or columns transformations.
and easily implemented in hardware and so they are commonly
After each transformation, a sub key was generated, which was
used for bulk data encryption. Public-key encryption uses two
sent later to the receiver to be used as decryption key. Ahmad
distinct but mathematically related keys- public and private.
Abusukhon and Mohammad Talib in [8] proposed a new data
When data are sent they are protected with a secret-key
encryption standard based on private key that transforms text
encryption that was encrypted with the public key. The secret
file into an image file. In this work, each character in the plain
key will then be used to decrypt the message.
text is coded with three random values ranging from 0 to 255
representing one pixel in the image file. During this process

978-1-4673-9939-5/16/$31.00 ©2016 IEEE

4879
random numbers for all letters and stored in one string called
key, which is further used for decryption.
III. TEXT TO IMAGE ENCRYPTION ALGORITHM
In the text to image encryption (TTIE) algorithm shown in
Fig.1, each letter in the text file is encrypted into three random
integers say R for red, G for green and B for blue where each
random number ranging from 0 to 255. The three random
numbers represent one pixel in the image file. This will make it
difficult for hackers to attack the data transmitted over a
network.
This algorithm generates a random pixel R, G, and B values
(calling them RGB value) for each letter. During this process
the random numbers RGB for all letters are generated and used
as key for encryption, then use key to transfer plain text into
cipher text. This key is generated at the receiver side, which is
used for decryption later. The result of this process is a two
dimensional array or matrix of pixels in which each pixel
represent one letter. These random values can be generated
using Pseudo random pattern generators like linear feedback
shift registers (LFSRs). Here an 8 bit LFSR is used to randomly
generate red, green and blue values.
IV. DECRYPTION ALGORITHM
The reverse algorithm as shown in Fig.2 is performed at the
receiver side to retrieve original data. The cipher text will be in Fig. 2. Steps in Decryption
the form of image, so at first read the pixels from image. Then
using key, RGB values are transferred to specific letters. In V. IMPLEMENTATION AND RESULTS
receiver side, LFSR can be used for generating random key The text to image encryption algorithm based on private key
values depending on encryption key. encryption is simulated in Matlab and its output has been
verified. Then this algorithm is coded in verilog HDL and is
simulated in Modelsim and the result is verified with Matlab
output. Also a paragraph of text is encrypted and its result is
verified using Matlab. This is shown in Fig.3. Outputs of both
encryption and decryption in Modelsim are shown in Fig. 4.
Field Programmable Gate Arrays are used for the hardware
implementation of this algorithm. To implement the above
encryption algorithm in FPGA, it is synthesized using Xilinx
ISE and is implemented on low cost Xilinx FPGA SPARTEN
3E. Synthesized report for encryption and decryption are shown
in Fig.5 and Fig.6.
It has been found that the number of 4 input LUTs utilized
by this operation for encryption is 174 out of 1920 available
LUTs, which is 9% utilization. And the number of occupied
slices is 123 out of 960 available slices, which is 12%
utilization. For decryption, number of 4 input LUTs utilized is
214 out of 1920 available LUTs, that is 11% utilization. And
the number of occupied slices is 140 out of 960 available slices,
which is 14% utilization.

Fig. 3. Matlab simulation output


Fig. 1. Steps in Encryption

4880
difficult to compute while considering all possible
combinations. By simple calculation, the number of possible
permutations to encrypt 26 letters is ((256)3) 26 . Since each
pixel consists of three values and each one of these values is in
the range from 0 to 255, choosing three values has (256)3
permutations. We have 26 letters and thus the permutations for
26 letters is ((256)3) 26.For an attacker to do all possible
permutations requires 4.328×1069 years which is not practical.
This makes it stronger compared to other data encryption
algorithms.
VII. CONCLUSION
Text to image encryption based on private encryption has
been implemented in SPARTEN 3E FPGA. It has found that
this algorithm occupies less number of slices and comparatively
less memory space.
This algorithm is good for text encryption for a network
system as well as for individual offline machines. It is very
reliable for email security where all messages stored in the mail
box are displayed as images and so difficult for any third party
to retrieve the image even if someone leaves the mail page
suddenly. In future, can divide the text into blocks and then
Fig. 4. Modelsim simulation output
transfer each block into an image and thus create individual key
for each block.

REFERENCES

[1] Zaidan, B., Zaidan A., Al-Frajat, A., Jalab, H., "On the differences
between hiding Information and cryptography techniques: An Overview",
Journal of Applied Sciences10(15),2010 .
[2] Goldwasser.S.,Micali. S.,L.Rivest.R. , "A Digital signature scheme secure
against adaptive chosen message attacks", SIAM Journal of Computing
17(2):281-308,1998 .
[3] Singh, A., Gilhorta, R. , "Data security using private key encryption
system based on arithmetic coding", International Journal of Network
Security and its Applications (IJNSA), 3(3),2011.
[4] Bh, P., Chandravathi, D., Roja, P. , "Encoding and decoding of a message
in the implementation of Elliptic Curve cryptography using Koblitz’s
Fig. 5. Device utilization summary after synthesis for encryption method", International Journal of Computer Science and Engineering,
2(5), 2010.
[5] Koblitz, N., Elliptic Curve cryptosystems, Mathematics of Computation,
48 , 203-209, 1987.
[6] Koblitz, N.,A Course in Number Theory and cryptography. 2'nd
edition.Springer-Verlag, 1994.
[7] Kiran Kumar, M., Mukthyar Azam, S., and Rasool, S. , "Efficient digital
encryption algorithm based on matrix scrambling technique",
International Journal of Network Security and its Applications (IJNSA),
2(4), 2010.
[8] K.A.Abusukhon, and M. Talib, "A Novel network security algorithm
based on private key Encryption", In Proceeding of The International
Conference on Cyber Security, Cyber Warfare and Digital
Forensic(CyberSec12), 2012.

Fig. 6. Device utilization summary after synthesis for decryption

VI. ANALYSIS
In our work, key is generated with 24 bits for each character,
thus making the length of key 64 bits for all 26 characters (A to
Z). This longer key length makes this algorithm stronger or

4881

Você também pode gostar