Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Performance Analysis of LSB, DCT, and DWT for Digital Watermarking

Application using Steganography

Conference Paper · January 2023


DOI: 10.1109/EESCO.2023.7253657

CITATIONS READS

34 3,727

2 authors:

Saravanan Chandran Pratim Hait


National Institute of Technology, Durgapur Maulana Abul Kalam Azad University of Technology, Kolkata
133 PUBLICATIONS 957 CITATIONS 4 PUBLICATIONS 35 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Information Security Education and Awareness Phase II View project

Dimensionality Reduction View project

All content following this page was uploaded by Pratim Hait on 24 September 2023.

The user has requested enhancement of the downloaded file.


International Conference on Electrical, Electronics, Signals, Communication and Optimization (EESCO) - 2023

Performance Analysis of LSB, DCT, and DWT for


Digital Watermarking Application using
Steganography

Saravanan Chandran, Ph.D, MIEEE, Pratim Hait,


Computer Center, Computer Center,
National Institute of Technology, MAKAUT
Durgapur, India. Kolkata, India.
dr.cs1973@gmail.com rikhait511@gmail.com

Abstract—Digital watermarking have been used for maintaining authenticate the originality of the media. There are various
copyright information of the digital media for a decade. Digital techniques available to implement steganography namely
watermarking is a technique used for embedding copyright three well known techniques are the Least Significant Bit
information in the media files. The media file could be an image, (LSB), the Discrete Cosine Transform (DCT) and the Discrete
an audio, a video, or a text. Steganography have been used in the Wavelet Transform (DWT). There are two types of domains in
Digital watermarking application. Steganography has become which steganography is implemented i.e. spatial domain and
more important due to the exponential growth of communication frequency domain [6]. In spatial domain, processing is applied
of potential computer information on the internet. directly on the pixel values of the image whereas in frequency
Steganography differs from cryptography, such that
domain, pixel values are transformed and then processing is
cryptography hides the contents of secret message, whereas,
applied on the transformed coefficients. Steganography is used
steganography is about hiding the message in media effectively.
This research article gives an overview of steganography, its to covert communication. The secret image which is
applications, and difference from cryptography. This research communicated to the destination is embedded into the cover
article analyses performance of the Least Significant Bit (LSB), image to derive the stego image.
Discrete Cosine Transform (DCT), and Discrete Wavelet
Transform (DWT). Cover File (Image,
Audio, Video)
Keywords—Steganography, Steganalysis, LSB, DCT, DWT, PSNR,
Histogram. Steganography Stego file

I. INTRODUCTION Data to hide (text,


Watermarking is a concept which is used to protect the image, audio, video)
document by embedding copyright information. The copyright
information could be either visible or invisible in the media. In Figure 1: Process of hiding data
general, watermark appears behind the original document and
will not harm the original content of the document [1]. Digital
watermarking is a process in which copyright information is Steganography
embedded in the form of a text, or an image, or an audio, or a
video in the particular media[8]. Watermarking have been
used for protecting the digital media from illegal access by the Spatial Domain Frequency Domain
unauthorized community. Many techniques have been
introduced such as cryptography, watermarking, and
DCT
steganography to protect data from unauthorized groups. The LSB
term steganography is derived from the Greek words
“steganos” (covert) and graphia (writing) [15]. Data DWT
encryption and decryption algorithms have been used in the
steganography for embedding and extracting the copyright Figure 2: Technique of steganography
information. Encryption algorithms used in the sender side and
decryption algorithms used in the receiver side [1]. The II. LITERATURE SURVEY
copyright information is embedded in the media to hide the Deshpande Neeta, et al. have proposed the Least
copyright information from the unauthorized world. On Significant Bit (LSB) embedding technique which hides the
receiver side, the copyright information is decrypted to

978-1-4799-7678-2/15/$31.00 ©2023 IEEE


data using the least significant bits of the cover image which is III. ALGORITHMS OF STEGANOGRAPHY
unable to notice by the naked human eye [1]. K. B. Raja, et al.
proposed a challenging task of transferring embedded A. The LSB based Steganography encoding algorithm [12]
information to the destination without being detected. In this had been developed as follows,
paper, the image based steganography utilized the Least Step 1: Read the cover image and text message which is to be
Significant Bit (LSB), Discrete Cosine Transform (DCT), and hidden in the cover image.
compression techniques on raw images to enhance the security
Step 2: Convert the color image into grey image.
of the payload [3]. Vijay Kumar Sharma, et al. have worked
Step 3: Convert text message in binary.
upon a new steganography algorithm for 8 bit grayscale or 24
bit color image based on logical operation to ensure the Step 4: Calculate LSB of each pixels of cover image.
security against the steganalysis attack [4]. Chen Ming, et al. Step 5: Replace LSB of cover image with each bit of secret
focused on the steganography tools algorithms [6]. Based on message one by one.
the analysis of the algorithms, various tools aredivided into Step 6: Write stego image
five categories: B. The decoding algorithm [12] had been developed as
Step 1: Spatial domain based steganography tools. follows,
Step 2: Transform domain based steganography tools.
Step 3: Document based steganography tools. Step 1: Read the stego image.
Step 4: File structure based Steganography tools. Step 2: Calculate LSB of each pixels of stego image.
Step 5: Other categories. Step 3: Retrieve bits and convert each 8 bit into character.
Aneesh Jain, et al. proposed a scheme which hides data in C. The DCT Based Steganography encoding algorithm [12]
bitmap images, in a way that there is almost no perceptible
had been developed as follows,
difference between the original image and this new image and
which is also resistant to JPEG compression [7]. Beenish Step 1: Read cover image.
Mehboob, et al. discussed the art and science of steganography Step 2: Read secret message and convert it in binary.
in general and proposed a novel technique to hide data in a Step 3: The cover image is broken into 8 x 8 block of pixels.
colorful image using least significant bit [8]. Hassan Step 4: Working from left to right, top to bottom subtract 128
Mathkour, et al. discussed a criteria to analyze and evaluate in each block of pixels.
the strengths and weaknesses of the presented techniques and Step 5: DCT is applied to each block.
a more robust steganography technique has been developed Step 6: Each block is compressed through quantization table.
that takes advantages of the strengths and avoids the Step 7: Calculate LSB of each DC coefficient and replace with
limitations [9]. Another approach combines spread spectrum each bit of secret message.
communication, error control coding and image processing to Step 8: Write stego image.
hide information in images [11]. K. B.Shiva Kumar, et al.
discussed the important issue of modern communication D. The decoding algorithm [12] had been developed as
establishes secret communication while using public channel follows,
and is achieved by steganography. In this research paper, Step 1: Read stego image
Coherent Steganography technique using Segmentation and Step 2: Stego image is broken into 8 x 8 block of pixels.
Discrete Cosine Transform(CSSDCT) was proposed. The Step 3: Working from left to right, top to bottom subtract 128
cover image was divided into 8 x 8 blocks and DCT was in each block of pixels.
applied on each block. The number of payload MSB bits were
Step 4: DCT is applied to each block.
embedded into DCT coefficients of the cover image
Step 5: Each block is compressed through quantization table.
coherently based on the values of DCT coefficients. It was
observed that the proposed algorithm had better PSNR, Step 6: Calculate LSB of each DC coefficient
Security, and capacity compared with the existing other E. The DWT Based Steganography encoding algorithm [5]
research techniques [12]. T. Narasimmalou, et al. proposed an had been developed as follows,
optimal discrete wavelet transform(DWT) based
steganography. Experiments shown that the peak signal noise Step 1: Read the cover image and text message which is to be
ratio (PSNR) generated by the proposed method was better hidden in the cover image.
[14]. Arvind Kumar, et al.discusses how digital images can be Step 2: Convert the text message into binary. Apply 2D Haar
used as a carrier to hide Messages and also analyses the transform on the cover image.
performance of some of the steganography tools [16]. Vijay Step 3: Obtain the horizontal and vertical filtering coefficients
Kumar, et al. intends to observe the effect of embedding the of the cover image. Cover image is added with data bits for
secret message in different bands such as CH, CV and CD on DWT coefficients.
the performance of stego image in terms of Peak Signal to Step 4: Obtain stego image. Step 5: Calculate the Mean square
Noise Ratio (PSNR). Experimentation has been done using six Error (MSE), Peak signal to noise
different attacks. Experimental results reveal that the error ratio (PSNR) of the stego image.
block replacement with diagonal detail coefficients (CD) gives
better PSNR than doing so with other coefficients [17]. F. The decoding Algorithm [5] had been developed as
follows,
Step 1: Read the stego image.
Step 2: Obtain the horizontal and vertical filtering coefficients 01001010
of the cover image. 10010110
Step 3: Extract the message bit by bit and recomposing the 10001100
cover image. 00010100
Step 4: Convert the data into message vector. Compare it with 01010110
original message. 00100111
01000011
IV. STEGANOGRAPHIC SYSTEM On average, only half of the LSBs required to change. The
The Steganographic system comprises of a stego system difference between the cover image and the stego image are
encoder that accepts the cover image, the message to be hardly noticeable to the human eye. However, one of its major
hidden and the optional key to generate the stego image that is limitations is small size of data which can be embedded in
identical to cover image as per the human visual systems such type of images using LSB. LSB is extremely vulnerable
(HVS). The encoder implements the algorithm for to attacks. LSB techniques implemented to 24 bit formats are
steganographic data hiding, it may use substitution technique difficult to detect contrary to 8 bit format [2 & 8]. Another
or transform technique. The cover can be transmitted via a example of LSB technique is: Consider a grid for 3 pixels of a
channel or uploaded to the internet. At the other end the 24 bit image and the number 300 is to be embedded using
decoder works on the stego image with the optional key to LSB technique. The resulting grid is as follows:
extract the hidden message. (01010101 01011100 11011000)
(10110110 11111100 00110100)
(11011110 10110010 10110101)
Message Staganographic Stego Image The following bits are embedded into the above grids.
Encoder 10000011
The embedded grid is as follows:
(01010101 01011100 11011000)
key (10110110 11111100 00110100)
(11011111 10110011 10110101)
Here the number C was embedded into the first 8 bytes of
the grid. Only the 2 bits need to be changed according to the
Recover Steganographic Communication embedded message. On average, only half of the bits in an
Message Decoder channel image need to be modified to hide a secret message using the
maximum cover size.
Figure 3: Steganographic data hiding system
B. Discrete Cosine Transform (DCT) method
The LSB, DCT, and DWT are discussed in the following DCT coefficients are used for JPEG compression [10 &
sections. 12]. It separates the image into different parts of importance. It
transforms a signal or image from the spatial domain to the
A. Least Significant Bit (LSB) data hiding
frequency domain. It separates the image into high, middle
In LSB steganography, the least significant bits of the and low frequency components. In low frequency subband,
cover media’s digital data were used to conceal the message. much of the signal energy lies at low frequency which
The simplest of the LSB steganography techniques is LSB contains most important visual parts of the image, while in
replacement. LSB replacement steganography flips the last bit high frequency subband, high frequency components of the
of each of the data values to reflect the message that needs to image are usually removed through compression and noise
be hide. Consider an 8 bit gray scale bitmap image where each attacks [13]. So the secret message is embedded by modifying
pixel is stored as a byte representing a gray scale value. the coefficients of the middle frequency subband, so that the
Suppose the first eight pixels of the original image have the visibility of the image is not affected.
following gray scale values [4]:
11010010
01001010
10010111 C(i,j) C(u,v)
10001100
00010101
01010111
00100110 Figure 4: DCT of an image
01000011
To hide the letter C whose binary value is 10000011, the The general equation for a 1D (N data items) DCT is defined
LSBs of these pixels are replaced to have the following new by the following equation [12]:
grayscale values:
11010011
N −1  (2i + 1)u  Figure 6: The vertical operation [5]
C (u ) = a(u )  X i cos  (1)
i =0  2N  V. ERROR METRICS
Where u = 1, 2, 3…..N-1. The general equation for a 2D The following two error metrics are used in the
(N × M image) DCT is defined by the following equation [12]: performance analysis.
N − 1 N −1  (2i + 1)u   (2i + 1)v  A. Mean Square Error
C(u, v) = a(v)  a(u)  X cos
  cos  (2)
 2N   2N 
i
i = 0 i =0 It is defined as the square of error between cover image and
Where u, v = 1, 2, 3…..N-1. Here, the input image is of size the stego image. The distortion in the image can be measured
N × M. c (i, j) is the intensity of the pixel in row i and column using MSE [2].
j; C (u, v) is the DCT coefficient in row u and column v of the
DCT matrix. DCT Image is broken into 8x8 blocks of pixels. 
 I1(m, n) − I 2( M , N )
M ,N
2
Working from left to right, top to bottom, DCT is applied to MSE = (3)
each block. Each block is compressed through quantization M N
table to scale the DCT coefficients and message is embedded M and N are the number of rows and column in the input
in DCT coefficients [10]. image.
C. Discrete Wavelet Transform Technique (DWT) B. Peak Signal to Noise Ratio
The Haar DWT is applied in this technique [18]. A It is the ratio of the maximum signal to noise in the stego
2dimensional Haar DWT consists of two operations: One is image [5].
the horizontal operation and the other is the vertical operation. 2
Detailed procedures of a 2D Haar DWT are described below: 256
PSNR = 10 log10 (4)
Step 1: MSE
Scan pixels from left to right in the horizontal direction. PSNR is measured in decibels (dB). PSNR is a good measure
Then, perform the addition and subtraction operations on for comparing restoration results for the same image.
neighboring pixels. Store the sum on the left and the
difference on the right as illustrated in figure 5. Repeat this VI. PERFORMANCE ANALYSIS
operation until all the rows are processed. The pixel sums The performance analysis of LSB, DCT and DWT
represent the low frequency part (denoted as symbol L) while algorithms are carried out on steganography using PSNR and
the pixel differences represent the high frequency part of the MSE. PSNR computes the peak signal to noise ratio, in
original image (denoted as symbol H). decibels, between the two images. This ratio is used as a
A B C D A+B C+D A -B C-D
quality measurement between two images. If PSNR ratio is
high then images are best of quality.

Figure 5: The horizontal operation on first row [5]


Step 2:
Scan pixels from top to bottom in vertical direction.
Perform the addition and subtraction operations on
neighboring pixels and then store the sum on the top and the
difference on the bottom as illustrated in Figure 6. Repeat this JET BABOON
operation until all the columns are processed. Finally, 4
Figure 7: Sample test image
subbands denoted as LL, HL, LH, and HH obtained. The LL
subband is the low frequency portion and hence looks very TABLE I. LSB, DCT, DWT TECHNIQUE
similar to the original image. The whole procedure described
is called the first order 2D Haar DWT.
Images PSNR MSE

M O M+N O+P
LSB DCT DWT LSB DCT DWT
N P
M-N O-P Jet 50.9015 52.9532 46.7309 0.5325 0.3320 1.3912

Baboon 51.3214 53.2092 46.8262 0.4834 0.3130 1.3610


TABLE II. PARAMETERS ANALYISIS OF STEGANOGRAPHY METHODS [4] Vijay KumarSharma, Vishalshrivastava, “A Steganography Algorithm
for Hiding Images by improved LSB substitution by
minizedetection.”Journal of Theoretical and Applied Information
Method LSB DCT DWT Technology, Vol. 36 No.1, ISSN: 1992-8645, 15th February 2012.
[5] Po-Yueh Chen and Hung-Ju Lin, “A DWT Based Approach for Image
Steganography”, International Journal of Applied Science and
Invisibility LOW HIGH HIGH Engineering 4, 3: 275-290, 2006.
[6] Chen Ming, Zhang Ru, NiuXinxin, Yang Yixian, “Analysis of Current
LOW MEDIUM HIGH Steganography Tools: Classifications & Features”, International
Robustness Conference on Intelligent Information Hiding and Multimedia Signal
Processing (IIH-MSP'06), IEEE- 0-7695-2745-0/06 $20.00.
PSNR MEDIUM HIGH LOW [7] Aneesh Jain, Indranil Sen Gupta, “A JPEG Compression Resistant
Steganography Scheme for Raster Graphics Images”, IEEE-1-4244-
1272-2/07/$25.00.
MSE MEDIUM LOW HIGH
[8] Beenish Mehboob and Rashid Aziz Faruqui, “A Steganography
Implementation”, IEEE -4244-2427-6/08/$20.00.
[9] Hassan Mathkour, Batool Al-Sadoon, AmeurTouir, “A New Image
Steganography Technique”, IEEE-978-1-4244-2108-4/08/$25.00.
VII. CONCLUSION [10] NageswaraRaoThota, Srinivasa Kumar Devireddy, “Image Compression
Using Discrete Cosine Transform”, Georgian Electronic Scientific
This paper discusses in detail about the LSB, DCT, and DWT Journal: Computer Science and Telecommunications, No.3 (17), 2008.
algorithms on steganography application. The LSB, DCT, and [11] Lisa M. Marvel, Charles T. Retter, Charles G. Boncelet Jr.: Hiding
DWT algorithms are implemented for steganography Information in Images. 396-398 Proceedings of the 1998 IEEE
application. In this experiment, performance analysis of LSB, International Conference on Image Processing (ICIP-98), Chicago,
DCT, and DWT methods is successfully completed and Illinois, October 4-7, 1998. IEEE Computer Society, 1998, ISBN 0-
8186-8821-1, Volume 2
experimental results are discussed. The MSE and PSNR
[12] Dr. Ekta Walia, Payal Jain, Navdeep, “An Analysis of LSB & DCT
values are compared for the LSB, DCT, and DWT algorithms. based Steganography”, Global Journal of Computer science &
The PSNR value shows the quality of image after embedding technology, Vol. 10 Issue 1 (Ver 1.0), April 2010.
the data. From the experiment results it is observed that the [13] N. F. Johnson, and S. Jajodia, “Steganography: Seeing the Unseen,”
PSNR of DCT is high as compared to the other two IEEE Computer magazine, February 1998, pp. 26-34.
algorithms. Thus, the experiment concludes the DCT [14] T. Narasimmalou, Allen Joseph R, “Optimized Discrete Wavelet
Transform based Steganography”, IEEE International Conference on
algorithm is more suitable for the steganography application Advanced Communication Control and Computing Technologies
compared to the LSB and the DWT based algorithms. (ICACCCT), 2012.
[15] Wikipedia - The Free Encyclopedia. Steganalysis. [online] 2004 May.
References Available at http://en.wikipedia.org/wiki/Steganalysis.
[1] Frank Y.Shih, “Digital Watermarking and Steganography- [16] Atalla I. Hashad, Ahmed S. Madani, “A Robust Steganography
Fundamentals and Techniques”, CRC Press 2008. Technique Using Discrete Cosine Transform Insertion” .
[2] Deshpande Neeta, KamalapurSnehal, Daisy Jacobs, “Implementation of [17] Vijay Kumar, Dinesh Kumar, “Performance Evaluation of DWT Based
LSB Steganography and Its Evaluation for Various Bits”, 2004. Image Steganography”, IEEE- 978-1-4244-4791-6/10/$25.00_c 2010.
[3] K.B.Raja, C.R.Chowdary, Venugopal K R, L.M.Patnaik, “A Secure [18] Gurmeet Kaurand Aarti Kochhar, “A Steganography Implementation
Image Steganography using LSB, DCT and Compression Techniques based on LSB & DCT”, “International Journal for Science and
on Raw Images”, IEEE-0-7803-9588-3/05/$20.00. Emerging, Technologies with Latest Trends” 4(1), ISSN No.
(Online):2250-3641, ISSN No. (Print): 2277-8136, 35-41 (2012).

View publication stats

You might also like