A digital image steganography method, system and device fusing multi-dimensional encryption

By combining magic matrix block scrambling and multi-level encryption algorithms with differential value calculation, a digital image steganography method is developed, which solves the problems of insufficient security and limited capacity in existing technologies. This method achieves high-security and high-capacity digital image steganography, improving anti-attack capabilities and image quality.

CN122372684APending Publication Date: 2026-07-10CHANGZHOU TEXTILE GARMENT INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGZHOU TEXTILE GARMENT INST
Filing Date
2026-03-25
Publication Date
2026-07-10

Smart Images

  • Figure CN122372684A_ABST
    Figure CN122372684A_ABST
Patent Text Reader

Abstract

This invention discloses a digital image steganography method, system, and device integrating multi-dimensional encryption. The method includes: S1, acquiring a preprocessed image and decomposing it into multiple channels; S2, channel block division and magic matrix scrambling; S3, converting secret information into a binary stream, calculating the difference value with the pixel binary stream of the red channel; encrypting the difference value to obtain ciphertext, and replacing the binary bits of the ciphertext bit by bit in the low-order bits of each pixel in the scrambled blue channel sub-block; S4, performing reverse scrambling on the blue channel sub-block, reconstructing the red channel, green channel, and the reverse scrambled blue channel, and performing inverse inversion and inverse flipping on the recovered RGB image to generate a steganographic image and output it. This invention solves the problems of insufficient security and limited capacity of traditional image steganography by introducing a triple security mechanism of magic matrix block scrambling, multi-level encryption algorithm, and difference value calculation, significantly improving security and practicality while maintaining high image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of information security and digital image processing technology, specifically to a digital image steganography method, system, and device that integrates multi-dimensional encryption. The digital image steganography method is based on least significant bit (LSB) replacement combined with magic matrix and multi-level encryption algorithms, and is suitable for the covert transmission and secure storage of sensitive information. Background Technology

[0002] Digital image steganography is an important branch of information hiding. Its core idea is to embed secret information imperceptibly into publicly available digital image carriers, thereby achieving covert communication or secure storage. Unlike encryption, steganography not only protects the information content itself but also emphasizes concealing the existence of the "communication behavior," meaning that third parties cannot easily detect whether the carrier contains additional information. With the popularization of network communication and multimedia technologies, digital image steganography has wide-ranging application needs in scenarios such as military communication, digital rights protection, e-government, secure transmission of medical images, and covert data exchange in smart terminals. Especially against the backdrop of increasingly severe information security situations, developing an efficient steganography method that balances high capacity, high security, and good image quality has become a core issue of continuous focus in this field.

[0003] The current mainstream digital image steganography methods are mainly divided into two categories: spatial domain methods and transform domain methods. (1) Spatial domain steganography methods: represented by least significant bit (LSB) replacement, which embeds secret information by directly modifying the lowest few bits of the image pixel value. Its variants include LSB matching, pseudo-random sequence embedding, etc., which aim to improve statistical invisibility. This type of method is simple to implement, has high computational efficiency, and has a large embedding capacity. (2) Transform domain steganography methods: using discrete cosine transform (DCT), discrete wavelet transform (DWT), etc. to transform the image to the frequency domain, embed information in the transform coefficients, and then recover the carrier image through inverse transform. Typical techniques include JSteg, F5 algorithm, and subband coding based on DWT. This type of method can usually better resist common image processing operations such as compression and filtering, and is superior to traditional spatial domain methods in terms of robustness.

[0004] However, the two major categories of steganography methods mentioned above have at least the following problems in practical applications: insufficient security: conventional LSB methods are easily detected by statistical analysis methods; contradiction between capacity and quality: high embedding capacity often leads to a significant decrease in image quality; weak resistance to attacks: poor resistance to image processing operations such as cropping and compression; low computational efficiency: complex encryption algorithms lead to excessively long processing time.

[0005] It is evident that existing technologies, such as simple LSB replacement and DWT / DCT transform domain methods, have significant trade-offs in security, capacity, and computational efficiency, and cannot simultaneously meet the needs of modern secure communication. Summary of the Invention

[0006] To address the aforementioned problems, the purpose of this invention is to propose a digital image steganography method, system, and device that integrates multi-dimensional encryption. By introducing magic matrix block scrambling, multi-level encryption algorithms, and related differential value calculations, a triple security mechanism is formed, solving the technical problems of insufficient security and limited capacity in traditional image steganography technology. While maintaining high image quality, it significantly improves the security and practicality of steganography technology.

[0007] This was achieved through the following technical solutions: First, a digital image steganography method integrating multi-dimensional encryption is proposed, including the following steps: S1. Embedding preprocessing: Obtain the original carrier image, secret information and key, perform flip operation and transpose operation on the original carrier image in sequence to obtain the preprocessed image, and then decompose the preprocessed image into red channel, green channel and blue channel; S2, Blue Channel Blocking and Magic Matrix Randomization: The blue channel is divided into multiple equal-sized sub-blocks, a magic matrix is ​​generated based on the key, and the pixels in each sub-block are randomly randomized using the magic matrix. S3. Secret Information Encryption and Dynamic Embedding: Convert the secret information into a binary stream, calculate the difference between the binary stream and the pixel binary stream of the red channel; then encrypt the difference value through a multi-level encryption algorithm to obtain ciphertext, and replace the binary bits of the ciphertext bit by bit in the low-order bits of each pixel in the disordered blue channel sub-block, while keeping the high-order bits of the pixels unchanged. S4. Embedding Post-processing and Output: Continue to perform the reverse scrambling operation on the blue channel sub-block, reassemble the red channel, green channel and the reverse scrambling blue channel to restore the RGB image, and perform the reverse inversion operation and reverse flip operation on the restored RGB image in sequence to generate a steganalyte image and output it.

[0008] Optionally, in step S2, the number of sub-blocks is four, and the magic matrix is ​​a 4×4 standard magic matrix.

[0009] Optionally, the random scrambling in step S2 includes: calculating a rearrangement index based on the element values ​​of the magic matrix, and sorting the pixels within each sub-block according to the rearrangement index. Using the element values ​​of the magic matrix as the basis for rearrangement ensures that the randomized order of pixels is deterministic and repeatable, guaranteeing synchronization between the embedding and extraction ends. Simultaneously, this sorting method based on a mathematical matrix completely destroys the correlation between the original pixels, significantly enhancing resistance to statistical analysis.

[0010] Optionally, the multi-level encryption algorithm in step S3 includes: First-level encryption: XOR the binary stream of the secret information with the key; Second-level encryption: Calculate the absolute value of the difference between the XOR operation result and the pixel binary stream of the red channel, and perform a modulo 256 operation on the absolute value to obtain the difference value; The third level of encryption involves a left circular shift operation on the difference value, swapping the first four bits and the last four bits of the 8-bit binary data of the difference value to generate the ciphertext. This three-level encryption ensures that the final ciphertext depends simultaneously on the key, the content of the carrier image itself, and the secret information, significantly improving resistance to known-plaintext and chosen-plaintext attacks. Furthermore, the introduction of the red channel as a difference factor binds the encryption process to the carrier image itself, further enhancing the concealment of the embedded information.

[0011] Optionally, the method also includes step S5, secret information embedding and extraction: Inputting the steganographic image and key, performing flip and transpose operations sequentially to decompose it into RGB channels and extract the blue and red channels; generating a magic matrix based on the same key, performing a reverse scrambling operation on each sub-block of the blue channel to restore the pixel order during embedding; extracting the binary stream from the low-order bits of each pixel in each sub-block after reverse scrambling, according to the key-controlled order, to obtain the ciphertext; decrypting the ciphertext using a multi-level encryption inverse algorithm to obtain the binary stream of the secret information; converting the binary stream of the secret information back into the original secret information and extracting it. An extraction process strictly symmetrical to the embedding process is constructed, ensuring that the original secret information can only be fully recovered with the correct key, achieving a secure closed loop for the method; simultaneously, the extraction process reuses parameters such as the magic matrix from the embedding stage, ensuring the accuracy and reliability of the extraction.

[0012] Optionally, the decryption process includes: First-level inverse operation: Right circular shift the ciphertext to restore the original bit order of the differential values; Second-level inverse operation: Based on the pixel binary stream and key of the red channel, recover the difference value from the right-circularly shifted ciphertext; The third-level inverse operation involves XORing the recovered difference value with the key to restore the binary stream of the secret information. The decryption process strictly corresponds to the reverse operation of the encryption process, ensuring the lossless and accurate restoration of the information.

[0013] Secondly, a digital image steganography system is proposed, which operates using the aforementioned digital image steganography method. The system includes: The preprocessing module is used to perform flip, transpose, and channel decomposition operations on the carrier image or steg image; The disorder management module is used to generate a magic matrix based on the key and perform pixel disorder or reverse disorder operation on the sub-blocks of the blue channel; The encryption and embedding module is used to calculate the difference between the secret information and the red channel, execute a multi-level encryption algorithm, and embed the generated ciphertext into the low-order bits of the blue channel pixels. The decryption and extraction module is used to extract the ciphertext from the low-order bits of the blue channel pixels and execute a multi-level encryption inverse algorithm to restore the secret information; The post-processing module performs reverse scrambling, channel reassembly, and inverse flipping operations on the blue channel after embedding information to generate a steganalytic image. In addition, an electronic device is proposed that operates using the digital image steganography method described above. The electronic device includes a processor and a memory. The memory stores program instructions for the digital image steganography method, and the processor executes the program instructions.

[0014] The beneficial effects of this invention compared to the prior art are: 1) Multi-technology integrated protection architecture: It organically combines LSB replacement with magic matrix scrambling, multi-level encryption algorithms, key control, image transposition, and flipping operations to build a multi-layer protection system of "preprocessing-encryption-dynamic embedding-reverse processing" to solve the problem of insufficient security of a single technology; 2) Adaptive embedding strategy: Based on the characteristics of RGB channels, the blue channel is selected as the embedding carrier. It is processed by dividing the data into 4 equal blocks. Each pixel can embed up to 4 bits of secret information, balancing the embedding capacity and image quality, and ensuring imperceptibility. 3) Dynamic encryption and random embedding mechanism: The secret information is encrypted by "circular shift + conditional XOR" through multi-level encryption algorithm. Combined with the key-controlled magic matrix block scrambling, the secret information is randomly embedded, which greatly improves the ability to resist statistical attacks. 4) Pixel-level quality optimization: Taking advantage of the fact that LSB bits have minimal impact on human vision, only the lower 4 bits of the pixel are modified, while the original information of the higher 4 bits is retained, ensuring that the structural similarity (SSIM) between the steganalysis image and the carrier image is close to 1; 5) Difference calculation-assisted encryption: The difference calculation between the secret information and the red channel is introduced to further hide the embedding traces and improve the anti-detection capability. Attached Figure Description

[0015] Figure 1 An embedding flowchart for a digital image steganography method that integrates multi-dimensional encryption; Figure 2 A flowchart for embedding and extracting secret information; Figure 3 This is a flowchart of a multi-level encryption algorithm; Figure 4 This is a flowchart of a blue channel block and out-of-order process. Detailed Implementation

[0016] The technical solutions in the embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0017] like Figure 1 The diagram shows an embedded flowchart of a digital image steganography method that integrates multi-dimensional encryption. By introducing magic matrix block scrambling, multi-level encryption algorithms, and related differential value calculations into digital image steganography, a triple security mechanism is formed, which solves the technical problems of insufficient security and limited capacity in traditional image steganography. While maintaining high image quality, it significantly improves the security and practicality of steganography.

[0018] The digital image steganography method specifically includes the following steps: S1. Embedding preprocessing: Obtain the original carrier image, secret information and key, perform flip and transpose operations on the original carrier image in sequence to obtain the preprocessed image, and then decompose the preprocessed image into red channel, green channel and blue channel.

[0019] S2. Blue Channel Segmentation and Magic Matrix Scrambling: The blue channel is divided into multiple equal-sized sub-blocks. A corresponding magic matrix (sometimes called a magic matrix) is generated based on the key. The magic matrix is ​​then used to randomly scramble the pixels within each sub-block, disrupting the pixel distribution order. The blue channel is chosen primarily based on the characteristics of the human visual system. The human eye is least sensitive to changes in blue, most sensitive to green, and then red. Therefore, embedding information in the blue channel causes minimal visual changes, and modifications to the blue channel have the least impact on overall image quality, thus maintaining the highest possible PSNR (Peak Signal-to-Noise Ratio, used to reflect image quality).

[0020] like Figure 4 The diagram illustrates a blue channel segmentation and disordering flowchart. When performing average segmentation, four sub-blocks can be used. The magic matrix is ​​a standard 4×4 magic matrix, where the sum of each row, each column, and both main diagonals is equal, totaling 34. Random disordering involves ensuring that each element in the magic matrix is ​​unique, representing the position index of each pixel within its corresponding sub-block. Therefore, a rearrangement index can be calculated based on the element values ​​of the magic matrix, and the pixels within each sub-block are sorted according to this index. By leveraging the unique mathematical properties of the standard magic matrix, the blue channel sub-blocks are non-linearly rearranged, breaking the spatial continuity of the secret information and enhancing resistance to statistical detection.

[0021] S3. Secret Information Encryption and Dynamic Embedding: Convert the secret information into a binary stream, calculate the difference between the binary stream and the pixel binary stream of the red channel; then encrypt the difference value through a multi-level encryption algorithm to obtain ciphertext, and replace the binary bits of the ciphertext bit by bit in the low-order bits of each pixel in the disordered blue channel sub-block, while keeping the high-order bits of the pixels unchanged, thus completing the dynamic embedding.

[0022] like Figure 3 The diagram shown is a flowchart of a multi-level encryption algorithm, combined with... Figure 3 As shown, the multi-level encryption algorithm includes: First-level encryption: key XOR, which is to perform an XOR operation between the binary stream of the secret information and the key; Second-level encryption: differential encryption, which calculates the absolute value of the difference between the XOR operation result and the pixel binary stream of the red channel, and performs a modulo 256 operation on the absolute value to obtain the difference value; The third level of encryption involves performing a left circular shift operation on the difference value, swapping the first 4 bits and the last 4 bits of the 8-bit binary data of the difference value to generate the ciphertext.

[0023] S4. Embedding Post-processing and Output: Continue to perform the reverse scrambling operation on the blue channel sub-block, reassemble the red channel, green channel and the reverse scrambling blue channel to restore the RGB image, and perform the reverse inversion operation and reverse flip operation on the restored RGB image in sequence to generate a steganalyte image and output it.

[0024] like Figure 2 The diagram shown illustrates a process for embedding and extracting secret information, illustrating the steps involved in both processes. Figure 2 As shown, after obtaining the steganalyte image, the process also includes step S5: embedding and extracting secret information. The input steganographic image and key are sequentially flipped and transposed to decompose the image into RGB channels and extract the blue and red channels. A magic matrix is ​​generated based on the same key, and a reverse scrambling operation is performed on each sub-block of the blue channel to restore the pixel order during embedding. The binary stream is extracted from the low-order bits of each pixel in each sub-block after reverse scrambling, in the order controlled by the key, to obtain the ciphertext. The ciphertext is decrypted using a multi-level encryption inverse algorithm to obtain the binary stream of the secret information. The binary stream of the secret information is then converted back into the original secret information and extracted.

[0025] In this embodiment, the decryption process includes: First-level inverse operation: Right circular shift the ciphertext to restore the original bit order of the differential values; Second-level inverse operation: Based on the pixel binary stream and key of the red channel, recover the difference value from the right-circularly shifted ciphertext; The third-level inverse operation: XOR the recovered difference value with the key to restore the binary stream of the secret information.

[0026] In this embodiment, for multi-level encryption and multi-level decryption, the encryption process can be described as E = (((S⊕K)⊕D)<<<4), where S = secret data, K = key, D = difference value, and <<<= left circular shift; the decryption process can be described as: S = (((E>>>4)⊕D)⊕K), where >>>= right circular shift (the inverse operation of left shift). The decryption process corresponds pairwise to the previous encryption process. The decryption stage uses the exact same key derivation mechanism as the encryption stage. For example, key consistency: the same secret key is used for encryption and decryption; derivation mask generation: the same magic matrix permutation sequence is generated based on the key; synchronization operation: the reverse scrambling of the blue channel uses the same magic matrix configuration; difference value calculation: the same red channel data is used for differential recovery during decryption to ensure the accuracy of the restored information.

[0027] Secondly, a digital image steganography system is proposed, which operates using the aforementioned digital image steganography method. The system includes: The preprocessing module is used to perform flip, transpose, and channel decomposition operations on the carrier image or steg image; The disorder management module is used to generate a magic matrix based on the key and perform pixel disorder or reverse disorder operation on the sub-blocks of the blue channel; The encryption and embedding module is used to calculate the difference between the secret information and the red channel, execute a multi-level encryption algorithm, and embed the generated ciphertext into the low-order bits of the blue channel pixels. The decryption and extraction module is used to extract the ciphertext from the low-order bits of the blue channel pixels and execute a multi-level encryption inverse algorithm to restore the secret information; The post-processing module performs reverse scrambling, channel reassembly, and inverse flipping operations on the blue channel after embedding information to generate a steganalytic image. Furthermore, an electronic device is proposed that operates using the aforementioned digital image steganography method. The electronic device includes a processor and a memory. The memory stores program instructions for the digital image steganography method, and the processor executes these program instructions. The specific operation and beneficial effects of the above system and electronic device can be found in the description of the aforementioned digital image steganography method, and will not be repeated here.

[0028] In summary, this invention organically combines LSB replacement with magic matrix scrambling, multi-level encryption algorithms, key control, image transposition, and flipping operations to construct a multi-layered protection system of "preprocessing-encryption-dynamic embedding-reverse processing," addressing the security limitations of single technologies. Based on the characteristics of the RGB channels, the blue channel is selected as the embedding carrier, employing a four-block processing method, embedding a maximum of 4 bits of secret information per pixel, balancing embedding capacity and image quality to ensure imperceptibility. Furthermore, a multi-level encryption algorithm is used to encrypt the secret information using "cyclic shift + conditional XOR," combined with key-controlled magic matrix block scrambling to achieve random embedding of the secret information, significantly improving resistance to statistical attacks. Moreover, leveraging the minimal impact of LSB bits on human vision, only the lower 4 bits of the pixel are modified, retaining the original upper 4 bits, ensuring that the structural similarity between the steganographic image and the carrier image is close to 1. In addition, the difference calculation between the secret information and the red channel is introduced to further hide embedding traces, forming difference calculation-assisted encryption, enhancing anti-detection capabilities, demonstrating significant progress.

[0029] The above embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solutions based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.

Claims

1. A digital image steganography method integrating multi-dimensional encryption, characterized in that, Includes the following steps: S1. Embedding preprocessing: Obtain the original carrier image, secret information and key, perform flip operation and transpose operation on the original carrier image in sequence to obtain the preprocessed image, and then decompose the preprocessed image into red channel, green channel and blue channel; S2, Blue Channel Blocking and Magic Matrix Randomization: The blue channel is divided into multiple equal-sized sub-blocks, a magic matrix is ​​generated based on the key, and the pixels in each sub-block are randomly randomized using the magic matrix. S3, Secret Information Encryption and Dynamic Embedding: Convert secret information into a binary stream and calculate the difference between the binary stream and the pixel binary stream of the red channel; The difference value is then encrypted using a multi-level encryption algorithm to obtain the ciphertext. The binary bits of the ciphertext are then replaced bit by bit in the low-order bits of each pixel in the disordered blue channel sub-block, while the high-order bits of the pixels are kept unchanged. S4. Embedding Post-processing and Output: Continue to perform the reverse scrambling operation on the blue channel sub-block, reassemble the red channel, green channel and the reverse scrambling blue channel to restore the RGB image, and perform the reverse inversion operation and reverse flip operation on the restored RGB image in sequence to generate a steganalyte image and output it.

2. The digital image steganography method integrating multi-dimensional encryption according to claim 1, characterized in that, In step S2, there are four sub-blocks, and the magic matrix is ​​a standard 4×4 magic matrix.

3. The digital image steganography method integrating multi-dimensional encryption according to claim 1, characterized in that, The random scrambling in step S2 includes: calculating the rearrangement index based on the element values ​​of the magic matrix, and sorting the pixels in each sub-block according to the rearrangement index.

4. The digital image steganography method integrating multi-dimensional encryption according to claim 1, characterized in that, The multi-level encryption algorithm in step S3 includes: First-level encryption: XOR the binary stream of the secret information with the key; Second-level encryption: Calculate the absolute value of the difference between the XOR operation result and the pixel binary stream of the red channel, and perform a modulo 256 operation on the absolute value to obtain the difference value; The third level of encryption involves performing a left circular shift operation on the difference value, swapping the first 4 bits and the last 4 bits of the 8-bit binary data of the difference value to generate the ciphertext.

5. The digital image steganography method integrating multi-dimensional encryption according to claim 1, characterized in that, It also includes step S5, embedding and extracting secret information: Input the steganographic image and key, and perform flip and transpose operations in sequence to decompose it into RGB three channels and extract the blue and red channels; generate a magic matrix based on the same key, and perform a reverse scrambling operation on each sub-block of the blue channel to restore the pixel order when it was embedded; Extract the binary stream from the low-order bits of each pixel in each sub-block after reversing the scrambled order, in the order controlled by the key, to obtain the ciphertext; decrypt the ciphertext using a multi-level encryption inverse algorithm to obtain the binary stream of the secret information; convert the binary stream of the secret information back into the original secret information and extract it.

6. The digital image steganography method integrating multi-dimensional encryption according to claim 5, characterized in that, The decryption process includes: First-level inverse operation: Right circular shift the ciphertext to restore the original bit order of the differential values; Second-level inverse operation: Based on the pixel binary stream and key of the red channel, recover the difference value from the right-circularly shifted ciphertext; The third-level inverse operation: XOR the recovered difference value with the key to restore the binary stream of the secret information.

7. A digital image steganography system, operating using the digital image steganography method as described in any one of claims 1 to 6, characterized in that, include: The preprocessing module is used to perform flip, transpose, and channel decomposition operations on the carrier image or steg image; The disorder management module is used to generate a magic matrix based on the key and perform pixel disorder or reverse disorder operation on the sub-blocks of the blue channel; The encryption and embedding module is used to calculate the difference between the secret information and the red channel, execute a multi-level encryption algorithm, and embed the generated ciphertext into the low-order bits of the blue channel pixels. The decryption and extraction module is used to extract the ciphertext from the low-order bits of the blue channel pixels and execute a multi-level encryption inverse algorithm to restore the secret information; The post-processing module is used to perform reverse scrambling, channel recombination, and inverse flipping operations on the blue channel after embedding information to generate a steganalytic image.

8. An electronic device, operating using the digital image steganography method as described in any one of claims 1 to 6, characterized in that, It includes a processor and a memory. The memory stores program instructions for digital image steganography, and the processor executes the program instructions.