Encryption and Decryption: Text and Image
GADAMSETTY BHUVANESH GANDLA JAYA CHANDRA PAL
CSE{CYBER SECURITY} CSE{CYBER SECURITY}
KALASALINGAM ACADEMY OF KALASALINGAM ACADEMY OF
RESEARCH AND EDUCATION RESEARCH AND EDUCATION
VIRUDHUNAGAR,INDIA VIRUDHUNAGAR,INDIA
[email protected] [email protected] LAGIDI VENKATA AJAY KUMAR K. ADITHYA
CSE{CYBER SECURITY} CSE{CYBER SECURITY}
KALASALINGAM ACADEMY OF KALASALINGAM ACADEMY OF
RESEARCH AND EDUCATION RESEARCH AND EDUCATION
VIRUDHUNAGAR,INDIA VIRUDHUNAGAR,INDIA
[email protected] [email protected] Abstract— In recent years, there has been a rapid an encrypted message shared the decoding technique needed
examination of digital data sharing. As a result, information to recover the original information only with intended
security is critical in the data storage and transmission recipients, thereby precluding unwanted persons to do the
processes. Text protection in digital media is required for the same. Since World War I and the advent of the computer, the
security of online banking account passwords, email account methods used to carry out cryptology have become
passwords, and so forth. Similarly, picture transmission and increasingly complex and its application more widespread.
storage for industrial and research activities necessitate image Nowadays, information security is primarily based on data
protection. Image encryption plays a paramount part to storage and transmission. Images are broadly used in
guarantee classified transmission and capacity of image over numerous processes. As a result, the safety of image data from
web. Then again, a real-time image encryption confronts a more
unauthorized access is crucial at the hands of user. Image
noteworthy test because of vast measure of information
encryption plays a significant role in the field of information
included. Because images have a large data size and a real-time
constraint problem, a comparable approach cannot be used to
hiding. Image hiding or encryption methods and algorithms
secure images and text from unauthorized access. However, ranges from simple spatial domain methods to more
with a few simple changes, AES may be used to protect both complicated and reliable frequency domain.
pictures and text. In this application, I utilized AES to encrypt Encryption uses different algorithm to encrypt the data
and decode text and images. into different form. Cryptographic Algorithm uses a set of
keys with the different characters for both encryption and
Keywords— Image Encryption, Domains of Image,
decryption. By using key, the plain text is converted to the
Encryption, Full and Selective Image, Encryption Techniques, AES,
Cryptography, Security.
cipher text and decryption is done by converting back the
plaintext from the cipher text. Cryptography is a process of
transmitting and storing data in a form that it is read only by
I. INTRODUCTION
authorised users. Cryptography is a science of protection of
Internet influences the human life to such a degree that almost data by encoding it into unreadable form. It is useful way of
every walks of life passes through this web at any time of its protecting the important sensitive information by using
passage. Financial transactions, social networking, personnel mathematical form algorithm for both encryption and
data sharing, vital information sharing etc use this path for decryption process. The encryption and decryption process
easy task completion. So, this communication system will depend on the key value. The strength of the algorithm is how
have to remain reliable. For this, the system has to be protected difficult it is to determine the key value and get the original
against challenging security issues like unauthorized access text. The algorithm is majorly divided into two types
and hacking. From time-to-time cryptologists develop several symmetric and asymmetric depending on the keys. If same
protocols and standards for keeping the system reliable, but keys are used for both encrypting and decrypting then it is
intruders succeed to the same level. This makes “Making- called symmetric algorithm. Symmetric algorithm is further
Cracking”, a never-ending task. divided into stream and block ciphers. A stream cipher is done
Cryptologist has to choose the path Security-Integrity on the single byte of data, whereas the block a cipher is done
Authenticity-Confidentiality to get around challenging on the block of data. Asymmetric algorithm uses two different
security issues. Cryptography is the practice and study of keys one for encryption and both for decryption. The key
techniques for secure communication in the presence of third should be kept secret so that the message should be not be
parties (called adversaries). More generally, it is about decrypted. The purpose of cryptography is to provide
constructing and analysing protocols that overcome the Authentication (proving the one’s identity), non-repudiation
influence of adversaries and which are related to various (the receiver should know the sender should not be faking),
aspects in information security such as data confidentiality, Integrity (data should be correct, accuracy, and
data integrity, authentication, and non-repudiation. trustworthiness), and Privacy/confidentiality (message is read
Cryptography prior to the modern age was effectively by only the intended receiver).
synonymous with encryption, the conversion of information
from a readable state to apparent nonsense. The originator of
II. RELATED WORK • For RSA we must generate two different prime
numbers. Using that prime numbers, Calculate
Euler’s Totient and q(n).
Quist-Aphetsi Kester proposed the work sets out to contribute
to the general body of knowledge in the area of cryptography • Select integer e such that gcd ( q(n), e)) =1 & 1< e <
application and by developing a cipher algorithm for image (n), Where e is called as Public Exponent.
encryption of m*n size by shuffling the RGB pixel values. • Now sender “A” will Encrypt the message using the
Finally, the algorithm made it possible for encryption and Public Exponent.
decryption of the images based on the RGB pixel. [1]. • Let the encrypted message be Cipher Text
Amrita Sahu et.al proposed a new key generation algorithm (cm).Consider an image, and hide the encrypted
based on palm print which is used for encryption and message(cm) in the given image with the secret key
decryption of an image. Our scheme allows one party to send Using Steganography Algorithm. And the secret key
a secret image to another party over the open network, even will be considered from RSA algorithm. Now send
if many eavesdroppers listen. This scheme gives reliable the Stagno-Image to the Receiver.
security. They presented an image encryption/decryption
scheme based on bit XOR method in this paper. The salient b) Decryption:
features of the proposed asymmetric image encryption
scheme can be summarized as: (a) Lossless encryption of INPUT: Stego-Image, key
image. (b) Less computational complexity. (c) Convenient • Consider the input be Stego-Image.
realization. (d) Choosing a suitable size of matrix according • Using the Secret Key, Obtain the hidden
to the size of image. (e) Encryption/decryption scheme uses message from the Stego-Image.
integer arithmetic and logic operations. [2].
• The Secret Key can be obtained using the RSA
Akanksha Mathur et.al represents that the proposed algorithm
has the following limitations: Algorithm.
1) More Execution times • And the obtained message is a Cipher Text. We
2) Key Length and length of plain text must be same must decrypt the message.
In the future wok related to proposed algorithm, the • The Decryption of the message can be done
limitations of proposed algorithm are overcome by using RSA Algorithm.
encrypting and decrypting data may or may not be same key • For Decryption the receiver will use the Secret
length size in comparison with input size. [3]. Exponent.
III. METHODOLOGY • And thus, the receiver will decrypt the message
and it is in the form of Base-64.
Fig. 3.1. Block Diagram
a) Encryption:
Fig 3.2. Overall Methodology
Inputs : Message, Prime Numbers, Image, Secret Key:
• Consider an Input , it can be : Image Fusion:
a) Text Graphics fusion technique can be used in image fusion.
b) Image According to the image pixel, image fusion can be completed
C) Audio Video between the same size images. Image fusion is described as
• Convert the input to Base-64 using Base-64 following: E(i, j)=w ×(K(i, j)-O(i, j))+O(i, j).
conversion Algorithm. Where w is parameter, K(i, j) is the pixel values of the key-
• After converting into Base-64 we will be getting a image ,O(i, j) is the pixel values of the original-image, and
String. E(i, j) is the pixel values of the fusion-image.
• Store the entire string in a Text File and save the file.
• From that file consider each character and apply
Rivest Shamir Adelman(RSA).
Fig 3.3. Encryption & Decryption Fig 4.2 Encrypted Image
Security Analysis: From Fig 4.2, we are going to encrypt the image
A good encryption scheme should be sensitive to the secret for the original image.
keys, and the key space should be large enough to make
brute-force attacks infeasible.
In our encryption algorithm, the key-image and the initial
values are used as secret keys.
The key space is large enough to resist all kinds of brute-force
attacks. The experimental results also demonstrate that our
scheme is very sensitive to the secret key mismatch.
Fig 4.3 Decrypted Image
From Fig 4.3, we have decrypted the image.
Fig 3.4 Class Diagram
IV. RESULTS AND DISCUSSION
Fig 4.4 Encrypted and Decrypted Text
From Fig 4.4, we are going to encrypt and decrypt
the text.
Fig 4.1 Original Image
V. CONCLUSION
From Fig 4.1, we are going to take an image. By
using this we are going to perform encryption and The proposed work makes use of AES algorithm to
decryption. encrypt and decrypt the image and text. It makes use of 128
bit key for encryption which makes AES secure and faster
than DES.As the key size is larger, it helps to overcome
several attacks such as brute force attack and man in the Signal and Image Processing(ATSIP 2016), Monastir,
middle attack. In our proposed system, encryption image Tunisia, pp.41- 45, 2016.
doesn’t remain the same. The encryption image is chosen in [4] Priya Deshmukh, ―An Image Encryption and Decryption
Using AES Algorithm‖, International Journal of
random. So, it is difficult for intruder to differentiate the Scientific & Engineering Research(IJSER), Vol.7,
encrypted image and the original image. So, AES algorithm Issue.2, pp.210-213, 2016.
is most suited for image encryption in real time applications. [5] Rajan.S.Jamgekar, Geeta Shantanu Joshi, "File
As a future work, we are planning for a different encryption Encryption and Decryption Using Secure RSA",
International Journal of Emerging Science and
key in each round to perform encryption. So, it is difficult for Engineering (IJESE), Vol-1, Issue-4, February 2013.
intruder to differentiate the encrypted image and the original [6] Isha Yadav, Nipun Gupta, and M.K. Beniwal “a new
image. So, AES algorithm is most suited for image cipher text generation technique by digitizing the genetic
encryption in real time applications. As a future work, we are dna code using random number, ijiset - International
planning for a different encryption key in each round to Journal of Innovative Science, Engineering &
Technology, Vol. 2 Issue 6, June 2015.
perform encryption. Even though the repetition of same value [7] Sanjay Kumar, Sandeep Srivastava, “Image Encryption
takes place, it assigns different value for each occurrence. using Simplified Data Encryption Standard (S-DES) “,
Hence it is difficult to identify the type of the original 2014.
message whether text or image file, since the cipher text is in [8] M. D. Randeri1, S. D. Degadwala, A. Mahajan, ―A
the format of numerals instead of image. It will be more Study on Image Encryption Using Key Matrix
Generation from Biometric Mixed Fingerprint Image for
helpful to increase the efficiency and security of the Two Level Security‖, International Journal of Scientific
algorithm. The future improvement needed in the proposed Research in Computer Science, Engineering and
work is to reduce the additional time needed for construction Information Technology(IJSRCSEIT), Vol.2, Issue.6,
of magic rectangle and compression of images. pp.486-490, 2017.
[9] Kundankumar Rameshwar Saraf, Vishal Prakash Jagtap,
Amit Kumar Mishra, “Text and Image Encryption
Decryption Using Advanced Encryption Standard”,
2014.
[10] J. V. Karthik and B. V. Reddy, “Authentication of secret
information in image steganography,” International
REFERENCES Journal of Computer Science and Network
Security(IJCSNS), vol. 14, no. 6. P. 58. 2014.
[1] Mohammad Amjad, ―Security Enhancement of IPV6 [11] Akanksha Mathur, "A Research paper: An ASCII value
Using Advance Encryption Standard and Diffie based data encryption algorithm and its comparison with
Hellman‖,International Journal of Scientific Research in other symmetric data encryption algorithms",
Network Security and Communication, Vol.5, Issue.3, International Journal on Computer Science and
pp.182-187,2017. Engineering (IJSCE), Vol. 4 No. 09 sep 2012.
[2] William Stallings, ―Cryptography and network [12] Guang-liang Guo, Quan Qian, Rui Zhang, ―Different
Security:principles and practice‖; Pearson Publication, Implementations of AES Cryptographic Algorithm‖, In
london, pp. 148-183, 2011. the Proceedings of the 2015 IEEE International
[3] Amina Msolli, Abdelhamid Helali, Hassen Maaref, Conference on High Performance Computing and
―Image encryption with the AES algorithm in wireless Communications (HPCC 2015), New York, USA,
sensor network‖, In the Proceedings of the 2016 IEEE pp.1848-1853, 2015.
International Conference on Advanced Technologies for