Data hiding method based on most significant bit replacement and least significant bit compression

By using the most significant bit replacement and least significant bit compression methods in encrypted images, the existing technology problems of low embedding capacity and high computational burden in encrypted images are solved, efficient data hiding and lossless recovery are achieved, and security is improved. and embedding rate.

CN114493968BActive Publication Date: 2024-09-24XIAN UNIV OF TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202111588662.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-09-24
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

Existing reversible data hiding methods in encrypted images suffer from distortion and low embedding capacity. In particular, methods based on reserved space before encryption require additional preprocessing to increase computational burden, and errors may occur during the extraction stage.

Method used

Adopting a data hiding method based on most significant bit replacement and least significant bit compression, by calculating the binary position map of the original image, performing encryption and decryption operations, and achieving separable and reversible data hiding in the image recovery stage, improving the embedding rate and security sex.

Benefits of technology

It maximizes the embedding rate on the basis of lossless image recovery, and achieves separable and reversible data hiding during the recovery stage, improving the security and efficiency of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114493968B
    Figure CN114493968B
Patent Text Reader

Abstract

The present invention discloses a data hiding method based on the most significant bit replacement and the least significant bit compression, which is specifically as follows: step 1, calculating the binary position map corresponding to the original image; step 2, encrypting the original image to obtain encrypted pixels; step 3, embedding the data to be embedded into the encrypted pixels to obtain the encrypted pixels with embedded data; step 4, decrypting the encrypted pixels of the encrypted image obtained in step 3 to obtain a directly decrypted image; step 5, extracting the data embedded in step 3; step 6, performing image restoration on the encrypted pixels extracted in step 5. The present invention solves the problems of distortion and relatively low embedding capacity in the existing methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of digital image encryption, and relates to a data hiding method based on most significant bit replacement and least significant bit compression. Background Art

[0002] With the development of cloud computing, privacy protection has become a practical issue. For this reason, reversible data hiding in encrypted images (RDHEI) has begun to attract research interests as an effective technique for embedding data in the encrypted domain.

[0003] According to whether to create embedding space for additional data before or after image encryption, the embedding mechanisms of current RDHEI schemes can be divided into two categories: reserved space before encryption (RRBE) and freed space after encryption (VRAE). The RRBE method uses the traditional RDH method to reserve space before image encryption by utilizing the spatial redundancy of the original image. The VRAE method uses a specific encryption algorithm to encrypt the original image while maintaining the spatial redundancy of the encrypted image, so it can be used for data embedding. In general, the RRBE-based RDHEI scheme has a larger hiding capacity than the VRAE-based scheme. However, the RRBE-based RDHEI scheme requires additional preprocessing before image encryption, which increases the computational burden of the content owner. In addition, the RDHEI method also has the problem of using the MSB of some pixels for marking in order to highlight the predicted error position, which may lead to errors in the extraction stage. Therefore, it is very urgent and necessary to comprehensively improve and innovate a more complete and more secure reversible data hiding method. Summary of the invention

[0004] The purpose of the present invention is to provide a data hiding method based on most significant bit replacement and least significant bit compression, which solves the problems of distortion and relatively low embedding capacity in the existing method.

[0005] The technical solution adopted by the present invention is a data hiding method based on the most significant bit replacement and the least significant bit compression, which is specifically implemented according to the following steps:

[0006] Step 1, calculate the binary position map corresponding to the original image;

[0007] Step 2, encrypting the original image to obtain encrypted pixels;

[0008] Step 3, embedding the data to be embedded into the encrypted pixel to obtain the encrypted pixel with the embedded data;

[0009] Step 4, decrypting the encrypted pixels of the embedded data obtained in step 3 to obtain a directly decrypted image;

[0010] Step 5, extract the data embedded in step 3;

[0011] Step 6, performing image restoration on the encrypted pixels extracted in step 5.

[0012] The present invention is also characterized in that

[0013] The specific process of step 1 is:

[0014] Step 1.1, create an initial binary position map L, the binary position map L has M×N pixels and all pixels are set to 0;

[0015] Step 1.2, except for the pixels in the first row and the first column of the original image F, calculate the absolute value of the difference between each original pixel F(i,j) and its left pixel F(i-1,j), and the absolute value of the difference between each original pixel F(i,j) and its upper pixel F(i,j-1), and record the smaller of these two absolute values ​​as the predicted pixel value F pred (i, j), where (i, j) is the pixel coordinate, 2≤i≤M, 2≤j≤N, as shown in formula (1):

[0016] If|F(i-1,j)-F(i,j)|-|F(i,j-1)-F(i,j)|<0

[0017] then F pred (i,j)=F(i-1,j),

[0018] else F pred (i,j)=F(i,j-1). (1)

[0019] In formula (1), (i, j) is the pixel coordinate, 2≤i≤M, 2≤j≤N;

[0020] Step 1.3, calculate the inverse value F corresponding to each original pixel inv (i,j), as shown in formula (2):

[0021] F inv (i,j)=(F(i,j)+128)mod256 (2)

[0022] Step 1.4, respectively calculate the absolute value of the difference between the predicted pixel value and the original pixel value, and the absolute value of the difference between the predicted pixel value and the inverse value of the original pixel, as shown in formula (3):

[0023]

[0024] Among them, Φ(i,j) represents the absolute value of the difference between the predicted pixel value and the original pixel value, Φ inv(i, j) represents the absolute value of the difference between the predicted pixel value and the inverse value of the original pixel;

[0025] Step 1.5: When the original pixel value is closer to the predicted pixel value than the inverse value of the original pixel, that is, when Φ(i,j)<Φ inv (i, j), there is no prediction error for the current pixel, and the pixel value in the binary position map remains unchanged at 0; when Φ(i, j)≥Φ inv (i, j), there is a prediction error in the current pixel, and the pixel value in the binary position map is changed to 1.

[0026] The specific process of step 2 is:

[0027] Step 2.1, divide each pixel value of the original image into 8 binary bits, as shown in formula (4);

[0028]

[0029] In formula (4), f(i,j,k) represents the binary bit of the original image pixel;

[0030] Step 2.2, using the encryption key K e Generate a pseudo-random sequence r(i,j,k) through a stream cipher, and perform an XOR operation on the binary bits of the original image pixels and the generated pseudo-random sequence to obtain the encrypted bits, as shown in formula (5);

[0031]

[0032] In formula (5), f e (i,j,k) represents the encryption bit, Indicates XOR calculation;

[0033] Step 2.3, convert the encrypted bit from binary to decimal to obtain the encrypted pixel, as shown in formula (6);

[0034]

[0035] In formula (6), F e (i,j) represents the encrypted pixel.

[0036] In step 3, the data to be embedded consists of three parts: parameters T, B, S, binary position map and secret data.

[0037] The specific process of step 3 is:

[0038] Step 3.1, set three parameters T, B, S, use N pThe three parameters are stored in pixels. The encrypted pixels are then grouped. Each group contains B pixels. T least significant bits are extracted from each pixel in each group, expressed as P(v,1), P(v,2), …, P(v,T·B), where v is the number of groups [1, (N t -N p ) / B],N t =M×N is the total pixel value;

[0039] Step 3.2, create a matrix of size (T·BS)×(T·B), expressed as:

[0040] G=[I T·B-S D] (7)

[0041] In formula (7), I T·B-S represents an identity matrix of size (T·BS)×(T·BS), and D represents a randomly generated binary matrix of size (T·BS)×S;

[0042] Step 3.3, the compressed pixel group is obtained by matrix multiplication. The compressed pixel group is expressed as P′(v,1), P′(v,2),…, and P′(v,T·BS), and the expression is:

[0043]

[0044] Each group is compressed to free up S bits of space to embed additional data, so a total of (N t -N p ) S / B bits, first embed the parameters T, B, S in the S-bit space, then embed the binary position map, and finally embed a part of the secret data in the remaining space;

[0045] Step 3.4, referring to the binary position map, replace the most significant bit of the encrypted pixel at position 0 with the remaining secret data, as shown in formula (9);

[0046] F ew (i,j)=b k ×128+(F e (i,j)mod128) (9)

[0047] In formula (9), b k is a bit of secret data, 1≤k≤M×N; F ew (i,j) represents the encrypted pixel with embedded data.

[0048] The specific process of step 4 is:

[0049] Step 4.1: Divide each encrypted pixel with embedded data into 8 binary bits, as shown in formula (10):

[0050]

[0051] In formula (10), f ew (i, j, k) represents the binary bit of the encrypted pixel where the data is embedded;

[0052] Step 4.2: Repeat step 2.2, using the encryption key K e Generate a pseudo-random sequence r(i,j,k), perform an XOR operation on the pseudo-random sequence and the binary bits of the encrypted pixels of the encrypted image to obtain the direct decryption bit, as shown in formula (11):

[0053]

[0054] In formula (11), Indicates direct decryption bit;

[0055] Step 4.3, convert the direct decryption bit from binary to decimal to obtain the pixels of the direct decrypted image, as shown in formula (12);

[0056]

[0057] In formula (12), It is the pixel of the directly decrypted image;

[0058] Step 4.4: Calculate the pixel value when the most significant bit is set to 0 and 1 As shown in formula (13):

[0059]

[0060]

[0061] Step 4.5: Calculation The absolute value of the difference between the predicted pixel value and the current pixel, The absolute value of the difference between the predicted pixel value and the current pixel, and the smaller of the two absolute values ​​is recorded as the correct pixel value:

[0062]

[0063]

[0064]

[0065] The specific process of step 5 is:

[0066] Step 5.1: Extract the encrypted pixel F with embedded data ew N of (i,j) pThe least significant bits are used to obtain the three embedded parameters, namely T, B, and S, and the remaining N t -N p The encrypted pixels with embedded data are divided into (N t -N p ) / B groups, for each encrypted pixel group with embedded data, S bits are extracted from the T least significant bits of the encrypted pixel with embedded data, and a total of (N t -N p ) S / B bit, that is, extracting the binary position map and a part of the secret data;

[0067] Step 5.2, extract the most significant bit of the pixel at the position of 0 in the binary position map, as shown in formula (16), to obtain the data embedded in step 3;

[0068] b k =F ew (i,j) / 128 (16)

[0069] In formula (16), b k is one bit of secret data, 1≤k≤M×N.

[0070] The specific process of step 6 is:

[0071] Step 6.1, construct a matrix W, whose size is S×T·B:

[0072]

[0073] In formula (17), D represents a randomly generated binary matrix of size (T·BS)×S, I S is an S×S identity matrix;

[0074] Step 6.2: N t -N p The extracted encrypted pixels are divided into (N t -N p ) / B groups, for each extracted encrypted pixel group, extract S bits from the T least significant bits of the extracted encrypted pixel, and then intercept the first T BS bits, denoted as P′(v,1),P′(v,2),…,P′(v,T BS), then the original bit group w before compression is expressed as:

[0075] w=[P′(v,1)P′(v,2)…P′(v,T·BS)00…0]T+ε·W (18)

[0076] In formula (18), ε is an arbitrary binary vector with a size of 1×S;

[0077] Step 6.3: Based on each original bit group w before compression, a group of encrypted pixels A is obtained. Repeat step 4 for the group of encrypted pixels A to obtain the decrypted pixel group C. w , the pixel value in the decrypted pixel group is represented by t i,j ;

[0078] Step 6.4, calculating the estimated grayscale value from the adjacent pixels of the directly decrypted image of the encrypted pixel A obtained by repeating step 4.3 for the encrypted pixel A, as shown in formula (19);

[0079]

[0080] In formula (19), B'(i,j) represents the estimated gray value;

[0081] Step 6.5: For each group, the total difference between the pixel value in the decrypted pixel group and its corresponding estimated grayscale value is calculated as:

[0082] R=Σ|t i,j -B' i,j |(i,j)∈C w (20)

[0083] When R is the smallest, the pixel value t in the decrypted pixel group i,j are considered as pixels of the restored image.

[0084] The beneficial effects of the present invention are that the method of the present invention can maximize the embedding rate of the method on the basis of ensuring that the original image can be restored losslessly, and realizes separable reversible data hiding in the restoration stage. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 is a flow chart of the method of the present invention;

[0086] FIG2( a ) is a test graph Lena of the method of the present invention;

[0087] FIG2( b ) is an image of Lena encrypted by the method of the present invention;

[0088] FIG2(c) is an encrypted image of Lena in which the data to be embedded is embedded by the method of the present invention;

[0089] Figure 2(d) is a direct image of the method of the present invention;

[0090] FIG2( e ) is a restored image of the method of the present invention;

[0091] FIG3( a ) is the original histogram of Lena by the method of the present invention;

[0092] FIG3( b ) is a histogram of the Lena encrypted image by the method of the present invention;

[0093] FIG3( c ) is a histogram of the encrypted image after the method of the present invention embeds the data of Lena. DETAILED DESCRIPTION

[0094] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0095] The present invention provides a data hiding method based on most significant bit replacement and least significant bit compression, such as Figure 1 As shown, the specific implementation steps are as follows:

[0096] Step 1: Calculate the binary position map corresponding to the original image

[0097] Step 1.1, create an initial binary position map L, the binary position map L has M×N pixels and all pixels are set to 0;

[0098] Step 1.2, except for the pixels in the first row and the first column of the original image F (size is M×N), calculate the absolute value of the difference between each original pixel F(i,j) and its left pixel F(i-1,j), and the absolute value of the difference between each original pixel F(i,j) and its upper pixel F(i,j-1), and record the smaller of these two absolute values ​​as the predicted pixel value F pred (i, j), where (i, j) is the pixel coordinate, 2≤i≤M, 2≤j≤N, as shown in formula (1):

[0099] If|F(i-1,j)-F(i,j)|-|F(i,j-1)-F(i,j)|<0

[0100] then F pred (i,j)=F(i-1,j),

[0101] else F pre d(i,j)=F(i,j-1). (1)

[0102] In formula (1), (i, j) is the pixel coordinate, 2≤i≤M, 2≤j≤N;

[0103] Step 1.3, calculate the inverse value F corresponding to each original pixel inv (i,j), as shown in formula (2):

[0104] F inv (i,j)=(F(i,j)+128)mod256 (2)

[0105] Step 1.4, respectively calculate the absolute value of the difference between the predicted pixel value and the original pixel value, and the absolute value of the difference between the predicted pixel value and the inverse value of the original pixel, as shown in formula (3):

[0106]

[0107] Among them, Φ(i,j) represents the absolute value of the difference between the predicted pixel value and the original pixel value,

[0108] Φ inv (i, j) represents the absolute value of the difference between the predicted pixel value and the inverse value of the original pixel;

[0109] Step 1.5: When the original pixel value is closer to the predicted pixel value than the inverse value of the original pixel, that is, when Φ(i,j)<Φ inv (i, j), there is no prediction error for the current pixel, and the pixel value in the binary position map remains unchanged at 0; when Φ(i, j)≥Φ inv (i, j), the current pixel has a prediction error, and the pixel value in the binary position map is changed to 1;

[0110] Step 2: Encrypt the original image to obtain encrypted pixels

[0111] Step 2.1, divide each pixel value of the original image into 8 binary bits, as shown in formula (4);

[0112]

[0113] In formula (4), f(i,j,k) represents the binary bit of the original image pixel;

[0114] Step 2.2, using the encryption key K e Generate a pseudo-random sequence r(i,j,k) through a stream cipher, and perform an XOR operation on the binary bits of the original image pixels and the generated pseudo-random sequence to obtain the encrypted bits, as shown in formula (5);

[0115]

[0116] In formula (5), f e (i,j,k) represents the encryption bit, Indicates XOR calculation;

[0117] Step 2.3, convert the encrypted bit from binary to decimal to obtain the encrypted pixel, as shown in formula (6);

[0118]

[0119] In formula (6), F e (i,j) indicates encrypted pixels;

[0120] Step 3: embed the data to be embedded into the encrypted pixel to obtain the encrypted pixel with embedded data

[0121] The data to be embedded consists of three parts: parameters T, B, S, binary position map and secret data.

[0122] Step 3.1, set three parameters T, B, S, use N p The three parameters are stored in pixels. The encrypted pixels are then grouped. Each group contains B pixels. T least significant bits are extracted from each pixel in each group, expressed as P(v,1), P(v,2), …, P(v,T·B), where v is the number of groups [1, (N t -N p ) / B],N t =M×N is the total pixel value;

[0123] Step 3.2, create a matrix of size (T·BS)×(T·B), expressed as:

[0124] G=[I T·B-S D] (7)

[0125] In formula (7), I T·B-S represents an identity matrix of size (T·BS)×(T·BS), and D represents a randomly generated binary matrix of size (T·BS)×S;

[0126] Step 3.3, the compressed pixel group is obtained by matrix multiplication. The compressed pixel group is expressed as P′(v,1), P′(v,2),…, and P′(v,T·BS), and the expression is:

[0127]

[0128] Each group is compressed to free up S bits of space to embed additional data, so a total of (N t -N p )·S / B bit, first embed the parameters T, B, S in the S bit space, then embed the binary position map, and then embed a part of the secret data in the remaining space. You can set N p is 20, where the values ​​of T, B and S are represented by 2, 14 and 4 bits respectively;

[0129] Step 3.4, referring to the binary position map, replace the most significant bit of the encrypted pixel at position 0 with the remaining secret data, as shown in formula (9);

[0130] F ew (i,j)=b k ×128+(F e(i,j)mod128) (9)

[0131] In formula (9), b k is a bit of secret data, 1≤k≤M×N; F ew (i, j) represents the encrypted pixel of the encrypted image. After embedding in two ways, the encrypted image F with embedded data is generated. ew ;

[0132] Step 4: Decrypt the encrypted pixels of the embedded data obtained in step 3 to obtain a directly decrypted image.

[0133] Step 4.1: Divide each encrypted pixel with embedded data into 8 binary bits, as shown in formula (10):

[0134]

[0135] In formula (10), f ew (i, j, k) represents the binary bit of the encrypted pixel where the data is embedded;

[0136] Step 4.2: Repeat step 2.2, using the encryption key K e Generate a pseudo-random sequence r(i,j,k), perform XOR operation on the binary bits of the encrypted pixel with embedded data, and obtain the direct decryption bit, as shown in formula (11):

[0137]

[0138] In formula (11), Indicates direct decryption bit;

[0139] Step 4.3, convert the direct decryption bit from binary to decimal to obtain the pixels of the direct decrypted image, as shown in formula (12);

[0140]

[0141] In formula (12), It is the pixel of the directly decrypted image;

[0142] Step 4.4: Calculate the pixel value when the most significant bit is set to 0 and 1 As shown in formula (13):

[0143]

[0144]

[0145] Step 4.5: Calculation The absolute value of the difference between the predicted pixel value and the current pixel, The absolute value of the difference between the predicted pixel value and the current pixel, and the smaller of the two absolute values ​​is recorded as the correct pixel value:

[0146]

[0147]

[0148]

[0149] Step 5: Extract the data embedded in step 3

[0150] Step 5.1, extract the encrypted pixel F with embedded data ew N of (i,j) p The least significant bits are used to obtain the three embedded parameters, namely T, B, and S, and the remaining N t -N p The encrypted pixels with embedded data are divided into (N t -N p ) / B groups, for each encrypted pixel group with embedded data, S bits are extracted from the T least significant bits of the encrypted pixel with embedded data, and a total of (N t -N p ) S / B bit, that is, extracting the binary position map and a part of the secret data;

[0151] Step 5.2, extract the most significant bit of the pixel at the position of 0 in the binary position map, as shown in formula (16), to obtain the data embedded in step 3;

[0152] bk = F ew (i,j) / 128 (16)

[0153] In formula (16), b k is a bit of secret data, 1≤k≤M×N;

[0154] Step 6: Perform image restoration on the encrypted pixels extracted in step 5

[0155] Step 6.1, construct a matrix W, whose size is S×T·B:

[0156]

[0157] In formula (17), D represents a randomly generated binary matrix of size (T·BS)×S, I S is an S×S identity matrix;

[0158] Step 6.2: N t -N p The extracted encrypted pixels are divided into (Nt -N p ) / B groups, for each extracted encrypted pixel group, extract S bits from the T least significant bits of the extracted encrypted pixel, and then intercept the first T BS bits, denoted as P′(v,1),P′(v,2),…,P′(v,T BS), then the original bit group w before compression is expressed as:

[0159] w=[P′(v,1)P′(v,2)…P′(v,T·BS)00…0] T +ε·W (18)

[0160] In formula (18), ε is an arbitrary binary vector with a size of 1×S;

[0161] Step 6.3: Based on each original bit group w before compression, a group of encrypted pixels A is obtained. Repeat step 4 for the group of encrypted pixels A to obtain the decrypted pixel group C. w , the pixel value in the decrypted pixel group is represented by t i,j ;

[0162] Step 6.4, calculating the estimated grayscale value from the adjacent pixels of the directly decrypted image of the encrypted pixel A obtained by repeating step 4.3 for the encrypted pixel A, as shown in formula (19);

[0163]

[0164] In formula (19), B'(i,j) represents the estimated gray value;

[0165] Step 6.5: For each group, the total difference between the pixel value in the decrypted pixel group and its corresponding estimated grayscale value is calculated as:

[0166] R=∑|t i,j -B' i,j |(i,j)∈C w (20)

[0167] When R is the smallest, the pixel value t in the decrypted pixel group i,j are considered as pixels of the restored image.

[0168] Example

[0169] In this embodiment, the model Lena is selected as the experimental object, as shown in Figure 2(a). The data to be embedded are the parameters T, B, S, the binary position map and the secret data. Figure 2(b) shows the encryption result of the sequence generated by the Chen system. It is noisy, so no valid information can be observed from it. Figure 2(c) shows the sequence containing 2.66×10 5Encrypted image of the secret bit, where the three parameters T, B, and S are set to 3, 150, and 5, respectively. The embedding rate reaches 1.0156 bits per pixel (bpp). If only the data hiding key auxiliary information is obtained and the least significant bit of the encrypted image can be obtained from the marked parameters T, B, S, the binary position map. With the help of this auxiliary information, the secret data W3 can be recovered from the most important bit that can be embedded. If only the encryption key is obtained, an approximate image very close to the original image can be restored, as shown in Figure 2(c), and the PSNR between them is 38.078dB. When both the encryption key and the data hiding key are possessed, not only can the secret data be successfully extracted, but the original image can also be restored losslessly, that is, PSNR = +∞, as shown in Figure 2(d) , 2(e) shown.

[0170] 1. Parameter analysis on least significant bit compression

[0171] Except for pixels with prediction errors, the most significant bits of other pixels can be used to embed secret data. If the least significant bits of all pixels are effectively compressed, the embedding rate will be greatly improved, which mainly depends on the parameters adopted in the compression process. In addition, the quality of the directly decrypted image and whether the original image can be restored losslessly also depends on the settings of these parameters. Therefore, it is important to analyze the impact of these parameters in detail.

[0172] Taking the images "Lena" and "Man" as examples, Tables 1 and 2 list the embedding rate, the PSNR of the directly decrypted image, and the PSNR of the restored image, respectively, with different parameters set. From observing the results listed in the table, the following conclusions can be drawn:

[0173] 1. When S is larger and B is smaller, the embedding rate is higher. This is because when B is smaller, the encrypted image is divided into more groups, each group has S bits vacated, and more space is compressed from it.

[0174] 2. When S is small and B is large, the amount of data embedded in the least significant bit is small, and more data in the encrypted image is not compressed and modified by the least significant bit. Therefore, the image directly decrypted has better quality.

[0175] 3. When T and S are small and B is large, the image quality of direct decryption is better. This is because the position map information can be extracted from the least significant bit, and the lossless recovery of the least significant bit can be achieved through pixel prediction.

[0176] 4. When T and B are larger and S is smaller, less data is embedded into the least significant bit, so the original image can be reconstructed without any loss.

[0177] 5. When T and B are too small or S is too large, the original image can be restored, but there will be some information loss, that is, PSNR≠+∞.

[0178] According to Table 1 and Table 2, under the condition that the original image can be losslessly restored, when the three parameters are set to 3, 150, and 5 respectively, the maximum embedding rate of the image "Lena" is 1.0156bpp, and the PSNR of the directly decrypted image is 38.1dB. The maximum embedding rate of the image "Man" is 0.9957bpp, and the PSNR of the directly decrypted image is 37.9dB.

[0179] Table 1 Embedding rate, PSNR of directly decrypted image, and PSNR of restored image with different parameters for image "Lena"

[0180]

[0181] Table 2 Embedding rate, PSNR of directly decrypted image, and PSNR of restored image with different parameters for image "Man"

[0182]

[0183] 2. Security Analysis

[0184] In order to evaluate the security of the proposed method, we analyze it from the histogram features. First, taking the image "Lena" as an example, the histograms of the original image, the encrypted image, and the marked encrypted image are shown in Figure 3(a), Figure 3(b), and Figure 3(c). It is obvious that the pixel distribution in Figure 3(a) is obvious, from which the statistical characteristics of the original image can be inferred. However, for the encrypted image shown in Figure 3(b), the distribution of pixels is uniform, and no useful statistical characteristics can be observed from it. After embedding the secret information, the distribution of pixels is still uniform, as shown in Figure 3(c), which is obviously different from the distribution of the original image, and the original content of the image cannot be retrieved. Similar results were obtained for other test images, which proves that the proposed method has high security in resisting histogram analysis.

Claims

1. A data hiding method based on most significant bit replacement and least significant bit compression, characterized in that: Follow the steps below to implement it: Step 1, calculate the binary position map corresponding to the original image; The specific process of step 1 is: Step 1.1, create an initial binary position map L, the binary position map L has M×N pixels and all pixels are set to 0; Step 1.2, except for the pixels in the first row and the first column of the original image F, calculate the absolute value of the difference between each original pixel F(i,j) and its left pixel F(i-1,j), and the absolute value of the difference between each original pixel F(i,j) and its upper pixel F(i,j-1), and record the smaller of these two absolute values ​​as the predicted pixel value F pred (i, j), where (i, j) is the pixel coordinate, 2≤i≤M, 2≤j≤N, as shown in formula (1): If|F(i-1,j)-F(i,j)-|F(i,j-1)-F(i,j)|<0 then F pred (i,j)=F(i-1,j), else F pred (i,j)=F(i,j-1). (1) In formula (1), (i, j) is the pixel coordinate, 2≤i≤M, 2≤j≤N; Step 1.3, calculate the inverse value F corresponding to each original pixel inv (i,j), as shown in formula (2): F inv (i,j)=(F(i,j)+128)mod256 (2) Step 1.4, respectively calculate the absolute value of the difference between the predicted pixel value and the original pixel value, and the absolute value of the difference between the predicted pixel value and the inverse value of the original pixel, as shown in formula (3): Among them, Φ(i,j) represents the absolute value of the difference between the predicted pixel value and the original pixel value, Φ inv (i, j) represents the absolute value of the difference between the predicted pixel value and the inverse value of the original pixel; Step 1.5, when Φ(i,j)<Φ inv (i, j), there is no prediction error for the current pixel, and the pixel value in the binary position map remains unchanged at 0; when Φ(i, j)≥Φ inv (i, j), the current pixel has a prediction error, and the pixel value in the binary position map is changed to 1; Step 2, encrypting the original image to obtain encrypted pixels; Step 3, embedding the data to be embedded into the encrypted pixel to obtain the encrypted pixel with the embedded data; The data to be embedded consists of three parts: parameters T, B, S, binary position map and secret data; The specific process of step 3 is: Step 3.1, set three parameters T, B, S, use N p The three parameters are stored in pixels. The encrypted pixels are then grouped. Each group contains B pixels. T least significant bits are extracted from each pixel in each group, expressed as P(v,1), P(v,2), …, P(v,T·B), where v is the number of groups [1, (N t -N p ) / B],N t =M×N is the total pixel value; Step 3.2, create a matrix of size (T·BS)×(T·B), expressed as: G=[I T·B-S D] (7) In formula (7), I T·B-S represents an identity matrix of size (T·BS)×(T·BS), and D represents a randomly generated binary matrix of size (T·BS)×S; Step 3.3, the compressed pixel group is obtained by matrix multiplication. The compressed pixel group is expressed as P′(v,1), P′(v,2),…, and P′(v,T·BS), and the expression is: Each group is compressed to free up S bits of space to embed additional data, so a total of (N t -N p ) S / B bits, first embed the parameters T, B, S in the S-bit space, then embed the binary position map, and finally embed a part of the secret data in the remaining space; Step 3.4, referring to the binary position map, replace the most significant bit of the encrypted pixel at position 0 with the remaining secret data, as shown in formula (9); F ew (i,j)=bk×128+(F e (i,j)mod 128) (9) In formula (9), b k is a bit of secret data, 1≤k≤M×N; F ew (i, j) represents the encrypted pixel with embedded data; Step 4, decrypting the encrypted pixels of the embedded data obtained in step 3 to obtain a directly decrypted image; Step 5, extract the data embedded in step 3; Step 6, performing image restoration on the encrypted pixels extracted in step 5.

2. The data hiding method based on most significant bit replacement and least significant bit compression according to claim 1, characterized in that: The specific process of step 2 is: Step 2.1, divide each pixel value of the original image into 8 binary bits, as shown in formula (4); In formula (4), f(i,j,k) represents the binary bit of the original image pixel; Step 2.2, using the encryption key K e Generate a pseudo-random sequence r(i,j,k) through a stream cipher, and perform an XOR operation on the binary bits of the original image pixels and the generated pseudo-random sequence to obtain the encrypted bits, as shown in formula (5); In formula (5), f e (i,j,k) represents the encryption bit, Indicates XOR calculation; Step 2.3, convert the encrypted bit from binary to decimal to obtain the encrypted pixel, as shown in formula (6); In formula (6), F e (i,j) represents the encrypted pixel.

3. The data hiding method based on most significant bit replacement and least significant bit compression according to claim 1, characterized in that: The specific process of step 4 is: Step 4.1: Divide each encrypted pixel with embedded data into 8 binary bits, as shown in formula (10): In formula (10), f ew (i, j, k) represents the binary bit of the encrypted pixel where the data is embedded; Step 4.2: Repeat step 2.2, using the encryption key K e Generate a pseudo-random sequence r(i,j,k), perform an XOR operation on the pseudo-random sequence and the binary bits of the encrypted pixels of the encrypted image to obtain the direct decryption bit, as shown in formula (11): In formula (11), Indicates direct decryption bit; Step 4.3, convert the direct decryption bit from binary to decimal to obtain the pixels of the direct decrypted image, as shown in formula (12); In formula (12), It is the pixel of the directly decrypted image; Step 4.4: Calculate the pixel value when the most significant bit is set to 0 and 1 As shown in formula (13): Step 4.5: Calculation The absolute value of the difference between the predicted pixel value and the current pixel, The absolute value of the difference between the predicted pixel value and the current pixel, and the smaller of the two absolute values ​​is recorded as the correct pixel value:

4. The data hiding method based on most significant bit replacement and least significant bit compression according to claim 1, characterized in that: The specific process of step 5 is: Step 5.1: Extract the encrypted pixel F with embedded data ew N of (i,j) p The least significant bits are used to obtain the three embedded parameters, namely T, B, and S, and the remaining N t -N p The encrypted pixels with embedded data are divided into (N t -N p ) / B groups, for each encrypted pixel group with embedded data, S bits are extracted from the T least significant bits of the encrypted pixel with embedded data, and a total of (N t -N p ) S / B bit, that is, extracting the binary position map and a part of the secret data; Step 5.2, extract the most significant bit of the pixel at the position of 0 in the binary position map, as shown in formula (16), to obtain the data embedded in step 3; b k =F ew (i,j) / 128 (16) In formula (16), b k is one bit of secret data, 1≤k≤M×N.

5. The data hiding method based on most significant bit replacement and least significant bit compression according to claim 1, characterized in that: The specific process of step 6 is: Step 6.1, construct a matrix W, whose size is S×T·B: In formula (17), D represents a randomly generated binary matrix of size (T·BS)×S, I S is an S×S identity matrix; Step 6.2: N t -N p The extracted encrypted pixels are divided into (N t -N p ) / B groups, for each extracted encrypted pixel group, extract S bits from the T least significant bits of the extracted encrypted pixel, and then intercept the first T BS bits, denoted as P′(v,1),P′(v,2),…,P′(v,T BS), then the original bit group w before compression is expressed as: w=[P′(v,1)P′(v,2)…P′(v,T·B-S)00...0] T +ε·W (18) In formula (18), ε is an arbitrary binary vector with a size of 1×S; Step 6.3: Based on each original bit group w before compression, a group of encrypted pixels A is obtained. Repeat step 4 for the group of encrypted pixels A to obtain the decrypted pixel group C. w , the pixel value in the decrypted pixel group is represented by t i,j ; Step 6.4, calculating the estimated grayscale value from the adjacent pixels of the directly decrypted image of the encrypted pixel A obtained by repeating step 4.3 for the encrypted pixel A, as shown in formula (19); In formula (19), B'(i,j) represents the estimated gray value; Step 6.5: For each group, the total difference between the pixel value in the decrypted pixel group and its corresponding estimated grayscale value is calculated as: R=∑|t i,j -B' i,j |(i,j)∈C w (20) When R is the smallest, the pixel value t in the decrypted pixel group i,j are considered as pixels of the restored image.

Citation Information

Patent Citations

  • A system for reversible data hiding in encrypted images

    AU2021102700A4

  • Reversible information hiding method for encrypted image

    CN105847629A

  • Asymmetric multi-image encryption method based on Logistic chaotic mapping

    CN108833736A

  • Ciphertext domain high-capacity image reversible data hiding method

    CN109348230A

  • Separable ciphertext domain reversible data hiding method

    CN111898138A