You are on page 1of 5

A Novel Visual Cryptographic Steganography

Technique
Mohit Kumar Goel *, Dr. Neelu Jain #
*

Dept. of Electronics and Electrical Comm., PEC University of Technology, Chandigarh


mohitgoel4u@gmail.com

Dept. of Electronics and Electrical Comm., PEC University of Technology, Chandigarh


neelujain@pec.ac.in

Abstract With development in technologies, the amount of data being exchanged on internet is increasing exponentially. The security
of information can be achieved by cryptography and steganography. Cryptography hides the contents of message by converting it to an
unreadable cipher. Steganography hides the existence of message by embedding data in some other digital media like image or audio
files. The paper proposes a security system which is combination of both the techniques. In proposed system data is firstly encrypted
using RSA encryption algorithm and then embedded in an image using DCT based steganographic method. The experimental result
shows that proposed system has better PSNR value in comparison to other techniques like LSB, Modulus arithmetic steganography. It
also maintainstaisfactory security as secret message cant be extracted without knowing the decoding algorithm.
Keywords- steganography; RSA encryption; data hiding; discrete cosine transform.

I.

INTRODUCTION

Due to increasing the technologies, security systems are


very popular in many areas. The information comes in
numerous forms and requires secure communication. Such
secure communication ranges from bank transactions,
corporate communications and credit card purchases.
Encryption and steganography are the preferred techniques
for protecting the transmitted data. Encryption hides the
contents of the message, but cannot hide the message data
itself. However, encryption clearly marks a message as
containing interesting information, and the encrypted
message becomes subject to attack. 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 [4]. Another example of a broken encryption
algorithm is WEP. WEP was designed to provide
confidentiality to users on wireless networks. A.
Stubblefield illustrates how WEP can be broken within
hours [5]. 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. So, in many cases
it is desirable to send information without being notice by
anyone that information has been sent. Steganography
conceal the secret messages within some image, music or
audio file so that it is not visible to others. Image

steganography schemes can be divided into two categories:


Spatial Domain and Frequency Domain.
A. Spatial domain steganography
Spatial domain techniques embed messages in the
intensity of the pixels directly [6][7][8]. Least Significant
Bit (LSB) is the first most widely used spatial domain
steganography technique. It embeds the bits of a message in
the LSB of the image pixels [9][10]. But the problem with
this technique is that if the image is compressed then the
embedded data may be lost. Thus, there is a fear for loss of
data that may have sensitive information [11]. 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 [12]. The embedding process
starts with deriving a seed for a PRNG from the user
password and generating a random walk through the cover
image that makes the steganalysis hard. Another recent
improvement based on random distribution of the message
was introduced by M. Bani Younes and A. Jantan [13]. In
this method they utilize an encryption key to hide
information about horizontal and vertical blocks where the
secret message bits are randomly concealed. SSB-4
steganography approach introduced by Rodrigues, Rios and
Puech is about changing the 4th bit of a pixel in the original
image according to the bit message. Then modify the other
bits (1st, 2nd, 3rd and/or 5th) to minimize the difference
between the changed pixel value and the original one [14].
The 4th digit is a significant bit and if the image is
compressed the embedded information is not destroyed [15].
Tu C. and Tran T D. argued that the difference must be

equal or less than four (i.e., 4) [16]. The 4th bit was chosen
because it satisfies that changing of 4 units in the channel
color value is imperceptible to human eyes, and it is the
most significant bit which provides the minimum change in
the pixel values. 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.

[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 Bobs 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 Alices Public key, which is the only
key that matches the signing private key.

B. Frequency domain steganography


In frequency domain, images are first transformed and
then the message is embedded in the image [17][18][19].
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 frequency domain method usually used in image
processing is the 2D discrete cosine transform [20][21]. In
this technique the image is divided into 88 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 [21].
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 [26]. Piyush Marwaha and
Paresh Marwaha use DES encryption and LSB
steganography for data security [25]. In this paper we
propose a method which uses RSA encryption and LSBDCT steganography for data security.
II. BACKGROUND OF CRYPTOGRAPHY
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.
2) Public Key Cryptography: Uses one key for
encryption and another for decryption.
3) Hash
Functions:
Uses
a
mathematical
transformation
to
irreversibly
encrypt
information.

Figure 1. RSA Encryption

The steps for RSA algorithm are:


1) Select two prime numbers p, q.
2) Calculate n= p q and (n)= (p-1)(q-1)
3) Select integer e such that
gcd ( (n),e)=1; 1<e < (n)
4) Calculate d such that d e=1mod( (n))
5) Now Public key (PU) is {e, n} and Private
Key (PR) is {d, n}.
6) At sender side, message (M) to be sent is
converted into cipher text (C) as follows:
(1)
C= Me mod n
7) At receiver side, cipher text is converted to original
message as follows:
M= Cd mod n
(2)
III.

LSB-DCT STEGANOGRAPHY

LSB-DCT steganography image (I) is divided into 8x8


blocks and two dimensional (2-D) is performed on each
block. The 2-d DCT is calculated as follow:
7 7
1
(2x 1)u (2y 1)
cos
F(u, v) C(u)C(v)f (x, y)cos
4
16 16
x0 y0

A. RSA encryption algorithm

for x=0,..., 7 and y=0,..,7

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

1 / 2 for k 0
where C (k )
otherwise
1

(3)

In DCT block lower frequency cofficents are at upper


left positions and high frequency coefficients are lower right
positions. Now image is compressed by quantization.
Quantization is achieved by dividing each element in the
DCT coefficient block by the corresponding value in the
standard quantization matrix shown in fig. 2 and the result is
rounded to the nearest integer. As eye is not able to discern
the change in high frequency components so these can be
compressed to larger extent. Lower right side components of
quantization matrix are of high value so that after
quantization high frequency components become zero.
16
12

14

14
Q
18

24
49

72

11 10 16

24

40

51

12 14 19

26

58

60

13 16 24
17 22 29

40
51

57
87

69
80

22 37 56
35 55 64

68 109 103
81 104 113

64 78 87 103 121 120


92 95 98 112 100 103

61
55

56

62
77

92
101

99

Output: Stego image.


1)
2)
3)
4)
5)
6)
7)
8)
9)

Encrypt the plain text using encryption key.


Divide the cover image into 88 blocks.
Perform 2-D DCT on each block.
Perform quantization on each block.
Perform zigzag scan to convert 88 block into one
dimensional array.
Replace the LSB of DCT coefficients with data
bits.
Convert 1-D zigzag array back to 88 block.
Perform Inverse DCT on each block.
Combine all the blocks to form stego image.

Figure 2. Quantization Matrix

Although the DCT coefficients have been decorrelated


by DCT transform to some extent, DCT coefficients in the
same block are still not independent, which is called as
intra-block correlation [16]. While neglecting the impact of
block edge, the general trend in magnitude of the block
coefficients in each block is non-increasing along zigzag
scan order. After block DCT coefficients are arranged by
zigzag scan pattern, dependencies among neighboring
coefficients in both horizontal and vertical directions can be
conveniently investigated [23]. Now data is embedded in
one dimensional zigzag array
a)

If data bit is 0, then make the DCT coefficient


even or,
b) If the data bit is 1, then make the DCT coefficient
odd
After embedding data zigzag array is again converted
into 88 block. These blocks are dequantized and inverse
DCT is performed. The entire 88 blocks are combined to
form the stego image which is then sent to receiver.
At the receiver side the stego-image is received in spatial
domain. Now stego image is divided into 88 blocks and
DCT is performed on each block. Then scan the DCT block
in zigzag way and extract the embedded data.
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 the steganalysis process. The data is
first converted into cipher text using RSA encryption and
then hided into lower frequency components of image using
LSB-DCT steganography.
A. Embedding algorithm
Steps of embedding algorithm are given as follow:
Input: An MN size cover image and data to be concealed.

Figure 3. Proposed Method

B. Extraction algorithm
Steps for extraction algorithm are given as follows:
Input: An MN size Stego image.
Output: Secret message.
1)
2)
3)
4)

Divide the stego image into 88 blocks.


Perform 2-D DCT on each block.
Perform quantization on each block.
Perform zigzag scan to convert 88 block into one
dimensional array.
5) Check the DCT coefficient.
a) If DCT coefficient is even then data bit is 0 or,
b) If DCT coefficient is odd then data bit is 1.
6) Concatenate the bits to obtain cipher message.
7) Decrypt the cipher text using decryption keys and
display original message on screen.
V.

EXPERIMENTAL RESULTS

Since the visual detection of stego images is depending


on the nature of the image [24] 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 [24]. Comparative analysis of LSB, Modulus
arithmetic (mod-16), and proposed method has been done
on the basis of Peak signal to noise ratio (PSNR). To
calculate PSNR, first MSE is calculated as follows:
MSE

1 m 1 n 1
I (i, j ) K (i, j )
mn i 0 j 0

The comparative analysis of PSNR value of different


steanography technique, is given in table 1, shows that
proposed steganography method has better image quality of
stego image than other techniques.
Table 1. Comparative analysis of PSNR values of different steganography
techniques
PSNR Value

( 4)

Image

Where MSE is the Mean Squared Error of Original


image (I) and stego image (K). Thereafter PSNR value is
calculated as follow:
MAX i2
PSNR 10. log 10
MSE

MAX i
20. log10

MSE

(5)

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. PSNR computes the peak signal to noise
ratio, in decibels, between two images. This ratio is used as
quality measurement between two images.

(a) Original Human.jpg

(b) Stego Human.jpg

LSB

Modulus
(mod-16)

RSA & LSBDCT

Human.jpg

52.10

49.23

55.87

Flower.jpg

53.54

50.53

56.36

Building.jpg

52.43

48.77

54.59

Tree.jpg

53.46

50.46

55.57

V.
CONCLUSION
In this paper we used 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 55 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 DCT 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.
VI.
[1]

(c) Original Flower.jpg

(d) Stego Flower.jpg

[2]
[3]

[4]
[5]

(e) Original Building.jpg

(f) Stego Building.jpg

[6]
[7]

[8]

REFERENCES

DES Encryption Standard (DES), National Bureau of Standard (U.S.).


Federal Information Processing Standards Publication 46, National
Technical Information Service, Springfield, VA, 1997.
Daemen J., and Rijmen, V. Rijndael: The Advanced Encryption
Standard, Dr. Dobbs Journal, March 2001.
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.
E. Biham, A. Shamir Differential cryptanalysis of DES-like
cryptosystem, Journal of cryptography, vol. 4, pp. 63-72, Jan. 1991.
A. Stubblefield, J. Loannidis and A. D. Rubin, A Key Recovery
Attack on the 802.11b Wired Equivalent Privacy Protocol, ACM
transaction on Information and System Security, vol. 7, pp. 319-332,
May 2004.
Chan, C.K. and Cheng. L.M. Hiding data in image by simple LSB
substitution. Pattern Recognition, 37, pp. 469 474, 2004.
Chang,C.C and Tseng, H.W. A Steganographic method for digital
images using side match. Pattern Recognition Letters, 25, pp. 1431
1437, 2004.
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]
(g) Original Tree.jpg

(h) Stego Tree.jpg

Figure 4. Original Images and Stego Images using DCT steganography

W. Bender, D. Gruhl, N. Morimoto, and A. Lu, Techniques for Data


Hiding, I.B.M. Systems Journal, 35(3-4): pp. 313-336, 1996.
[10] N. Nikolaidis, and I. Pitas, Robust Image Watermarking in the
Spatial Domain, Signal Processing, 66(3), pp. 385-403, 1998

[11] T. Morkel, J. Eloff, and M. Olivier, An overview of image


steganography, In Proceedings of the Fifth Annual Information
Security South Africa Conference (ISSA2005).
[12] 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.
[13] 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.
[14] J. Rodrigues, J. Rios, and W. Puech SSB-4 System of
Steganography using bit 4, In International Workshop on Image
Analysis for Multimedia WIAMIS, May, 2005.
[15] J. Fridrich, and M. Goljan, Practical steganalysis: state-of the-art, In
Proceeding of SPIE Photonics West, Electronic Imaging 2002, vol.
4675, pp. 1-13, 2002.
[16] Tu C. and Tran T D. Context based entropy coding of block
transform coefficients for image compression, IEEE Transaction on
Image Processing, vol. 11, No.11, November, 2002.
[17] Wenqiong Yu, Blind Detection for JPEG Steganography,

International Conference on Networking and Information


Technology, pp. 128-132, July 2010.

[18] Chung, K.L., Shen, C.H. and Chang, A novel SVDand VQ-based
image hiding scheme.Pattern Recognition Letters, 22, pp. 1051
1058, 2001.
[19] Iwata M., Miyake K. and Shiozaki, Digital Steganography Utilizing
Features of JPEG Images, IEICE Transfusion Fundamentals, E87-A,
4, pp. 929 936, 2004.

[20] 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.
[21] Nedal M.S. Kafari, Hani Y. Suleiman, Bit-4 of Frequency Domain
DCT Steganography Technique, First national on networked digital
technology, p.p. 286-291, 2009.
[22] Dr. Ekta Walia, Payal Jain and Navdeep, An Analysis of LSB &
DCT based Steganography, Global Journal of Computer Science and
Technology, Vol. 1, pp. 4-8, April, 2010.
[23] Zhiping Zhou and Maomao Hui, Steganalysis for Markov
Feature of Difference Array in DCT Domain, Proceedings of Sixth
International Conference on Fuzzy Systems and Knowledge
Discovery, pp. 581 - 584 , Aug. 2009.
[24] 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-58113888-1, 2004.
[25] Piyush Marwaha, Paresh Marwaha, Visual cryptographic
steganography in images, Proceedings of international conference
on Computing and Networking Technologies, p.p. 1-6, 2010.
[26] Wai Wai Zin, Than Naing Soe, Implementation and Analysis of
Three Steganographic Approaches, Proceedings of 3rd international
conference on computer research and development, vol. 2, p.p.
456-460, 2011.

You might also like