Image Encryption and Decryption in Public Key Cryptography based on MR
Image Encryption and Decryption in Public Key Cryptography based on MR
Cryptography based on MR
D.I.George Amalarethinam J.Sai Geetha
Associate Professor & Director- MCA, Assistant Professor, Dept of Computer Science
Jamal Mohamed College Nehru Memorial College, Puthanampatti
Trichy, India Trichy, India
[email protected] [email protected]
Abstract— In the past decade, image encryption is given much processes. As a result, the safety of image data from
attention in research of information security and a lot of image unauthorized access is crucial at the hands of user. Image
encryption algorithms have been introduced. Due to some intrinsic encryption plays a significant role in the field of information
features of images like bulk data capacity and high data redundancy, hiding. Image hiding or encryption methods and algorithms
the encryption of image is different from that of text; therefore it is
ranges from simple spatial domain methods to more
difficult to handle them by traditional encryption methods. In the
complicated and reliable frequency domain.
proposed work, a new image encryption algorithm based on Magic
Rectangle (MR) is being applied. To begin with, the plain-image is The parameters used in encryption and decryption process of
converted into blocks of single bytes and then the block is replaced as the algorithm plays a vital role for security such as key
the value of MR. Further, the control parameters of Magic Rectangle streams in one time pad, the secret key in Data Encryption
(MR) are selected randomly by the user. Subsequently the image is Standard algorithm, the prime p and q in RSA etc. Of all the
being encrypted with public key cryptography algorithms such as encryption algorithms available, RSA(Rivest, Shamir,
RSA, ElGamal etc. The experimental result shows that the proposed Adlemen) accounts for highly reliable one. In RSA, the secret
algorithm can successfully encrypt/decrypt the images with separate key is derived from the public key and choosing p and q with
secret keys, and the algorithm has good encryption effect. Cipher text very large size. Even though the above parameters are
developed by this method will be entirely different when compared to considered, it is not fully secured. The conventional method of
the original image file and will be suitable for the secured
image encryption is done through any one of the technique
transmission over the internet. Thus, this model provides an additional
such as RGB color shuffling, bits manipulation, chaotic
level of security to public key algorithm and efficient utilization of
memory. mapping method etc. Of all the methods stated above, the
Keywords— Communication Security, Image Encryption and result of encryption is in the form of cipher image. It takes
Decryption, Public Key Cryptography, Public key, Secret key, Magic more time for encryption and decryption process and the
Rectangle. inefficient use of memory in this kind of cryptosystem results
in reduction of transmission speed. To overcome this problem,
I. INTRODUCTION this paper tries to develop a entirely different method by
introducing a special singly even magic rectangle [2] of the
Computer has become an essential device now a days. The order 32 x 48. Thus preferably different numerals representing
main use of computer is to store data and send it from one the bytes of image values are taken from magic rectangle
location to other. The information that is shared must be instead of taking patterns or bits for encryption. The encryption
transferred in a secured manner. To ensure secured process is being performed using RSA cryptosystem.
transmission of information, data is encrypted to unreadable
formats by an unauthorized person. Cryptography is the science II. RELATED WORK
of information security which has become a very critical aspect Quist-Aphetsi Kester[3], proposed the work sets out to
of modern computing systems towards secured data contribute to the general body of knowledge in the area of
transmission and storage. The exchange of digital data in cryptography application and by developing a cipher algorithm
cryptography results in different algorithms that can be for image encryption of m*n size by shuffling the RGB pixel
classified into two cryptographic mechanisms: symmetric key values. Finally, the algorithm made it possible for encryption
in which same key is used for encryption and decryption and and decryption of the images based on the RGB pixel.
asymmetric key in which different keys are used for encryption Musheer Ahmad and M. Shamsher Alam [4] proposed a new
and decryption [1]. Asymmetric key algorithms are more image encryption algorithm based on three different chaotic
secured when compared with symmetric key algorithms. maps. In this work, the plain-image is first decomposed into
Nowadays, information security is primarily based on data 8x8 size blocks and then the block based shuffling of image is
storage and transmission. Images are broadly used in numerous
978-1-4799-7623-2/15/$31.00 2015
c IEEE 133
carried out through 2D Cat map. In addition, the control the encryption process. The processing model of image
parameters meant for shuffling are randomly generated by encryption and decryption process is represented in fig.1.
employing 2D coupled Logistic map. Subsequently the
shuffled image is encrypted through chaotic sequence Encryption Minstart,Maxstart, Decryption
generated by one dimensional Logistic map.
Original image Column sum
Varsha Bhatt and Gajendra Singh Chandel[5] proposed a new Cipher Text
algorithm that deals with the representative image encryption
techniques, position permutation, naive, substitution
Generating singly
transposition and value transformation. Selective techniques even Magic
Transformation Decryption
will be described, assessed and matched up with respect to process (bytes) Rectangle of order
32 x 48. process
security level and encryption speed.
Hiral Rathod, Mahendra Singh Sisodia et.al[6], introduced a
new permutation technique based on the combination of image
permutation and developed an encryption algorithm called Determining the
Determining the
“Hyper Image Encryption Algorithm (HIEA)”. The selected numeral value from
Magic position of the
the magic rectangle
image will be converted into binary value blocks, which will that corresponds to Rectangle numeral value in the
be rearrange into a permuted image using a permutation magic rectangle
the bytes of image
process, and then the generated image will be encrypted using
the HIEA algorithm.
Manoj. B, Manjula et.al[7] , proposed a method in which the
image data is an input to AES Encryption to obtain the Encryption Transformation
encrypted image. The encrypted image is used as input to AES process process(bytes)
Decryption to get the original image. In this paper, 128 bit
AES is used for image encryption and decryption which is
synthesized and simulated on FPGA family of Spartan-6
(XC6SLX25) using Xilinx ISE 12.4 tool in Very high speed Cipher Text Original Image
integrated circuit Hardware Description Language (VHDL).
Mohammad Ali Bani Younes and Aman Jantan[8] introduced Fig.1. Model for Image Encryption and Decryption process
a block-based transformation algorithm using the combination
of image transformation and a well known encryption and 3.1.Construction of Magic Rectangle
decryption algorithm namely Blowfish. The initial image was
separated into blocks. The divided blocks were rearranged into 3.1.1. Magic Square
a transformed image using a transformation algorithm. Then
the transformed image was encrypted by applying the Blowfish The magic rectangle is similar to magic square. A magic
algorithm. The results concluded that the correlation between square is defined as an arrangement of integers of order nxn
image elements was significantly decreased. matrix. The important feature of a magic square is that the
A.Naresh Reddy, Rakesh Nayak and S. Baboo [9] presented sums of all the elements in every column, row and along the
the comparative study of RSA and NTRU (“non trivial ring two main diagonals are equal. The magic constant of a magic
units“ or “nth degree truncated polynomial ring units” or square depends only on n and has the value
“Number Theory Research Units”) algorithms for images as M (n) =n (n2+1) / 2
input and the results were assessed and compared so as to Magic square can be classified into three types: odd, doubly
identify the appropriate method for the business needs. even (n divisible by four), singly even (n is even and not
divisible by four). [2][10].
III. PROPOSED METHODOLOGY
3.1.2. Magic Rectangle
The images used will have their bytes extracted; the bytes
values are transposed as MR values and further encrypted to
A magic rectangle of order mxn is an arrangement of integers
obtain cipher text. The ciphering of the images for this work
such that the sums of all the elements in every row are equal
will be done only by using the byte values of the images. In
and also the sums of all the elements in every column are
this method, the RGB values of the image are not changed.
equal. The magic rectangle is in the category of singly even.ie,
Also there is no need to RGB expansion at the end of the
the order of the matrix is even but not divisible by the numeral
encryption and decryption process. The numerical values of the
04 such as 4x6, 8x12, 16x24, 32x48 and so on. Any order with
MR are displaced from their respective positions and encrypted
even number can be used in this work. It can be followed only
in order to obtain the cipher text. Therefore there is no change
the order 4x6, 8x12, 16x24, 32x48 etc. The size of the
in the total size of the image during encryption and decryption
rectangle is purely based on the rules of perfect rectangle or
process. The characteristic of image remains unchanged during
Table 3. Encryption and Decryption of Image file Using MR Hillc.jpg(38.8) 172 234 406
size of the files are larger, the crypt time taken by the
uncompressed file is comparatively higher than the
compressed file.
Fig.5. Encryption and Decryption of image file after compression Fig.7. Comparison of execution time between compressed and uncompressed
files.
The sample output of encryption and decryption time of image
file using compression are presented in Fig.6. Finally the 4.2. Results and Discussion
execution time of both the compressed and uncompressed
image files are compared using the four selected images. The The proposed methodology image encryption and decryption
corresponding graph is represented in fig 7. The uncompressed using MR is implemented in Java. When the file size is
files needs more execution time than the compressed files. In increased, the encryption and decryption time will also
the first two cases of files, there is no much difference in file increases. It takes additional time to generate magic rectangle
size. The time taken for encryption and decryption towards and image compression during initial stage. The size of the file
these files is one and the same. In the rest of cases, where the is reduced by the compression technique. Hence additional
References
[1]. A.J.Menezes ,P.C.Van Oorschot, and S.Vanstone , “Handbook of
Applied cryptography”, CRC Press, Boca Ration,Florida,
USA,1997.
[2]. Gopinath Ganapathy, and K.Mani , “ Add-On Security Model for
publickey Cryptosystem Based on Magic Square Implementation”,
ISBN 978-988-17012-6-8, Proceedings of the world congress on
Engineering and Computer Science 2009 Vol I, San Fransisco,
USA