International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 2, April 2012
95
Abstract— With the development of science, digital media can be transmitted conveniently over the internet. The security of the data is essential issue for the internet. The security of information can be achieved by cryptography and steganography. Cryptography scrambles the data to hides the contents of message. Steganography hides the existence of message by embedding data in some other digital media like image or audio files. The paper proposes a security method which uses both encryption and data hiding. In proposed system data is firstly encrypted using RSA encryption algorithm and then embedded in an image using Haar-DWT based steganographic method. The experimental result shows that proposed system has better PSNR value and high capacity in comparison to other techniques like LSB and LSB-DCT steganography.
Index Terms— data hiding, discrete wavelet transform, RSA
encryption, steganography.
I. INTRODUCTION
In this information era, either a public network or private network, one requires a tool that can allow communicating over these channels and as well providing the security and robustness of the hiding data. Encryption and steganography are the preferred techniques for protecting the transmitted data. In Cryptography, the data is encrypted so that it cannot be understood by anyone else. The encrypted data is unreadable but is not hidden from the eavesdroppers. Though the purpose of cryptography is to protect the data (or information) from unwanted attackers, it does not ensure covertness on the channel. The commonly used encryption schemes include DES (Data Encryption Standard) [1], AES (Advanced Encryption Standard) [2] and RSA [3]. DES, an encryption standard that was used by many national governments, successfully withstood attacks for many years. However, E. Biham and A. Shamir mention a cryptanalytic attack that can break DES in only a few minutes. Another example of a broken encryption algorithm is WEP. WEP was designed to provide confidentiality to users on wireless networks. [3] Illustrates how WEP can be broken within
Manuscript received April 15, 2012..
Mohit Kumar Goel, Electronics and Elecrical Communication
Department, PEC University of Technology, Chandigarh, India ,
Dr. Neelu Jain, Electronics and Elecrical Communication Department,
PEC University of Technology, Chandigarh, India,
hours. DES and WEP are examples of two encryption algorithms that were thought to be secure at the time of their design, but were broken in the future when attackers had more powerful computational resources. However, encryption clearly marks a message as containing “interesting” information, and the encrypted message becomes subject to attack. So, in many casesit is desirable to send information without being notice by anyone that information has been sent. The Steganography solves this problem by embedding data in the cover object so that it is hard to detect. The word steganography in Greek means “covered writing” (Greek words “stegos” meaning “cover” and “grafia” meaning “writing”). Steganography differs from cryptography in the sense that where cryptography focuses on concealing the contents of a message, steganography focuses on concealing the existence of a message. Image steganography schemes can be divided into two categories: Spatial Domain and Frequency Domain.
A. Spatial domain steganography
In spatial domain steganography data is embedded directly in image pixels [4].Least Significant Bit (LSB) is the first most widely used spatial domain steganography technique. It hides the message in the LSB of the image pixels [5]. But the problem with this technique is that if the image is compressed then the embedded data may be lost. LSB has been improved by using a Pseudo Random Number Generator (PRNG) and a secret key in order to have private access to the embedded information [6]. Another recent improvement based on random distribution of the message was introduced by M. Bani Younes and A. Jantan [7]. In this method they utilize an encryption key to hide information about horizontal and vertical blocks where the secret message bits are randomly concealed. Modulus arithmetic steganography proposed by Sayuthi Jaafar and Azizah A Manaf has calculated last four bits of each pixel by mod-16 operation. Then these bits are replaced with data bits [8]. In this the amount of the data that can be embedded is more but stego image has less PSNR value than LSB and SSB-4 techniques.
B. Frequency domain steganography
In frequency domain, images are first transformed and then the message is embedded in the image [9]. When the data is embedded in frequency domain, the hidden data resides in more robust areas, spread across the entire image, and provides better resistance against statistical attacks. There are many techniques used to transform image from spatial domain to frequency domain. The most common
A RSA- DWT Based Visual Cryptographic
Steganogrphy Technique
is the 2D discrete cosine transform (DCT) [10][11] and 2D discrete wavelet transform[12]. In DCT steganography the image is divided into 8×8 blocks and DCT transformation on each block is performed. The data bits are embedded in the low frequency coefficients of DCT. SSB-4 & DCT steganography proposed by Nedal M. S. Kafri and Hani Y Suleiman uses DCT approach with SSB-4 technique [11]. The DWT steganography uses both image‟s spatial as well as frequency characterstics. DWT divides the image in four sub bands (LL, LH, HL and HH) and then data can be embedded in coefficients of one of the selected sub band.
Steganography with cryptography can be combined so that, even if an attacker does realize that a message is sent, he would still have to decode it [13]. Piyush Marwaha and Paresh Marwaha use DES encryption and LSB steganography for data security [14]. In this paper we propose a method which uses RSA encryption and DWT steganography for data security.
Security and robustness are the main aspects affecting steganography and its usefulness. Security relates to the ability of an eavesdropper to figure the hidden information easily. Robustness is concerned about the resist possibility of modifying or destroying the unseen data.
C. PSNR (Peak Signal to Noise Ratio)
PSNR computes the peak signal to noise ratio, in decibels, between two images. This ratio is used as quality measurement between two images. To calculate PSNR; first MSE is calculated as follows:
) 1 ( ) , ( ) , (
1 1 2
0 1 0
m i n j j i K j i I mn MSEWhere MSE is the Mean Squared Error of Original image (I) and stego image (K). Thereafter PSNR value is calculated as follow: ) 2 ( log . 20 log . 10 10 2 10 MSE MAX MSE MAX
PSNR i i
Where, MAXi is the maximum pixel value of the image. In
other words MAXi = 2b − 1, where b is the bit depth of the
original image. The larger PSNR indicates the higher the image quality i.e. there is only little difference between the cover-image and the stego-image. On the other hand, a smaller PSNR means there is huge distortion between the cover-image and the stegoimage.
II. BACKGROUNDOFCRYPTOGRPHY
In cryptography, the message is scrambled to make it meaningless and unintelligible unless the decryption key is available. It makes no attempt to disguise or hide the encoded message. Basically, cryptography offers the ability of transmitting information between persons in a way that prevents a third party from reading it. Cryptography can also provide authentication for verifying the identity of someone or something. There are several ways of classifying cryptographic algorithms. The three types of algorithms are:
1) Secret Key Cryptography: Uses a single key for both encryption and decryption.
encryption and another for decryption.
3) Hash Functions: Uses a mathematical transformation to irreversibly “encrypt” information.
A. RSA encryption algorithm
RSA is a Public key cryptography named after its inventors: Ronald Rivest, Adi Shamir and Leonard Adleman. RSA can be used for encryption as well as for authentication [3]. An example of Alice and Bob, who want to use asymmetric RSA algorithm for secure communication is shown in fig. 1. For encryption purpose, Alice would encrypt the message using Bob‟s Public key and send the cipher text to Bob. Upon receiving the cipher text, Bob, who is owner of corresponding private key, can then decrypt the message with his private key. For authentication purposes, Alice would encrypt (or sign) the message using her own private key. Other people such as Bob can verify the authenticity of the message by using Alice‟s Public key, which is the only key that matches the signing private key.
Fig. 1 RSA Encryption
The steps for RSA algorithm are:
1) Select two prime numbers r, s. 2) Calculate n= r × s and φ(n)= (r-1)(s-1)
3) Select integer „e‟ such that e is relatively prime to φ(n).
gcd (φ (n),e)=1; 1<e < φ(n) 4) Calculate d such that d × e=1mod(φ (n))
5) Now Public key (PU) for encryption is {e, n} and Private Key (PR) for decryption is {d, n}.
6) At sender side, message (M) is converted into cipher text (C) as follows:
C= Me mod n (3) 7) At receiver side, cipher text is converted back to
original message as follows:
M= Cd mod n (4)
III. HAAR- DWT TRANSFORM
International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 2, April 2012
97 representation and storage of multiresolution images, the
DWT provides powerful insight into an image‟s spatial and frequency characteristics. The fourier transform and DCT, on other hand, reveal only image‟s frequency attributes. The discrete wavelet transform (DWT) used in this paper is Haar-DWT, the simplest DWT. A 2-dimensional Haar-DWT consists of two operations which are described as follows:
Step 1: Scan the pixels from left to right in horizontal direction and perform the addition and subtraction operations on neighboring pixels. Store the sum on the left and the difference on the right as shown in Figure 2. Repeat this operation until all the rows are processed. The pixel sums represent the low frequency part (denoted as symbol L) while the pixel differences represent the high frequency part of the original image (denoted as symbol H).
Fig. 2 The horizontal operation on the first row
Step 2: Scan the pixels from top to bottom in vertical direction and perform the addition and subtraction operations on neighboring pixels. Then store the sum on the top and the difference on the bottom as illustrated in Figure 3. Repeat this operation until all the columns are processed. Finally 4 sub-bands denoted as LL, HL, LH, and HH respectively are obtained. The LL sub-band is the low frequency portion and hence looks very similar to the original image.
Fig. 3The vertical operation
The first-order 2-D Haar-DWT applied on the image “woman” is illustrated in Fig 4.
Fig. 4 Haar DWT Operation
IV. PROPOSED METHOD
The challenge in this work was to find a way to camouflage a secret message in an image without perceptible degrading the image quality and to provide better resistance against steganalysis process. The data is first converted into cipher text using RSA encryption and the hided into lower
frequency component of image using Haar-DWT steganography.
Fig. 5 Proposed Method
A. Embedding algorithm
Steps of embedding algorithm are given as follow:
Input: An M×N size cover image and data to be concealed.
Output: Stego image.
1) Encrypt the plain text using RSA encryption key. 2) Perform Haar-DWT transform on cover image to
decompose it into four sub bands (LL, LH, HL and HH).
3) Apply mod2 operation on coefficients (Pi) of selected
sub band (LH) and modify it to hide data (mi) in
following way: Qi = mod2 (Pi)
a) If Qi is 0 i.e. Pi is even then
Modified coefficients MPi = Pi+ mi or
b) If Qi is 1 i.e. Pi is odd then
Modified coefficients MPi = (Pi-1) + mi
4) Four sub bands including modified sub band are combined to generate stego image using Haar- IDWT transform.
5) Send the stego image to receiver.
B. Extraction algorithm
Steps for extraction algorithm are given as follows:
Input: An M×N size Stego image.
decompose it into four sub bands (LL, LH, HL and HH).
2) Apply mod2 operation on coefficients (Pi) of selected
sub band (LH) to extract data (mi) in following way:
Qi = mod2 (Pi)
Message bit mi = Qi
3) Concatenate the message bits to obtain cipher message. 4) Decrypt the cipher message using RSA decryption keys
and display it on screen.
V. EXPERIMENTAL RESULTS
Since the visual detection of stego images is depending on the nature of the image [15] so, varieties of image categories are utilized in the experiments. The experimental image data set consists of 100 JPEG images, which were taken by digital camera. We focused on short messages with length of 3000 bits because they are the most challenging to detect [15].
(a) Original animal.jpg (b) Stego animal.jpg
(c) Original human.jpg (d) Stego human.jpg
(e) Original building.jpg (f) Stego building.jpg
(g) Original flower.jpg (h) Stego flower.jpg
Fig. 6 Original Images and Stego Images using DCT steganography
Comparative analysis of LSB, LSB-DCT, and proposed method has been done on the basis of Peak signal to noise ratio (PSNR). The comparative analysis of PSNR value of different steanography technique, is given in table 1, shows that proposed method of steganography has better image quality of stego image than other techniques.
steganography techniques
Image PSNR Value
LSB LSB-DCT RSA & DWT
animal.jpg 52.62 54.66 55.87
human.jpg 53.31 55.24 57.36
building.jpg 53.12 54.46 56.52
flower.jpg 52.78 54.86 56.35
VI. CONCLUSION
In this paper we used a mixed approach cryptography and steganography is used for data security. By using RSA encryption, ASCII codes corresponding to characters of plain text are converted into 16 bits encrypted codes. Hence it becomes difficult to get original text without knowing decryption keys. Then cipher data is hided into cover image. Average PSNR value of 56 is obtained for 100 images using proposed method. The obtained experimental results indicate that, the proposed method is a good and acceptable scheme for data security. Furthermore, by embedding information in the least significant bits of the DWT domain, the hidden message resides in more robust areas, spread across the entire stego image, and provides better resistance against statistical attacks than other techniques. The future work may focus on the improvement and further development in this technique.
REFERENCES
[1] DES Encryption Standard (DES), National Bureau of Standard (U.S.). Federal Information Processing Standards Publication 46, National Technical Information Service, Springfield, VA, 1997.
[2] Daemen J., and Rijmen, V. “Rijndael: The Advanced Encryption Standard”, Dr. Dobb‟s Journal, March 2001.
[3] R. Rivest, A. Shamir, and L. Adleman, “A method for obtaining digital signatures and public-key cryptosystems”. Communication of the ACM, pp. 120-126, 1978.
[4] Chan, C.K. and Cheng. L.M. “Hiding data in image by simple LSB substitution. Pattern Recognition”, 37, pp. 469 – 474, 2004.
[5] N. Nikolaidis, and I. Pitas, “Robust Image Watermarking in the Spatial Domain”, Signal Processing, 66(3), pp. 385-403, 1998
[6] J. Fridrich, M. Goljan, “ Steganalysis of JPEG Images: Breaking the F5 Algorithm”, Publisher: Springer Berlin, Heidelberg, Lecture Notes in Computer Science, vol. 2578, pp 310-323, 2003.
[7] M. A. Bani Younes, A. Jantan, “A New Steganography Approach for Image Encryption Exchange by Using the Least Significant Bit Insertion”, IJCSNS, International Journal of Computer Science and Network Security, vol. 8 No. 6, June 2008.
[8] Sayuthi Jaafar, Azizah A Manaf, Akram M Zeki, “Steganography Technique using Modulus Arithmetic”, 9th International Symposium on Signal Processing and Its Applications, pp. 1 – 4, April 2007. [9] Iwata M., Miyake K., and Shiozaki, “Digital Steganography Utilizing
Features of JPEG Images”, IEICE Transfusion Fundamentals, E87-A, 4, pp. 929 – 936, 2004.
[10] M. Kharrazi, H. Sencar, and N. Memon, “Performance study of common image steganography and steganalysis techniques,” Communications of the SPIE and IS&T, 15, No.4, pp. 1017-9909, Oct-Dec., 2006.
[11] Nedal M.S. Kafari, Hani Y. Suleiman,“Bit-4 of Frequency Domain DCT Steganography Technique”, First National Conference on Network Digital Technologies, PP.286-291,2009.
[12] Amitava Nag, Sushanta Biswas and Debasree Sarkar, “A Novel Technique for Image Steganography Based on DWT and Huffman Encoding”, International Journal of Computer Science and Security, (IJCSS), vol. 4, pp. 561-570, 2011
[13] Wai Wai Zin, Than Naing Soe, “Implementation and Analysis of Three Steganographic Approaches”, Proceedings of 3rd International
International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 2, April 2012
99
[14] Piyush Marwaha, Paresh Marwaha, “Visual cryptographic steganography in images”, Proceedings of international conference on Computing Communication and Networking Technologies, 2010, p.p. 1-6.
[15] L. Davidson, and P. Goutam, “Locating secret message in images”, In ACM SIGKDD international conference on Knowledge discovery and data mining, (Seattle, Washington, Aug.22-25. ACM 1-58113-888-1, 2004.