0% found this document useful (0 votes)
46 views11 pages

Data Hiding in JPEG Spectral Coefficients

jjjjjjjjjjjjjjjjjj

Uploaded by

simulateur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views11 pages

Data Hiding in JPEG Spectral Coefficients

jjjjjjjjjjjjjjjjjj

Uploaded by

simulateur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Hiding information in the coefficients of the

spectral transformations of a JPEG file

Hamza TOUIL (),

LISAC, Faculty of Sciences, Dhar-Mahraz (FSDM), Sidi Mohamed Ben Abdellah


University, Fez, Morocco

[email protected];

Abstract:
In the active development of network technologies, a large amount of information is transmitted
over networks, and the percentage of attacks by intruders and attempts to gain unauthorized
access to it is increasing. In this regard, the security of data transmission in the network arises.
The article presents a detailed review of existing steganographic methods for hiding information
in images, indicating their advantages and disadvantages. Based on the criteria formulated in the
paper, the technique of hiding in the spectral coefficients of the image file, which is the basis of
the developed algorithm, was chosen. An algorithm for hiding data in images based on the
writing methodology on "wet paper" is presented. An experimental study of the method was
carried out according to the criteria for data extraction accuracy and undetectableness.

1. Introduction
Information is one of the most important subjects of modern life. With the active development of
information technology and global computer networks, access to it has become extremely
simple. At the same time, the degree of data security breaches has increased [1,2,3]. Therefore,
there was a need to protect information from unauthorized access. There are two approaches to
solving this problem: information encryption and steganography. Cryptographic protection of
information does not eliminate the problem. In this approach, the content of the message itself is
protected. The presence of an encrypted message causes suspicion and a desire to decrypt the
transmitted message or change it to make future decryption impossible. In addition, in a number
of countries, there are bans on the use of cryptographic tools [4,5,6]. The second approach is
based on concealing the very fact that a secret message was transmitted. The advantage of
steganography over pure cryptography is that messages do not draw attention to themselves.
Many common file formats, including the JPEG format, use data compression, which allows you
to reduce the amount of information while maintaining the quality of information. Existing
methods of hiding information are either not resistant to compression or are stable at low
compression ratios. Therefore, it became necessary to create a method resistant to compression
in all cases[7,8,9,10].
Keywords: steganography, information hiding, watermarks, compression, JPEG format,
PSNR, bit error.

2. Related Works
A set of studies have been proposed to implement methods capable of securing cryptography,
including digital signatures. Beginning with [11], solve the challenge of reconstructing three-
dimensional scenes from photos captured by cameras with changing characteristics and various
perspectives. This approach is based on the projection of three-dimensional points on picture planes.
The connections between the matches and the camera characteristics are utilized to create a
nonlinear equation system. This system is turned into an objective function, which is minimized
using a genetic algorithm to estimate the intrinsic and extrinsic camera parameters. Finally, the
coordinates of the scene's 3D points are produced by solving a linear equation system.[12] provide a
novel method for retrieving a 3D point cloud that leads to a high-quality 3D surface model in a
reasonable amount of time. To begin, our method retrieves a set of 3D coordinates using the
structure from the motion approach (which corresponds to matched interest points). Then, based on
match propagation and particle swarm optimization (PSO), we devised a strategy that dramatically
increased the number of matches while maintaining a regular distribution of these matches. It
accepts the found matches, their corresponding 3D coordinates, and the camera settings as input.[13]
provide a flexible and quick approach for 3D reconstruction of multi-scale objects/scenes from
uncalibrated images/video captured by a moving camera with changeable parameters. The suggested
approach is based on incremental structure from motion and excellent bundle adjustment
exploitation. To begin, our system can recover the coordinates of a collection of 3D points from two
selected photos in a well-chosen reference.[14] introduces a full process for reconstructing and
modeling unknown complicated 3D scenes from unrestricted images. The suggested approach is
based on creating a nonlinear cost function by establishing the link between 2D points in pictures
and camera settings; optimization of this function by a genetic algorithm allows for the discovery of
the ideal camera parameters.[15] offer a novel self-calibration approach for cameras with variable
intrinsic characteristics, which can be calculated only from information included in the pictures
themselves. The method requires no prior knowledge of camera angles and is based on utilizing a
3D environment containing an unknown isosceles right triangle. The significance of our technique
lies in minimizing limitations on the self-calibration system and estimating these parameters with
only two photos.

3. Overview of known steganographic methods


This article analyzes steganographic methods for hiding data in images. The advantage of frequency
methods over spatial ones is shown. Based on frequency methods, an algorithm for hiding a JPEG
file in the spectral coefficients has been developed and presented, which ensures the complete
recovery of embedded data.

3.1. Basic Data Hiding Methods

The main property of the developed algorithm is resistance to various measures of influence, namely to
compression. Therefore, it is necessary to analyze known algorithms to select the appropriate method. Currently,
there is a wide variety of steganographic algorithms. Computer steganography methods are divided into three
main groups:
 Concealment methods based on the use of special properties of computer formats
 Methods of concealment in the spatial domain
 Concealment methods in the frequency domain

The advantage of the methods of the 1st group is the ease of use. Extension fields are available in many
multimedia formats; they are filled with zero information and are not taken into account by the program. But
such methods provide a low degree of secrecy and poor performance. The amount of transmitted data is quite
limited. Methods of the 2nd group are based on embedding hidden data in the primary image area. The
advantage of such forms is that complex mathematical operations and lengthy image transformations are not
required for embedding information. An example of the implementation of this approach is the LSB (Least
Significant Bit, least significant bit) method, the most common among replacement methods in the spatial
domain. The essence of this method is to replace the least important bits in the container (images, audio, or
video) with the bits of the hidden message. The difference between empty and filled containers should not be
perceptible to human perception. The disadvantage of the LSB method is its instability in processing the
container file, making it impossible to use it to hide data in a file that is subsequently compressed. Based on the
above, we can conclude that neither methods based on the use of special properties of file formats nor methods
that work in the spatial area of the file can be used to develop a hiding algorithm in the JPEG format. Therefore,
it is necessary to consider and analyze the concealment method in the frequency domain of the container [16,17].

3.2. JPEG format

For use in electronic media, non-animated grayscale and full-color photographs are usually saved in
PNG and JPEG digital formats. The advantages of these formats include cross-platform, the ability
to process in almost all graphic editors, and good image quality indicators. Due to the possibility of
lossy compression, JPEG images are smaller in size compared to similar ones saved in PNG format.
Therefore, using the JPEG format for saving and transmitting images is preferable [3]. The JPEG
compression process for a non-animated image is shown in Figure 1.

Figure 1. JPEG image compression process

The channel thinning stage is optional; it is omitted in the developed algorithm. The transition from
the RGB system to the YCrCb system is carried out according to the following relations:
Discrete-cosine transformation of the block is performed according to the following formula:

This algorithm assumes that N=M=8. For the inverse discrete cosine transform, the same C(u), C(v)
values and the following formula are used:

The quantization process plays a key role in JPEG compression. This is a process that removes the
high frequencies present in the original image - subsequently, high detail. This is done because the
eye is more sensitive to low frequencies than to high frequencies. Thus, high frequencies can be
removed with very little visual loss. This is done by dividing the amplitudes of the high-frequency
components by larger amounts than the magnitudes by which the lower frequency components are
divided. Quantization is simply the division of the working matrix by the quantization matrix
element by element[18,19]. For each component (Y, Cr, and Cb), its own quantization matrix is
specified in the general case. The JPEG standard sets the quantization matrices for the luminance
and color components for a compression ratio of 50%. For an arbitrary quality factor, each element
of the quantization matrices must be converted according to the following relations:
The embedding of the message into the watermark coefficients will be performed after the
quantization stage. Since the change in the color component of a pixel is less noticeable to the
human perception organs, the message will be hidden in the color channels of the image (Cr and
Cb).

3.3. Overview of steganographic methods in the frequency domain

As noted earlier, steganographic methods of hiding data in special fields of file formats and the
spatial area of the image are unstable to various types of distortions, in particular, compression.
More resistant to distortions, including compression, are methods that use the frequency domain of
the container to hide information since they work with already converted data channels. There are
several ways to represent an image in the frequency domain. This uses a certain decomposition of
the image used as a container. For example, there are methods based on the discrete cosine
transform (DCT), discrete Fourier transform (DFT), wavelet transform, Karhunen-Loev transform,
etc. Such transformations can be applied to individual parts of the image and the whole image.
Wavelet transforms and DCT is the most widespread among all orthogonal transformations in
steganography. This is due to the significant spread of their use in image compression. In addition,
to hide data, it is advisable to use exactly the transformation of the container to which it will be
subjected in case of possible compression. For example, the DCT algorithm is basic in the JPEG
standard, and wavelet transforms are in the JPEG2000 standard. One of the most well-known
steganographic methods is the Koch method and the Zhao method of relative replacement of the
values of the discrete cosine transform (DCT) coefficients. In this algorithm, watermark bits are
embedded into 8 x 8-pixel image blocks (1 bit per block). In this case, a monochrome image and a
certain sequence {0,1} consisting of an arbitrary number of numbers can be used as a message.
Another common steganographic method is the Friedrich method. Unlike the previous Koch and
Zhao algorithm, in which DCT is performed block by block, in Friedrich's algorithm, DCT occurs
for the entire protected image. The hidden message is the sequence {-1, 1}. According to the
algorithm, data is embedded in the image in two different ways, depending on whether the
concealment occurs in the DCT coefficients - in the mid-frequency or the low-frequency[20].

3.4. Choosing a Method for Algorithm Development

From the above analysis, we can conclude the advantages and disadvantages of various methods of
hiding data in images. Comparative characteristics of steganographic methods with respect to digital
images are shown in Table 1.
Method Flaws Advantages

1. Methods based on the – Low degree of secrecy; – Ease of use.


features of data
formats. – transmission of small
limited amounts of
information.

2. Methods in the spatial – Distortion of digital – Possibility of


domain. streams; – Instability to covert
container modifications, transmission of
in particular to a large amount
compression. of information.

3. Methods in the – Best results are – Resistant to


frequency domain. achieved with a low container
compression ratio. compression.

Table 1. Comparative characteristics of steganographic methods with respect to digital images

As can be seen from Table. 1, to implement the hiding algorithm in JPEG, only methods that work
in the frequency domain of the image can be taken as a basis, due to their resistance to compression.

4. The proposed approach


As indicated earlier, the algorithm for hiding information in the coefficients of spectral image
transformations must meet two criteria: resistance to compression and invisibility. The first property
is achieved by the fact that data is directly embedded into the quantized DCT coefficients, which
prevents information loss. Ensuring the second property is reduced to the problem of choosing DCT
coefficients for embedding message bits. Let's assume that the sender wants to send the q message
bit m ={m1,mq}T. The sender and receiver agree on a secret key, which creates a pseudo-random
binary matrix D with dimensions q x n, where n is the number of DCT coefficients. The set is the
pixel indices, in DCT coefficient values , in which the

message bits will be hidden.

The sender rounds the values resulting in a vector that satisfies the following
condition:
Thus, the sender needs to solve the system of linear equations in to receive the message
[9].

Decoding is the reverse operation. The recipient knows the binary matrix , composes a vector , and
performs the multiplication operation on .

The choice of pixels, and, accordingly, the DCT coefficients for data hiding, is reduced to setting the
threshold value B, according to which the coefficients will be selected: bit embedding will be
performed only in those coefficients whose value is higher than B. In each DCT block, two such
coefficients are selected.

5. Experimental study
As an experiment, a series of tests were conducted to study the program's operation for color images
of various sizes and hidden messages of various lengths. Experiment 1: the original image is in
color, and its size is fixed. It is necessary to investigate the dependence of the PSNR estimate on the
compression quality factor for the same message length. PSNR is most commonly used to measure
the level of distortion in image compression. The formula determines PSNR:

where MAXI is the maximum value taken by the image pixel (with a bit depth of 8 bits MAXI =255

, and MSE is the root mean square error for images I and K of size m x n , calculated by the
formula:

The results of the study are shown in fig. 2. The areas on the x-axis correspond to the compression
ratios, the values of the y-axis correspond to the PSNR values.

Figure 2. Results of experiment 1


As you can see from the graph, there is a direct relationship between the compression ratio and the
PSNR score. The best results were achieved using a ratio above 80%, and the worst - at 20% - 40%.

Experiment 2: the original image is in color, and its size is fixed. It is necessary to investigate the
PSNR estimate's dependence on the embedded message's length for a fixed compression quality
factor. In the experiment, a compression ratio of 80% was chosen. The results of the study are
shown in Figure 22. The areas on the x-axis correspond to the message lengths in symbols, and the
values of the y-axis correspond to the PSNR values.

Figure 3. Results of experiment 2

As can be seen from the graph, there is an inverse relationship between the message length and the
PSNR score value. When embedding a small message (up to 30 characters), the best score is
achieved, and the worst - starts from 70 characters. To determine the accuracy of data extraction, the
BER criterion was used - the bit error probability, which shows the ratio of the number of bit errors
to the number of transmitted bits. The implemented algorithm provides 100% accuracy in data
extraction. The BER score is 0% in all cases. In cases where the message size exceeds the maximum
allowable value, calculating the BER is an incorrect task since the sizes of the original and extracted
strings do not match. Therefore, such cases were not considered during the experiment. Also, when
evaluating the algorithm, it is necessary to evaluate the visual criterion for the invisibility of
message transmission. Figures 4–6 show the images obtained by hiding the same message but with
different degrees of compression. As can be seen from the figures, at a compression ratio below
60%, message-hiding artifacts are visible.
Figure 4. Image with 20% aspect ratio

Figure 5. Image with 60% compression ratio

Figure 6. Image with 80% aspect ratio

Conclusion

The article presents the developed algorithm for hiding information in the spectral coefficients of a
JPEG file. Studies were carried out on the criteria for the accuracy of data extraction and the
invisibility of the transmitted message, which showed that the developed algorithm provides
complete recovery of hidden information. In the future, it plans to adapt the algorithm for audio
files, particularly MP3 files.
Reference
[1] Li Y, Hua N, Li J, Zhong Z, Li S, Zhao C, Xue X, Zheng X Optical spectrum feature analysis
and recognition for optical network security with machine learning. Optics express. 2019

[2] Touil H, El Akkad N, Satori K Text Encryption: Hybrid cryptographic method using Vigenere
and Hill Ciphers. In: 2020 International Conference on Intelligent Systems and Computer Vision
(ISCV), Fez, Morocco, pp. 1–6; 2020.

[3] Wang C, Ma B, Xia Z, Li J, Li Q, Liu X, Sang S Geometric resistant polar quaternion discrete
Fourier transform and its application in color image zero-hiding. ISA transactions. 2021

[4] Eze PU, Parampalli U, Evans RJ, Liu D Spread Spectrum Steganographic Capacity Improvement
for Medical Image Security in Teleradiology. Annual International Conference of the IEEE
Engineering in Medicine and Biology Society. IEEE Engineering in Medicine and Biology Society.
Annual International Conference. 2018

[5] Touil H, El Akkad N, Satori K; Securing the Storage of Passwords Based on the MD5 HASH
Transformation; International Conference on Digital Technologies and Applications; 2021

[6] Eze P, Parampalli U, Evans R, Liu D A New Evaluation Method for Medical Image Information
Hiding Techniques. Annual International Conference of the IEEE Engineering in Medicine and
Biology Society. IEEE Engineering in Medicine and Biology Society. Annual International
Conference. 2020

[7] Touil, H., El Akkad, N., Satori, K. Secure and guarantee QoS in a video sequence: A new
approach based on TLS protocol to secure data and RTP to ensure real-time exchanges. International
Journal of Safety and Security Engineering, Vol. 11, No. 1, pp. 59-68; 2021.

[8] Touil H, El Akkad N, Satori K; H-Rotation: Secure storage and retrieval of passphrases on the
authentication process. Int J Safety Security Eng 10(6):785–796 2020

[9] Wang B, Xie Y, Zhou S, Zhou C, Zheng X Reversible Data Hiding Based on DNA Computing.
Computational intelligence and neuroscience. 2017

[10] Li Y, Hua N, Li J, Zhong Z, Li S, Zhao C, Xue X, Zheng X Optical spectrum feature analysis
and recognition for optical network security with machine learning. Optics express. 2019

[11]El akkad N, El Hazzat S, Saaidi A and Satori K (2016). Reconstruction of 3D Scenes by Camera
Self-Calibration and Using Genetic Algorithms. 3D Research, 6 (7): 1-17.
[12] S. El hazzat, M. Merras, N. El akkad, A. Saaidi and K. Satori. Enhancement of sparse 3D
reconstruction using a modified match propagation based on particle swarm optimization.
Multimedia Tools and Applications (Springer), 78, pages14251–14276, 2019.
[13] El Hazzat, S., Merras, M., El Akkad, N., Saaidi, A., Satori, K. 3D reconstruction system based
on incremental structure from motion using a camera with varying parameters (2018) Visual
Computer, 34 (10), pp. 1443-1460.

[14] Merras, M., Saaidi, A., El Akkad, N., Satori, K. Multi-view 3D reconstruction and modeling of
the unknown 3D scenes using genetic algorithms (2018) Soft Computing, 22 (19), pp. 6271-6289.
[15] Boudine, B., Kramm, S., Akkad, N.E., Bensrhair, A., Saaidi, A., Satori, K. A flexible technique
based on fundamental matrix for camera self-calibration with variable intrinsic parameters from two
views (2016) Journal of Visual Communication and Image Representation, 39, pp. 40-50.

[16] Al-Dmour H, Al-Ani A, Nguyen H An efficient steganography method for hiding patient
confidential information. Annual International Conference of the IEEE Engineering in Medicine and
Biology Society. IEEE Engineering in Medicine and Biology Society. Annual International
Conference. 2014
[17]Al-Dmour H, Al-Ani A Quality optimized medical image information hiding algorithm that
employs edge detection and data coding. Computer methods and programs in biomedicine. 2016

[18] Abuadbba A, Khalil I Walsh-Hadamard-Based 3-D Steganography for Protecting Sensitive


Information in Point-of-Care. IEEE transactions on bio-medical engineering. 2016

[19] Eze PU, Parampalli U, Evans RJ, Liu D Spread Spectrum Steganographic Capacity
Improvement for Medical Image Security in Teleradiology. Annual International Conference of the
IEEE Engineering in Medicine and Biology Society. IEEE Engineering in Medicine and Biology
Society. Annual International Conference. 2018

[20] Jain M, Lenka SK Diagonal queue medical image steganography with Rabin cryptosystem.
Brain informatics. 2016
[21] Wojtuń J, Piotrowski Z Synchronization of Acoustic Signals for Steganographic Transmission.
Sensors (Basel, Switzerland). 2021

You might also like