[go: up one dir, main page]

CN114465779A - A reversible and separable ciphertext domain information hiding method and system - Google Patents

A reversible and separable ciphertext domain information hiding method and system Download PDF

Info

Publication number
CN114465779A
CN114465779A CN202210031655.XA CN202210031655A CN114465779A CN 114465779 A CN114465779 A CN 114465779A CN 202210031655 A CN202210031655 A CN 202210031655A CN 114465779 A CN114465779 A CN 114465779A
Authority
CN
China
Prior art keywords
image
pixel
white pixel
black
marked
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202210031655.XA
Other languages
Chinese (zh)
Inventor
万文博
刘文秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Normal University
Original Assignee
Shandong Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Normal University filed Critical Shandong Normal University
Priority to CN202210031655.XA priority Critical patent/CN114465779A/en
Publication of CN114465779A publication Critical patent/CN114465779A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/106Enforcing content protection by specific content processing
    • G06F21/1066Hiding content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a reversible separable ciphertext domain information hiding method and a system, comprising the following steps: acquiring an original image, and dividing the pixel interval of the original image into black and white pixels; combining the predicted values of each white pixel to obtain a white pixel predicted image; respectively encrypting the white pixel image and the white pixel predicted image; obtaining a marked white pixel image based on the quadratic difference matrix; obtaining a black pixel prediction image based on the prediction value combination of each black pixel; encrypting the black pixel image and the black pixel predicted image respectively; obtaining a marked black pixel image based on the quadratic difference matrix; and combining the marked white pixel image and the marked black pixel image to obtain an encrypted marked image of the original image, thereby realizing the hiding of the ciphertext domain information of the original image. The invention realizes information lossless extraction and image complete recovery, and the information extraction and the image recovery can be mutually independent and separated.

Description

一种可逆可分离的密文域信息隐藏方法及系统A reversible and separable ciphertext domain information hiding method and system

技术领域technical field

本发明涉及信息隐藏技术领域,尤其涉及一种可逆可分离的密文域信息隐藏方法及系统。The invention relates to the technical field of information hiding, in particular to a reversible and separable ciphertext domain information hiding method and system.

背景技术Background technique

本部分的陈述仅仅是提供了与本发明相关的背景技术信息,不必然构成在先技术。The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

随着云计算的兴起和云存储的广泛应用,用户将自己的图像存于第三方云服务提供商,但是又不信任对方,因此将自己的数据先进行加密,再上传到云服务中心。云服务提供商为了方便数据的管理和认证,需要对所有数据打上标记再存储,这些标记即隐藏的秘密信息,而这些过程完全不需要知道图像的内容信息。因此,信息隐藏过程是在图像的密文域上进行的。而对于一些数据认证要求高的应用场景,要求信息的提取与图像的恢复完全可逆,所以,加密图像的可逆信息隐藏技术应运而生。With the rise of cloud computing and the wide application of cloud storage, users store their images in a third-party cloud service provider, but do not trust the other party, so they encrypt their data first, and then upload it to the cloud service center. In order to facilitate data management and authentication, cloud service providers need to mark all data before storing. These marks are hidden secret information, and these processes do not need to know the content information of the image. Therefore, the information hiding process is carried out on the ciphertext domain of the image. For some application scenarios with high data authentication requirements, the extraction of information and the restoration of images are required to be completely reversible. Therefore, the reversible information hiding technology of encrypted images emerges as the times require.

但是,随着需求的不断变化,人们对密文域的可逆信息隐藏有了更多的要求,比如,人们希望在传输高机密图像时,即使是加密图像,一些高机密的图像也不允许在公网传输,所以,这些高机密图像需要打上“标记”,当检测到标记显示机密程度高,网警自动拦截。这就需要限制网警仅有提取标记信息的权限,无法获得解密的图像,且在提取标记信息之后,不会对图像产生影响。However, with the continuous change of requirements, people have more requirements for reversible information hiding in the ciphertext domain. For example, people hope that when transmitting high-confidential images, even if they are encrypted images, some high-confidential images are not allowed in Therefore, these high-secret images need to be marked with "marks". When the mark is detected to show a high degree of confidentiality, the network police will automatically intercept them. This requires that the network police only have the authority to extract the marking information, and cannot obtain the decrypted image, and after the marking information is extracted, the image will not be affected.

在目前来看,密文域的可逆信息隐藏算法分为两类:加密前预留空间和加密后腾出空间。加密前预留空间方法,在大多数情况下,通过使用压缩获取可共嵌入的位平面空间,得到高嵌入容量,但是大多数算法无法实现提取信息与图像恢复分离。加密后腾出空间方法的密文图像冗余度低,腾出空间来嵌入信息难度较大,很大地限制后续进行信息嵌入的容量,算法不断改进,通过利用各种加密规则,增大密文图像像素间的相关性,可供我们进行嵌入信息。但是仍存在图像解密后的标记图像视觉质量差等问题。At present, the reversible information hiding algorithms in the ciphertext domain are divided into two categories: reserving space before encryption and making space after encryption. The reserved space before encryption method, in most cases, obtains a co-embeddable bit-plane space by using compression, and obtains a high embedding capacity, but most algorithms cannot achieve separation of information extraction and image restoration. The ciphertext image of the method of freeing up space after encryption has low redundancy, and it is difficult to free up space to embed information, which greatly limits the capacity of subsequent information embedding. The algorithm is continuously improved, and the ciphertext is increased by using various encryption rules. The correlation between image pixels allows us to embed information. However, there are still problems such as poor visual quality of marked images after image decryption.

由上述可以得到,目前的密文域可逆信息隐藏算法存在两个不足:(1)为追求高嵌入容量,导致无法使信息提取与图像恢复分离。(2)加密标记图像在仅解密之后,图像质量较差。It can be seen from the above that the current reversible information hiding algorithms in the ciphertext domain have two shortcomings: (1) In pursuit of high embedding capacity, information extraction and image restoration cannot be separated. (2) After the encrypted marked image is only decrypted, the image quality is poor.

发明内容SUMMARY OF THE INVENTION

为了解决上述问题,本发明提出了一种可逆可分离的密文域信息隐藏方法及系统,只有同时拥有加密秘钥和提取秘钥,才能得到秘密信息和解密图像;可以在保证嵌入容量的前提下,实现信息提取与图像恢复分离,并且解密后的标记图像视觉质量相对较高,在仅解密的情况下,对图像内容和图像质量的影响不大。In order to solve the above problems, the present invention proposes a reversible and separable ciphertext domain information hiding method and system. Only by possessing the encryption key and the extraction key at the same time, can the secret information and decryption image be obtained; In this case, the separation of information extraction and image restoration is realized, and the visual quality of the decrypted marked image is relatively high, and in the case of only decryption, the impact on the image content and image quality is small.

在一些实施方式中,采用如下技术方案:In some embodiments, the following technical solutions are adopted:

一种可逆可分离的密文域信息隐藏方法,包括:A reversible and separable ciphertext domain information hiding method, comprising:

获取原始图像,将所述原始图像的像素间隔分成黑白两种像素;Obtaining an original image, and dividing the pixel interval of the original image into black and white pixels;

将白色像素重新组合形成白色像素图像,基于每一个白色像素的预测值组合得到白色像素预测图像;Recombining the white pixels to form a white pixel image, and combining the predicted values of each white pixel to obtain a white pixel predicted image;

分别对白色像素图像和白色像素预测图像进行加密;基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;基于所述二次差值矩阵得到标记的白色像素图像;Encrypt the white pixel image and the white pixel prediction image respectively; obtain the difference matrix D1 based on the encrypted white pixel image and the white pixel prediction image, divide the difference matrix D1 into blocks, and obtain the quadratic difference matrix diff_D1; The quadratic difference value matrix obtains the marked white pixel image;

将黑色像素重新组合形成黑色像素图像,基于每一个黑色像素的预测值组合得到黑色像素预测图像;Recombining the black pixels to form a black pixel image, and combining the predicted values of each black pixel to obtain a black pixel predicted image;

分别对所述黑色像素图像和黑色像素预测图像进行加密;基于加密后的黑色像素图像和黑色像素预测图像,得到差值矩阵D2,对差值矩阵D2进行分块,得到二次差值矩阵diff_D2;基于所述二次差值矩阵得到标记的黑色像素图像;Encrypt the black pixel image and the black pixel prediction image respectively; obtain the difference matrix D2 based on the encrypted black pixel image and the black pixel prediction image, and divide the difference matrix D2 into blocks to obtain a secondary difference matrix diff_D2 ; Obtain the marked black pixel image based on the quadratic difference matrix;

组合标记的白色像素图像和标记的黑色像素图像,得到原始图像的加密标记图像,从而实现原始图像的密文域信息隐藏。The marked white pixel image and the marked black pixel image are combined to obtain the encrypted marked image of the original image, thereby realizing the information hiding of the ciphertext domain of the original image.

在另一些实施方式中,采用如下技术方案:In other embodiments, the following technical solutions are adopted:

一种可逆可分离的密文域信息隐藏系统,包括:A reversible and separable ciphertext domain information hiding system, including:

图像获取模块,用于获取原始图像,将所述原始图像的像素间隔分成黑白两种像素;an image acquisition module for acquiring an original image, and dividing the pixel interval of the original image into black and white pixels;

第一层图像加密模块,用于将白色像素重新组合形成白色像素图像,基于每一个白色像素的预测值组合得到白色像素预测图像;分别对白色像素图像和白色像素预测图像进行加密;The first layer of image encryption module is used to recombine the white pixels to form a white pixel image, and obtain a white pixel predicted image based on the predicted value combination of each white pixel; respectively encrypt the white pixel image and the white pixel predicted image;

第一层图像标记模块,用于基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;基于所述二次差值矩阵得到标记的白色像素图像;The first layer image marking module is used to obtain the difference matrix D1 based on the encrypted white pixel image and the white pixel prediction image, and divide the difference matrix D1 into blocks to obtain a secondary difference matrix diff_D1; The difference matrix gets the marked white pixel image;

第二层图像加密模块,用于将黑色像素重新组合形成黑色像素图像,基于每一个黑色像素的预测值组合得到黑色像素预测图像;分别对所述黑色像素图像和黑色像素预测图像进行加密;The second-layer image encryption module is used for recombining black pixels to form a black pixel image, and combining the predicted values of each black pixel to obtain a black pixel predicted image; respectively encrypt the black pixel image and the black pixel predicted image;

第二层图像标记模块,用于基于加密后的黑色像素图像和黑色像素预测图像,得到差值矩阵D2,对差值矩阵D2进行分块,得到二次差值矩阵diff_D2;基于所述二次差值矩阵得到标记的黑色像素图像;The second layer image marking module is used to obtain the difference matrix D2 based on the encrypted black pixel image and the black pixel prediction image, and divide the difference matrix D2 into blocks to obtain a secondary difference matrix diff_D2; The difference matrix gets the marked black pixel image;

组合标记模块,用于组合标记的白色像素图像和标记的黑色像素图像,得到原始图像的加密标记图像,从而实现原始图像的密文域信息隐藏。The combined marking module is used to combine the marked white pixel image and the marked black pixel image to obtain the encrypted marked image of the original image, thereby realizing the information hiding of the ciphertext domain of the original image.

在另一些实施方式中,采用如下技术方案:In other embodiments, the following technical solutions are adopted:

一种终端设备,其包括处理器和存储器,处理器用于实现各指令;存储器用于存储多条指令,所述指令适于由处理器加载并执行上述的可逆可分离的密文域信息隐藏方法。A terminal device, comprising a processor and a memory, the processor is used to implement each instruction; the memory is used to store a plurality of instructions, the instructions are suitable for being loaded by the processor and executing the above-mentioned reversible and separable ciphertext domain information hiding method .

在另一些实施方式中,采用如下技术方案:In other embodiments, the following technical solutions are adopted:

一种计算机可读存储介质,其中存储有多条指令,所述指令适于由终端设备的处理器加载并执行上述的可逆可分离的密文域信息隐藏方法。A computer-readable storage medium stores a plurality of instructions, wherein the instructions are adapted to be loaded by a processor of a terminal device and execute the above-mentioned reversible and separable ciphertext domain information hiding method.

与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:

(1)本发明可逆可分离的密文域信息隐藏方法,利用图像加密算法的规则增大加密图像像素间的冗余,在保持较大的嵌入容量的同时,增加解密后的标记图像视觉质量,在整个过程中,本发明实现信息无损提取与图像完全恢复,而且信息提取与图像恢复是可以相互独立,相互分离的。(1) The reversible and separable ciphertext domain information hiding method of the present invention uses the rules of the image encryption algorithm to increase the redundancy between the pixels of the encrypted image, and while maintaining a large embedding capacity, the visual quality of the decrypted marked image is increased. , in the whole process, the present invention realizes the lossless extraction of information and the complete restoration of the image, and the information extraction and the image restoration can be independent and separated from each other.

(2)接收端在收到加密标记图像的同时,另外收到加密秘钥和提取秘钥,使用加密秘钥可以得到解密后的标记图像,使用提取秘钥可以获得加密图像,且这两种密钥的使用相互独立,顺序可以相互交换,只有同时拥有两个秘钥,才能得到秘密信息和解密图像。加解密和提取信息分离,接收端只有具有加解密或信息提取的权限时,才能对收到的图像解密或提取信息。(2) When the receiving end receives the encrypted marked image, it also receives the encrypted key and the extraction key. The decrypted marked image can be obtained by using the encrypted key, and the encrypted image can be obtained by using the extracted key. The use of keys is independent of each other, and the order can be exchanged with each other. Only by possessing two keys at the same time, can the secret information and decrypted image be obtained. Encryption and decryption are separated from extracting information. Only when the receiving end has the authority to encrypt and decrypt or extract information can it decrypt or extract information from the received image.

(3)本发明方法实现了仅有提取嵌入信息权限,无法得到解密图像,即图像具体内容不会公开传输,保证了信息传输的安全性;在仅有解密权限时,无法对图像嵌入的认证信息或版权信息进行修改,保护了图像的版权。而且,在本方法中,解密后图像的视觉质量与其他方法相比具有优越性,标记图像与原始图像在外观上一致,在肉眼上很难察觉被嵌入秘密信息。(3) The method of the present invention realizes that only the right to extract and embed information can be obtained, and the decrypted image cannot be obtained, that is, the specific content of the image will not be publicly transmitted, which ensures the security of information transmission; when there is only the right to decrypt, the authentication of image embedding cannot be performed. Information or copyright information is modified to protect the copyright of the image. Moreover, in this method, the visual quality of the decrypted image is superior to other methods, the marked image is consistent with the original image in appearance, and the embedded secret information is difficult to be detected by the naked eye.

本发明的其他特征和附加方面的优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本方面的实践了解到。Other features and advantages of additional aspects of the invention will be set forth in part from the description that follows, and in part will become apparent from the description below, or will be learned by practice of the present aspects.

附图说明Description of drawings

图1为本发明实施例中可逆可分离的密文域信息隐藏方法流程图;1 is a flowchart of a reversible and separable ciphertext domain information hiding method in an embodiment of the present invention;

图2为本发明实施例中图像预测阶段分层示意图;FIG. 2 is a hierarchical schematic diagram of an image prediction stage in an embodiment of the present invention;

图3为本发明实施例中菱形预测器示意图;3 is a schematic diagram of a diamond predictor in an embodiment of the present invention;

图4为本发明实施例中加密和标记过程的图像分块示意图;4 is a schematic diagram of image segmentation in an encryption and marking process in an embodiment of the present invention;

图5为本发明实施例中加密和标记过程的块内部示意图;Fig. 5 is the block diagram inside the encryption and marking process in the embodiment of the present invention;

图6为本发明实施例中的Lena图像直方图;6 is a Lena image histogram in an embodiment of the present invention;

图7为本发明实施例中的Lena加密图像直方图;Fig. 7 is the Lena encrypted image histogram in the embodiment of the present invention;

图8为本发明实施例中的Lena图像水平方向像素相关性示意图;8 is a schematic diagram of pixel correlation in the horizontal direction of a Lena image in an embodiment of the present invention;

图9为本发明实施例中的Lena加密图像的二次差值直方图;Fig. 9 is the quadratic difference value histogram of the Lena encrypted image in the embodiment of the present invention;

图10为本发明提供的不同方法和BPP的Lena图像PSNR对比图;Fig. 10 is the Lena image PSNR comparison diagram of different methods provided by the present invention and BPP;

图11为本发明提供的不同方法和BPP的Baboon图像PSNR对比图;Fig. 11 is the Baboon image PSNR comparison diagram of different methods provided by the present invention and BPP;

图12为本发明提供的不同方法和BPP的Plane图像PSNR对比图;Fig. 12 is the Plane image PSNR comparison diagram of different methods provided by the present invention and BPP;

图13为本发明实施例中以Lena图像为例的整个图像处理过程示意图。FIG. 13 is a schematic diagram of the entire image processing process using a Lena image as an example in an embodiment of the present invention.

具体实施方式Detailed ways

应该指出,以下详细说明都是例示性的,旨在对本申请提供进一步的说明。除非另有指明,本发明使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used herein is for the purpose of describing specific embodiments only, and is not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural as well, furthermore, it is to be understood that when the terms "comprising" and/or "including" are used in this specification, it indicates that There are features, steps, operations, devices, components and/or combinations thereof.

实施例一Example 1

在一个或多个实施方式中,公开了一种可逆可分离的密文域信息隐藏方法,结合图1,具体包括如下过程:In one or more embodiments, a reversible and separable ciphertext domain information hiding method is disclosed, which specifically includes the following process in conjunction with FIG. 1 :

步骤S101:获取原始图像,将所述原始图像的像素间隔分成黑白两种像素;Step S101: obtaining an original image, and dividing the pixel interval of the original image into two types of pixels, black and white;

本实施例中,将尺寸为512*512的原始图像I像素间隔分成黑白两种像素,如图2所示,白色像素作为第一层像素,黑色像素作为第二层像素。In this embodiment, the original image with a size of 512*512 is divided into black and white pixels at intervals of 1 pixel. As shown in FIG. 2 , the white pixels are used as the first layer of pixels, and the black pixels are used as the second layer of pixels.

步骤S102:使用菱形预测器和黑色像素计算每一个白色像素的预测值,将白色像素重新组合成白色像素图像W,每一个白色像素的预测值组合得到白色像素预测图像W’;Step S102: use a diamond predictor and black pixels to calculate the predicted value of each white pixel, recombine the white pixel into a white pixel image W, and combine the predicted value of each white pixel to obtain a white pixel predicted image W';

具体地,如图3所示,菱形预测器计算方式如下:Specifically, as shown in Figure 3, the calculation method of the diamond predictor is as follows:

Figure BDA0003466665620000061
Figure BDA0003466665620000061

其中,B(i,j-1)表示黑色像素在(i,j-1)点的像素值;此时的第一层图像W及其预测图像W’尺寸缩减,变成512*256。Among them, B(i, j-1) represents the pixel value of the black pixel at point (i, j-1); at this time, the size of the first layer image W and its predicted image W' is reduced to 512*256.

B(i-1,j)表示黑色像素在(i-1,j)点的像素值,B(i,j+1)表示黑色像素在(i,j+1)点的像素值,B(i+1,j)表示黑色像素在(i+1,j)点的像素值,W’(i,j)表示白色像素在(i,j)点的像素预测值。B(i-1,j) represents the pixel value of the black pixel at point (i-1,j), B(i,j+1) represents the pixel value of the black pixel at point (i,j+1), B( i+1,j) represents the pixel value of the black pixel at point (i+1,j), and W'(i,j) represents the pixel predicted value of the white pixel at point (i,j).

步骤S103:分别对白色像素图像和白色像素预测图像进行加密;具体的加密过程如下:Step S103: Encrypt the white pixel image and the white pixel prediction image respectively; the specific encryption process is as follows:

A1:使用Lorenz混沌系统得到伪随机序列S1和S2,具体公式如下:A1: Use Lorenz chaotic system to obtain pseudo-random sequences S1 and S2, the specific formula is as follows:

Figure BDA0003466665620000071
Figure BDA0003466665620000071

其中,当a=10,b=8/3,c=28且-1.52≤r≤-0.06系统处于超混沌状态。设置公式中的x,y,z,w的初始值作为加密秘钥,利用超混沌Lorenz系统,生成伪随机序列S1和S2,此时序列是一维序列,长度为512*256。Among them, when a=10, b=8/3, c=28 and -1.52≤r≤-0.06, the system is in a hyperchaotic state. Set the initial values of x, y, z, and w in the formula as the encryption key, and use the hyper-chaotic Lorenz system to generate pseudo-random sequences S1 and S2. At this time, the sequence is a one-dimensional sequence with a length of 512*256.

A2:将伪随机序列S1和S2转换成512*256的二维序列,进行无重复行置换和列置换,经过置换后的二维序列Scrambling_S1作为加密序列K。A2: Convert the pseudo-random sequences S1 and S2 into a 512*256 two-dimensional sequence, perform row permutation and column permutation without repetition, and use the permuted two-dimensional sequence Scrambling_S1 as the encrypted sequence K.

A3:将Scrambling_S1按照每间隔4个元素就保留下一个元素及其上下左右元素的方式进行分块,块数为Num,在伪随机序列S2中取前Num个元素,组成新的序列S2_Num,将得到的序列S2_Num和序列Scrambling_S1,通过模加法得到加密序列K’。A3: Divide Scrambling_S1 into blocks by keeping the next element and its upper, lower, left, and right elements every 4 elements. The number of blocks is Num, and the first Num elements are taken from the pseudo-random sequence S2 to form a new sequence S2_Num. The obtained sequence S2_Num and the sequence Scrambling_S1 are obtained by modulo addition to obtain the encrypted sequence K'.

本实施例中,按照图4中所示进行分块,并计算完整块的个数,记作Num。在伪随机序列S2中取前Num个元素,组成新的序列S2_Num,通过模加法得到加密序列K’,具体公式如下:In this embodiment, the blocks are divided as shown in FIG. 4 , and the number of complete blocks is calculated, which is denoted as Num. The first Num elements are taken from the pseudo-random sequence S2 to form a new sequence S2_Num, and the encrypted sequence K' is obtained by modulo addition. The specific formula is as follows:

K'(i,j)=S1(i,j)+S2_Num(count)i=1,2,...M,j=1,2,...NK'(i,j)=S1(i,j)+S2_Num(count)i=1,2,...M,j=1,2,...N

其中,i,j是对应的二维序列的行和列,count是对应的每个块的序号,M,N表示加密图像的尺寸,在该实施例中是512*256。Among them, i, j are the rows and columns of the corresponding two-dimensional sequence, count is the corresponding serial number of each block, M, N represent the size of the encrypted image, which is 512*256 in this embodiment.

A4:采取模加法的方式,使用加密序列K和K’分别对第一层白色像素图像W和白色像素预测图像W’进行加密,具体计算公式如下:A4: The first-layer white pixel image W and the white pixel prediction image W' are encrypted using the encryption sequence K and K' by modulo addition. The specific calculation formula is as follows:

Figure BDA0003466665620000081
Figure BDA0003466665620000081

其中,EW(i,j),EW'(i,j)是第一层白色像素图像W和白色像素预测图像W’对应的加密图像。Among them, EW(i,j), EW'(i,j) are the encrypted images corresponding to the first-layer white pixel image W and the white pixel prediction image W'.

步骤S104:在安全性、相关性和随机性三个方面,对加密图像的性能进行分析,具体步骤如下:Step S104: Analyze the performance of the encrypted image in terms of security, correlation and randomness, and the specific steps are as follows:

B1:如图6所示,Lena原始图像的直方图,像素分布不均匀,经过加密之后,如图7所示的加密图像,像素分布均匀,像素分布越均匀,加密算法的安全性越高。B1: As shown in Figure 6, the histogram of Lena's original image has uneven pixel distribution. After encryption, the encrypted image shown in Figure 7 has a uniform pixel distribution. The more uniform the pixel distribution, the higher the security of the encryption algorithm.

B2:随机选取5000对相邻像素,在水平方向分别计算原始图像和加密图像的相关性,具体相关系数计算公式如下:B2: Randomly select 5000 pairs of adjacent pixels, and calculate the correlation between the original image and the encrypted image in the horizontal direction. The specific correlation coefficient calculation formula is as follows:

Figure BDA0003466665620000082
Figure BDA0003466665620000082

其中,X,Y表示两个像素值,RXY表示水平两个相邻像素之间的相关性,cov(X,Y)表示两个像素的协方差,D(X),D(Y)表示该像素在加密和不加密两种情况之间的方差。Among them, X, Y represent two pixel values, R XY represents the correlation between two adjacent pixels horizontally, cov(X, Y) represents the covariance of the two pixels, D(X), D(Y) represents The variance of the pixel between encrypted and unencrypted cases.

如图8所示,Lena加密图像的相邻像素之间相关性低,像素的随机性大。As shown in Figure 8, the correlation between adjacent pixels of the Lena encrypted image is low, and the randomness of the pixels is large.

B3:信息熵(Entropy)表示像素的随机性,理想的加密图像的信息熵接近8,信息熵的计算公式如下:B3: Information entropy (Entropy) represents the randomness of pixels. The information entropy of an ideal encrypted image is close to 8. The calculation formula of information entropy is as follows:

Figure BDA0003466665620000083
Figure BDA0003466665620000083

Figure BDA0003466665620000084
Figure BDA0003466665620000084

其中,H(p),H'(p)表示对应加密图像的信息熵,p表示在范围[0,255]之间的像素。Among them, H(p), H'(p) represent the information entropy of the corresponding encrypted image, and p represents the pixels in the range [0, 255].

B4:像素变化率(NPCR)能够体现加密方法秘钥的灵敏度,理想的加密图像NPCR接近0.9960,具体计算公式如下:B4: The pixel change rate (NPCR) can reflect the sensitivity of the encryption method key. The ideal encrypted image NPCR is close to 0.9960. The specific calculation formula is as follows:

Figure BDA0003466665620000091
Figure BDA0003466665620000091

Figure BDA0003466665620000092
Figure BDA0003466665620000092

其中,NPCR表示在(i,j)点的像素变化率。where NPCR represents the pixel change rate at point (i, j).

表1分别给出了Lena、Baboon和Plane的NPCR和信息熵表格Table 1 gives the NPCR and information entropy tables of Lena, Baboon and Plane, respectively

Table1测试图的信息熵和NPCRInformation entropy and NPCR of Table1 test graph

Figure BDA0003466665620000093
Figure BDA0003466665620000093

如表1所示,选取三张测试图,分别命名为Lena、Baboon、Plane用来进行机密性能分析,可以看出,Lena加密图像的信息熵接近8,随机性好,而且像素变化率接近0,9960,加密秘钥灵活度高,安全性高。As shown in Table 1, three test images are selected and named as Lena, Baboon, and Plane for confidential performance analysis. It can be seen that the information entropy of Lena encrypted image is close to 8, the randomness is good, and the pixel change rate is close to 0 ,9960, the encryption key has high flexibility and high security.

由以上的评价标准,可以证明该加密方法在安全性、相关性和随机性方面都具有良好的性能。From the above evaluation criteria, it can be proved that the encryption method has good performance in terms of security, correlation and randomness.

步骤S105:基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;基于所述二次差值矩阵得到标记的白色像素图像;具体过程如下:Step S105: Based on the encrypted white pixel image and the white pixel prediction image, obtain a difference matrix D1, divide the difference matrix D1 into blocks, and obtain a secondary difference matrix diff_D1; White pixel image; the specific process is as follows:

C1:将加密后的图像EW和EW’像素值对应相减再取模,得到差值矩阵D1。C1: Subtract the encrypted image EW and EW' pixel values correspondingly and then take the modulo to obtain the difference matrix D1.

具体计算公式为:D1(i,j)=(EW(i,j)-EW'(i,j))mod 256 i=1,2,...M,j=1,2,...NThe specific calculation formula is: D1(i,j)=(EW(i,j)-EW'(i,j))mod 256 i=1,2,...M,j=1,2,... N

C2:将差值矩阵D1按照每间隔4个元素就保留下一个元素及其上下左右元素的方式进行分块,并使上下左右的元素与中间元素作差,得到二次差值矩阵diff_D1,详细算法过程如下:C2: Divide the difference matrix D1 into blocks by keeping the next element and its upper, lower, left, and right elements every 4 elements, and make the difference between the upper, lower, left, and right elements and the middle element to obtain a quadratic difference matrix diff_D1. Details The algorithm process is as follows:

按照图的分块规则,在每个块内使上下左右的元素与中间元素作差,具体计算公式如下:According to the block rules of the graph, in each block, the upper, lower, left and right elements are made to differ from the middle element. The specific calculation formula is as follows:

Figure BDA0003466665620000101
Figure BDA0003466665620000101

其中,mod256指的是对前面括号的内容取模。得到除以256后的余数。Among them, mod256 refers to modulo the contents of the preceding parentheses. Get the remainder after dividing by 256.

C3:获取二次差值矩阵diff_D1的直方图,通过直方图移位的方式,进行信息嵌入,得到标记的白色像素加密图像P1。C3: Obtain the histogram of the quadratic difference matrix diff_D1, and perform information embedding by means of the histogram shift to obtain the marked white pixel encrypted image P1.

将认证信息或版权信息作为秘密信息,其表现为二进制序列,并使用秘钥产生伪随机序列,与秘密信息序列做异或操作,这里的秘钥就是提取秘钥,用于后续提取信息,并对秘密信息解密得到正确的认证信息或版权信息。Take authentication information or copyright information as secret information, which is represented as a binary sequence, and use the secret key to generate a pseudo-random sequence, which is XORed with the secret information sequence. The secret key here is the extraction secret key, which is used for subsequent extraction of information and Decrypt the secret information to obtain correct authentication information or copyright information.

为了更加方便的展示本方法的具体过程,以下使用S∈(0,1)表示秘密信息。In order to show the specific process of this method more conveniently, the following uses S∈(0,1) to represent the secret information.

设定秘密信息为S∈(0,1),以diff_D1(i-1,j)为例,当嵌入的秘密信息为0时,均保持不变。Set the secret information as S∈(0,1), take diff_D1(i-1,j) as an example, when the embedded secret information is 0, it remains unchanged.

当嵌入的秘密信息为1时,相当于在加密图像EW(i-1,j)处加1并取模,具体计算公式如下:When the embedded secret information is 1, it is equivalent to adding 1 to the encrypted image EW(i-1,j) and taking the modulo. The specific calculation formula is as follows:

(diff_D1(i-1,j)+1)mod256=((D1(i-1,j)-D1(i,j))mod256+1)mod256(diff_D1(i-1,j)+1)mod256=((D1(i-1,j)-D1(i,j))mod256+1)mod256

=(D1(i-1,j)+1)mod256-D1(i,j)mod256=(D1(i-1,j)+1)mod256-D1(i,j)mod256

=((EW(i-1,j)+1)mod256-EW'(i-1,j))mod256-(EW(i,j)-EW'(i,j))mod256)mod256=((EW(i-1,j)+1)mod256-EW'(i-1,j))mod256-(EW(i,j)-EW'(i,j))mod256)mod256

信息嵌入算法采取直方图移位,嵌入信息的直方图bin称为扩展bin,用于移动产生空位的直方图bin称为移动bin;The information embedding algorithm adopts histogram shift, the histogram bin of the embedded information is called extended bin, and the histogram bin used for shifting to generate vacancies is called moving bin;

通过上述可知,二次差值直方图的扩展和移动其实是在加密图像EW上进行改变,嵌入扩展bin位置对应的加密图像EW的位置,经过标记的加密图像P1在某一点的像素值根据扩展bin和移动bin的具体计算公式得到。From the above, it can be seen that the expansion and movement of the quadratic difference histogram is actually changed on the encrypted image EW, and the position of the encrypted image EW corresponding to the extended bin position is embedded, and the pixel value of the marked encrypted image P1 at a certain point is based on the expansion The specific calculation formulas of bin and moving bin are obtained.

扩展bin的具体计算公式如下:The specific calculation formula of the extended bin is as follows:

Figure BDA0003466665620000111
Figure BDA0003466665620000111

扩展bin与移动bin之间的位置对应像素的具体计算公式如下:The specific calculation formula of the pixel corresponding to the position between the extended bin and the mobile bin is as follows:

Figure BDA0003466665620000112
Figure BDA0003466665620000112

设定尺寸与原始图像相同的0矩阵作为标记地图,移动bin对应位置的像素在标记地图上标记1,其他位置标记0,将标记地图与第一行像素进行LSB(最低有效位)替换,替换的像素作为辅助信息与秘密信息一同嵌入到图像中。Set the 0 matrix with the same size as the original image as the marker map, move the pixels corresponding to the bin to mark 1 on the marker map, and mark 0 for other positions, and replace the marker map with the pixels in the first row LSB (least significant bit), replace The pixels are embedded into the image as auxiliary information along with the secret information.

C4:根据直方图特征选择扩展bin与移动bin;C4: Select extended bins and mobile bins according to histogram features;

如图9所示的二次差值矩阵diff_D1的直方图,从中发现,在0和255附近直方图高,差值集中。As shown in the histogram of the quadratic difference matrix diff_D1 as shown in Figure 9, it is found that the histogram is high near 0 and 255, and the difference is concentrated.

一般选择0,1,255和254四个最高的bin作为扩展bin,选择0bin或者数目最小的bin作为移动bin。Generally, the four highest bins of 0, 1, 255 and 254 are selected as extended bins, and 0 bin or the smallest number of bins are selected as mobile bins.

步骤S106:使用菱形预测器和标记的白色像素图像得到每一个黑色像素的预测值,将黑色像素重新组合成黑色像素图像,每一个黑色像素的预测值组合得到黑色像素预测图像;Step S106: use the diamond predictor and the marked white pixel image to obtain the predicted value of each black pixel, recombine the black pixel into a black pixel image, and combine the predicted value of each black pixel to obtain a black pixel predicted image;

步骤S107:对所述黑色像素图像和黑色像素预测图像进行加密;Step S107: encrypting the black pixel image and the black pixel prediction image;

具体地,参照步骤S103中对于白色像素图像的加密方式,取模加法的方式,使用加密序列K和K’对黑色像素图像B及黑色像素预测图像B’进行加密,具体计算公式如下:Specifically, referring to the encryption method for the white pixel image in step S103, the method of modulo addition, the black pixel image B and the black pixel predicted image B' are encrypted using the encryption sequence K and K', and the specific calculation formula is as follows:

EB(i,j)=(B(i,j)+K(i,j))mod 256 i=1,2,...M,j=1,2,...NEB(i,j)=(B(i,j)+K(i,j))mod 256 i=1,2,...M,j=1,2,...N

EB'(i,j)=(B'(i,j)+K'(i,j))mod 256 i=1,2,...M,j=1,2,...NEB'(i,j)=(B'(i,j)+K'(i,j))mod 256 i=1,2,...M,j=1,2,...N

其中,EB(i,j),EB'(i,j)分别表示加密后的黑色像素图像和黑色像素预测图像。Among them, EB(i,j), EB'(i,j) represent the encrypted black pixel image and the black pixel prediction image, respectively.

步骤S108:基于加密后的黑色像素图像和黑色像素预测图像,得到差值矩阵D2,对差值矩阵D2进行分块,得到二次差值矩阵diff_D2;基于所述二次差值矩阵得到标记的黑色像素图像;具体过程如下:Step S108: Based on the encrypted black pixel image and the black pixel prediction image, a difference matrix D2 is obtained, and the difference matrix D2 is divided into blocks to obtain a secondary difference matrix diff_D2; Black pixel image; the specific process is as follows:

D1:加密后的黑色像素图像EB及黑色像素预测图像EB’对应相减,得到差值矩阵D2,具体计算公式如下:D1: The encrypted black pixel image EB and the black pixel prediction image EB' are correspondingly subtracted to obtain a difference matrix D2. The specific calculation formula is as follows:

D2(i,j)=(EB(i,j)-EB'(i,j))mod 256 i=1,2,...M,j=1,2,...ND2(i,j)=(EB(i,j)-EB'(i,j))mod 256 i=1,2,...M,j=1,2,...N

D2:将差值矩阵D2按照每间隔4个元素就保留下一个元素及其上下左右元素的方式进行分块,并使上下左右的元素与中间元素作差,得到二次差值矩阵diff_D2,详细算法过程如下:D2: Divide the difference matrix D2 into blocks in such a way that the next element and its upper, lower, left, and right elements are kept every 4 elements, and make the difference between the upper, lower, left, and right elements and the middle element to obtain a secondary difference matrix diff_D2. Details The algorithm process is as follows:

按照图4和图5的分块规则,在每个块内使上下左右的元素与中间元素作差,具体计算公式如下:According to the block rules shown in Figure 4 and Figure 5, in each block, the upper, lower, left, and right elements are made to differ from the middle element. The specific calculation formula is as follows:

Figure BDA0003466665620000121
Figure BDA0003466665620000121

D3:获取二次差值矩阵diff_D2的直方图,通过直方图移位的方式,将秘密信息,即需要嵌入的身份认证等信息,嵌入黑色像素图像B,得到标记的黑色像素加密图像P2。D3: Obtain the histogram of the quadratic difference matrix diff_D2, and embed the secret information, that is, the identity authentication and other information that needs to be embedded, into the black pixel image B by means of the histogram shift to obtain the marked black pixel encrypted image P2.

当嵌入的秘密信息为1时,相当于在加密图像EW(i-1,j)处加1并取模,当嵌入的秘密信息为0时,保持不变。When the embedded secret information is 1, it is equivalent to adding 1 and taking the modulo at the encrypted image EW(i-1,j), and when the embedded secret information is 0, it remains unchanged.

选择最高的四个直方图bin嵌入信息,一般情况下选择0,1,255,和254。选择0bin或者数目最小的bin作为移动bin.。Select the highest four histogram bins to embed information, generally choose 0, 1, 255, and 254. Select 0 bin or the smallest number of bins as moving bins.

当嵌入扩展bin小于移动bin,移动bin加1,当嵌入扩展bin大于于移动bin,移动bin减1。When the embedded expansion bin is smaller than the mobile bin, the mobile bin is increased by 1, and when the embedded expansion bin is greater than the mobile bin, the mobile bin is decreased by 1.

移动bin对应的像素位置使用map标记1,其他位置标记0,将map作为辅助信息与秘密信息一同嵌入到图像中。The pixel position corresponding to the moving bin is marked with map 1, and other positions are marked with 0, and the map is embedded into the image as auxiliary information and secret information.

步骤S109:组合标记的白色像素图像和标记的黑色像素图像,得到原始图像的加密标记图像,从而实现原始图像的密文域信息隐藏。Step S109 : combining the marked white pixel image and the marked black pixel image to obtain an encrypted marked image of the original image, thereby realizing information hiding of the ciphertext domain of the original image.

本实施例中,验证其可逆可分离性和PSNR性能分析,详细步骤如下:In the present embodiment, to verify its reversible separability and PSNR performance analysis, the detailed steps are as follows:

E1:验证原始图像的加密标记图像的信息提取和图像恢复可逆性。E1: Verification of the information extraction and image restoration reversibility of the encrypted labeled image of the original image.

提取加密标记图像的黑色像素,按照步骤S106使用标记的白色像素图像得到每一个黑色像素的预测值,每一个黑色像素的预测值组合得到黑色像素预测图像;按照上述步骤S108,获得二次差值直方图,通过如下计算公式得到提取信息和恢复成为加密图像:Extract the black pixel of the encrypted marked image, use the marked white pixel image to obtain the predicted value of each black pixel according to step S106, and combine the predicted value of each black pixel to obtain the predicted image of black pixel; According to the above-mentioned step S108, obtain the secondary difference value The histogram is obtained by the following calculation formula to extract the information and restore it to become an encrypted image:

扩展bin的具体计算公式如下:The specific calculation formula of the extended bin is as follows:

Figure BDA0003466665620000131
Figure BDA0003466665620000131

扩展bin与移动bin之间的位置对应像素的具体计算公式如下:The specific calculation formula of the pixel corresponding to the position between the extended bin and the mobile bin is as follows:

Figure BDA0003466665620000141
Figure BDA0003466665620000141

Pc kz是扩展bin恢复成没嵌入信息之前的像素值,P2是加密标记后的黑色像素值,S是秘密信息,S∈(0,1),Pc yd是扩展bin与移动bin之间的位置对应像素恢复成原来的像素值。P c kz is the pixel value before the extended bin is restored to no embedded information, P2 is the black pixel value after encrypted marking, S is the secret information, S∈(0,1), P c yd is the difference between the extended bin and the mobile bin The position of the corresponding pixel is restored to the original pixel value.

提取加密标记图像的白色像素,重复上述步骤,得到提取信息和恢复成为加密图像。Extract the white pixels of the encrypted marked image, and repeat the above steps to obtain the extracted information and restore the encrypted image.

提取第一行像素的LSB(最低有效位),即提取标记地图(标记地图用来记录移动Bin的位置),尺寸与原始图像相同的0矩阵。移动bin对应位置的像素在标记地图上标记1,其他位置标记0,得到移动bin的值和位置。Extract the LSB (least significant bit) of the first row of pixels, that is, extract the marker map (the marker map is used to record the position of the moving Bin), a 0 matrix with the same size as the original image. The pixel at the corresponding position of the moving bin is marked with 1 on the marked map, and the other positions are marked with 0, and the value and position of the moving bin are obtained.

最后,将提取的秘密信息中的辅助信息重新放回第一行像素的LSB中,得到完整的仅加密图像。Finally, the auxiliary information in the extracted secret information is put back into the LSB of the first row of pixels to obtain a complete encrypted-only image.

通过上述操作得到提取信息和黑色像素仅加密图像,与原加密图像做对比,两张图像对应像素相同,证明其可逆性。提取的秘密信息与原秘密信息做对比,提取信息无误。The extracted information and black pixels are only encrypted images obtained through the above operations. Compared with the original encrypted images, the corresponding pixels of the two images are the same, which proves their reversibility. The extracted secret information is compared with the original secret information, and the extracted information is correct.

E2:验证黑色像素加密图像的加解密可逆性。E2: Verify the encryption and decryption reversibility of the black pixel encrypted image.

本实施例采用加密秘钥产生伪随机序列,并通过模加法得到加密图像,解密方法如下:In this embodiment, an encryption key is used to generate a pseudo-random sequence, and an encrypted image is obtained by modulo addition. The decryption method is as follows:

B(i,j)=mod(EB(i,j)-K(i,j),256)B(i,j)=mod(EB(i,j)-K(i,j),256)

B'(i,j)=mod(EB'(i,j)-K'(i,j),256)B'(i,j)=mod(EB'(i,j)-K'(i,j),256)

通过加密秘钥产生伪随机序列,进而得到两个伪随机序列K和K’,通过加密图像与伪随机序列的模减法,得到解密图像。The pseudo-random sequence is generated by encrypting the secret key, and then two pseudo-random sequences K and K' are obtained, and the decrypted image is obtained by modulo subtraction of the encrypted image and the pseudo-random sequence.

对比黑色像素图像与黑色像素解密图像,验证加解密的可逆性。Compare the black pixel image with the black pixel decryption image to verify the reversibility of encryption and decryption.

E3:验证白色像素图像的可逆可分离性。E3: Verification of reversible separability of white pixel images.

验证第一层图像提取信息和可逆性的方法,同步骤E1和E2相同。The method of verifying the extraction information and reversibility of the first layer image is the same as steps E1 and E2.

以上步骤证明本实施例提出的信息隐藏算法是可以实现信息提取与图像恢复的可逆可分离性。The above steps prove that the information hiding algorithm proposed in this embodiment can realize the reversible separability of information extraction and image restoration.

E4:PANR性能分析。E4: PANR performance analysis.

计算EI仅解密后的图像与原始图像I的PSNR,具体公式如下:Calculate EI only the PSNR of the decrypted image and the original image I, the specific formula is as follows:

Figure BDA0003466665620000151
Figure BDA0003466665620000151

Figure BDA0003466665620000152
Figure BDA0003466665620000152

其中,MSE表示加密标记图像与原始图像之间的均方误差,单层加密图像的尺寸是M*N,全部加密之后的图像尺寸为M*2N;Among them, MSE represents the mean square error between the encrypted marked image and the original image, the size of the single-layer encrypted image is M*N, and the size of the fully encrypted image is M*2N;

图13给出了以Lena图像为例的整个图像处理过程示意图。结合图10-12所示,通过对比其他三种仅解密图像的PSNR,可知:Figure 13 shows a schematic diagram of the entire image processing process taking the Lena image as an example. Combined with Figure 10-12, by comparing the PSNR of the other three only decrypted images, we can see that:

本实施例可以实现加密标记图像的加解密过程与信息提取过程可分离性,且在仅解密的情况下,与原始图像的PSNR相对其他方案较高,图像视觉质量较好。This embodiment can realize the separability of the encryption and decryption process and the information extraction process of the encrypted marked image, and in the case of only decryption, the PSNR of the original image is higher than that of other solutions, and the image visual quality is better.

在嵌入过程中,本申请的方法相比其它方法可以实现较大容量的嵌入,且在嵌入过程中,嵌入秘密信息的容量可以调节,能够尽可能的满足现实情况对嵌入容量的需求。In the embedding process, the method of the present application can achieve larger capacity embedding than other methods, and in the embedding process, the capacity of the embedded secret information can be adjusted, which can meet the needs of the embedding capacity in reality as much as possible.

实施例二Embodiment 2

在一个或多个实施方式中,公开了一种可逆可分离的密文域信息隐藏系统,包括:In one or more embodiments, a reversible and separable ciphertext domain information hiding system is disclosed, including:

图像获取模块,用于获取原始图像,将所述原始图像的像素间隔分成黑白两种像素;an image acquisition module for acquiring an original image, and dividing the pixel interval of the original image into black and white pixels;

第一层图像加密模块,用于将白色像素重新组合形成白色像素图像,基于每一个白色像素的预测值组合得到白色像素预测图像;分别对白色像素图像和白色像素预测图像进行加密;The first layer of image encryption module is used to recombine the white pixels to form a white pixel image, and obtain a white pixel predicted image based on the predicted value combination of each white pixel; respectively encrypt the white pixel image and the white pixel predicted image;

第一层图像标记模块,用于基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;基于所述二次差值矩阵得到标记的白色像素图像;The first layer image marking module is used to obtain the difference matrix D1 based on the encrypted white pixel image and the white pixel prediction image, and divide the difference matrix D1 into blocks to obtain a secondary difference matrix diff_D1; The difference matrix gets the marked white pixel image;

第二层图像加密模块,用于将黑色像素重新组合形成黑色像素图像,基于每一个黑色像素的预测值组合得到黑色像素预测图像;分别对所述黑色像素图像和黑色像素预测图像进行加密;The second-layer image encryption module is used for recombining black pixels to form a black pixel image, and combining the predicted values of each black pixel to obtain a black pixel predicted image; respectively encrypt the black pixel image and the black pixel predicted image;

第二层图像标记模块,用于基于加密后的黑色像素图像和黑色像素预测图像,得到差值矩阵D2,对差值矩阵D2进行分块,得到二次差值矩阵diff_D2;基于所述二次差值矩阵得到标记的黑色像素图像;The second layer image marking module is used to obtain the difference matrix D2 based on the encrypted black pixel image and the black pixel prediction image, and divide the difference matrix D2 into blocks to obtain a secondary difference matrix diff_D2; The difference matrix gets the marked black pixel image;

组合标记模块,用于组合标记的白色像素图像和标记的黑色像素图像,得到原始图像的加密标记图像,从而实现原始图像的密文域信息隐藏。The combined marking module is used to combine the marked white pixel image and the marked black pixel image to obtain the encrypted marked image of the original image, thereby realizing the information hiding of the ciphertext domain of the original image.

需要说明的是,上述各模块的具体实现方式已经在实施例一中进行了说明,不再详述。It should be noted that the specific implementation manners of the above modules have been described in the first embodiment, and will not be described in detail.

实施例三Embodiment 3

在一个或多个实施方式中,公开了一种终端设备,包括服务器,所述服务器包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现实施例一中的可逆可分离的密文域信息隐藏方法。为了简洁,在此不再赘述。In one or more embodiments, a terminal device is disclosed, including a server, the server including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the The program implements the reversible and separable ciphertext domain information hiding method in the first embodiment. For brevity, details are not repeated here.

应理解,本实施例中,处理器可以是中央处理单元CPU,处理器还可以是其他通用处理器、数字信号处理器DSP、专用集成电路ASIC,现成可编程门阵列FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate array FPGA or other programmable logic devices , discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据、存储器的一部分还可以包括非易失性随机存储器。例如,存储器还可以存储设备类型的信息。The memory may include read-only memory and random access memory and provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.

实施例四Embodiment 4

在一个或多个实施方式中,公开了一种计算机可读存储介质,其中存储有多条指令,所述指令适于由终端设备的处理器加载并执行实施例一中所述的可逆可分离的密文域信息隐藏方法。In one or more embodiments, a computer-readable storage medium is disclosed, wherein a plurality of instructions are stored, and the instructions are adapted to be loaded by a processor of a terminal device and execute the reversibly separable described in the first embodiment. ciphertext domain information hiding method.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, they do not limit the scope of protection of the present invention. Those skilled in the art should understand that on the basis of the technical solutions of the present invention, those skilled in the art do not need to pay creative work. Various modifications or deformations that can be made are still within the protection scope of the present invention.

Claims (10)

1.一种可逆可分离的密文域信息隐藏方法,其特征在于,包括:1. a reversible and separable ciphertext domain information hiding method, is characterized in that, comprises: 获取原始图像,将所述原始图像的像素间隔分成黑白两种像素;Obtaining an original image, and dividing the pixel interval of the original image into black and white pixels; 将白色像素重新组合形成白色像素图像,基于每一个白色像素的预测值组合得到白色像素预测图像;Recombining the white pixels to form a white pixel image, and combining the predicted values of each white pixel to obtain a white pixel predicted image; 分别对白色像素图像和白色像素预测图像进行加密;基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;基于所述二次差值矩阵得到标记的白色像素图像;Encrypt the white pixel image and the white pixel prediction image respectively; obtain the difference matrix D1 based on the encrypted white pixel image and the white pixel prediction image, divide the difference matrix D1 into blocks, and obtain the quadratic difference matrix diff_D1; The quadratic difference value matrix obtains the marked white pixel image; 将黑色像素重新组合形成黑色像素图像,基于每一个黑色像素的预测值组合得到黑色像素预测图像;Recombining the black pixels to form a black pixel image, and combining the predicted values of each black pixel to obtain a black pixel predicted image; 分别对所述黑色像素图像和黑色像素预测图像进行加密;基于加密后的黑色像素图像和黑色像素预测图像,得到差值矩阵D2,对差值矩阵D2进行分块,得到二次差值矩阵diff_D2;基于所述二次差值矩阵得到标记的黑色像素图像;Encrypt the black pixel image and the black pixel prediction image respectively; obtain the difference matrix D2 based on the encrypted black pixel image and the black pixel prediction image, and divide the difference matrix D2 into blocks to obtain a secondary difference matrix diff_D2 ; Obtain the marked black pixel image based on the quadratic difference matrix; 组合标记的白色像素图像和标记的黑色像素图像,得到原始图像的加密标记图像,从而实现原始图像的密文域信息隐藏。The marked white pixel image and the marked black pixel image are combined to obtain the encrypted marked image of the original image, thereby realizing the information hiding of the ciphertext domain of the original image. 2.如权利要求1所述的一种可逆可分离的密文域信息隐藏方法,其特征在于,基于每一个白色像素的预测值组合得到白色像素预测图像,具体包括:2. a kind of reversible and separable ciphertext domain information hiding method as claimed in claim 1, is characterized in that, based on the predicted value combination of each white pixel, obtains the white pixel prediction image, specifically comprises: 使用菱形预测器和黑色像素,得到每一个白色像素的预测值;将每一个白色像素的预测值组合得到白色像素预测图像。Using the diamond predictor and black pixels, the predicted value of each white pixel is obtained; the predicted value of each white pixel is combined to obtain the white pixel predicted image. 3.如权利要求1所述的一种可逆可分离的密文域信息隐藏方法,其特征在于,分别对白色像素图像和白色像素预测图像进行加密,具体包括:3. a kind of reversible and separable ciphertext domain information hiding method as claimed in claim 1 is characterized in that, the white pixel image and the white pixel prediction image are encrypted respectively, and specifically comprises: 使用Lorenz混沌系统得到伪随机序列S1和S2;Use Lorenz chaotic system to get pseudo-random sequences S1 and S2; 对伪随机序列S1和S2进行无重复行置换和列置换,经过置换后的序列S1作为加密序列K;Perform non-repetitive row permutation and column permutation on the pseudorandom sequences S1 and S2, and the permuted sequence S1 is used as the encrypted sequence K; 在伪随机序列S2中取设定数量的元素,组成新的序列,将所述新的序列和置换后的序列S1,通过模加法得到加密序列K’;A set number of elements are taken in the pseudo-random sequence S2 to form a new sequence, and the new sequence and the replaced sequence S1 are obtained by modulo addition to obtain the encrypted sequence K'; 使用加密序列K对白色像素图像进行加密,使用加密序列K’对白色像素预测图像进行加密。The white pixel image is encrypted using the encryption sequence K, and the white pixel prediction image is encrypted using the encryption sequence K'. 4.如权利要求1所述的一种可逆可分离的密文域信息隐藏方法,其特征在于,基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;具体包括:4. a kind of reversible and separable ciphertext domain information hiding method as claimed in claim 1, is characterized in that, based on the white pixel image after encryption and white pixel prediction image, obtain difference value matrix D1, to difference value matrix D1 Divide into blocks to obtain a quadratic difference matrix diff_D1; specifically, it includes: 将加密后的白色像素图像和白色像素预测图像的像素值对应相减再取模,得到差值矩阵D1;The pixel values of the encrypted white pixel image and the white pixel prediction image are correspondingly subtracted and then modulo are obtained to obtain a difference matrix D1; 将差值矩阵D1按照每间隔设定元素就保留下一个元素及其上下左右元素的方式进行分块,并使上下左右的元素与中间元素作差,得到二次差值矩阵diff_D1。The difference matrix D1 is divided into blocks according to the method of retaining the next element and its upper, lower, left, and right elements at each interval, and the upper, lower, left, and right elements are made difference with the middle element to obtain a quadratic difference matrix diff_D1. 5.如权利要求1所述的一种可逆可分离的密文域信息隐藏方法,其特征在于,基于所述二次差值矩阵得到标记的白色像素图像,具体包括:5. a reversible and separable ciphertext domain information hiding method as claimed in claim 1, is characterized in that, obtains the marked white pixel image based on described quadratic difference value matrix, specifically comprises: 获取二次差值矩阵diff_D1的直方图,通过直方图移位的方式,进行信息嵌入,得到标记的白色像素图像。Obtain the histogram of the quadratic difference matrix diff_D1, and perform information embedding by means of the histogram shift to obtain the marked white pixel image. 6.如权利要求1所述的一种可逆可分离的密文域信息隐藏方法,其特征在于,使用菱形预测器和标记的白色像素图像得到每一个黑色像素的预测值,每一个黑色像素的预测值组合得到黑色像素预测图像。6. a kind of reversible and separable ciphertext domain information hiding method as claimed in claim 1, is characterized in that, obtains the predicted value of each black pixel using diamond shape predictor and the marked white pixel image, and each black pixel's predicted value is obtained. The predicted values are combined to obtain a predicted image of black pixels. 7.如权利要求1所述的一种可逆可分离的密文域信息隐藏方法,其特征在于,还包括:7. A kind of reversible and separable ciphertext domain information hiding method as claimed in claim 1, is characterized in that, also comprises: 对于原始图像的加密标记图像的信息提取和图像恢复可逆性进行验证的过程;The process of verifying the information extraction and image restoration reversibility of the encrypted label image of the original image; 对于标记的白色像素图像的加解密可逆性进行验证的过程;The process of verifying the reversibility of encryption and decryption of the marked white pixel image; 对于标记的黑色像素图像的加解密可逆性进行验证的过程。The process of verifying the reversibility of encryption and decryption of marked black pixel images. 8.一种可逆可分离的密文域信息隐藏系统,其特征在于,包括:8. A reversible and separable ciphertext domain information hiding system, characterized in that, comprising: 图像获取模块,用于获取原始图像,将所述原始图像的像素间隔分成黑白两种像素;an image acquisition module for acquiring an original image, and dividing the pixel interval of the original image into black and white pixels; 第一层图像加密模块,用于将白色像素重新组合形成白色像素图像,基于每一个白色像素的预测值组合得到白色像素预测图像;分别对白色像素图像和白色像素预测图像进行加密;The first layer of image encryption module is used to recombine the white pixels to form a white pixel image, and obtain a white pixel predicted image based on the predicted value combination of each white pixel; respectively encrypt the white pixel image and the white pixel predicted image; 第一层图像标记模块,用于基于加密后的白色像素图像和白色像素预测图像,得到差值矩阵D1,对差值矩阵D1进行分块,得到二次差值矩阵diff_D1;基于所述二次差值矩阵得到标记的白色像素图像;The first layer image marking module is used to obtain the difference matrix D1 based on the encrypted white pixel image and the white pixel prediction image, and divide the difference matrix D1 into blocks to obtain a secondary difference matrix diff_D1; The difference matrix gets the marked white pixel image; 第二层图像加密模块,用于将黑色像素重新组合形成黑色像素图像,基于每一个黑色像素的预测值组合得到黑色像素预测图像;分别对所述黑色像素图像和黑色像素预测图像进行加密;The second-layer image encryption module is used for recombining black pixels to form a black pixel image, and combining the predicted values of each black pixel to obtain a black pixel predicted image; respectively encrypt the black pixel image and the black pixel predicted image; 第二层图像标记模块,用于基于加密后的黑色像素图像和黑色像素预测图像,得到差值矩阵D2,对差值矩阵D2进行分块,得到二次差值矩阵diff_D2;基于所述二次差值矩阵得到标记的黑色像素图像;The second layer image marking module is used to obtain the difference matrix D2 based on the encrypted black pixel image and the black pixel prediction image, and divide the difference matrix D2 into blocks to obtain a secondary difference matrix diff_D2; The difference matrix gets the marked black pixel image; 组合标记模块,用于组合标记的白色像素图像和标记的黑色像素图像,得到原始图像的加密标记图像,从而实现原始图像的密文域信息隐藏。The combined marking module is used to combine the marked white pixel image and the marked black pixel image to obtain the encrypted marked image of the original image, thereby realizing the information hiding of the ciphertext domain of the original image. 9.一种终端设备,其包括处理器和存储器,处理器用于实现各指令;存储器用于存储多条指令,其特征在于,所述指令适于由处理器加载并执行权利要求1-7任一项所述的可逆可分离的密文域信息隐藏方法。9. A terminal device, comprising a processor and a memory, the processor is used to implement each instruction; the memory is used to store a plurality of instructions, wherein the instructions are adapted to be loaded by the processor and execute any of claims 1-7. A reversible and separable ciphertext domain information hiding method. 10.一种计算机可读存储介质,其中存储有多条指令,其特征在于,所述指令适于由终端设备的处理器加载并执行权利要求1-7任一项所述的可逆可分离的密文域信息隐藏方法。10. A computer-readable storage medium, wherein a plurality of instructions are stored, wherein the instructions are adapted to be loaded by a processor of a terminal device and execute the reversibly detachable reversible detachable device according to any one of claims 1-7. Ciphertext domain information hiding method.
CN202210031655.XA 2022-01-12 2022-01-12 A reversible and separable ciphertext domain information hiding method and system Withdrawn CN114465779A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210031655.XA CN114465779A (en) 2022-01-12 2022-01-12 A reversible and separable ciphertext domain information hiding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210031655.XA CN114465779A (en) 2022-01-12 2022-01-12 A reversible and separable ciphertext domain information hiding method and system

Publications (1)

Publication Number Publication Date
CN114465779A true CN114465779A (en) 2022-05-10

Family

ID=81408835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210031655.XA Withdrawn CN114465779A (en) 2022-01-12 2022-01-12 A reversible and separable ciphertext domain information hiding method and system

Country Status (1)

Country Link
CN (1) CN114465779A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117676032A (en) * 2023-11-24 2024-03-08 广东技术师范大学 Multi-party reversible information hiding method and device for ciphertext binary image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117676032A (en) * 2023-11-24 2024-03-08 广东技术师范大学 Multi-party reversible information hiding method and device for ciphertext binary image
CN117676032B (en) * 2023-11-24 2024-06-04 广东技术师范大学 Multi-party reversible information hiding method and device for ciphertext binary image

Similar Documents

Publication Publication Date Title
Huang et al. On symmetric color image encryption system with permutation-diffusion simultaneous operation
Wang et al. High capacity reversible data hiding in encrypted image based on intra-block lossless compression
Li et al. Reversible data hiding in encrypted images using cross division and additive homomorphism
CN104851070B (en) A kind of image encryption and decryption method based on foreground and background separation
CN112040086B (en) Image encryption and decryption methods and devices, equipment and readable storage medium
CN110086601A (en) Based on the associated Josephus traversing of pixel value and hyperchaotic system image encryption method
CN107220923B (en) Digital picture feedback encryption method based on image network
Shifa et al. Joint crypto-stego scheme for enhanced image protection with nearest-centroid clustering
CN107330338B (en) Color image encryption and decryption method and system based on double chaotic cross-diffusion
Nunna et al. Secure data transfer through internet using cryptography and image steganography
Abdel-Nabi et al. Medical imaging security using partial encryption and histogram shifting watermarking
CN104881838B (en) One kind is based on GF (23) (K, N) significant point deposited without expansion image and reconstructing method
Huynh et al. Quadri-directional searching algorithm for secret image sharing using meaningful shadows
Gao et al. An authenticatable (2, 3) secret sharing scheme using meaningful share images based on hybrid fractal matrix
Wang et al. A chaotic image encryption scheme based on cat map and MMT permutation
CN114465779A (en) A reversible and separable ciphertext domain information hiding method and system
CN113407955A (en) Image encryption method, medium, equipment and terminal based on four-dimensional hyper-chaotic system
Hasnat et al. A novel image encryption algorithm using pixel shuffling and pixel intensity reversal
Abu-Alhaija Crypto-Steganographic LSB-based System for AES-Encrypted Data
Ariyanto et al. Performance analysis of LSB image steganography combined with blowfish-RC4 encryption in various file extensions
Thakur et al. Enhance steganography techniques: A solution for image security
Li et al. Image secret sharing and hiding with authentication
Babatunde et al. Performance analysis of gray code number system in image security
JP2020184663A (en) High resistance digital watermarking method
Gawade et al. Basic of Secrete Communication System for Military by Using ML and Steganography

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20220510

WW01 Invention patent application withdrawn after publication