Ijeee v1i1 03

Page 1

IJEEE, Vol. 1, Issue 1 (Jan-Feb 2014)

e-ISSN: 1694-2310 | p-ISSN: 1694-2426

Design of Selective Encryption Scheme Using Matlab Abhishek Thakur1, Rajesh Kumar2, Amandeep Bath3, Jitender Sharma4 1,2,3,4

Electronics & Communication Department, IGCE, Punjab, India

1

abhithakur25@gmail.com, 2errajeshkumar2002@gmail.com

3

amandeep_batth@rediffmail.com, 4er_jitender2007@yahoo.co.in

Abstract- This paper gives the idea of recent developments in the field of image security and improvements in image security. Images are used in many applications and to provide image security using image encryption and authentication. Image encryption techniques scramble the pixels of the image and decrease the correlation among the pixels, such that the encrypted image cannot be accessed by unauthorized user. This study proposes a method for encrypting the sender’s messages using new algorithm called Chaotic encryption method. This key will be used for encrypting and decrypting the messages which are transmitted between two sides. Chaotic encryption technique is the new way of cryptography. Emphasizing the image security, this paper is to design the enhanced secure algorithm which uses Chaotic encryption method to ensure improved security and reliability. Keywords— Cryptography, Cryptography key, RGB image,

LSB, image key. II. INTRODUCTION Across the internet information exchanges and the storage of data in open networks have created an environment in which illegal users can obtain the important information. Encryption algorithms have been used to provide a kind of randomness such that any unauthorized user cannot obtain the secure data. Only the authorized user having the key can obtain the original data. Images are used in many applications such as medical imaging system, military image databases, cable TV, confidential video conferencing, online personal photograph album, etc. Hence, reliable, fast and robust security techniques are required to store and transmit digital images. In open environments, there are several security problems associated with the processing and transmission of digital images. Therefore it is necessary to affirm the integrity and confidentiality of the digital image being transmitted. The various techniques used in the existing image encryption techniques can be classified into three major categories: transposition techniques (position permutation), substitution techniques (value transformation) and the combination i.e. transposition-substitution technique [1]. The position permutation techniques shuffle the pixel position within the image itself and usually have low security because histogram International Journal of Electrical & Electronics Engineering

14

of the shuffled image remains same. If we talk about the value transformation techniques, they modify pixel value of the original image and have the potential of low computational complexity and low hardware cost. Finally, the combination performs both position permutation and value transformation and has the potential of high security. Another technique for securing digital images is based on the use of chaotic functions [2]. III. TECHNIQUES USED In recent years, a number of different image encryption schemes have been proposed based on chaotic maps [3-12], in order to overcome image encryption problems. A. Cryptography The cryptography has been proposed to ensure the confidentiality and authenticity of the message. The encryption key must be long. Yet, it is difficult to remember it and even storing the key in a database or in a file may be insecure. In addition the protection of the confidentiality of encryption keys is one of the important issues to be dealt with. This issue can be efficiently solved through generating the key before starting the process of encryption and decryption, rather than storing it. Here we will use an image to generate the key. The main objective of this study is to increase security in communication by encrypting the information using a key that is created through using an image. Cryptography presents various methods for taking legible, readable data, and transforming it into unreadable data for the purpose of secure transmission, and then using a key to transform it back into readable data when it reaches its destination [8]. Cryptography is considered to be one of the fundamental building blocks of computer security [4]. The need of reliable and effective security mechanisms to protect information systems is increasing due to the rising magnitude of identity theft in our society. Although cryptography is a powerful tool to achieve information security, the security of cryptosystems relies on the fact that cryptographic keys are secret and known only to the legitimate user [9]. In secure communication, key generation phase has many challenges and this problem can be solved if the sender and the receiver share the key in any other form or if they generate the keys www.ijeee-apm.com


readily during encryption and decryption separately, thus, the concept of generating the key from an image came to the role. B. Visual Cryptography Visual Cryptography is a special encryption technique to hide information in images in such a way that it can be decrypted by the human vision if the correct key image is used. In secret sharing mechanisms, the secret data is divided into several shares (images) and distributed among participants. Shares are stacked together to recover the data. Visual cryptography (VC) attempts to recover a secret image via the human visual system by stacking two or more transparencies. In VC approach [1], the secret was partitioned into n shadow images (shares), and each participant would receive only one share. Once any k or more shares of a secret are stacked together, the secret image will be visually retrieved without the help of the computer. That is to say that the secret image will be invisible if the number of stacked shares is less than k. This is known as (k, n) threshold mechanism. If the random looking shares are enveloped into some meaningful images the interest of hackers can be reduced. C. Steganography Hiding information by embedding secret data into an innocuous medium is often referred to as steganography. Steganography can be applied electronically by taking a message (a binary file) and some sort of cover (often a sound or image file) and combining both to obtain a “stego-object�. The RS analysis is considered as one of the most famous steganalysis algorithm which has the potential to detect the hidden message by the statistic analysis of pixel values [1]. The process of RS steganalysis uses the regular and singular groups as the considerations in order to estimate the correlation of pixels [2]. The presence of robust correlation has been witness in the adjacent pixels. But unfortunately using traditional LSB replacing steganography [3], the system enders the alteration in the proportion in singular and regular groups which exposes the presence of the steganography. Ultimately, it will not be so hard to decrypt the secret message. Although there are extensive researches based on combining these two approaches [4] [5] [6], but the results are not so satisfactory with respect to RS analysis. Other conventional methods of image security has witnessed the use of digital watermarking extensively, which embeds another image inside an image, and then using it as a secret image [7]. The use of steganography in combination visual cryptography is a sturdy model and adds a lot of challenges to identifying such hidden and encrypted data. The image is divided into a number of blocks and each block is computed to produce hash value. In the scheme, only the hash value is encrypted using the chaotic logistic map and remaining block values are computed using the transition function of linear memory cellular automata. The method uses the concepts of linear memory cellular automata (LMCA). The linear memory cellular automata requires large number of computations and one-by-one, each block of the image is computed using cells of the cellular automata. If the method is applied over large www.ijeee-apm.com

sized images, more number of blocks will be made and the number of computations will be much more. In the scheme, the number of blocks is not constant and can vary. Therefore, if the blocks are of large size, then local transition function will require much computations and if the block size is small then more number of blocks will be there, which also requires more computations to be performed. Hence, the method is good butif we apply the scheme over small computation devices (e.g. Micro devices that have less computational power compared to a computer), the number of executions will be a complex issue. The security provided by the scheme is keen but the computation needs to be enhanced such that the method can be adopted easily. IV. SELECTIVE ENCRYPTION The encryption process requires an encryption algorithm and a key. The process of recovering plaintext from cipher text is called decryption. The accepted view among professional cryptographers (formalized in KIRKHOFF's law) is that the encryption algorithm should be published, whereas the key must be kept secret. Selective encryption scheme generate the key before starting the process of encryption and decryption, rather than storing it. In secure communication, key generation phase has many challenges and this problem can be solved if the sender and the receiver share the key in any other form or if they generate the keys readily during encryption and decryption separately.

Fig. 1: Encryption of an image.

From Fig. 1, it is clear that the receiver should decrypt the information before it can decompress the image. This approach has the main drawback that it is impossible to access the smallest part of information without knowledge of the key. For example, it would impossible to search through a general database of fully encrypted images. A way to address this issue is to use a technique called selective encryption; it is International Journal of Electrical & Electronics Engineering

15


depicted in Fig. 2. The image is first compressed (if needed). Afterwards the algorithm only encrypts part of the bitstream with a well-proven ciphering technique; incidentally a message (a watermark) can be added during this process. To guarantee a full compatibility with any decoder, the bitstream should only be altered at places where it does not compromise the compliance to the original format. This principle is sometimes referred to as format compliance. WEN et al. [] have recently described a general framework for formatcompliant encryption.

Fig. 2: Selective encryption mechanism.

A. Input Image The simplest way to hide binary data on an image is to use a lossless image format (such as a Bitmap) and replace the least significant bits of each pixel in scan lines across the image with the binary data. This is not secure as an attacker can simply repeat the process to quickly recover the hidden information. This technique, known here as “BlindHide” because of the way it blindly hides information, is also not good at hiding – the initial portion of the image is left degraded while the rest remains untouched. The proposed project work consist of mainly two algorithms which are (i) Steganography using Genetic Algorithm (ii) Visual Cryptography with Threshold. The application initiates with Steganography module where the cover image will be encrypted to generate Stego image. The stagographic image generated in this module will act as an input for visual cryptographic module. Algorithm: Steganography Input: Cover Image Output: Stego Image 1) Read the cover image. 2) Find out the pixel values of cover image. 3) Read the secret data character wise. 4) Convert each character into its equivalent ASCII code. 5) ASCII code is converted into binary values. 6) Enter the secret key. 7) Secret data is converted into cipher data. International Journal of Electrical & Electronics Engineering

16

8) The stream of 8 bit(cipher data) are embedded into LSB of each pixel of the cover image. 9) To apply Genetic Algorithm in the stego image the pixel location should be modified. Algorithm: Visual Cryptography Input: Stego-Image Output: Encrypted Shares 1) Read Stego-Image generated. 2) The stego image is breaked into three layers namely split-1, split-2, split-3 these three files are containing the hidden data and to get the hidden data these three files have to be reconstructed perfectly. 3) The re-assembled picture and the extracted data will be gained again. The proposed scheme is based on standard visual cryptography as well as visual secret sharing. The implementation of the algorithm yields in better result with insignificant shares when stego images are normally with light contrast. It can also be seen that the algorithm gives much darker shares in gray output the proposed scheme is based on standard visual cryptography as well as visual secret sharing. The implementation of the algorithm yields in better result with insignificant shares when stego images are normally with light contrast. It can also be seen that the algorithm gives much darker shares in gray output. This algorithm gives better results in terms of image quality and stegnalysis. good at hiding – the initial portion of the image is left degraded while the rest remains untouched. The proposed project work consist of mainly two algorithms which are (i) Steganography using Genetic Algorithm (ii) Visual Cryptography with Threshold. The application initiates with Steganography module where the cover image will be encrypted to generate Stego image. The stagographic image generated in this module will act as an input for visual cryptographic module. The original message is embedded into the image by using LSB insertion method. The resultant image is called as stego image shown in Figure 3. Then apply genetic algorithm to modify the pixel location and detection of message is complex. Then apply visual cryptography scheme stego image is splitted into two shares based on threshold. The shares of the stego image is shown in Figure 4. It is almost impossible for anyone who will attempt to decrypt the encrypted data within that image to reveal if the secret shares which they posses are set of all encrypted shares or certain secret shares are missing. V. PERFORMANCE ANALYSIS The performance of the proposed system is experimented by performing stegnalysis and conducting benchmarking test for analysing parameters like Mean Squared Error (MSE) and Peak Signal to Noise Ratio. Cover image : rice.png Size : 256*256 Mean Square Error (MSE) : 0.0678 Peak Signal-to-Noise Ratio (PSNR) : 59.8188db After applying Genetic Algorithm the measured performance is shown in below www.ijeee-apm.com


Mean Square Error (MSE) : 0.794 Peak Signal-to-Noise Ratio (PSNR) : 39.4011db After applying genetic algorithm all the pixel location are altered. Due to the change the pixel location MSE and PSNR values are increased. From Figure 1 and 2, we can conclude that both the sender and receiver before they start to communicate with each other, they should use the same images database, image channel (R, G or B), K value for the key array, and the session type. This study implemented the key generation as 1 image/session. The session period can be an hour or one day. For instance, hourly session uses one image for each hour and the daily session uses one image for each day. Phase 1: Database creation: In this phase, we create a database of color RGB images which would be used for generating the key for encryption/decryption process. In case of using hourly session, the database should contain 24 images; otherwise, it should contain 7 images for the daily session. Both the sender and the receiver should use the same database of images (24 or 7 images) as the names of the images should be the same in both sides. B. Key Generation: In this section, we present the pseudo code for the key generation algorithm and the algorithm steps as follows: 1. Get the value of K variable and the value of N from binaries message step. 2. Select color image from the database according to the session type and current date or time. 3. Retrievethe image and create array Img [x, y] as LSB of the pixels for one channel (red, green or blue) where the image has x*y dimension. 4. Create array Key [N, k] to represent the encryption key. 5. Loop i=0 to N-1 /* for each row in Key*/ 6. Loop c=0 to k/2-1 step 2//fill array by two each7. Scan the LSB Img[x,y] to find two neighbor values where the absolute difference between them is one. 8. Key[i,c] = First LSB value. 9. Key[i,c+1] = Second LSB value. 10. End loop 11. End loop C. Image Encryption In this section, we present the pseudo code for the encryption algorithm and the algorithm steps as follows: 1. Get the value of K variable. 2. Read a message to encrypt 3. Binaries the message and store the binary data in array Data[N,N] where message bits <= N*N 4. Generate the key using key generation algorithm and create Key [N, k]. 5. Create array EncData [N, N] to store the encrypted data 6. c=0 7. Loop i=0 to N-1// for each row in Data /* the elements in the Data array row i compare with two columns of Key array start from c */ www.ijeee-apm.com

8. Loop j=0 to N-1// for each bit in the row i 9. If Data[i,j] = Key[j,c] 10. EncData[i,j]=0 // the value in the first column 11. Else 12. EncData[i,j]=1 // the value in the second column 13. End loop 14. c=c+2// go to next two columns of Key array. 15. if c >= K then c=0// return to the first two columns of Key array 16. End loop 17. Convert the Enc. Data from binary data to text. D. Decryption: In this section, we present the pseudo code for the decryption algorithm and the algorithm steps as follows: 1. Get the value of K variable. 2. Binaries the encrypted message and store the binary data in array EncData[N,N] 3. Generate the key using key generation algorithm and create Key [N, k]. 4. Create Data[N, N] to store the original data 5. c=0 6. Loop i=0 to N-1 /* for each row in Data*//* the elements in the Data array row i compare with two columns of Key array start from c */ 7. Loop j=0 to N-1 // for each bit in the row i 8. If Encdata[i,j]=0 then VI. RESULTS E. Results for image encryption and decryption This figure shows the result of image encryption, decryption and histogram of each image. Input Image

Histogram of input image 2000 1000 0

Encrypted Image

0 100 200 Histogram of Encrypted image 2000

0 Final Image

0 100 200 Histogram of final Image 2000 1000 0 0

100

200

Fig. 3: Results for image encryption and decryption International Journal of Electrical & Electronics Engineering

17


Image encryption and decryption algorithm is developed in matlab. In the first step we take any image which we want to encrypt and apply any key consist of number, words and special character. When we apply this key to image its visualization is hidden and its histogram is also change. When we want to decrypt this image we need to enter same key. If we provide wrong key then image will not decrypt.

different applications. Everyday new image encryption techniques are evolving, hence fast and secure image security techniques will always work with high rate of security. We are doing research work in the field of image security. Image security techniques should be such that any unauthorized user cannot access the image and if any modifications can be made to the image, that modifications can be detected at the receiving side. Hashing is a good technique that can be used to verify integrity of the image. Along with hashing, if proper encryption is provided to the image, the image will be more secure. Using encryption, any unauthorized user cannot access the image. Hence, to improve the image security, proper combination of encryption as well as authentication techniques presents ideal alternative. To achieve high level of image security, we are functioning on a hybrid technique based on image encryption and authentication. The technique consists of hash generation of the plain image. The generated hash is embedded in the image and the entire image is encrypted using combination of chaotic maps and substitution-diffusion techniques. The technique can provide high level security to the image with less computation overheads. REFERENCES [1]

[2]

[3] [4]

[5] [6]

[7]

Fig. 4: Results for image encryption and decryption

[8]

VII. CONCLUSIONS Images play an important role in our lives. They are used in many applications. Therefore it is necessary to affirm the integrity and confidentiality of the digital image being transmitted. Some image encryption and authentication schemes are discussed in this paper and further improvements are also suggested in the previous section. The chaos based image cryptography is increasing and improving day by day. The paper presents different chaos based image cryptographic techniques proposed in the last decade. We discussed the cryptanalysis of an image encryption scheme and conclude that if the algorithm is not designed properly, it may be possible that the image being protected will be insecure. Therefore proper security mechanisms should be adopted to secure the image. Each technique is unique and is suitable for International Journal of Electrical & Electronics Engineering

18

[9]

[10]

[11]

[12]

[13]

Marc Van Droogenbroeck and Raphael Benedett, “Techniques for a selective encryption of uncompressed and compressed images” In Advanced Concepts for Intelligent Vision Systems (ACIVS), Ghent, Belgium, pages 90-97, September 2002. Amitesh Singh Rajput, "Towards the Growth of Image Encryption and Authentication Schemes, "2013 International Conference on Advances in Computing, Communications and Informatics, P.N.454-459. Mrs.G.Prema, S.Natarajan, "Steganography using Genetic Algorithm along with Visual Cryptography for Wireless Network Application" Tawfiq S. Barhoom, Zakaria M. Abusilmiyeh, "A Novel Cryptography Method Based on Image for Key Generation", In "2013 Palestinian International Conference on Information and Communication Technology", 2013 IEEE, P.N. 71-76. M. Sabery.K, M.Yaghoobi, “A New Approach for Image encryption using Chaotic logistic map”, 978-0-7695-3489-3/08 © 2008 IEEE. [8] Chen G, Mao Y and Chui CK. “A symmetric image encryption scheme based on 3D chaotic cat maps”. Chaos Solitons Fractals 2004; 21:749–61. [9] Zhang Q, Guo L and Wei X. “Image encryption using DNA addition combining with chaotic maps”. Math Comput Model 2010; 52:2028–35. [10] Sun F, Liu S, Li Z, and Lu Z. “A novel image encryption scheme based on spatial chaos map”. Chaos Solitons Fractals 2008; 38:631– 40. [11] Rhouma Rhouma and Safya Belghith, “Cryptanalysis of a new image encryption algorithm based on hyper-chaos”, Physics Letters A 372(2008) 5973–5978. [12] Atieh Bakhshandeh and Ziba Eslami , “An authenticated image encryption scheme based on chaotic maps and memory cellular automata”, Optics and Lasers in Engineering, Volume 51, Issue 6, June 2013, Pages 665-673. [13] Aloka Sinha and Kehar Singh, “A technique for image encryption using digital signature”, Optics Communications, Volume, 1 April 2003, Pages 229-234. [14] Jing Qiu and Ping Wang, “ Image encryption and authentication scheme”, IEEE, Computational Intelligence and Security (CIS), 2011 Seventh International Conference, 3-4 Dec. 2011, 784 – 787. [15] Siddharth Malik, Anjali Sardana and Jaya, “A Keyless Approach to Image Encryption”, IEEE 2012 International Conference on Communication Systems and Network Technologies (2012), 879-883.

www.ijeee-apm.com


[14] Narendra K. pareek, Vinod Patidar and K. K. Sud, “DiffusionSubstitution bsed gray image encryption scheme”, Digital Signal Processing, Volume 23, Issue 3, May 2013, pages 894-901.

AUTHORS First Author– Abhishek Thakur: M. Tech. in Electronics and Communication Engineering from Punjab Technical University, MBA in Information Technology from Symbiosis Pune, M.H. Bachelor in Engineering (B.E.- Electronics) from Shivaji University Kolhapur, M.H. Five years of work experience in teaching and one year of work experience in industry. Area of interest: Digital Image and Speech Processing, Antenna Design and Wireless Communication. International Publication: 7, National Conferences and Publication: 6, Book Published: 4 (Microprocessor and Assembly Language Programming, Microprocessor and Microcontroller, Digital Communication and Wireless Communication). Working with Indo Global College of Engineering Abhipur, Mohali, P.B. since 2011. Email address: abhithakur25@gmail.com Second Author – Rajesh Kumar is working as Associate Professor at Indo Global College of Engineering, Mohali, Punjab. He is pursuing Ph.D from NIT, Hamirpur, H.P. and has completed his M.Tech from GNE, Ludhiana, India. He completed his B.Tech from HCTM, Kaithal, India. He has 11 years of academic experience. He has authored many research papers in reputed International Journals, International and National conferences. His areas of interest are VLSI, Microelectronics and Image & Speech Processing. Email address: errajeshkumar2002@gmail.com

www.ijeee-apm.com

Third Author – Amandeep Batth: M. Tech. in Electronics and Communication Engineering from Punjab Technical University, MBA in Human Resource Management from Punjab Technical University , Bachelor in Technology (B-Tech.) from Punjab Technical University . Six years of work experience in teaching. Area of interest: Antenna Design and Wireless Communication. International Publication: 1, National Conferences and Publication: 4. Working with Indo Global College of Engineering Abhipur, Mohali, P.B. since 2008. Email address: amandeep_batth@rediffmail.com Forth Author – Jitender Sharma: M. Tech. in Electronics and Communication Engineering from Mullana University, Ambala, Bachelor in Technology (B-Tech.)from Punjab Technical University . Five years of work experience in teaching. Area of interest:, Antenna Design and Wireless Communication. International Publication: 1 National Conferences and Publication:6 and Wireless Communication). Working with Indo Global college since 2008. E-mail address:er_jitender2007@yahoo.co.in

International Journal of Electrical & Electronics Engineering

19


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.