Abstract
Information hiding is a crucial technology in the field of information security. Embedding capacity and stego-image quality are two key performance metrics in information hiding. In recent years, many information-hiding methods have been proposed to enhance embedding capacity and stego-image quality. However, through the study of these methods, we found that there is still room for improvement in terms of performance. This paper proposes a high-capacity information-hiding method based on a chunking matrix (CM). CM divides a 256×256 matrix into blocks, where each block contains k×k corresponding secret numbers. A pair of pixels is extracted from the original image and used as the coordinates for the matrix. In the search domain at that coordinate position, the corresponding secret number is found, and the matrix coordinates of the secret information are used as the pixel value for the stego-image. This paper evaluates the security and effectiveness of CM through measures such as embedding capacity, peak signal-to-noise ratio (PSNR), and bit-plane analysis. CM achieves a maximum embedding capacity of 4.806 bits per pixel (bpp) and maintains a PSNR value of more than 30 dB. Furthermore, the bit-plane analysis fails to detect the presence of the information hidden using CM method.
Introduction
With the rapid development of the Internet, more and more people enjoy the convenience brought by information technology but also suffer the threat of information leakage and network attacks. Hence, security [27, 28] is getting high attention. In the field of information security [1], cryptography [2–4], and information hiding method [5–8] are effective tools for protecting private information. However, the encrypted secret information appears scrambled and meaningless. This easily raises suspicion among attackers who may attempt to disrupt it. In contrast, information-hiding methods embed secret information in media files such as text, images, audio, and video, while leaving the original media file little changed. This protects the confidentiality of the information and achieves imperceptible transmission.
Information hiding involves embedding confidential data within daily media without arousing suspicion or attacks from third parties other than the communicating parties. It finds applications in various fields where communication security is paramount, including the domains of digital copyright protection, cybersecurity, healthcare, and the military. Information hiding plays a crucial role in enhancing data security, privacy protection, and content authentication across these diverse areas of application.
This paper uses images as carriers to embed secret information. Information hiding methods for digital images can be divided into two main categories: the spatial domain and the frequency domain. In frequency domain-based hiding methods, pixels are transformed into frequency coefficients through various discrete transform functions such as Discrete Fourier Transform (DFT) [9] and Discrete Cosine Transform (DCT) [10], and these coefficients are modified to embed secret information. Frequency domain-based hiding methods exhibit strong resistance against attacks but have a relatively low embedding capacity. In spatial domain-based hiding methods, the pixel values of an image are directly modified to embed secret information. Spatial domain information hiding is a digital image processing technique designed to embed secret information into the pixel values of digital images, aiming to achieve information concealment and protection. The primary objective of this technology is to hide data within an image without causing perceptible degradation in image quality, while ensuring that the hidden data can be extracted when needed.The spatial domain-based hiding method is easy to implement and has a high embedding capacity. In the spatial domain, after extracting the embedded secret information, information hiding can be classified into reversible information hiding [11] and irreversible information hiding [12], depending on whether the cover image can be recovered or not. In reversible information hiding, the cover image can be recovered without distortion. This method is suitable for image-sensitive fields, such as healthcare and military domains. Irreversible information hiding is a branch of digital steganography that differs from reversible information hiding. It introduces some form of irreversible transformation or loss to embed secret information into the carrier data. Unlike reversible information hiding, irreversible information hiding does not guarantee the complete restoration of the original data during data extraction, as it typically involves a certain degree of information loss, but it allows for higher information embedding capacity and ease of implementation.
This paper studies irreversible data hiding. In the past decades, many irreversible data hiding methods have been proposed. The methods can be divided into three categories, LSB-based, PVD-based, and EMD-based. Firstly, least significant bit (LSB)-based method [13], which involves embedding secret information by modifying the least significant bit of pixels, is the simplest and most well-known method. LSB is simple to implement, but the generated stego-images can be suspicious or easily detected. Mielikainen’s LSB matching revisited method [14] overcomes the shortcomings of LSB replacement and is resistant to steganographic attacks. However, it does not improve the embedding capability. Its embedding rate is 1 bpp. In 2018, in order to improve the capacity of hidden secret data, Wang et al. [15] proposed a steganographic method based on a combination of LSB and EMD, which achieves an embedding rate of 2 bpp. Pixel-Value Differencing(PVD) -based method [16, 17] divides the grayscale image into non-overlapping blocks, with each block consisting of two pixels. The secret information is embedded within the difference between the two pixel values. The last type is exploiting modified direction (EMD) based method. The method embeds secret information by modifying one pixel value within a group of grayscale image pixels using a specific equation or modular function. it has the characteristics of a small change in cover pixel value and high information hiding ability. In 2006, Zhang et al. [18] proposed EMD by making full use of the modulus function to change the directional characteristics. The EMD method uses a function to embed secret data transformed in the (2n + 1)-ary notational system in n cover pixels. EMD can achieve the maximum embedding payload of 1.16 bpp. To enhance the embedding capacity, many improved EMD-based methods have been proposed. In 2007, Lee et al. [19] proposed an improved EMD method (LWC) which increased the embedding capacity to 1.5 bpp. In 2009, Jung et al. [20] proposed an improved method based on EMD, which used one pixel to carry a secret digit in (2n + 1)-ary notational system and achieved a maximum embedding rate of 2 bpp. In 2012, Kuo et al. [21] proposed a novel data hiding method based on Generalized exploiting modification direction (GEMD). This method is a generalized version of LWC. In 2019, Sairam et al. [22] proposed SB algorithm to carry secret data using other notational systems. The maximum embedding payload of this method is 4 bpp.
Through the study and analysis of the above literature, we found that there is still room for improvement in its embedding capacity and stego-image quality. To improve the embedding capability, we propose a high-capacity embedding method based on a chunking matrix while still generating images with acceptable steganographic image quality (PSNR > 30 dB). The contributions and innovations of CM are as follows: CM is designed and implemented by using a chunking matrix. With the method, the embedding capacity can reach 4.806 bpp while the quality of stego-image is still acceptable (PSNR > 30); The performance and security of CM are proved by embedding capacity, image quality, and steganalysis experiments; To make it easier for other scholars to verify the work, we have uploaded all the code and other materials at https://github.com/zhangju85/CM.git.
The rest of the paper is organized as follows. Methods of related works from FEMD, RGEMD, SB, SPM, and MPM are described in Section 2. The new method (CM) is introduced and the example is given in Section 3. Section 4 provides the experimental details and experimental results of CM. The conclusion and major contributions are highlighted in Section 5.
Some information hiding schemes
After introducing the categories of information hiding, we will provide a brief review of some irreversible spatial domain information hiding algorithms to gain a general understanding of the embedding and extraction processes. Following familiarization with these algorithms’ embedding and extraction procedures, we will proceed to compare their performance with the algorithm proposed in this paper.
FEMD
In 2011, a data hiding method based on FEMD was proposed by The Duc Kieu and Chin-Chen Chang [23]. The method embeds k secret bits of a binary secret message into a cover pixel pair of the grayscale cover image. The payload of FEMD is k/2, up to 4.5 bpp when k = 9. The algorithm is as follows.
The inputs of FEMD are cover pixels (x i ,x i +1), M = (m1,m2 . . . m k ), and parameter s, where 2≤s≤23. The output is a stego-pixel pair (y i ,y i +1).
Step1: Generate the matrix S sized 256×256 by using the proposed extraction function F defined by Equations (1).
Step2: Compute k =⌊ log 2s2 ⌋ , r = ⌊ s / - 2 ⌋. Read the next k secret bits (m1,m2 . . . m k ) from M and convert them into the decimal number d.
Step3: Embed the secret data into cover-pixels as follows.
If d = S[x i ] [x i +1]
(y i ,y i +1) = (x i ,x i +1);
Else
Search from the searching square W (2 ×r +1) ×(2 ×r +1) (s,(x i ,x i +1),r) to find out the element S[p][q] = d,
(y i ,y i +1) = (p,q).
Step4: Calculate d = F(y i ,y i +1) to get the secret data.
In 2018, Chun-Cheng Wang et al. [15] proposed RGEMD method based on a combination of LSB and GEMD, which achieves an embedding rate of 2 bpp. The details of RGEMD are as follows.
The inputs of RGEMD are n cover pixels G(g1,g2, . . . ,g n ) and secret message S(2n). The output is stego-pixel G′ (g′1, g′2, …, g′ n ). s i refer to the first (n + 1) bits of s. si +1 refer to the next (n–1) bits of s.
Step1: Compute f GEMD by Equations (2) and compute d = (s i –f GEMD ) mod 2 n +1.
Step2: Embed secret digit s i in cover-image. The rules for modifying pixels are as follows:
If d = 0,
If d = 2
n
,
If 0 < d < 2 n , transform d to (b n , bn-1, …, b2) 2.
For i = n to 1 do
If b
i
= 0 & b
i
–1 = 1,
If b
i
= 1 & b
i
–1 = 0,
Else
If d > 2 n , d′ = 2n+1 - d, transform d′ to (b n , bn-1, …, b2) 2.
For i = n to 1 do
If b
i
= 0 & b
i
–1 = 1,
If b
i
= 1 & b
i
–1 = 0,
Else
Step3: Embed secret digit si +1 in cover-image. The rules for modifying pixels are as follows:
Transform si+1 = (b′n-2, b′n-3, …, b′0).
For i = n–2 to 0 do
If
If
Else
Step4: Calculate LSB (g′ i ) and f GEMD (g′1, g′2, …, g′ n ) to get the secret data.
In 2019, T. D. Sairam et al. [22] proposed a data hiding method SB based on EMD, it can not only improve the embedding capacity but also maintain good quality of stego-images. SB method uses k2-ary notational system and can achieve an embedding rate of 4 bpp and also maintain the good visual quality. More detailed steps are shown below.
The inputs of SB are cover pixel G (g1, g2, …, g n ) and k2-ary notational system digit S(k2) which is transformed from k binary bit secret data. The output is stego-pixels G′ (g′1, g′2, …, g′ n ).
Step1: For cover pixel G(g) and for secret digit S(k2). x is selected satisfying the condition -⌊ n2/ - 2 ⌋ ⩽ x ⩽ ⌊ n2/ - 2 ⌋ and f = (g + x) mod k2.
If f = d
g′ = g + x.
Step2: Calculate S (k2) = g′mod k2 mod n2 to get the secret data.
SPM
In 2022, Wang et al. [24] proposed SPM method, which embeds k secret bits into a cover-pixel and minimizes the change to cover-pixel. SPM method achieves an embedding rate of 4 bpp and also maintains the good visual quality. More detailed steps are shown below.
The inputs of SPM are cover pixel G (g1, g2, …, g n ) and k2-ary notational system digit d which is transformed from k binary bit secret data. The output is stego-pixels G′ (g′1, g′2, …, g′ n ).
Step1: Embed secret digit d into a cover pixel g by following algorithm.
For x ∈ [- [2 n / - 2] , [2 n / - 2]]
f = (g + x) mod 2 n
If f = d
g′ = g + x.
Step2: Secret digit d can be extracted by d = g′mod 2 n .
MPM
In 2022, Zhang et al. [25] proposed MPM, a method for modulo computation using a optimization problem. The main idea of MPM is to embed confidential bits into cover image pixels while minimizing modification to original pixels. The embedding payload of this method is up to 4.3 bpp. The details of MPM are shown as follows.
The inputs of MPM are n adjacent pixels G (g1, g2, …, g n ) and decimal data d which is transformed from nk + 1 binary bit secret data. The output is n stego-pixels G′ (g′1, g′2, …, g′ n ).
Step1: Find one cover pixel with a specified index by g h = q mod n, where q be the index of the pixel group.
Step2: Transform the confidential binary bits (b nk bnk-1 … b1b0) 2, b i ∈ (0, 1), into decimal value d = 22kb2k + 22k-1b2k-1 + … + 21b1 + 20b0. Similarly, transform (b k bk-1 … b1b0) 2 into d0, (b(y+1)k … byk+2byk+1) 2 into decimal d y , y ∈ [1, n - 1].
Step3: Find x
h
in optimization problem(3)
Embed information in stego-pixel using
Step4: Find x
i
by solving the optimization problem (4).
Embed information in stego-pixel using
Step5: Calculate
The embedding progress
Inspired by some works of literature [1, 22–25], we propose the use of a chunking matrix for embedding secret information into cover images. CM method can not only improve the embedding capacity but also maintain good quality of stego-images. The maximum embedding rate is 4.806 bpp while the PSNR of stego-image is maintained more than 30 dB. CM method embed a k2-ary notational system digit s into a cover pixel pair (x i ,x i +1) of the grayscale cover image X sized H×W at a time, where i∈ { 1, 3, …, H × W - 1 }, to obtain a stego-pixel pair (y i ,y i +1) of the grayscale stego-image Y. The embedding process is as follows. Figure 1 shows a flowchart of the proposed algorithm for the embedding process.

The flowchart of CM for the data embedding process.
Input: The grayscale cover image X sized H×W and the binary secret message.
Output: The grayscale cover image Y sized H×W.
Step1: Construct a 256×256 matrix M according to the following rules:
1. Divide the matrix M into non-overlapping blocks of size k×k.
2. Assign consecutive values from 0 to k2–1 to each row and column of every block.
For k = 3 and k = 4, the partial matrices are illustrated in Fig. 2.

Some mapping matrices M for various values of k.
Step2: Convert all binary secret information into a series of decimal digits, and then convert the decimal digits into k2-ary digits (d1, d2, …, d m ) k 2 , m < i.
Step3: Divide the pixels of the cover image into non-overlapping pixel pairs (x i ,x i +1), where x i corresponds to the x-axis of the matrix M, and x i +1 corresponds to the y-axis of the matrix M.
Step4: Define the searching area as a k×k square block around each pixel value. When k is odd, the searching area of M(x i ,x i +1) is denoted as M(x i -⌊k /- 2⌋⩽x i ⩽x i +⌊k /- 2⌋,xi+1-⌊k /- 2⌋⩽y i ⩽xi+1+⌊k /- 2⌋). When k is even, the searching area of M(x i ,x i +1) is denoted as M(x i -⌊k /- 2⌋⩽x i ⩽x i +⌊k /- 2⌋-1,xi+1-⌊k /- 2⌋⩽y i ⩽xi+1+⌊k /- 2⌋-1). For example, when k = 3, the searching area of M(4,5) is M(3⩽x i ⩽5,4⩽y i ⩽6) = {M (3, 4) , M (3, 5) , M (3, 6) , M (3, 4) , M (4, 4) , M (4, 5) , M (4, 6) , M (5, 4) , M (5, 5) , M (5, 6)}. when k = 4, the searching area of M(4,5) is M(2⩽x i ⩽5,3⩽y i ⩽6) = {M (2, 3) , M (2, 4) , M (2, 6) , M (3, 3) , M (3, 4) , M (3, 5) , M (3, 6) , M (4, 3) , M (4, 4) , M (4, 5) , M (4, 6) , M (5, 3) , M (5, 4) , M (5, 5) , M (5, 6)}.
Step5: Read the k2-ary digits d i , and embed d i into each pixel pair (x i ,x i +1) of the cover image according to the following rules:
For i = 1 to m do
If M(x i ,x i +1) = d i
(y i ,y i +1) = (x i ,x i +1);
If M(x i ,x i +1)≠ d i
Search within the searching area for values that satisfy M(p,q) = d i ,
(y i ,y i +1) = (p,q);
End.
End.
According to the embedding method, the secret data is embedded in the cover image to get the stego-image. Stego-image is transmitted from the sender to the receiver. The receiver extracts the secret information from the stego-image by the following extraction algorithm.
Input: The grayscale cover image Y sized H×W.
Output: The binary secret message
Step1: Construct a 256×256 matrix M according to the embedding rules mentioned above.
Step2: Divide the pixels of the stego-image into non-overlapping pixel pairs (y i ,y i +1), where y i corresponds to the x-axis of the matrix M, and y i +1 corresponds to the y-axis of the matrix M.
Step3: Use d = M(y i ,y i +1) to obtain the secret digits, and convert them into binary secret messages.
In order to illustrate the steps of the CM method more clearly. Figure 3 shows a simple example:

Example of the CM method.
During the process of embedding secret information, the embedding operation may lead to pixel value overflow. When embedding the secret information into an image, if proper handling is not performed, it can result in pixel values exceeding their representation range, causing significant changes in the image and making the hidden information visible. Therefore, to address this issue, the following overflow prevention measures are implemented in the proposed method:
Case1: if x ∈ [0, ⌊ k/ - 2 ⌋) , x = x + 1 where x∈ { x i , xi+1 };
Case2: if x ∈ (255 - ⌊ k / - 2 ⌋ , 255] , x = x - 1 where x∈ { x i , xi+1 }.
Experimental results and discussion
In this section, the experiments are carried out to evaluate the performance of the proposed method. Our proposed method and other referenced methods are implemented in Python and run in a PC with an Intel i7-10700 CPU @ 2.90 GHz and 16-GB RAM. The operating system is Windows 10 Professional 64-bit. The images used for the experiments are a series of grayscale images of standard size 512×512 (Airplane, Baboon, Barbara, Boat, House, Lena, Peppers, and Tiffany) [26], which are shown in Fig. 4.

Eight 512 * 512 grayscale images (Airplane, Baboon, Barbara, Boat, House, Lena, Peppers, and Tiffany).
The performance of method in this paper includes embedding capacity, quality of stego-image, and steganalysis.
The embedding capacity is defined as the number of secret bits that can be embedded per pixel (bpp). The formula for embedding capacity is defined as follows:
A larger value of bpp represents that the scheme has better embedding performance, that is, a pixel in the cover image can carry more confidential data. On the contrary, a smaller value of bpp means a lower embedding capacity. In Table 1, it shows the characteristics of the embedding methods, including the Number of pixels, embedding bits, and embedding capacity (bpp). In this table, n is the number of pixels in a group and k is used to adjust the degree of secret data embedding. For CM method, n = 2, k = 2, 3, 4, …, 27, 28 in experiments.
Six methods’ embedding capacity
The number of pixels in a group is different for each data-hiding method. There are 2,n,1,1,n,2 adjacent pixels in a group of FEMD, RGEMD, SB, SPM, MPM, and CM, respectively. FEMD, RGEMD, SB, SPM, MPM and CM can embed ⌊ log 2k2 ⌋ , 2n, k, k, nk + 1, and log2 k2 bits. And then, the specific payload of the above algorithm is shown in Table 1.
We calculate their specific values and express them in Fig. 5. In Fig. 5, it can be observed that the bpp of the algorithms tends to increase as k increases. And we can find that the CM algorithm can achieve a maximum embedding capacity of 4.806 bpp.

Compare six algorithms’ payloads.
Peak Signal-to-Noise Ratio(PSNR) is commonly used in the field of information security to assess the quality of an image and to measure the degree of difference between the original image and the processed image. PSNR is calculated using the following formula:
Where M and N represent the length and width of the image, g(x,y) and g′ (x, y) represent the cover pixel value and the stego-pixel value. PSNR is measured in dB. A higher PSNR value indicates better reconstruction quality of an image and a smaller disparity between the processed image and the original image. Typically, a PSNR value exceeding 40dB is considered excellent in terms of image quality, while a value above 30dB is regarded as good. When the PSNR value is above 30dB, the hidden secret information within the stego-image is imperceptible to the human visual system.
In order to compare and analyze the comprehensive performance of the proposed algorithm, we compared CM with five other algorithms. In this experiment, the embedded secret data consisted of randomly generated bit streams generated by a random number generator. The number of secret data(NSD) is set as 30720 bits and 184,320 bits, respectively. The stego-image of Lena which is embedded with 30720 bits of secret digits is shown in Fig. 6 and the stego-image of House with 184320 bits of secret data is shown in Fig. 7.

512×512 stego-images of Lena when NSD = 30720 bits.

512×512 stego-images of House when NSD = 184320 bits.
When NSD = 30720 bits, the PSNR, average PSNR and used pixels of the six algorithms are shown in Table 2. For methods such as FEMD, SB, SPM, MPM and CM, a lower value of k uses more pixels for embedding secret information and has a lower embedding capacity but has a higher PSNR value. In contrast, a higher value of k results in a higher embedding capacity but a lower PSNR value. When k = 4, the CM method requires the use of 15360 pixels (PSNR = 46.39). However, when k = 28, only 6392 pixels are needed to embed the secret information (PSNR = 30.02). When the same number of pixels (15360, 12288, 10240) are used to embed secret information, the CM method exhibits higher PSNR values compared to other methods (RGEMD, SB, SPM, MPM). Moreover, when k = 23, the CM method uses fewer pixels to embed secret information, yet it achieves a higher PSNR compared to the FEMD method (used pixel: 6828 (FEMD) > 6792 (CM), PSNR: 31.68 (FEMD) < 31.7 (CM)). From Table 2, it can be observed that CM uses the minimum number of pixels (6392) to embed 30720 bits of secret information and has a better stego-image quality (PSNR = 30.02), indicating that CM can achieve the highest embedding capacity compared to the other five methods. For a more visual comparison, we plot Fig. 8. It is obvious that CM has a better overall performance in terms of PSNR and embedded capacity.

Compare PSNR of stego-image when NSD = 30720 bits.
The results of comparison when NSD = 30720
When NSD = 184320 bits, the PSNR, average PSNR, and used pixels of the six algorithms are shown in Table 3. When the same number of pixels (61440, 92160) is used for embedding secret information, CM demonstrates a higher PSNR value compared to other methods (RGEMD, SB, SPM, MPM). When k = 23, CM utilizes fewer pixels to embed secret information, with a PSNR value that differs from FEMD by only 0.01 (used pixels: 40960 (FEMD) > 40748 (CM), PSNR: 31.69 (FEMD) > 31.68 (CM)). When k = 25, CM uses 39692 pixels to embed secret information, but its PSNR is 0.13 higher than MPM with k = 4 (used pixels: 40960). A comparison of the performance of several methods can be observed more visually in Fig. 9.
The results of comparison when NSD = 184320

Compare PSNR of stego-image when NSD = 184320 bits.
In summary, CM does better when both embedding capaccity and stego-image quality are considered. The results are shown in Table 2 and Table 3.
Steganalysis is also an important metric for evaluating the security performance of information hiding algorithms. Based on different information hiding algorithms, researchers have also proposed different information hiding analysis algorithms. Information hiding analysis algorithms can detect the presence of secret data in an image and may even roughly extract the secret information.
Bit-plane analysis is one of the information hiding analysis algorithms. Bit-plane analysis represents each pixel value of an image in binary form and groups the binary bits of each pixel according to their level of importance. The distribution and variation of pixels on different bit planes are analysed to reveal features and hidden information about the image. Therefore, we apply this analysis method to further demonstrate the security of the CM method. In this section, we conducted bit-plane analysis experiments on the cover image Lena and the stego images embedded with 30720 bits and 184320 bits of hidden data.
By comparing Fig. 10, Fig. 11, and Fig. 12, it can be observed that there is no significant difference between the bit planes of the original image and the cover image after the bit-plane analysis. This indicates that an attacker cannot extract the hidden data through bit-plane analysis, demonstrating that CM ensures the security of information hiding.

Bit-plane analysis for cover image. (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.

Bit-plane analysis for our method (NSD = 30720). (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.

Bit-plane analysis for our method (NSD = 184320). (a) 0th bit. (b) 1th bit. (c) 2th bit. (d) 3th bit. (e) 4th bit. (f) 5th bit. (g) 6th bit. (h) 7th bit.
In this paper, a novel high-capacity information hiding algorithm CM based on chunking matrix is proposed. The main idea of this method is to divide the image into blocks, where each block represents a piece of secret information. The coordinates of a pair of pixelsfrom the original image are used as the row and column indices in the matrix.Within the search domain at that position, the algorithm searches for the secret information to be hidden and assigns the values of the coordinates at that position as the values of pixels in the stego image. From the above experiments, it can be concluded that CM exhibits advantages such as ease of extraction, high embedding capacity, good stego-image quality, and high security. We have uploaded all our code and data on https://github.com/zhangju85/CM.git. If any researcher is interested in the CM algorithm, please download it and conduct further experiments. Through this approach, we aim to foster the development of more innovative and effective information hiding methods.
