A method for recording and extracting audit information of text images based on reversible steganography in ciphertext domain

By embedding sensitive information in encrypted text images, generating audit records and performing reversible extraction, the problem of difficult auditing of sensitive information in encrypted instant messaging systems is solved, and audit information can be obtained without decryption, thus protecting the security of sensitive information.

CN115765963BActive Publication Date: 2025-10-10FUJIAN NORCA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211358742.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2025-10-10
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

In privately deployed encrypted instant messaging systems, it is difficult for organizations to conduct post-audits after users transmit text or images of sensitive information, and traditional decryption methods pose the risk of uncontrolled spread of sensitive information.

Method used

A reversible steganography method based on the ciphertext domain is used to hide sensitive words, sender information, receiver information and other additional information in the encrypted text image to generate audit records. The information is embedded and extracted through the difference histogram shift method to ensure that the audit information can be obtained without decryption.

Benefits of technology

It enables the acquisition of audit information without decryption, protects the confidentiality of text and images, reduces the risk of uncontrolled spread of sensitive information, and improves the reliability and security of audits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115765963B_ABST
    Figure CN115765963B_ABST
Patent Text Reader

Abstract

The application discloses a text image audit information recording and extraction method based on a ciphertext domain reversible steganography, and comprises the following contents: for a text image containing sensitive words sent by a user, audit information is hidden in the encrypted text image based on a ciphertext domain reversible steganography method in a terminal to form an audit record; when audit is needed, the hidden audit information is extracted from the audit record. The method reversibly hides the audit information of the text image containing sensitive words in the ciphertext image of the text image in the terminal, generates an audit record, and is ready for subsequent audit, and the audit information can be acquired without decryption, thereby protecting the confidentiality of the text image to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of secure communications, and in particular relates to a method for recording and extracting text image audit information based on reversible steganography in a ciphertext domain. Background Art

[0002] To ensure the secure transmission of work information over the internet, more and more organizations are adopting privately deployed encrypted instant messaging systems. However, when users use these systems to transmit text and images containing sensitive information that organizations have explicitly prohibited from online transmission, post-audit becomes difficult. If the server doesn't retain the data, evidence collection becomes difficult. If it does, traditional methods often require direct decryption of the encrypted images. However, in practice, auditors and authorized personnel with access to sensitive information (defined by organizations as defined by regulations) are often different. Therefore, there is a risk of uncontrolled dissemination of sensitive information. Therefore, post-audit methods for such issues need to be improved. Summary of the Invention

[0003] The purpose of the present invention is to provide a method for recording and extracting audit information of text images based on reversible steganography in the ciphertext domain, which reversibly hides the audit information of text images containing sensitive words in their ciphertext images at the terminal, generates audit records for subsequent audits, and can obtain audit information without decryption, thereby protecting the confidentiality of the text images to a certain extent.

[0004] In order to achieve the above object, the solution of the present invention is:

[0005] A method for recording and extracting audit information from text images based on ciphertext domain reversible steganography includes the following contents: for text images containing sensitive words sent by users, audit information is hidden in the encrypted text images based on the ciphertext domain reversible steganography method at the terminal to form an audit record; when an audit is required, the hidden audit information is extracted from the audit record.

[0006] The specific process of generating audit records on the terminal is:

[0007] Step A1: Assume that the size of the text image A containing sensitive words is H×W, and calculate the number of pixels of A: pix=H*W;

[0008] Step A2: Randomly select a 16-byte string S as the symmetric key and use the ZUC algorithm to generate a key stream K of length pix / 2;

[0009] Step A3, preprocessing image A according to the key stream K to obtain image A1;

[0010] Step A4, calculating the summary H1=SM3(A1) of image A1, where SM3(·) indicates that the summary is obtained using the SM3 algorithm;

[0011] Step A5: Encrypt image A1 using key stream K to obtain ciphertext image B;

[0012] Step A6: Calculate the encryption key of S: enS = SM2_enc(S, ePub), where SM2_enc(·) represents the SM2 encryption algorithm, S is the plaintext, and the public key ePub of the person authorized to know the sensitive information is the key.

[0013] In step A7, the sensitive words Sw, H1, enS, sender information SI, receiver information RI and other additional information Add are hidden in the ciphertext image B by combining the difference histogram shift method to obtain the ciphertext image C. Image C is the audit record of the text image A.

[0014] The specific contents of the above step A3 are:

[0015] Step A31, dividing the image A into a plurality of non-overlapping groups, with each adjacent two pixels forming a group;

[0016] In step A32, image A is processed to obtain image A1. The processing method is as follows:

[0017]

[0018] Where i = {1, 2}, j = {1, 2, ..., pix / 2}, a i,j Represents the pixel value of the i-th pixel in the j-th group of the grayscale image A, (~a i,j ) means a i,j Binary inversion, a' i,j represents the pixel value of the i-th pixel in the j-th group of the grayscale image A1, Represents a bitwise exclusive OR operation.

[0019] The specific contents of the above step A5 are:

[0020] Step A51, grouping image A1 in the same manner as image A;

[0021] In step A52, each group of pixels is encrypted with the same key. The key stream K is used to encrypt the image A1 pixel by pixel to obtain the ciphertext image B. The encryption method is as follows:

[0022]

[0023] Where i = {1, 2}, j = {1, 2, ..., pix / 2}, c i,jRepresents the pixel value of the i-th pixel in the j-th group of the ciphertext image B.

[0024] The specific content of the above step A7 is:

[0025] Step A71, calculate the length of the information to be embedded: pltlen = 16 + strlen(Sw) + 32 + 16 + 97 + strlen(SI) + strlen(RI) + strlen(Add), where the first 16 represents the length of Sw, SI, and RI, and pltlen, which each occupy 4 bytes. 32 is the byte length of H1. The second 16 represents the byte length of the symmetric key S. 97 is the byte length added after S is encrypted. The strlen(·) function determines the byte length of the character string.

[0026] Step A72, calculate the bit information to be embedded plt = int2char(pltlen)||int2char(Sw)||Sw||H1||enS||int2char(SI)||SI||int2char(RI)||RI||Add, "||" represents a concatenation operation, and int2char(·) represents the conversion of integer data into a 4-byte string;

[0027] Step A73: Group the ciphertext image B in the same way as image A, calculate the difference between adjacent pixels, and construct a difference histogram:

[0028] d j =(c i,j -c i+1,j )mod256

[0029] Where i = 1, j = {1, 2, ..., pix / 2}, d j Indicates the pixel difference of the jth group of ciphertext, c i,j 、c i+1,j Respectively represent the pixel values ​​of the first and second pixels of the j-th group of the ciphertext image B;

[0030] Step A74: Expand the difference histogram to the left of point -1 and to the right of point 0 by one unit to make room for subsequent embedding of secret information.

[0031]

[0032] Where, j = {1, 2, ..., pix / 2}, d' j is the new difference after modification;

[0033] Step A75, calculate the ciphertext pixel difference d" j and the ciphertext pixel c' i,j :

[0034]

[0035]

[0036] Wherein, i = {1, 2}, j = {1, 2, ..., pix / 2}, b∈ {0, 1} represents the bit information to be embedded, which is taken from the bit information to be embedded plt;

[0037] Step A76, repeat step A75 until plt is completely hidden and the ciphertext image C is obtained.

[0038] The specific process of extracting audit information from audit records is as follows:

[0039] Step B1: The auditor extracts Sw', H1', ​​enS', SI', RI', and Add' from the ciphertext image on his terminal and restores the ciphertext image B';

[0040] Step B2: Analyze the sensitive word Sw'. If it can be directly determined that the text image sent by the user does not involve sensitive information, then stop. Otherwise, a person authorized to know the sensitive information will perform the following process for further verification;

[0041] Step B3, calculate the symmetric key of ZUC key = SM2_dec(enS', ePri), where SM2_dec(·) represents the SM2 decryption algorithm, enS' is the ciphertext, and the private key ePri of the person authorized to know the sensitive information is the key;

[0042] Step B4: Use the key key to decrypt the ciphertext image B' using the same method as the image encryption to obtain image A';

[0043] Step B5, calculating the summary H2=SM3(A') of the image A';

[0044] Step B6: Determine whether H1' and H2 are equal. If they are equal, it proves that A' is indeed the text image A1. If the text image A1 is sensitive information, it proves that the user has violated the rules.

[0045] The specific contents of the above step B1 are:

[0046] Step B11: Group the ciphertext image in the same way as image A, calculate the difference between adjacent pixels, and construct a difference histogram:

[0047] d” j =(c' i,j -c' i+1,j )mod256

[0048] Where i = 1, j = {1, 2, …, pix / 2};

[0049] Step B12, judging the difference value of each embedded secret information pixel point, extracting the secret information according to the following formula:

[0050]

[0051] Wherein, j={1, 2, …, pix / 2};

[0052] Step B13, offsetting the difference histogram translation operation, restoring the ciphertext image:

[0053]

[0054] Wherein, i={1, 2}, j={1, 2, …, pix / 2};

[0055] Step B14, according to the combination rule of the secret information, Sw', H1', enS', SI', RI' and Add' are obtained respectively.

[0056] After the above scheme, the related audit information of the text image containing sensitive words is recorded, when the user sends the text image containing sensitive words, the text image is encrypted by using the additive homomorphic encryption mechanism, and the sensitive words, the sender information, the receiver information, the encryption key information and other additional information are reversibly hidden in the ciphertext image by combining the difference histogram translation method, so that the audit record is generated, so as to be ready for subsequent audit; the text image is pretreated before the text image is encrypted, so that the obtained ciphertext image has no boundary saturated pixels (0 or 1), and the embedding of the image position information in the reversible information hiding is reduced; the audit information of the text image is bound with the ciphertext image after the text image is encrypted, so that the audit information can be better managed, the audit personnel can obtain the audit information without decryption, the confidentiality of the text image is protected to a certain extent, and only when it is necessary to further verify whether the user violates the rules to use the encrypted instant communication system to transmit sensitive text images, the authorized personnel who know the sensitive information decrypt the encrypted image, so that the sensitive information is effectively protected. BRIEF DESCRIPTION OF DRAWINGS

[0057] Figure 1 is the overall flowchart of the present application;

[0058] Figure 2 is the principle diagram of the reversible steganography of the image ciphertext domain in the present application;

[0059] Figure 3 is the flowchart of the reversible steganography in the present application;

[0060] Figure 4 is the logical architecture schematic diagram of the ZUC algorithm;

[0061] Figure 5 is the flowchart schematic diagram of the ZUC algorithm;

[0062] Figure 6 is a schematic diagram of image grouping in the image encryption step;

[0063] Figure 7 is an encrypted difference histogram;

[0064] Figure 8 is a schematic diagram of the process of embedding secret information by shifting the difference histogram;

[0065] wherein (a) represents the difference histogram, (b) represents the shifted difference histogram, and (c) represents the difference histogram after embedding information. DETAILED DESCRIPTION

[0066] The technical solutions and beneficial effects of the present application will be described in detail below with reference to the accompanying drawings.

[0067] As shown in Figure 1 , the present application provides a text image audit information recording and extraction method based on ciphertext domain reversible steganography. For a text image sent by a user and containing sensitive words, the method processes the text image to form an audit record. When audit is needed, the hidden audit information can be extracted from the audit record. The method includes two parts: hiding of text image audit information and extraction of text image audit information, which will be described below.

[0068] As shown in Figure 2 , it is a principle diagram of image ciphertext domain reversible steganography, as shown in Figure 3 , it is a flowchart of a text image audit information recording method based on ciphertext domain reversible steganography, which is used to directly generate an audit record of a text image at a terminal. Assuming that the transmitted text image A contains sensitive words Sw, the audit information recording method includes the following steps:

[0069] Step A1, assuming that the text image A containing sensitive words has a size of HxW, the number of pixels of A is calculated as pix=H*W;

[0070] Step A2, a 16-byte string S is randomly selected as a symmetric key, and a key stream K with a length of pix / 2 is generated by using the ZUC algorithm;

[0071] Step A3, the image A is preprocessed according to the key stream K to obtain an image A1, so that the ciphertext image has no boundary saturated pixels (0 or 255), and the embedding of image position information in reversible information hiding is reduced;

[0072] Step A4, the digest H1=SM3(A1) of the image A1 is calculated, wherein SM3(·) represents the digest obtained by using the SM3 algorithm;

[0073] Step A5, the image A1 is encrypted by using the key stream K to obtain a ciphertext image B;

[0074] Step A6: Calculate the encryption key of S: enS = SM2_enc(S, ePub), where SM2_enc(·) represents the SM2 encryption algorithm, S is the plaintext, and the public key ePub of the person authorized to know the sensitive information is the key.

[0075] In step A7, the sensitive words Sw, H1, enS, sender information (denoted as SI), receiver information (denoted as RI) and other additional information (denoted as Add) are hidden in the ciphertext image B by combining the difference histogram shift method to obtain the encrypted ciphertext image C and store it on the third-party supervision platform. Image C is the audit record, and the storage location of the audit record can be specified by the system user organization. Other additional information Add usually includes information that needs to be recorded as needed, as well as information that must be hidden to achieve complete reversibility, such as data length.

[0076] Step A8: Write the operation record of the user sending the text image containing sensitive words into the audit log.

[0077] The specific content of step A3 is:

[0078] Step A31, dividing the image A into a plurality of non-overlapping groups, with each adjacent two pixels forming a group;

[0079] In step A32, image A is processed to obtain image A1. The processing method is as follows:

[0080]

[0081] Where i = {1, 2}, j = {1, 2, ..., pix / 2}, a i,j Represents the pixel value of the i-th pixel in the j-th group of the grayscale image A, (~a i,j ) means a i,j Binary inversion, a' i,j represents the pixel value of the i-th pixel in the j-th group of the grayscale image A1, Represents a bitwise exclusive OR operation.

[0082] The specific content of step A5 is:

[0083] Step A51, grouping image A1 in the same manner as image A;

[0084] In step A52, each group of pixels is encrypted with the same key. The key stream K is used to encrypt the image A1 pixel by pixel to obtain the ciphertext image B. The encryption method is as follows:

[0085]

[0086] where i = {1, 2}, j = {1, 2,..., pix / 2}, c i,j represents the pixel value of the i-th pixel of the j-th group of the ciphertext image B.

[0087] The specific content of the step A7 is:

[0088] Step A71, calculate the length of the information to be embedded pltlen = 16 + strlen(Sw) + 32 + 16 + 97 + strlen(SI) + strlen(RI) + strlen(Add), where the first 16 represents the length of Sw, SI and RI and pltlen respectively occupies 4 bytes, 32 is the byte length of H1, the second 16 represents the byte length of the symmetric key S, 97 is the byte length increased after S encryption, and the strlen(·) function represents the byte length of the string;

[0089] Step A72, calculate the embedded bit information plt = int2char(pltlen) || int2char(Sw) || Sw || H1 || enS || int2char(SI) || SI || int2char(RI) || RI || Add, "||" represents the splicing operation, and int2char(·) represents the conversion of integer data to 4-byte string;

[0090] Step A73, the ciphertext image B is grouped in the same way as image A, the difference value of adjacent pixels is calculated, and the difference histogram is constructed:

[0091] d j = (c i,j -c i+1,j ) mod 256

[0092] where i = 1, j = {1, 2,..., pix / 2}, d j represents the j-th group of pixel difference value, c i,j , c i+1,j respectively represent the pixel value of the first and second pixels of the j-th group of the ciphertext image B;

[0093] Step A74, the difference histogram left of -1 point and right of 0 point is expanded by one unit outward, which leaves space for the embedding of subsequent secret information:

[0094]

[0095] where j = {1, 2,..., pix / 2}, d' j is the new difference value after modification;

[0096] Step A75, calculate the steganographic ciphertext pixel difference value d" jand the ciphertext pixel c' i,j :

[0097]

[0098]

[0099] Wherein, i = {1, 2}, j = {1, 2, ..., pix / 2}, b∈ {0, 1} represents the bit information to be embedded, which is taken from the bit information to be embedded plt;

[0100] Step A76, repeat step A75 until plt is completely hidden and the ciphertext image C is obtained.

[0101] The present invention also provides a method for extracting audit information from text images based on ciphertext domain reversible steganography, comprising the following steps:

[0102] Step B1: The auditor counts the number of times in the audit log that users send text images containing sensitive words;

[0103] Step B2: For users who send more times, the auditor obtains their audit records from the audit record storage location, extracts Sw', H1', ​​enS', SI', RI', and Add' from them, and then restores the ciphertext image B';

[0104] Step B3: Analyze the sensitive word Sw'. If it can be directly determined that the text image sent by the user does not involve sensitive information, then stop. Otherwise, a person authorized to know the sensitive information will perform the following process for further verification;

[0105] Step B4, calculate the symmetric key of ZUC key = SM2_dec(enS', ePri), where SM2_dec(·) represents the SM2 decryption algorithm, enS' is the ciphertext, and the private key ePri of the person authorized to know the sensitive information is the key;

[0106] Step B5: Use the key key to decrypt the ciphertext image B' using the same method as the image encryption to obtain image A';

[0107] Step B6, calculating the summary H2=SM3(A') of the image A';

[0108] Step B7: Determine whether H1' and H2 are equal. If they are equal, it proves that A' is indeed the text image A. If the text image A is sensitive information, the user is determined to have violated the rules.

[0109] The information extraction in step B2 is the inverse process of embedding, and the specific contents are:

[0110] Step B21: Group the ciphertext image in the same way as image A, calculate the difference between adjacent pixels, and construct a difference histogram:

[0111] d” j =(c' i,j -c' i+1,j )mod256

[0112] Where, i=1, j={1,2,…,pix / 2}.

[0113] Step B22: Determine the difference between each pixel embedded with secret information and extract the secret information according to the following formula:

[0114]

[0115] Where j = {1, 2,…, pix / 2}.

[0116] Step B23, offset the difference histogram shift operation and restore the ciphertext image:

[0117]

[0118] Where, i = {1, 2}, j = {1, 2,…, pix / 2}.

[0119] In step B24, according to the secret information combination rule (steps A71 and A72), Sw', H1', ​​enS', SI', RI' and Add' are obtained respectively.

[0120] The following is a detailed description of the relevant contents of the present invention.

[0121] 1. ZUC cryptographic algorithm

[0122] The ZUC algorithm is a synchronous sequence cipher, a national cryptographic standard in China, and the first Chinese cryptographic algorithm to become an international cryptographic standard.

[0123] like Figure 4 As shown in Figure 1, the ZUC algorithm is logically divided into three layers: upper, middle, and lower layers. The upper layer is a 16-stage linear feedback shift register (LFSR), the middle layer is a bit reorganization (BR), and the lower layer is a nonlinear function F.

[0124] The upper LFSR consists of 16 31-bit register unit variables, each variable is in the set {1,2,3,...,2 31 -1}. The linear feedback shift register is based on the finite field GF(2 31 -1) 16th degree polynomial:

[0125] P(x)=x 16 -2 15 x15 -2 17 x 13 -2 21 x 10 -2 20 x 4 -(2 8 +1)

[0126] is a connecting polynomial. Therefore, the output is a prime field GF(2 31 -1) has good randomness.

[0127] The middle layer bit reorganization extracts 128 bits from the LFSR register unit to form four 32-bit words X0, X1, X2, and X3. The bit reorganization uses half-merging technology to realize the data conversion from the LFSR data unit to the nonlinear function F and the key output. Its main purpose is to destroy the LFSR in the prime field GF(2 31 -1) on the linear structure.

[0128] The nonlinear function F contains two 32-bit storage units R0 and R1. The input of F is three 32-bit words X0, X1, and X2 from bit reorganization, and the output is a 32-bit word W.

[0129] The algorithm flow is as follows Figure 5 shown.

[0130] The LFSR of the ZUC algorithm takes both security and efficiency into full consideration during its design, achieving high security goals while having highly efficient hardware and software implementations.

[0131] In the bit reassembly part, the reassembled data has good randomness and the probability of duplication is small enough.

[0132] In the design of the nonlinear function F, two nonlinear transformation S-boxes S0 and S1 are used. The S-box provides obfuscation for the password, and L provides diffusion for the password. The two work together to improve the security of the password.

[0133] 2. Homomorphic encryption algorithm

[0134] The characteristic of homomorphic encryption is that certain operations performed on ciphertext have the same effect as those performed directly on plaintext. The general definition of homomorphic encryption is as follows:

[0135] Let M represent the plaintext set, C represent the ciphertext set, given the encryption key K and the encryption function E, if the following equation is satisfied, we call it homomorphic encryption:

[0136]

[0137] in, represents the operation in the plaintext set M, Represents an operation on the ciphertext set C, and “←” represents “can be directly calculated from…”, that is, there is no intermediate decryption process.

[0138] The encryption method selected by this invention and the homomorphism it meets (addition, subtraction, multiplication, and division) must be consistent with image encryption. To ensure high security and low complexity of image encryption, the key stream generated by the ZUC algorithm is selected to encrypt the image pixel by pixel, ensuring that the corresponding homomorphism meets additive homomorphism.

[0139] Additive homomorphism means that there is an operation The encryption system satisfies the following formula:

[0140]

[0141]

[0142] 3. Image encryption steps

[0143] First, group the original image into groups, with each two adjacent pixels as a group, such as Figure 6 As shown (each row of black and white dots is a group).

[0144] It is stipulated that each group of pixels is encrypted with the same key. The original image size is H×W, and the plaintext set M is the pixels of the original grayscale image. An initial key S is selected to generate a key stream K of length (H*W) / 2 to encrypt M pixel by pixel to obtain the ciphertext set C. E() represents the encryption process. The encryption method is modulo 256 addition. The encryption formula is:

[0145]

[0146] The number of pixels in the original image is represented by L, the i-th plaintext pixel, the random number in the key stream, and the ciphertext pixel are represented by m respectively. i , k i , c i In this way, the image can be encrypted in the above way. The security of this encryption mechanism depends on the ZUC stream cipher used.

[0147] The proof of the homomorphism of this encryption method is as follows:

[0148] E(O m(m1,m2),k)=E((m1+m2)mod256,k1+k2)=((m1+m2)mod256+k1+k2)mod256=(m1+m2+k1+k2)mod25 6=(m1+k1)mod256+(m2+k2)mod256=((m1+k1)mod256+(m2+k2)mod256)mod256=(c1+c2)mod256=O c (c1,c2)

[0149] Among them O m Indicates the operation in the plaintext domain, O c The above proof verifies that the same operation in the plaintext domain and the ciphertext domain has the same result.

[0150] After obtaining the ciphertext set C, that is, the pixels of the encrypted image, the subsequent information embedding steps can be continued.

[0151] After the image is additively homomorphically encrypted, the statistical characteristics of the difference histogram are preserved in the encrypted image, which is also the basis for the subsequent embedding algorithm.

[0152] 4. Difference histogram shift

[0153] The encrypted image is grouped in the same way as the original image. Before performing the histogram operation, the boundary saturated pixels (0 and 255) are preprocessed to avoid pixel overflow during the histogram shift:

[0154]

[0155] Where i = {1, 2}, j = {1, 2, ..., pix / 2}, c i,j represents the i-th pixel of the j-th group of the encrypted image, c' i,j represents the i-th pixel in the j-th group after preprocessing.

[0156] The pre-processed pixels are marked using a location map Lm to facilitate subsequent pixel value restoration. Lm is a string of binary bits that can be compressed and embedded as auxiliary information. The difference between adjacent pixels is calculated to construct a difference histogram. The calculation formula is:

[0157] d j =(c i,j -c i+1,j )mod256

[0158] Where i = 1, j = {1, 2, ..., pix / 2}, d jThe calculated ciphertext pixel difference is the same as the difference d obtained by the formula and the result obtained by the same operation on the plaintext image, as shown below:

[0159] d j =(c i,j -c i+1,j )mod256=((m i,j +k i,j )mod256-(m i+1,j +k i+1,j )mod256)mod256=(m i,j +k i,j -m i+1,j -k i+1,j )mod256

[0160] And because k i,j =k i+1,j , so we have:

[0161] d j =(m i,j -m i+1,j )mod256

[0162] According to the formula, the encrypted difference histogram can be obtained as follows Figure 7 As shown in the figure, the most frequent difference occurs near 0. Because of the modulo operation, the closer the difference is to 0, the smaller the difference is, indicating that the adjacent pixel values ​​are very similar. This also shows that most of the differences are consistent with the characteristic that adjacent pixels in natural images always have similarities.

[0163] Since the peak appears near point 0, after obtaining the difference histogram, the difference histograms to the left of point -1 and to the right of point 0 are expanded outward by one unit to make room for the subsequent embedding of secret information:

[0164]

[0165] Among them, d' j is the new difference after modification. In the process of difference histogram shift, the actual modification of image pixels can be defined as:

[0166]

[0167] Where, i = {1, 2}, j = {1, 2, ..., pix / 2}, c" i,j is the ciphertext pixel value. After the difference histogram is shifted to make room, the secret information is embedded into the vacated -1 and 0 points, and the secret difference d" i,j The calculation process is:

[0168]

[0169] Where i = {1, 2}, j = {1, 2, ..., pix / 2}, and b∈{0, 1} represents the bit information to be embedded. In the process of embedding secret information, the actual modification of the image pixels can be defined as:

[0170]

[0171] The process of embedding secret information by difference histogram shift is as follows: Figure 8 shown.

[0172] 5. Information extraction and image restoration

[0173] Information extraction is the inverse process of information embedding. First, the difference between each pixel embedded with secret information is determined, and the secret information is extracted according to the following formula:

[0174]

[0175] Then the difference histogram shift operation is offset to restore the ciphertext image:

[0176]

[0177] Then perform the opposite operation on the previous preprocessing step to offset the changes made to the ciphertext image by preprocessing:

[0178]

[0179] Finally, the image is decrypted. D() represents the decryption process. The decryption method is:

[0180]

[0181] At this point, the embedded secret information is extracted and decrypted using the above formula, ultimately obtaining the extracted secret information and the restored original image.

[0182] The above embodiments are only for illustrating the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for recording and extracting audit information of text images based on reversible steganography in ciphertext domain, characterized in that The system includes the following: for text images containing sensitive words sent by users, audit information is hidden in the encrypted text images based on the ciphertext domain reversible steganography method at the terminal to form an audit record; when an audit is required, the hidden audit information is extracted from the audit record; The specific process of generating audit records on the terminal is: Step A1: Assume that the size of the text image A containing sensitive words is H×W, and calculate the number of pixels of A: pix=H*W; Step A2: Randomly select a 16-byte string S as the symmetric key and use the ZUC algorithm to generate a key stream K of length pix / 2; Step A3, preprocessing image A according to the key stream K to obtain image A1; Step A4, calculating the summary H1=SM3(A1) of image A1, where SM3(·) indicates that the summary is obtained using the SM3 algorithm; Step A5: Encrypt image A1 using key stream K to obtain ciphertext image B; Step A6: Calculate the encryption key of S: enS = SM2_enc(S, ePub), where SM2_enc(·) represents the SM2 encryption algorithm, S is the plaintext, and the public key ePub of the person authorized to know the sensitive information is the key. Step A7: Combine the difference histogram shift method to hide the sensitive words Sw, H1, enS, sender information SI, receiver information RI, and other additional information Add in the ciphertext image B, obtaining the encrypted ciphertext image C. Image C is the audit record of text image A. The specific content of step A7 is: Step A71, calculate the length of the information to be embedded: pltlen = 16 + strlen(Sw) + 32 + 16 + 97 + strlen(SI) + strlen(RI) + strlen(Add), where the first 16 represents the length of Sw, SI, and RI, and pltlen, which each occupy 4 bytes. 32 is the byte length of H1. The second 16 represents the byte length of the symmetric key S. 97 is the byte length added after S is encrypted. The strlen(·) function determines the byte length of the character string. Step A72, calculate the bit information to be embedded plt = int2char(pltlen)||int2char(Sw)||Sw||H1||enS||int2char(SI)||SI||int2char(RI)||RI||Add, "||" represents a concatenation operation, and int2char(·) represents the conversion of integer data into a 4-byte string; Step A73: Group the ciphertext image B in the same way as image A, calculate the difference between adjacent pixels, and construct a difference histogram: d j =(c i,j -c i+1,j )mod256 Where i = 1, j = {1, 2, ..., pix / 2}, d j Indicates the pixel difference of the jth group of ciphertext, c i,j 、c i+1,j Respectively represent the pixel values ​​of the first and second pixels of the j-th group of the ciphertext image B; Step A74: Expand the difference histogram to the left of point -1 and to the right of point 0 by one unit to make room for subsequent embedding of secret information. Where, j = {1, 2, ..., pix / 2}, d' j is the new difference after modification; Step A75, calculate the ciphertext pixel difference d" j and the ciphertext pixel c' i,j : Wherein, i = {1, 2}, j = {1, 2, ..., pix / 2}, b∈ {0, 1} represents the bit information to be embedded, which is taken from the bit information to be embedded plt; Step A76, repeat step A75 until plt is completely hidden and the ciphertext image C is obtained.

2. The method according to claim 1, wherein: The specific content of step A3 is: Step A31, dividing the image A into a plurality of non-overlapping groups, with each adjacent two pixels forming a group; In step A32, image A is processed to obtain image A1. The processing method is as follows: Where i = {1, 2}, j = {1, 2, ..., pix / 2}, a i,j Represents the pixel value of the i-th pixel in the j-th group of the grayscale image A, (~a i,j ) means a i,j Binary inversion, k j is a random number in the key stream K, a' i,j represents the pixel value of the i-th pixel in the j-th group of the grayscale image A1, Represents a bitwise exclusive OR operation.

3. The method according to claim 2, wherein: The specific content of step A5 is: Step A51, grouping image A1 in the same manner as image A; In step A52, each group of pixels is encrypted with the same key. The key stream K is used to encrypt the image A1 pixel by pixel to obtain the ciphertext image B. The encryption method is as follows: Where i = {1, 2}, j = {1, 2, ..., pix / 2}, c i,j Represents the pixel value of the i-th pixel in the j-th group of the ciphertext image B.

4. The method according to claim 1, wherein: The specific process of extracting audit information from audit records is: Step B1: The auditor extracts Sw', H1', ​​enS', SI', RI', and Add' from the ciphertext image on his terminal and restores the ciphertext image B'; Step B2: analyzing the sensitive word Sw'. If it can be directly determined that the text image sent by the user does not involve sensitive information, the process stops. Otherwise, further verification is performed by a person authorized to know the sensitive information.

5. The method according to claim 4, wherein: The specific content of step B1 is: Step B11: Group the ciphertext image in the same way as image A, calculate the difference between adjacent pixels, and construct a difference histogram: d” j =(c' i,j -c' i+1,j )mod256 Where i = 1, j = {1, 2, …, pix / 2}; Step B12: Determine the difference between each pixel embedded with secret information and extract the secret information according to the following formula: Where, j = {1, 2, ..., pix / 2}; Step B13, offset the difference histogram shift operation and restore the ciphertext image: Where, i = {1, 2}, j = {1, 2, ..., pix / 2}; In step B14, according to the secret information combination rule, Sw', H1', ​​enS', SI', RI' and Add' are obtained respectively.

Citation Information

Patent Citations

  • Homomorphism cryptograph domain reversible hiding method

    CN106941402A

  • Dual encryption type reversible data hiding method of encryption domain image

    CN107809644A