You are on page 1of 6

Colored Image-In-Image Hiding

Mamoun Suleiman Al Rababaa


the last decade [35-48], and most of them were designed for
Abstract - Image hiding is a technique that embeds the two goals: to reduce the degradation of the visual quality of
important images into a cover image such that the the stego image, and to be able to completely recover the
important images are imperceptible and can be securely original important images. One of the most popular techniques
transmitted to the receiver. In this paper, we present a used to achieve these goals is the least-significant-bit (LSB)
steganographic method and software for embedding a substitution approach [36,38,47]. For example, Wang et al.
digital image (color image) in a true color image requires [47] introduced two well-known LSB substitution methods to
the use of uncompressed 24-bit windows format bitmap embed the bit stream of an important image into the LSBs of a
image cover image.
Typically, two types of image hiding schemes are
Keywords: Steganography; image hiding; Stego-image often used. The schemes of the first type hide secret messages
in the spatial domain of a host image. Several image-hiding
INTRODUCTION schemes based on the spatial domain, such as [5-9], have been
Data hiding technique is a generic term of designing proposed. The secret data are embedded into the pixels of the
a very wide set of applications, such as steganography [1]. host image directly. All of these schemes are not robust to
The term steganography is derived from the Greek language image compression such as JPEG [10]. But the size of data,
and means covert writing. It is the technique of encoding which can be hidden by replacing the rightmost fourleast
secret information in a communication channel in such a significant bits (LSB) per pixel in LSB substitution schemes,
manner that the very existence of the information is would be 131,072 bytes for an image of size 512× 512, for
concealed. example. The second type of image-hiding schemes embeds
The major goal of steganography is to enhance secret messages into a host image that has been transformed.
communication security by inserting secret message into the Generally, one of the transformation functions, such as the
digital image, modifying the nonessential pixels of the image discrete Fourier transform (DFT), the discrete cosine
[2,3]. The image after the embedding of the secret message, transform (DCT), or the discrete wavelet transform (DWT), is
so-called stego-image, is then sent to the receiver through a used to transform the pixel values in the spatial domain into
public channel. transformed coefficients in the frequency domain. Several
Computer-based image steganography [4] is one way of data steganographic methods based on DFT [11], DCT [12,13],
hiding which provides data security in digital images. It is and DWT [14,15] had been proposed. In general, the hiding
considered as a technique inspired from ancient capacity of these methods based on the frequency domain is
steganography. The aim is to embed and deliver secret limited. For example, the hiding capacity in the scheme based
messages in digital images without any suspiciousness. on DCT [13] is 6656 bytes. But schemes of this type ,provide
Many researchers have focused on steganographic better robustness than that of the first type.
schemes [16-30]; [21]; [22]; [23]. Until now, two major
techniques, the spatial domain manner [31]; [29] and the DIGITAL PICTURE WINDOWS FORMAT BITMAP
frequency domain manner [17] led in steganographic 1. Bitmap File:
development. - Bitmap: is a graphical object is used to create, manipulate,
Many steganographic techniques about embedding store images as files on a disk, the most common image
data in images have been proposed. A number of data formats that has the extension ".bmp".
embedding techniques are based on the method of replacing - Bitmap Structure: each bitmap file includes the following
the least-significantbits (LSBs) of the pixels of the cover headers that represent the bitmap attributes:
image [32] and a pseudo-random number generation - BITMAPFILEHEADER.
mechanism is often used to accomplish the security work [33]. - BITMAPINFO.
In [34] an LSB-like embedding technique is used in a - RGBQUAD (if any).
wavelet-based method by adding or subtracting one unit from - Pixel Bits.
the transform coefficients of the image. Some other - Bitmap Storage Structure:
steganographic methods based on modifying small details in The bitmap file arranges Headers in order way as following:
images are also published in the literature. - BITMAPFILEHEADER
Computer-based image steganography mainly considers the - BITMAPINFO
requirement that the steganographic result, the so-called - RGBQUAD (in 1, 4, 8 pits per pixel)
stego-image, be undetectable, as pointed out in [4]. Such - Pixel Bits
steganographic techniques may be used in various - BITMAPFILEHEADER:
applications. BITMAPFILEHEADER contains the following values:
Many image-hiding methods have been proposed in - Type: contains the file extension (very important for our
technique)
Mamoun Suleiman Al Rababaa – IT Faculty, CS Department,
- Size: contains the file of the whole bitmap file
AL al Bayt University, Jordan
marababaa@aabu.edu.jo

CADSM’2009, 24-28 February, 2009, Polyana-Svalyava (Zakarpattya), UKRAINE


- Reseved1: Reserved for the Windows use. ƒ Values of BITMAPINFOHEADER.
- Reseved2: Reserved for the Windows use. ƒ Bits that represent pixels colors.
- Offset: represents the distance (in bytes) between the 2. compute the required size for embedding the
beginning of the bitmap file to the beginning of Pixel secret image as following (in byte):
bits(very important for our technique) Required size = (3*width of secret *height of secret)
- BITMAPINFO: + (3*2) + (20*2)….....(1).
BITMAPINFO consists from two headers: Descriptions:
- BITMAPINFOHEADER a. (3*width of secret *height of secret) means:
- BITMAPINFOHEADER contains the following values: ƒ 3: each pixel needs 3 byte to represent
- Width: contains the width of the bitmap (in pixel) it.
- Height: contains the height of the bitmap (in pixel) ƒ Width*height: dimension of the secret
- BitCount: represents the type of the bitmap (1, 4, 8, 16, image.
24, 32 bits per pixel) b. (3*2) means:
- Other values (Compression, SizeImage, XPelsPerMeter, ƒ 3: 3 bytes for each one (width, height)
YPelsPerMeter, ClrUsed, ClrImportant) but these values for embedding them.
are not important in out technique. ƒ 2: represents number of values (width,
height).
- RGBQUAD: c. (20*2):
Represents the color table for the bitmap (if any). ƒ 20: 20 bytes for each one (password,
- Blue: the value of the blue color hidden message).
- Red: the value of the red color ƒ 2: represents number of values
- Green: the value of the green color (password, hidden message).
- Reserved: for the Windows use.
3. Compute the new offset value as following:
- Bitmap type: New offset value = old offset value + required size
1-bit per pixel: the bitmap is a monochrome (white and (from equation 1)……..(2).
black color), in this type the bitmap use the RGBQUAD 4. Compute the new bitmap file size as following:
(color table) and has two entries in this table (white and black New bitmap file size = new offset value (from
colors) (is not important in our technique). equation 2) + (cover width * cover height *
4-bit per pixel: the bitmap uses the RGBQUAD (color 3)……..3.
table) and has 16 colors in its color table. (Is not important in Note: 3 means each pixel needs 3 bytes to represent
our technique). it.
8-bit per pixel: the bitmap uses the RGBQUAD (color
table) and has 256 colors into it. (Is not important in our ƒ Stego image:
technique) 1. Copy the values of that cover structures.
16-bit per pixel: the bitmap does NOT use the RGBQUAD 2. update the following values:
(color table) and has RGB values for its pixels (RGB (5 bits, 5 ƒ BitmapFileHeader.FileSize = new bitmap
bits, 5 bits)). (Is not important in our technique). file size.
ƒ BitmapFileHeader.Offset = new offset
24-bit per pixel: the bitmap does NOT use the RGBQUAD value.
(color table) and has RGB values for its pixels (RGB (8 bits, 8 3. write the following values in sequenced order:
bits, 8 bits)). (is the Most important for our technique) ƒ Write all structures values of the cover
image after updating them to the stego image
THE PROPOSED ALGORITHM (BITMAPFILEHEADER,
BITMAPINFOHEADER).
1. Embedding algorithm: ƒ Write the width and the height values of the
ƒ Secret image: secret image to the stego image.
Secret image can be 1,4,8,16,24 bits per pixel. ƒ Write the password and the hidden message
1. Obtain values of pixels that represent the entire to the stego image.
secret image. ƒ Write the values of the secret image pixels
2. obtain width and height of the secret image to the stego image.
3. check that: ƒ Write the values of the cover image pixels
Width and height are more than 20px and lower than to the stego image.
5000px. Note:
Writing process: when you needing to write a
ƒ Cover image: value you must first convert this value into the
Note: cover image must be 24 bits per pixel. binary format then write it.
1. obtain the cover image data: 4. Save the stego image into an independent bitmap file.
ƒ Values of BITMAPFILEHEADER. The figure 3.1. Shows the embedding algorithm.

CADSM’2009, 24-28 February, 2009, Polyana-Svalyava (Zakarpattya), UKRAINE


Figure 1: embedding algorithm
2. Extracting algorithm:
1. obtain the following values from the stego image to
build the secret image:
ƒ Width, height, password, secret message,
bits that represent the secret image pixels.
2. Build the secret image according to these values.
Note: do not use never ever the stego image as a cover
image or as secret image.
The Figure 3.2. Shows extracting algorithm

Figure 2: extracting algorithm

CADSM’2009, 24-28 February, 2009, Polyana-Svalyava (Zakarpattya), UKRAINE


[5]. C.K. Chan, L.M. Chen, Hiding data in images by simple
LSB substitution, Pattern Recognition 37 (3) (2004) 469–
3. Essential Algorithm Idea:
474.
How does The Operating System read the bitmap file? [6]. C.C. Thien, J.C. Lin, A simple and high-hiding capacity
The OS reads the following data in sequenced order: method for hiding digit-by-digit data in images based on
1-BITMAPFILEHEADER values modulus function, Pattern Recognition 36 (2003) 2875–
2-BITMAPFILEHEADER values and checks BitCount 2881.
attribute to determine the bitmap type (1, 4, 8, 16, 24, 32 bits [7]. R.Z. Wang, C.F. Lin, J.C. Lin, Image hiding by optimal
per pixel) and then concludes whether this bitmap uses color LSB substitution and genetic algorithm, Pattern
table or not, if the color table is represented then the bits Recognition 34 (3) (2001) 671–683.
pixels are indexes for the color table (we do not deal with this [8]. D.C. Wu, W.H. Tsai, Data hiding in images via
format because our technique deals only with the 24 bits per multiplebased number conversion and lossy compression,
pixel for the cover image, 24 pits per pixel does include a IEEE Trans. Consumer Electron. 44 (4) (1998) 1406–
color table, then the bits pixels represent colors of pixels) 3- 1412.
checks the value of the Offset value in the [9]. D.C.Wu,W.H. Tsai, Spatial-domain image hiding using
BITMAPFILEHEADER to get the position of bits pixels image differencing, IEE Proc.—Vision, Image Signal
This Algorithm tells the OS that read your headers but i will Proc. 147 (1) (2000) 29–37.
change the place of Pixels bits and I will inform you where I [10]. G.K. Wallace, The JPEG still picture compression
located them by using Offset value, Ok reach your values but standard, Commun. ACM 34 (4) (1991) 40–44.
the space between your values it is for me. [11]. F. Alturki, R. Mersereau, Secure blind image
This Algorithm uses the Bitmap 24 bits per pixel for the cover steganographic technique using discrete Fourier
bitmap because this type of bitmap does not use the color transformation, in: Proceedings of 2001 International
table then there are more spaces used between the Cover Conference on Image Processing, Thessaloniki, Greece,
image headers and pixels bits, then there are a large space we 2001, pp. 542–545.
can use it in the embedding operation, another reason for [12]. H.W. Wong, C. Au, W.C. Wang, Data hiding and
using this format is high resolution for the image pixels, 32 watermarking in JPEG compressed domain by DC
pit per pixel produces Stego image very big, then the optimal coefficient modification, Proceedings of SPIE
choose is 24 pits per pixel. Symposium of Security and Watermarking of Multimedia
Contents 2000, vol. 3971, San Jose, January 2000, pp.
CONCLUSION 237–244.
[13[. C.C. Chang, T.S. Chen, L.Z. Chung, A steganographic
In this paper, we proposed a new steganographic method for method based upon JPEG and quantization table
embedding a color image in color image. The major feature modification, Inform. Sci. 141 (1–2) (2002) 123–138.
characteristics of this algorithm are ability to embedding large [14]. J. Spaulding, H. Noda, M.N. Shirazi, E. Kawaguchi,
digital picture into small digital picture and vice versa without BPCS steganography using EZW lossy compressed
any changes with cover image, allows for embedding text images, Pattern Recognition Lett. 23 (13) (2002) 1579–
message into cover image and high degree of security and 1587.
privacy, with including obligatory password in the stego [15]. H. Noda, J. Spaulding, M.N. Shirazi, E. Kawaguchi,
image, so no one can extract the secret image except whose Application of bit-plane decomposition steganography to
know the password JPEG2000 encoded images, Signal Proc. Lett. 9 (12)
(2002) 410–413.
[16]. Chan, C.K., Cheng, L.M., 2003. Hiding data in images
REFERENCES by simple LSB substitution. Pattern Recognition 37, 469–
[1]. C.C. Chang, C.Y. Lin, Y.Z. Wang, New image 474.
steganographic method using run-length approach, [17]. Chang, C.C., Lin, P.Y., 2004. A compression based data
Information Sciences 176 (22) (2006) 3393–3408. hiding scheme using vector quantization and principle
[2]. Feng, J.B., Lin, I.C., Tsai, C.S., Chu, Y.P., 2006. component analysis. In: Proceedings of the 2004
Reversible watermarking: current status and key issues. International Conference on Cyberworlds, Tokyo, Japan,
International Journal of Network Security 2 (May), 161– pp. 369–375.
170. [18]. Chang, C.C., Lin, C.Y., 2006. Reversible steganography
[3]. Petitcolas, F.A.P., Anderson, R.J., Kuhn, M.G., 1999. for VQcompressed images using side matching and
Information hiding– a survey. In: Proceedings of the relocation. IEEE Transactions on Information Forensics
IEEE Special Issue on Identification and Protection of and Security 1 (4), 493–501.
Multimedia Content, vol. 87, pp. 1062–1078. [19]. Chang, C.C., Hsiao, J.Y., Chung, L.Z., 2002.
[4]. Anderson, R.J., Petitcolas, F.A.P., 1998. On the limits of Steganographic method based upon JPEG and
steganography. IEEE J. Selected Areas Commun. 16, quantization table modification. Information Sciences 141
474– 481. (2), 123–138.

CADSM’2009, 24-28 February, 2009, Polyana-Svalyava (Zakarpattya), UKRAINE


[20]. Chang, C.C., Chen, G.M., Lin, M.H., 2004. Information [36]. C.K. Chan, L.M. Cheng, Hiding data in images by
hiding based on search-order coding for VQ indices. simple LSB substitution, Pattern Recognition 37 (3)
Pattern Recognition Letters 25, 1253–1261. (2004) 474--496.
[21]. Chang, C.C., Tai, W.L., Lin, C.C., 2006. A reversible [37]. C.C. Chang, C.S. Chan, Y.H. Fan, Image hiding scheme
data hiding scheme based on side match vector with modulus function and dynamic programming,
quantization. IEEE Transactions on Circuits and Systems Pattern Recognition 39 (6) (2006) 1155--1167.
for Video Technology 16 (10), 1301–1308. [38]. C.C. Chang, J.Y. Hsiao, C.S. Chan, Finding optimal
[22]. Chang, C.C., Lin, C.C., Hu, Y.S., 2007. An SVD least-significant-bits substitution in image hiding by
oriented embedding watermark scheme with high dynamic programming strategy, Pattern Recognition 36
qualities for the restored images. International Journal of (7) (2003) 1583--1595.
Innovative Computing Information andControl 3 (3), [39]. C.C. Chang, C.Y. Lin, Y.Z. Wang, New image
609–620. steganographic methods using runlength approach, Inf.
[23]. Chen, C.C., Lin, C.S., 2007. A GA-based nearly optimal Sci. 176 (22) (2006) 3393--3408.
image authentication approach. International Journal of [40]. K.L. Chung, C.H. Shen, L.C. Chang, A novel SVD- and
Innovative Computing Information and Control 3 (3), VQ-based image hiding scheme, Pattern Recognition
631–640. Lett. 22 (9) (2001) 1051--1058.
[24]. Chung, K.L., Shen, C.H., Chang, L.C., 2001. A novel [41]. Y.C. Hu, High-capacity image hiding scheme based on
SVD- and VQ-based image hiding scheme. Pattern vector quantization, Pattern Recognition 39 (9) (2006)
Recognition Letters 22, 1051–1058. 1715--1724.
[25]. Du, W.C., Hsu, W.J., 2003. Adaptive data hiding based [42]. C.Y. Lin, C.H. Chen, An invisible hybrid color image
on VQ compressed images. IEE Proceedings-Vision, system using spread vector quantization neural networks
Image and Signal Processing 150 (4), 233–238. with penalized FCM, Pattern Recognition 40 (6) (2007)
[26]. Lin, Y.C., Wang, C.C., 1999. Digital image 1685--1694.
watermarking by vector quantization. In: Proceedings of [43]. S. Li, K.C. Leung, L.M. Cheng, C.K. Chan, A novel
the 9th National Computer Symposium, Taichung, image-hiding scheme based on block difference, Pattern
Taiwan, pp. 76–87. Recognition 39 (6) (2006) 1168--1176.
[27]. Pan, J.S., Huang, H.C., Jain, L.C., Fang, W.C. (Eds.), [44]. S.S. Maniccam, N. Bourbakis, Lossless compression
2007. Intelligent Multimedia Data Hiding: New and information hiding in images, Pattern Recognition 37
Directions. Studies in Computational Intelligence Series. (3) (2004) 475--486.
Springer, pp. 400. ISBN: 978-3-540-71168-1. [45]. C.C. Thien, J.C. Lin, A simple and high-hiding capacity
[28]. Shie, S.C., Lin, S.D., Fang, C.M., 2006. Adaptive data method for hiding digitby- digit data in images based on
hiding based on SMVQ prediction. IEICE Transactions modulus function, Pattern Recognition 36 (12) (2003)
on Information and Systems E89-D, 358–362. 2875--2881.
[29]. Tsai, P.Y, Hu, Y.C, Chang, C.C. 2002. An image hiding [46]. S.J. Wang, Steganography of capacity required using
technique using the block truncation coding. In: modulo operator for embedding secret image, Appl.
Proceedings of Pacific Rim Workshop on Digital Math. Comput. 164 (1) (2005) 99--116.
Steganography 2002, Kyushu, Japan, pp. 54–64. [47]. R.Z. Wang, C.F. Lin, J.C. Lin, Image hiding by optimal
[30]. Wang, R.Z., Lin, C.F., Lin, J.C., 2001. Image hiding by LSB substitution and genetic algorithm, Pattern
optimal LSB substitution and genetic algorithm. Pattern Recognition 34 (3) (2001) 671--683.
Recognition 34, 671–683. [48]. R.Z. Wang, Y.D. Tsai, An image-hiding method with
[31]. Wu, M.N., Lin, C.C., Chang, C.C. 2005. Hiding secret high hiding capacity based on best-block matching and k-
information in VQ compressed images using Voronoi means clustering, Pattern Recognition 40 (2) (2007) 398--
diagram. In: Proceedings of the 2nd International 409.
Symposium on Voronoi Diagrams in Science and
Engineering, Seoul, Korea, pp. 55–61.
[32]. Walton, S., 1995. Image authentication for a slippery APPENDIX
new age. Dr. Dobb_s J.: Software Tools Profess. Implementation
Program. 20, 18–26. System interface
[33]. Turner, L.F., 1989. Digital data security system. Patent Features
IPN, WO 89/08915. The first window appears when the user opens the system.
[34]. Ohnishi, J., Matsui, K., 1996. Embedding a seal into a next Fig shows the features page.
picture under orthogonal wavelet transform. In: Proc.
Multimedia _96. IEEE Press, Piscataway, NJ, pp. 514–
521.
[35]. T.S. Chen, C.C. Chang, M.S. Hwang, A virtual image
cryptosystem based upon vector quantization, IEEE
Trans. Image Process. 7 (10) (1998) 1485--1488.

CADSM’2009, 24-28 February, 2009, Polyana-Svalyava (Zakarpattya), UKRAINE


Extracting
Window for recover the secret image.

Features window

Embedding
Extracting window
This window for embedding the secret image.
Secret image

Secret image window


embedding window

Stego image

Stego image window

CADSM’2009, 24-28 February, 2009, Polyana-Svalyava (Zakarpattya), UKRAINE

You might also like