An image self-authentication method based on hash function and information hiding

By embedding hash values ​​in the image and using reversible information hiding technology, the problems of image tampering and resource waste in the prior art are solved, and the self-authentication of images and system security are improved.

CN114782238BActive Publication Date: 2025-03-25XIAN UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210382820.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2025-03-25
Estimated Expiration
2042-04-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively resist the problems of image tampering and resource waste, especially in image transmission and storage processes.

Method used

The image self-authentication method based on hash function and information hiding is adopted, and random sequences are generated through SM3 algorithm and segmented logistic mapping, the hash value of the image is embedded in the image, and the reversible information hiding is achieved using the histogram translation algorithm.

Benefits of technology

It realizes self-authentication of images, reduces resource consumption, improves system security, and can resist image tampering attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782238B_ABST
    Figure CN114782238B_ABST
Patent Text Reader

Abstract

The present invention discloses an image self-authentication method based on hash function and information hiding, comprising: step-by-step hash storage, calculating the image hash value and determining the information hiding position p i; The hash value is embedded into the image using reversible information hiding based on histogram shift, and the image is self-authenticated. The receiver extracts the image hash value to authenticate the integrity of the original image. The present invention hides the hash value of the image in the image, and the authenticator can directly extract the hash value from the image and restore the original image. The image authentication can be achieved by simply hashing the restored image again and comparing the obtained hash value with the extracted hash value. Therefore, the image self-authentication can be achieved, so that the signature information does not need to be stored separately like the image digital signature, which reduces the consumption of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an image self-authentication method, in particular to an image self-authentication method based on hash function and information hiding. Background Art

[0002] At present, image information has been widely used in various fields due to its intuitive content and large amount of information, bringing huge benefits to the economic development of human society. However, with the emergence of many powerful image editing software, it has become extremely easy for people to edit digital images without leaving obvious traces. Some people with ulterior motives may maliciously tamper with images to achieve certain purposes. Usually, these tampered images are difficult to identify and are very harmful.

[0003] How to ensure the authenticity and integrity of images in digital image libraries is of great research significance. For example, in the public security portrait management system, how to prevent criminals from attempting to evade face recognition by modifying their own portrait information; in the medical image library, how to ensure that the patient's medical image has not been tampered with by someone with ulterior motives to cause misdiagnosis; in the vehicle violation photo system, how to prevent violators from tampering with the image to evade legal responsibility, etc.

[0004] As one of the most commonly used and effective technologies to ensure information security, encryption technology disguises plaintext information and converts it into incomprehensible ciphertext to prevent information from being illegally stolen or tampered with. Plaintext, ciphertext, key, encryption algorithm and decryption algorithm constitute a complete cryptographic system. Plaintext refers to the original information that needs to be disguised or encrypted; ciphertext refers to the output data of the plaintext after encryption; key refers to the parameters required in the encryption / decryption process; encryption algorithm refers to the function that converts plaintext messages into ciphertext; decryption algorithm refers to the function that restores ciphertext messages to plaintext. A complete encryption / decryption process is that the content owner uses the encryption key and encryption algorithm to encrypt the plaintext to obtain the ciphertext. The receiver uses the decryption key and decryption algorithm to restore the plaintext to the obtained ciphertext.

[0005] Information hiding is a technology that hides secret information in another publicly transmitted carrier. This technology mainly uses the fact that multimedia data has a lot of redundancy, and human vision or hearing cannot perceive obvious changes in the carrier after the secret information is embedded, so as to effectively avoid the attention of attackers and achieve the purpose of secure transmission of secret information. The most important branches of information hiding are steganography and digital watermarking technology. The main purpose of steganography is to achieve the secure transmission of secret information. At this time, the object to be protected is the secret information, and the carrier can be selected arbitrarily. The main purpose of digital watermarking technology is to protect the copyright of the carrier, that is, the data embedded in the carrier is used to identify the author, ownership and other related information of the carrier. The process of information hiding generally includes two parts: data embedding and data extraction. Data embedding refers to hiding the secret information to be hidden in the original carrier, and data extraction refers to extracting the secret information embedded in the carrier from the carrier.

[0006] Image authentication scheme based on digital signature:

[0007] The essence of a digital signature is the encrypted summary of a message. The content owner uses a private key to encrypt the content to be transmitted to obtain a signature. Since the private key used by the content owner is known only to him, once the signature is completed, it is guaranteed that the content owner cannot deny the message he has sent. While verifying the signature is correct, it also verifies that the information has not been tampered with after being signed.

[0008] Image digital signature is also called image hash function. Hash function refers to the conversion of input of arbitrary length into output of fixed length through hash algorithm. An image hash function must meet three basic security requirements. First, one-way: given an input value, there must be an output, but if the output is known, the input value cannot be deduced. Second, anti-collision: given any image input, it is impossible to find another image that makes their outputs equal. Third, key confidentiality: when the key is unknown, the hash value cannot be forged or estimated.

[0009] In this scheme, the authentication of the image is mainly divided into the following three steps. The first step is to use the hash function to process the image to generate the corresponding hash summary. Second, the generated hash summary is signed by a digital signature algorithm, and then the signature is transmitted to a trusted third party. Third, when authenticating the image, the hash value of the current image is compared with the original hash value to achieve image authentication.

[0010] Image authentication scheme based on digital watermark:

[0011] As a kind of information hiding, digital watermarking uses the redundancy of images and human visual perception to embed watermark information into images. Once the image data is modified, the watermark information embedded in it will also be modified accordingly. In this way, when performing authentication, the embedded watermark information can be used to complete the authentication.

[0012] In this scheme, the authentication of the image is mainly divided into the following three steps. The first step is the generation of digital watermarks. The method of generating digital watermarks can be based on the characteristics or content of the digital image, or a random number known in advance by the image owner and the image authenticator. The second step is the embedding of digital watermarks. The data owner uses an embedding algorithm to hide the digital watermark into the original carrier. The embedding algorithm needs to meet the requirement that after the watermark is embedded in the image, it will not obviously damage the visual effect of the original image. The third step is the extraction and authentication of the digital watermark. After obtaining the image containing the watermark, the authenticator uses the extraction algorithm corresponding to the embedding algorithm to extract the watermark, and then compares the extracted watermark with the original watermark information to know whether the image has been modified.

[0013] Disadvantages of existing technology:

[0014] 1. Since the image itself contains a lot of redundant information, some operations are usually performed according to different needs during the storage and transmission process, such as compression, contrast enhancement, filtering, etc. These operations do not affect the authenticity and visual effects of the image, so they are acceptable. In addition, the image will be interfered by some noise during the transmission process. A good authentication method should be able to resist these operations or noise interference, but digital signature authentication cannot do so. Any slight change in the image will cause authentication failure.

[0015] 2. Digital signatures are usually stored in separate files. When data is transmitted, the signature is attached to the end of the original data and transmitted together. For digital image libraries, a large amount of signature information needs to be stored additionally, which will cause a great waste of resources. For image transmission, if the signature information is removed or modified during the transmission process due to some operations such as image format conversion, it will cause authentication failure.

[0016] 3. Existing digital watermark algorithms can be divided into fragile watermarks, semi-fragile watermarks and robust watermarks according to different authentication requirements. When performing image authentication, fragile watermarks will have a high false alarm rate due to lossy compression and other operations; semi-fragile watermarks have good compression robustness, but they cannot effectively distinguish between compression operations and malicious tampering; robust watermarks are robust to most operations, but due to their strong robustness, they cannot detect some malicious operations.

[0017] 4. Watermark signals have many forms, such as random sequences, digital logos, texts and images, which can all be used as digital watermarks. Different watermark forms are used in different applications. For example, copyright protection watermarks are usually company logos, author names, serial numbers of digital hardware that generates images, etc., while integrity protection watermarks are details and features extracted from images, or signatures of image features, etc. The security of these watermark information cannot be well guaranteed and can be easily obtained by illegal users, resulting in tampered or forged images being able to pass authentication. Summary of the invention

[0018] The main purpose of the present invention is to provide an image self-authentication method based on hash function and information hiding, so as to realize image self-authentication and improve the security of the system.

[0019] The technical solution adopted by the present invention is: an image self-authentication method based on hash function and information hiding, comprising:

[0020] Step-by-step hash storage, calculate the image hash value and determine the information hiding position p i: The SM3 algorithm and symmetric information hiding algorithm are used to authenticate the integrity of images in the digital image library. First, the image owner uses the SM3 algorithm to generate a hash value H for the image to be transmitted. f , and use piecewise logistic mapping to generate a random sequence a i , thereby obtaining the hidden bit p of the hash value i;

[0021] The hash value is embedded into the image using reversible information hiding based on histogram shift: The hash value is embedded into the peak point of the image histogram through the histogram shift algorithm to obtain the disguised object S t;

[0022] Image self-authentication, the receiver extracts the image hash value to authenticate the integrity of the original image: the authenticator obtains the disguised object S t Finally, the extraction algorithm can accurately extract the hash value embedded in the image and restore the original image without loss.

[0023] The integrity of the image can be verified by calculating the hash value of the restored image.

[0024] Furthermore, the step-by-step hash storage calculates the image hash value and determines the information hiding position p i Specifically include:

[0025] Use the SM3 algorithm to hash the original image C and get the hash value H f , record hash

[0026] Value size S Hf ;

[0027] According to the histogram H(x) of the original image C, find the point with the most grayscale value in the image, that is, the peak point h, and record the number of peak points as S f ;

[0028] The peak points of the image are divided into n groups, and the size p of each group is determined by the following formula:

[0029]

[0030] Generate S using piecewise logistic mapping Hf The piecewise logistic mapping formula is as follows:

[0031] Set the initial value μ∈(0,4), a0∈(0,1), when μ∈(3.6,4), the generated random sequence is a chaotic sequence (the key can be taken to 15 decimal places):

[0032]

[0033] Now we get a random decimal sequence a i , let the information hiding bit be p i , then the calculation formula for the hidden bit of the i-th hash value is as follows:

[0034]

[0035] In this way, the hash value and information hiding bit of the original image are obtained.

[0036] Furthermore, the method of embedding the hash value into the image using the reversible information hiding based on histogram shift specifically includes:

[0037] Find the peak point h and the zero point l in the histogram H(x) of the original image. The corresponding peak value is H(h) and the corresponding zero value is H(l);

[0038] If l<h, shift the entire part of x∈(l,h) in the histogram to the left by one unit, that is, the pixel values ​​of all grayscale values ​​satisfying x∈(l,h) are reduced by 1, and the number of pixels at h-1 is set to 0; if l>h, shift the entire part of x∈(l,h) in the histogram to the right by one unit, that is, the pixel values ​​of all grayscale values ​​satisfying x∈(l,h) are increased by 1, and the number of pixels at h+1 is set to 0;

[0039] Number the peak points in the image and number them as p iThe point is recorded as a hidden point; scan the image in sequence, and once a pixel with a gray value of h is encountered, check whether it is a point to be embedded. If so, check the hash value to be embedded. If the bit to be embedded is 1, then when l<h, the gray value of the pixel at the point is reduced by 1, and when l>h, the gray value of the pixel at the point is increased by 1; if the bit to be embedded is 0, the gray value of the pixel at the point remains unchanged;

[0040] Through the above steps, the hash value is hidden in the original carrier, and the disguised object S is obtained. t .

[0041] Furthermore, the image is self-authenticated, and the receiver extracts the image hash value to authenticate the integrity of the original image, specifically including:

[0042] Extracting hash value

[0043] The authenticator uses the hidden key μ and a0 to obtain the decimal sequence a using piecewise logistic mapping i , and then get the hidden point p i ;

[0044] Scan the disguised object in the same order as in the embedding process, find the pixels with grayscale values ​​of h and h±1, and number these points in the order of numbering the peak points. If the pixel value is h±1, extract bit 1, and if the pixel value is h, extract bit 0, and you can extract the hash value H f ′;

[0045] Restore the original image

[0046] According to the histogram of the camouflaged object, the pixels of x∈(l,h) are translated back, that is, all the pixel values ​​whose grayscale values ​​satisfy x∈(l,h) are added or subtracted by 1, and the restored original image C′ can be obtained;

[0047] Verify image integrity

[0048] Use the SM3 algorithm to hash the restored image C′ and get the hash value H f ″;

[0049] Compare H f ′ and H f "Are they the same? If they are the same, the authentication is successful, indicating that the image has not been tampered with. If they are different, the authentication fails, indicating that the image has been tampered with.

[0050] Advantages of the present invention:

[0051] The present invention hides the hash value of the image in the image, and the authentication party can directly extract the hash value from the image and restore the original image. It only needs to hash the restored image again and compare the obtained hash value with the extracted hash value to realize the authentication of the image. Therefore, the self-authentication of the image can be realized, so that the signature information does not need to be stored separately like the image digital signature, which reduces the consumption of resources.

[0052] For existing reversible information hiding technology, if the attacker knows the information hiding algorithm, it is easy to extract the hash value embedded in the image, and then embed the hash value of the tampered image into the tampered image using the same information hiding algorithm, thus completing a tampering attack. This scheme uses a pseudo-random sequence as the key for information hiding in the process of embedding the hash value, so that the hash value can be securely embedded in the image. Even if the attacker knows the information hiding algorithm, he cannot restore the original image and extract the hash value. Therefore, this scheme can resist image tampering attacks.

[0053] During the implementation of the entire solution, the hash value of the image is directly embedded in the image and not disclosed to the public, so the hash value is confidential. In this way, only the image owner and the legitimate authenticator can authenticate the image, thus preventing illegal users from authenticating the image.

[0054] The algorithm used in the present invention is very simple to implement, has no special requirements on hardware devices, can be easily implemented on a general-purpose CPU platform, and has good applicability and portability.

[0055] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0057] Figure 1 It is a structural block diagram of the present invention;

[0058] Figure 2 It is a step-by-step hash storage flow chart of the present invention;

[0059] Figure 3 is the information hiding flow chart of the present invention;

[0060] Figure 4 It is the image self-authentication flow chart of the present invention. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0062] The present invention uses the SM3 algorithm and the symmetric information hiding algorithm to authenticate the integrity of images in the digital image library. First, the image owner uses the SM3 algorithm to generate a hash value H for the image to be transmitted. f , and use piecewise logistic mapping to generate a random sequence a i , thereby obtaining the hidden bit p of the hash value i Then the hash value is embedded into the peak point of the image histogram through the histogram shift algorithm to obtain the disguised object S t The authenticator obtains the disguised object S t After that, the extraction algorithm can accurately extract the hash value embedded in the image and restore the original image without loss. By comparing the extracted hash value with the hash value of the restored image, the integrity of the image can be authenticated. The structure diagram of the whole solution is shown in the figure below. Figure 1 shown.

[0063] The implementation of the scheme can be divided into three parts: the first part is step-by-step hash storage, calculating the image hash value and determining the information hiding bit p i The second part uses reversible information hiding based on histogram shift to embed the hash value into the image; the third part is image self-authentication, where the receiver extracts the image hash value to authenticate the integrity of the original image. The following is a detailed introduction to these three parts.

[0064] 1. Step-by-step hash storage

[0065] 1) Use the SM3 algorithm to hash the original image C and get the hash value H f , record the hash value size S Hf;

[0066] 2) According to the histogram H(x) of the original image C, find the point with the most grayscale value in the image, that is, the peak point h, and record the number of peak points as S f ;

[0067] 3) Divide the peak points of the image into n groups, and the size p of each group is determined by the following formula:

[0068]

[0069] 4) Generate S using piecewise logistic mapping Hf The piecewise logistic mapping formula is as follows:

[0070] Set the initial value μ∈(0,4), a0∈(0,1), when μ∈(3.6,4), the generated random sequence is a chaotic sequence (the key can be taken to 15 decimal places):

[0071]

[0072] 5) Now get a random decimal sequence a i , let the information hiding bit be p i , then the calculation formula for the hidden bit of the i-th hash value is as follows:

[0073]

[0074] In this way, the hash value and information hiding bits of the original image are obtained. The flowchart of the first part is as follows Figure 2 shown.

[0075] 2. Information hiding

[0076] 1) Find the peak point h (corresponding to the peak value H(h)) and the zero point l (corresponding to the zero value H(l)) in the histogram H(x) of the original image;

[0077] 2) If l < h, shift the entire part of x∈(l,h) in the histogram to the left by one unit, that is, the pixel values ​​of all grayscale values ​​satisfying x∈(l,h) are reduced by 1, and the number of pixels at h-1 is set to 0; if l > h, shift the entire part of x∈(l,h) in the histogram to the right by one unit, that is, the pixel values ​​of all grayscale values ​​satisfying x∈(l,h) are increased by 1, and the number of pixels at h+1 is set to 0;

[0078] 3) Number the peak points in the image and number them as p i The point is recorded as a hidden point. Scan the image in sequence. Once a pixel with a gray value of h is encountered, check whether it is a point to be embedded. If so, check the hash value to be embedded. If the bit to be embedded is "1", then when l<h, the gray value of the pixel at the point is reduced by 1, and when l>h, the gray value of the pixel at the point is increased by 1. If the bit to be embedded is 0, the gray value of the pixel at the point remains unchanged.

[0079] Through the above steps, the hash value is hidden in the original carrier, and the disguised object S is obtained. t The flowchart of the second part is as follows Figure 3 shown.

[0080] 3. Image Self-Authentication

[0081] 1) Extract hash value

[0082] a. The authenticator uses the hidden key μ and a0 to obtain the decimal sequence a using piecewise logistic mapping i , and then get the hidden point p i ;

[0083] b. Scan the disguised object in the same order as in the embedding process, find the pixels with grayscale values ​​of h and h±1, and number these points in the order of numbering the peak points. If the pixel value is h±1, extract the bit "1", and if the pixel value is h, extract the bit "0", and you can extract the hash value H f ′.

[0084] 2) Restore the original image

[0085] According to the histogram of the camouflaged object, the pixels of x∈(l,h) are translated back, that is, all the pixel values ​​whose grayscale values ​​satisfy x∈(l,h) are added or subtracted by 1, and the restored original image C′ can be obtained.

[0086] 3) Verify image integrity

[0087] a. Use the SM3 algorithm to hash the restored image C′ and get the hash value H f ″;

[0088] b. Contrast H f ′ and H f "Are they the same? If they are the same, the authentication is successful, indicating that the image has not been tampered with. If they are different, the authentication fails, indicating that the image has been tampered with.

[0089] The flowchart of the third part is as follows Figure 4 shown.

[0090] The present invention

[0091] Realize self-authentication of images

[0092] This solution can realize self-authentication of images, that is, the image does not need other separate authentication information during authentication, and authentication can be completed only with the image itself.

[0093] Compared with existing authentication methods, the advantage of self-authentication is that the verifier does not need to save the authentication information of the authenticator, that is, the hash value or other information that can be authenticated, but directly saves the authentication information in the carrier image to be authenticated, and the hash value of the image is not disclosed to the public. This ensures the confidentiality of the hash value, making it impossible for illegal users to obtain the hash value of the original image, greatly reducing the probability of a successful camouflage attack.

[0094] Another benefit of self-certification is that it uses reversible information hiding technology based on symmetric keys to achieve secret transmission of authentication information, that is, the embedding party and the authenticator use the same key. If the private key is used for too long, or the authenticator finds that the private key is at risk of being leaked, the authenticator can modify the private key regularly or irregularly, which will greatly improve the security of the system.

[0095] Improve system security

[0096] This solution can resist image tampering attacks. The so-called image tampering attack refers to the attacker using a forged image to try to pass the authentication. The solution uses SM3 and reversible information hiding technology based on symmetric keys, which can effectively resist image tampering attacks. The specific instructions are as follows:

[0097] Assume that the image used by the legitimate authenticator is A. Perform SM3 hash operation on the image and obtain the hash value of the image as A. f The symmetric key used in the embedding process is key1, and the hidden key sequence generated by the piecewise logistic map is a1, a2, …, a n ,The image hash value is hidden in the image using a symmetric information hiding algorithm.

[0098] Suppose the tampered image used by the attacker is A′. He performs SM3 hash operation on the image and obtains the hash value A of the image. f ′, he needs to tamper with the hash value A of the image f ′ is hidden in the carrier A′. Even if he knows the piecewise logistic mapping used, but he does not have the symmetric key key1, he can guess or set a key key2 himself. The generated hidden keys are recorded as a1′, a2′, …, a n ′, the sequence is the same as the legitimate authenticator’s sequence a1, a2, …, a n Different, so it is impossible to accurately know the hidden position used by the legitimate authenticator. Let the carrier after information hiding be A″. During authentication, the verifier uses the legitimate key key1 to extract the hidden hash value. At this time, the attacker's image extraction hash value must fail.

[0099] In this scheme, a piecewise logistic map is used to generate a pseudo-random sequence a i As the key sequence, the parameters of the segmented logistic map can be used as the system key. The range of the parameters is μ∈(3.6,4) and a0∈(0,1). The values ​​of these two parameters can be accurate to 15 decimal places. Therefore, the key space size of this scheme is 10 14 ×10 15 =10 29≈2 97 , this key space is large enough to resist the attacker's exhaustive attack. If the attacker wants to forge the hash value without the key, he must have a pseudo-random sequence. However, it is computationally infeasible to forge a random sequence without the key. Therefore, this scheme has sufficient security.

[0100] Since the signature information will be saved as a separate file in the image digital signature authentication scheme, resulting in a huge waste of resources, an image self-authentication method is adopted in this scheme to embed the authentication information into the image using a reversible information hiding algorithm. During authentication, only the authentication information needs to be extracted from the image to complete the authentication.

[0101] This scheme improves the security of traditional authentication methods. First, compared with the digital signature authentication scheme, the hash value of the image in this scheme is hidden in the image and is not disclosed to the public. Therefore, illegal users and other unauthorized users cannot obtain the hash value of the original image, which greatly reduces the probability of successful camouflage attacks. Secondly, since this scheme uses a reversible information hiding scheme based on symmetric keys to achieve secret transmission of authentication information, that is, the embedding party and the authenticating party use the same key, this is not only more convenient for the management of the image library, but also if the administrator finds that the private key is at risk of leakage, the private key can be modified regularly or irregularly, which will greatly improve the security of the system. Finally, if an attacker attempts to pass the authentication by using a forged image without knowing the key, since this scheme uses logistic mapping to generate a hidden key sequence, the key space size can reach 2 97 Therefore, the attacker cannot accurately know the hidden position used by the legitimate authenticator, and the process of forging a random sequence without a key is computationally infeasible. Therefore, this scheme can resist image tampering attacks and exhaustive attacks.

[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An image self-authentication method based on hash function and information hiding, characterized in that: include: Step-by-step hash storage, calculate the image hash value and determine the information hiding position p i: The SM3 algorithm and symmetric information hiding algorithm are used to authenticate the integrity of images in the digital image library. First, the image owner uses the SM3 algorithm to generate a hash value H for the image to be transmitted. f , and use piecewise logistic mapping to generate a random sequence a i , thus obtaining the hidden bit p of the hash value i; The hash value is embedded into the image using reversible information hiding based on histogram shift: The hash value is embedded into the peak point of the image histogram through the histogram shift algorithm to obtain the disguised object S t; Image self-authentication, the receiver extracts the image hash value to authenticate the integrity of the original image: the authenticator obtains the disguised object S t Finally, the hash value embedded in the image can be accurately extracted using the extraction algorithm and the original image can be restored losslessly. The integrity of the image can be authenticated by comparing the extracted hash value with the hash value of the restored image. The step-by-step hash storage calculates the image hash value and determines the information hiding position p i Specifically include: Use the SM3 algorithm to hash the original image C and get the hash value H f , record the hash value size S Hf ; According to the histogram H(x) of the original image C, find the point with the most grayscale value in the image, that is, the peak point h, and record the number of peak points as S f ; The peak points of the image are divided into n groups, and the size p of each group is determined by the following formula: Generate S using piecewise logistic mapping Hf The piecewise logistic mapping formula is as follows: Set the initial value μ∈(0,4), a0∈(0,1). When μ∈(3.6,4), the generated random sequence is a chaotic sequence, and the key is 15 decimal places: Now we get a random decimal sequence a i , let the information hiding bit be p i , then the calculation formula for the hidden bit of the i-th hash value is as follows: In this way, the hash value and information hiding bit of the original image are obtained; The method of embedding the hash value into the image using the reversible information hiding method based on histogram shift specifically includes: Find the peak point h and the zero point l in the histogram H(x) of the original image. The corresponding peak value is H(h) and the corresponding zero value is H(l); If l<h, shift the entire part of x∈(l,h) in the histogram to the left by one unit, that is, the pixel values ​​of all grayscale values ​​satisfying x∈(l,h) are reduced by 1, and the number of pixels at h-1 is set to 0; if l>h, shift the entire part of x∈(l,h) in the histogram to the right by one unit, that is, the pixel values ​​of all grayscale values ​​satisfying x∈(l,h) are increased by 1, and the number of pixels at h+1 is set to 0; Number the peak points in the image and number them as p i The point is recorded as a hidden point; scan the image in sequence, and once a pixel with a gray value of h is encountered, check whether it is a point to be embedded. If so, check the hash value to be embedded. If the bit to be embedded is 1, then when l<h, the gray value of the pixel at the point is reduced by 1, and when l>h, the gray value of the pixel at the point is increased by 1; if the bit to be embedded is 0, the gray value of the pixel at the point remains unchanged; Through the above steps, the hash value is hidden in the original carrier, and the disguised object S is obtained. t ; The image self-authentication, in which the receiver extracts the image hash value to authenticate the integrity of the original image, specifically includes: Extracting hash value The authenticator uses the hidden key μ and a0 to obtain the decimal sequence a using piecewise logistic mapping i , and then get the hidden point p i ; Scan the disguised object in the same order as in the embedding process, find the pixels with grayscale values ​​of h and h±1, and number these points in the order of numbering the peak points. If the pixel value is h±1, extract bit 1, and if the pixel value is h, extract bit 0, and you can extract the hash value H f ′; Restore the original image According to the histogram of the camouflaged object, the pixels of x∈(l,h) are translated back, that is, all the pixel values ​​whose grayscale values ​​satisfy x∈(l,h) are added or subtracted by 1, and the restored original image C′ can be obtained; Authentication of image integrity Use the SM3 algorithm to hash the restored image C′ and get the hash value H f ″; Compare H f ′ and H f "Are they the same? If they are the same, the authentication is successful, indicating that the image has not been tampered with. If they are different, the authentication fails, indicating that the image has been tampered with.

Citation Information

Patent Citations

  • Self-adaptation reversible watermarking method used for medical image authentication and doctor-patient information hiding

    CN104268824A

  • Robust watermarking method based on ROI and IWT medical image tampering authentication and recovery

    CN112085016A