Halftone image reversible information hiding method, halftone image reversible information extraction method, equipment and medium
By combining the Hash algorithm and ZUC encryption algorithm with the multinomial secret sharing algorithm to generate a secret-carrying shared image, the applicability and correctness of halftone image information hiding in the cloud computing environment are solved, and the information hiding and extraction process can be realized without the participation of network administrators.
Patent Information
- Application Number
- CN202511087392.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-11
AI Technical Summary
In cloud computing and cloud storage environments, existing halftone image information hiding methods require the participation of network administrators, and the extraction process of the original image and the extraction process of secret information are independent, resulting in insufficient applicability and correctness of information hiding.
The method employs a hash algorithm to calculate the image digest information and the secret information, uses the ZUC encryption algorithm and the multinomial secret sharing algorithm to generate N shared images, generates a secret-carrying shared image through an XOR operation, and extracts the secret information using Lagrange interpolation and Hamming code generation matrix.
This technology improves the applicability and confidentiality of halftone image sharing without requiring network administrator intervention, while ensuring the accuracy of the original image and confidential information.
Smart Images

Figure CN120935308A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image encryption, and in particular to a method, device and medium for reversible information hiding and extraction of halftone images. Background Technology
[0002] A halftone image is a special type of image that represents an image using only two color values: black and white. Conceptually, a halftone image can be considered a binary image, but this binary image differs from the binary image obtained after image segmentation. The binary image obtained from image segmentation is used to highlight the difference between the foreground and background; while a halftone image, although only binary, aims to present the original image as distortion-free as possible.
[0003] Image sharing is an important method for image encryption, offering significant advantages in both security and convenience. The original binary secret image is divided into N binary shared images through image sharing. Then, K images can be randomly selected from these N shared images to extract the original image.
[0004] Previous methods have proposed an independent secret information hiding method for shared images of halftone images. This method uses a halftone image as the original image O and generates N shared images containing hidden secret information M through a special secret sharing mechanism. Although the extraction processes of the original image O and the secret information M are independent, the information hiding must be achieved during the secret sharing process.
[0005] In recent years, with the rapid development of cloud computing and cloud storage, N original images of the original image O have been stored on the network server. At this stage, network administrators cannot participate in the sharing process of the original image. If they want to hide secret information S in the original image, they must use a homomorphic information hiding method. Summary of the Invention
[0006] The purpose of this application is to provide a method, device, and medium for reversible information hiding and extraction of halftone images, so as to improve the applicability, confidentiality, and accuracy of halftone image sharing.
[0007] To achieve the above objectives, this application provides the following solution:
[0008] Firstly, this application provides a method for reversible information hiding in halftone images, including:
[0009] Obtain the original halftone image and the original secret information;
[0010] The hash algorithm is used to calculate the summary information of the original halftone image;
[0011] The summary information and the original secret information are combined to form the secret information to be hidden, which is then stored as a secret image.
[0012] The original halftone image is encrypted using the ZUC encryption algorithm to obtain an encrypted halftone image;
[0013] Based on the encrypted halftone image, N original images for sharing are obtained using a polynomial secret sharing algorithm;
[0014] Based on the secret image, N shared secret images are obtained using a polynomial secret sharing algorithm;
[0015] The N original shared images and the N secret shared images are combined to obtain N secret-carrying shared images.
[0016] Optionally, the original halftone image is encrypted using the ZUC encryption algorithm to obtain an encrypted halftone image, specifically including:
[0017] The original halftone image is ZUC encrypted using the first encryption key to obtain encrypted image data;
[0018] The channel data of the encrypted image data is ZUC encrypted using the second encryption key to obtain an encrypted halftone image.
[0019] Optionally, based on the encrypted halftone image, N original images for sharing are obtained using a multinomial secret sharing algorithm, specifically including:
[0020] The encrypted halftone image is used as a first basic processing unit, with each 16 pixels representing a single image.
[0021] The three channels of data in each of the first basic processing units are processed respectively, and the 16 data in each channel are divided into 4 groups and converted into 4 first Hamming codes.
[0022] Construct the first cubic polynomial using the four first Hamming codes as polynomial coefficients;
[0023] Based on the first 3rd degree polynomial, N original images for sharing are generated using the polynomial secret sharing algorithm.
[0024] Optionally, based on the secret image, N shared secret images are obtained using a multinomial secret sharing algorithm, specifically including:
[0025] The secret image is used as a second basic processing unit, with each 6 pixels representing a second basic processing unit.
[0026] The three channels of data in each of the second basic processing units are processed separately, and the data in each channel is divided into two groups on average.
[0027] The two sets of data are used as coefficients of the Hamming code error generator polynomial, and a second polynomial is constructed.
[0028] Based on the second polynomial, N secret-sharing images are generated using the polynomial secret-sharing algorithm.
[0029] Optionally, the N original shared images and the N secret shared images are synthesized to obtain N secret-carrying shared images, specifically including:
[0030] Perform an XOR operation on the three channels of each pixel in the i-th secret-sharing image and the three channels of the corresponding pixel in the i-th original shared image to generate the i-th secret-carrying shared image; i = 1, ..., N.
[0031] Secondly, this application provides a halftone image extraction method, including:
[0032] Obtain K encrypted sharing images; the K encrypted sharing images are selected from N encrypted sharing images obtained using the above-mentioned halftone image reversible information hiding method; K < N;
[0033] Eight binary pixel values are selected from one channel corresponding to each of the aforementioned encrypted shared images, and a decimal pixel value is generated as a shared data.
[0034] Based on the K shared data, the dense polynomial is obtained through Lagrange interpolation;
[0035] For the coefficients of the cryptographic polynomial, a Hamming code generation matrix is used to extract the secret image;
[0036] Based on the K shared data, an encrypted halftone image is obtained;
[0037] Based on the encrypted halftone image, the original halftone image is obtained using the ZUC decryption algorithm;
[0038] Based on the original halftone image, a first digest information is calculated using a hash algorithm;
[0039] Extract the second summary information and the original secret information from the secret image;
[0040] If the first digest information and the second digest information are equal, it indicates that the original secret information and the original halftone image are complete and correct.
[0041] Optionally, based on the encrypted halftone image, the original halftone image is obtained using the ZUC decryption algorithm, specifically including:
[0042] Using the second encryption key, the encrypted halftone image is decrypted using ZUC to obtain encrypted image data;
[0043] Using the first encryption key, the encrypted image data is decrypted using ZUC to obtain the original halftone image.
[0044] Optionally, the hash algorithm is the MD5 algorithm.
[0045] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the halftone image reversible information hiding method described in any one of the above.
[0046] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the halftone image reversible information hiding method described above.
[0047] According to the specific embodiments provided in this application, this application has the following technical effects:
[0048] This application provides a method, device, and medium for reversible information hiding and extraction of halftone images. The method involves obtaining an original halftone image and original secret information; calculating a digest of the original halftone image using a hash algorithm; combining the digest and the original secret information to form the secret information to be hidden, which is then stored as a secret image; encrypting the original halftone image using the ZUC encryption algorithm to obtain an encrypted halftone image; obtaining N shared original images using a polynomial secret sharing algorithm based on the encrypted halftone image; obtaining N shared secret images using the polynomial secret sharing algorithm based on the secret image; and combining the N shared original images and the N shared secret images to obtain N secret-carrying shared images. This application does not require the administrator to participate in the secret sharing process of the original image; it only requires generating shared secret images from the secret information to be hidden and combining them with existing shared original images. The ZUC encryption algorithm ensures the secrecy of the original image; and the addition of the digest information of the original image to the secret information ensures the correctness of both the original image and the secret information. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1A flowchart illustrating a halftone image reversible information hiding method provided in an embodiment of this application;
[0051] Figure 2 The flowchart shows the halftone image reversible information hiding method of this application in a practical application.
[0052] Figure 3 This is a flowchart of the halftone image extraction method of this application;
[0053] Figure 4 A schematic diagram of image encryption using the ZUC encryption algorithm;
[0054] Figure 5 This is a diagram illustrating image channel adjustment.
[0055] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] In this application, the original halftone image O is secretly shared to generate N shared original images, the original secret information is secretly shared to generate N shared secret images, and the N shared secret images are combined with the N shared original images to generate N secret-carrying shared images.
[0059] From N encrypted shared images, K encrypted shared images are arbitrarily selected. Through Lagrange interpolation, the result is extracted as a encrypted polynomial. The original secret information can be extracted from the encrypted polynomial and the original halftone image O can be restored.
[0060] In this application, the generator matrix of Hamming code is used to make the polynomial secret sharing satisfy the additive homomorphic property, and the secret image M can be extracted from the carrier polynomial; this application uses the ZUC encryption algorithm to encrypt the carrier data, thereby ensuring its secrecy; the digest information of the original halftone image is added to the secret information, thereby ensuring the correctness of the original halftone image and the secret information.
[0061] In one exemplary embodiment, such as Figure 1 and Figure 2 As shown, a method for reversible information hiding in halftone images is provided, including the following steps:
[0062] S1: Obtain the original halftone image and the original secret information.
[0063] S2: Calculate the summary information of the original halftone image using a hash algorithm.
[0064] The original image (original halftone image) O is calculated using a hash algorithm. In this embodiment, the MD5 algorithm is used to calculate the digest information, denoted as H.
[0065] S3: Combine the summary information with the original secret information to form the secret information to be hidden, and store it as a secret image.
[0066] S4: Use the ZUC encryption algorithm to encrypt the original halftone image to obtain an encrypted halftone image.
[0067] As an optional implementation, S4 specifically includes:
[0068] S41: The original halftone image O is encrypted using the first encryption key K1 using ZUC to obtain encrypted image data.
[0069] S42: Use the second encryption key K2 to perform ZUC encryption on the channel data of the encrypted image data to obtain an encrypted halftone image.
[0070] S5: Based on the encrypted halftone image, N original images for sharing are obtained using a polynomial secret sharing algorithm.
[0071] As an optional implementation, S5 specifically includes:
[0072] S51: Use 16 pixels of the encrypted halftone image as the first basic processing unit.
[0073] S52: Process the three channels of data of each of the first basic processing units respectively, divide the 16 data of each channel into 4 groups, and convert them into 4 first Hamming codes.
[0074] S53: Construct the first cubic polynomial using the four first Hamming codes as polynomial coefficients.
[0075] S54: Based on the first 3rd degree polynomial, use the polynomial secret sharing algorithm to generate N original images for sharing.
[0076] In this embodiment, the data of the encrypted original image (encrypted halftone image) O' is divided into basic processing units of 16 pixels each. The three channels of each basic processing unit are processed, and the 16 data points of each channel are divided into four groups, converted into four Hamming codes. These four Hamming codes are used as polynomial coefficients to construct a cubic polynomial. N sets of shared data are generated through polynomial secret sharing and allocated to the corresponding channels of the corresponding positions in the N shared original images. The operation S5 is performed on the data of each basic processing unit in the original image O to obtain N shared original images.
[0077] S6: Based on the secret image, use the polynomial secret sharing algorithm to obtain N shared secret images.
[0078] As an optional implementation, S6 specifically includes:
[0079] S61: Use every 6 pixels of the secret image as a second basic processing unit.
[0080] S62: Process the three channels of data for each of the second basic processing units respectively, and divide the data of each channel into two groups on average.
[0081] S63: Use the two sets of data as coefficients of the Hamming code error generator polynomial and construct the second polynomial.
[0082] S64: Based on the second polynomial, use the polynomial secret sharing algorithm to generate N secret sharing images.
[0083] In this embodiment, the data of the secret image M is divided into basic processing units of 6 pixels each. The data of each channel in each basic processing unit is processed separately, and the 6 data points in each channel are divided into two groups. These two groups of data are used as coefficients for a Hamming code error generating polynomial, and a polynomial is constructed. N sets of shared secret data are generated through polynomial secret sharing and assigned to the corresponding channels at the corresponding positions in the N shared secret images. Operation S6 is performed on the data of each basic processing unit in the secret image to obtain N shared secret images.
[0084] S7: Combine the N original shared images and the N secret shared images to obtain N secret-carrying shared images.
[0085] As an optional implementation, S7 specifically includes:
[0086] Perform an XOR operation on the three channels of each pixel in the i-th secret-sharing image and the three channels of the corresponding pixel in the i-th original shared image to generate the i-th secret-carrying shared image; i = 1, ..., N.
[0087] In one exemplary embodiment, such as Figure 3As shown, a halftone image extraction method is provided, including:
[0088] Step 1: Obtain K encrypted sharing images; the K encrypted sharing images are selected from the N encrypted sharing images obtained using the above halftone image reversible information hiding method; K < N.
[0089] In this embodiment, K encrypted sharing images are arbitrarily selected from N encrypted sharing images.
[0090] Step 2: Select 8 binary pixel values from one channel corresponding to each of the shared images and generate a decimal pixel value as a sharing data.
[0091] In this embodiment, eight binary pixel values are selected from the corresponding position of one channel in each shared image, and a decimal pixel value of 0-255 is generated as a set of shared data. K shared images with one channel corresponding to one position can obtain K sets of shared data, which are used as a set of shared data.
[0092] Step 3: Based on the K shared data, obtain the dense polynomial through Lagrange interpolation.
[0093] Step 4: Generate a secret image by generating a matrix using Hamming code for the coefficients of the secret polynomial.
[0094] Step 5: Obtain the encrypted halftone image based on the K shared data.
[0095] In this embodiment, for each group (K) of shared data, a secret polynomial is obtained through Lagrange interpolation. From the coefficients of the secret polynomial, a secret image M is extracted using a Hamming code generation matrix, and the original encrypted image O' is recovered from the shared data of this group.
[0096] The process of Lagrange interpolation:
[0097] According to f M Formula (x) yields the polynomial:
[0098]
[0099] For example, if there are 4 images, each with 127, 155, 233, and 44 pixels respectively, then the formula would be:
[0100]
[0101] Each group shares data and completes steps 2-5 above to obtain the extracted secret image M and the restored encrypted original image O'.
[0102] Step 6: Based on the encrypted halftone image, use the ZUC decryption algorithm to obtain the original halftone image.
[0103] As an optional implementation, step 6 specifically includes:
[0104] Using the second encryption key, the encrypted halftone image is decrypted using ZUC to obtain the encrypted image data.
[0105] Using the first encryption key, the encrypted image data is decrypted using ZUC to obtain the original halftone image.
[0106] In this embodiment, the recovered encrypted original image O' is decrypted using the second encryption key K2 via ZUC channel, and then the image data is decrypted using the first encryption key K1 via ZUC channel to obtain the original image O.
[0107] Step 7: Calculate the first digest information based on the original halftone image using a hash algorithm.
[0108] Step 8: Extract the second summary information and the original secret information from the secret image.
[0109] Step 9: If the first digest information and the second digest information are equal, it indicates that the original secret information and the original halftone image are complete and correct.
[0110] In this embodiment, the second digest information and the original secret information are extracted from the extracted secret image M, denoted as H2. The recovered original image O is subjected to a hash operation to calculate the first digest information, denoted as H1. If H1 = H2, it indicates that the extracted original secret information and the original image O are complete and correct.
[0111] The processing procedure in this application uses 16 original image pixels and 6 secret image pixels as the basic unit. The implementation process is explained in detail below using one basic unit of data (16 original image pixel data and 6 secret information data) as an example:
[0112] 1. Secret sharing and information hiding process.
[0113] (1) The original image O is calculated using the Hash algorithm to calculate the summary information, denoted as H.
[0114] (2) Combine the summary information H with the original secret information to form the secret image M; the original secret information is some binary data, and the summary information H is also binary data. Place the summary information H after the original secret information to form the secret image M.
[0115] Taking (4, 5) secret sharing as an example (the original data generates 5 pieces of shared data, and obtaining 4 pieces of shared data can restore the original data).
[0116] The data of a basic unit includes:
[0117] There are 16 raw image pixel data and 6 secret image pixel data; each raw image pixel and secret image pixel is a color halftone image pixel, that is, it includes three components: R, G and B, and each component has only two pixel values: 0 or 1.
[0118] (3) The original image O undergoes ZUC encryption, which includes two steps:
[0119] A. First, extract 16 pixels from the original image O. Each pixel has 3 components. Taking the R component as an example, the R values of the 16 pixels are divided into 4 groups. Let the R components of the 16 pixels be: (1, 0, 1, 0), (1, 1, 0, 1), (1, 1, 0, 1), (0, 1, 1, 1). Using the key K1 and a ZUC-generated sequence cipher, XOR the R components of the 16 original image pixels. Let the generated sequence cipher be (0, 1, 1, 1; 0, 1, 0, 0; 1, 1, 0, 1; 0, 1, 0, 0). XOR this sequence cipher with the R components of the 16 pixels above to obtain the four encrypted groups of R component data: (1, 1, 0, 1), (1, 0, 0, 1), (0, 0, 0, 0), (0, 0, 1, 1). Figure 4 As shown, Figure 4 The image shows the ZUC encryption process for the R components of the first 8 pixels.
[0120] B. Using ZUC encryption on the previously encrypted image data, swap the data from the three channels of each pixel to generate the encrypted original image O'. Let the random sequence generated using ZUC with key K2 be (1, 1, 0, 0, 0…). Group the generated random sequences into sets of three, controlling the swapping of the RGB channels of one pixel. The swapping rules are as follows:
[0121] If two of the three numbers are the same, then the channels corresponding to the two identical numbers are swapped.
[0122] If all three numbers are 000, it indicates a left channel loop, i.e., from RGB to GBR; if all three numbers are 111, it indicates a right channel loop, i.e., from RGB to BRG.
[0123] In the sequence above, the first three numbers are 1, 1, and 0. Two identical numbers are swapped. For 110, this means the R(1) and G(2) channels are swapped. For example, in the original image, a set of four pixel RGB channels are (1, 1, 0, 1), (1, 0, 1, 0), and (0, 0, 1, 0). When swapping channels, the R and G channels are swapped, and a pair of pixels at the same position in the RGB channels becomes (1, 0, 1, 0), (1, 1, 0, 1), and (0, 0, 1, 0). Figure 5 As shown, the R and G channels of the first group of 4 pixels are swapped.
[0124] (4) Take 16 pixel values from each of the three RGB channels of the encrypted original image O', divide them into 4 groups of 4 data. Each group of data generates a corresponding Hamming code according to the (7,4) Hamming code generator matrix G, resulting in 4 groups of Hamming codes. Let the R channel of the 16 pixel data in O' be (0,0,1,1), (0,1,1,0), (1,1,0,1), (0,1,1,1). Multiply these by G to obtain four Hamming codewords, which are then converted to decimal numbers (35, 70, 23, and 13). G is the formula (1).
[0125]
[0126] During the sharing phase, the decimal values of these four Hamming codewords are used as coefficients of a cubic polynomial, resulting in polynomial f. i (x)=35x 3 +70x 2 +23x+13.
[0127] Input 1, 2, 3, 4, and 5 as the private key into the polynomial f. i (x)=35x 3 +70x 2 In +23x+13, five sharing values of 127, 155, 233, 44, and 148 are calculated. These five sharing values are then assigned to the corresponding R channels of N (N=5) shared original images. Note that the generated shared original images are still halftone images, so each pixel has only 0 or 1. Therefore, for each sharing value, it needs to be converted into 8 binary numbers and stored in the 8 pixels of the shared original images. Using 16 pixels as the basic processing unit, the above operation is performed for each channel to obtain N shared original images.
[0128] (5) Perform the following operation on each channel of every 6 pixels of the secret image M. For example, if the R channel data is (1, 0, 0, 0, 1, 1) as a group, divide the 6 pixels into two groups. First, convert the two groups of data (1, 0, 0) and (0, 1, 1) to 64 and 4 using the Hp matrix. Using 64 and 4 as polynomial coefficients, obtain a first-order polynomial f. D (x) = (4x + 64), then input the private keys 1, 2, 3, 4, and 5 into f. D (x) yields 5 sets of shared data (68, 72, 76, 80, 84). These (68, 72, 76, 80, 84) are then shared to the corresponding R channels of N (N=5) shared secret images. Note that the generated shared images are still halftone images, so each pixel has only 0 or 1. Therefore, for each shared value, it needs to be converted into 8 binary numbers and stored in the pixels of the 8 shared images. This process is repeated for each set of secret data to obtain N shared secret images.
[0129] The Hp matrix is shown in formula (2).
[0130]
[0131] (6) Information hiding based on additive homomorphism. Combine N secret-sharing images with N original shared images to generate N secret-sharing images.
[0132] The synthesis process:
[0133] The shared secret image with the same private key is combined with the shared original image, that is, the i-th shared secret image is combined with the i-th shared original image.
[0134] The synthesis operation involves XORing the three channels of the corresponding pixel data of the shared secret image with the three channels of the corresponding pixel data of the shared original image to generate the secret-carrying shared image.
[0135] Each pixel completes the above operations to generate the i-th encrypted sharing image.
[0136] 2. Information extraction and original image restoration.
[0137] Taking (4, 5) secret sharing as an example (the original data generates 5 shared data images, and obtaining 4 shared data images can restore the original data):
[0138] (1) From N (N=5) encrypted sharing images, randomly select K (K=4) encrypted sharing images, and randomly select images K1, K2, K3, and K4.
[0139] (2) Extract data from the corresponding positions of the four shared images for each of the three channels. For example, select four sets of pixel data from the corresponding positions of the four shared images, and select the R channel number for each set of pixel data to form four sets (8 pixels per set) of shared data. Since the shared images are halftone images, each set of data includes 8 pixels, which includes 8 binary data. For example, the R channel of the corresponding positions of the four images corresponds to four sets of shared data: (0, 0, 1, 1, 1, 0, 1, 1), (1, 1, 0, 1, 0, 0, 1, 1), (1, 0, 1, 0, 0, 1, 0, 1), (0, 1, 1, 1, 1, 1, 0, 0).
[0140] (3) Convert the four sets of shared data to decimal to obtain (59, 211, 165, 124), and obtain the dense polynomial f through Lagrange interpolation. M (x)=13x 3 +23x 2 +66x+99, for the first coefficient and constant term (66, 99) of the encrypted polynomial, use Hamming code to generate a matrix and extract a set of encrypted secret information (0, 1, 1) and (1, 0, 0). Hamming decoding of (66, 99) yields (0, 1, 1) and (1, 0, 0). For the constant term 99, it is converted into eight-bit binary (01100011). The last seven bits are multiplied by the inverse of formula (2) Hp.
[0141]
[0142] Similarly, to convert 66 to 01000010, use:
[0143]
[0144] The secret information is obtained at position i in the Hamming matrix (i are 3 and 7 respectively) using 2 i-1 The interpolation (4, 64) is obtained. (4, 64) and (66, 99) are XORed to obtain (70, 35). (66: 01000010, 4: 00000100, XOR: 01000110 = 70; 99: 01100011, 64: 01000000, XOR: 00100011 = 35). (70, 35) is combined with the cubic coefficient 13 and quadratic coefficient 23 in the encrypted polynomial to form the data (35, 70, 23 and 13). Hamming code decoding is performed to obtain (0, 0, 1, 1), (0, 1, 1, 0), (0, 1, 1, 1), (1, 1, 0, 1), and the original encrypted image data is obtained.
[0145] In the above secret sharing and information hiding process (4), the data is multiplied by G. The last four bits of G are the identity matrix, which means that the last four bits of data are the data in the channel. In the Hamming code decryption process, only the last four bits need to be extracted to decrypt.
[0146] 35 in binary is 00100011, the last four bits are 0011, and the decoded value is (0, 0, 1, 1).
[0147] 70 in binary is 01000110, the last four bits are 0110, and the decoded value is (0, 1, 1, 0).
[0148] 23 in binary is 00010111, the last four bits are 0111, and the decoded result is (0, 1, 1, 1).
[0149] 13 in binary is 00001101, the last four bits are 1101, and the decoded value is (1, 1, 0, 1).
[0150] (4) Each group shares data and completes the above steps (2)-(3) to obtain the extracted secret image M and the restored encrypted original image O'.
[0151] (5) Decrypt the recovered encrypted original image O' using ZUC to obtain the recovered original image O, which includes two steps:
[0152] A. Decrypt the original encrypted image O' by channel: For example, using key K2, the random sequence generated by ZUC is (1, 1, 0, 1…). Take the first three numbers as 1, 1, 0, and swap any two identical numbers. Originally, the RGB channels of the four pixels in the RGB three-channel system are (1, 0, 1, 0), (1, 1, 0, 1), and (0, 0, 1, 0). When swapping channels, the R channel and G channel are swapped, and the RGB channels of the four pixels in the RGB three-channel system become (1, 1, 0, 1), (1, 0, 1, 0), and (0, 0, 1, 0).
[0153] B. Using the key K1, perform ZUC decryption on the data after decryption of the previous channel to obtain and recover the original image O. Let the R channels of the 16 pixels be (1, 1, 0, 1), (1, 0, 0, 1), (0, 0, 0, 0), (0, 0, 1, 1). If the ZUC sequence cipher generator generates the sequence ciphers as (0, 1, 1, 1; 0, 1, 0, 0; 1, 1, 0, 1; 0, 1, 0, 0), and four pixel groups (1, 0, 1, 0), (1, 1, 0, 1), (1, 1, 0, 1), (0, 1, 1, 1).
[0154] (6) Extract the second digest information and the original secret information from the extracted secret image M, denoted as H2. Use the hash operation to recover the original image O and calculate the first digest information, denoted as H1. If H1 = H2, it indicates the completeness and correctness of extracting secret information M and recovering the original image O.
[0155] The halftone image reversible information hiding method proposed in this application outperforms existing algorithms in terms of applicability, secrecy, and correctness.
[0156] Applicability: This application does not require the administrator to participate in the secret sharing process of the original image. It only requires generating a shared secret image from the secret data M to be hidden and combining it with the existing shared original image.
[0157] Confidentiality: The ZUC encryption algorithm ensures the confidentiality of the original image.
[0158] Correctness: Adding a summary of the original image to the secret information ensures the correctness of both the original image and the secret information.
[0159] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described halftone image reversible information hiding method.
[0160] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described halftone image reversible information hiding method.
[0161] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described halftone image reversible information hiding method.
[0162] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a halftone image reversible information hiding method.
[0163] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0165] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0166] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0168] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for reversible information hiding in halftone images, characterized in that, include: Obtain the original halftone image and the original secret information; The hash algorithm is used to calculate the summary information of the original halftone image; The summary information and the original secret information are combined to form the secret information to be hidden, which is then stored as a secret image. The original halftone image is encrypted using the ZUC encryption algorithm to obtain an encrypted halftone image; Based on the encrypted halftone image, N original images for sharing are obtained using a polynomial secret sharing algorithm; Based on the secret image, N shared secret images are obtained using a polynomial secret sharing algorithm; The N original shared images and the N secret shared images are combined to obtain N secret-carrying shared images.
2. The halftone image reversible information hiding method according to claim 1, characterized in that, The original halftone image is encrypted using the ZUC encryption algorithm to obtain an encrypted halftone image, specifically including: The original halftone image is ZUC encrypted using the first encryption key to obtain encrypted image data; The channel data of the encrypted image data is ZUC encrypted using the second encryption key to obtain an encrypted halftone image.
3. The halftone image reversible information hiding method according to claim 1, characterized in that, Based on the encrypted halftone image, N original images for sharing are obtained using a multinomial secret sharing algorithm, specifically including: The encrypted halftone image is used as a first basic processing unit, with each 16 pixels representing a single image. The three channels of data in each of the first basic processing units are processed respectively, and the 16 data in each channel are divided into 4 groups and converted into 4 first Hamming codes. Construct the first cubic polynomial using the four first Hamming codes as polynomial coefficients; Based on the first 3rd degree polynomial, N original images for sharing are generated using the polynomial secret sharing algorithm.
4. The halftone image reversible information hiding method according to claim 1, characterized in that, Based on the secret image, N shared secret images are obtained using a polynomial secret sharing algorithm, specifically including: The secret image is used as a second basic processing unit, with each 6 pixels representing a second basic processing unit. The three channels of data in each of the second basic processing units are processed separately, and the data in each channel is divided into two groups on average. The two sets of data are used as coefficients of the Hamming code error generator polynomial, and a second polynomial is constructed. Based on the second polynomial, N secret-sharing images are generated using the polynomial secret-sharing algorithm.
5. The halftone image reversible information hiding method according to claim 1, characterized in that, The N original shared images and the N secret shared images are combined to obtain N secret-carrying shared images, specifically including: Perform an XOR operation on the three channels of each pixel in the i-th secret-sharing image and the three channels of the corresponding pixel in the i-th original shared image to generate the i-th secret-carrying shared image; i = 1, ..., N.
6. A method for extracting halftone images, characterized in that, include: Obtain K encrypted shared images; The K encrypted sharing images are selected from N encrypted sharing images obtained using the halftone image reversible information hiding method described in any one of claims 1-4; K < N; Eight binary pixel values are selected from one channel corresponding to each of the aforementioned encrypted shared images, and a decimal pixel value is generated as a shared data. Based on the K shared data, the dense polynomial is obtained through Lagrange interpolation; For the coefficients of the cryptographic polynomial, a Hamming code generation matrix is used to extract the secret image; Based on the K shared data, an encrypted halftone image is obtained; Based on the encrypted halftone image, the original halftone image is obtained using the ZUC decryption algorithm; Based on the original halftone image, a first digest information is calculated using a hash algorithm; Extract the second summary information and the original secret information from the secret image; If the first digest information and the second digest information are equal, it indicates that the original secret information and the original halftone image are complete and correct.
7. The halftone image extraction method according to claim 6, characterized in that, Based on the encrypted halftone image, the original halftone image is obtained using the ZUC decryption algorithm, specifically including: Using the second encryption key, the encrypted halftone image is decrypted using ZUC to obtain encrypted image data; Using the first encryption key, the encrypted image data is decrypted using ZUC to obtain the original halftone image.
8. The halftone image extraction method according to claim 6, characterized in that, The hash algorithm used is the MD5 algorithm.
9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the halftone image reversible information hiding method according to any one of claims 1-5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the halftone image reversible information hiding method according to any one of claims 1-5.
Citation Information
Cited By
Steganography Implementation Method, Device, Medium and System Based on Color Screen Electronic Price Tag
CN122420454A