A diffusion-based image deniable encryption method

By constructing an image repudiation encryption model using a variational autoencoder and a diffusion model, the problem of semantic information inconsistency in traditional methods is solved, achieving a high similarity between the real decrypted image and the original image, thus enhancing the privacy protection of image data.

CN118484822BActive Publication Date: 2026-03-10HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing deniable encryption methods based on traditional cryptographic systems struggle to ensure that the decrypted image and the original image have highly similar semantic information without arousing suspicion from attackers, resulting in insufficient privacy protection performance.

Method used

An image-repudiable encryption model consisting of a variational autoencoder, a diffusion model, and a classifier is constructed. An encrypted image with semantic information is generated through a training and transformation process. The corresponding decrypted image is generated under the guidance of the real decryption key and the fake decryption key, ensuring that the real decrypted image is highly similar to the original image.

Benefits of technology

It enhances the privacy protection performance of image data, ensuring that the decrypted image has highly similar semantic information to the original image, thus improving the privacy protection effect of the encryption method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484822B_ABST
    Figure CN118484822B_ABST
Patent Text Reader

Abstract

This invention discloses an image deniable encryption method based on a diffusion model. The method constructs an image deniable encryption model consisting of a variational autoencoder, a diffusion model, and a classifier. The variational autoencoder is trained using the original image to transform it into an original latent signal. Guided by category labels, the diffusion model is trained using the original latent signal to transform it into a reconstructed latent signal. The decoding unit of the variational autoencoder decodes the reconstructed latent signal to generate a reconstructed image with semantic information. Guided by an encryption key, the trained image deniable encryption model is used on the original image to generate an encrypted image, and corresponding real decrypted images or fake decrypted images are generated. This method uses deep learning technology to solve the semantic deniable encryption problem of image data, ensuring that the real decrypted image and the original image have highly similar semantic information, thereby enhancing the privacy protection performance of the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and in particular to an image denial encryption method based on a diffusion model. Background Technology

[0002] Repudiable encryption is an encryption mechanism that allows the sender (or receiver) of information to deny the actual encryption parameters used in the encryption process, and prevents attackers from detecting false encryption / decryption parameters. When performing repudiable encryption based on traditional cryptographic schemes, encrypted data lacking semantic information is easily aroused by attackers. To enhance the privacy protection performance of repudiable encryption, it is generally required that both the actual and false decryption data contain semantic information. Summary of the Invention

[0003] The purpose of this invention is to propose an image deniable encryption method based on a diffusion model. This method uses deep learning technology to solve the semantic deniable encryption problem of image data, which can ensure that the real decrypted image and the original image have highly similar semantic information, thereby enhancing the privacy protection performance of the data.

[0004] The objective of this invention is achieved through the following technical solution:

[0005] A diffusion-based image deniability encryption method, the method comprising:

[0006] Step 1: Construct an image denial encryption model consisting of a variational autoencoder, a diffusion model, and a classifier;

[0007] Step 2: Train a variational autoencoder using the original image, and transform the original image into the original latent signal through the coding unit of the variational autoencoder.

[0008] Step 3: Train the diffusion model using the original subsurface signal under the guidance of the category label, and transform the original subsurface signal into a reconstructed subsurface signal through the diffusion model;

[0009] Step 4: Use the decoding unit of the variational autoencoder to decode and reconstruct the latent signal to generate a reconstructed image with semantic information;

[0010] Step 5: Using the trained image-denial encryption model, an encrypted image is generated from the original image under the guidance of the encryption key; using the image-denial encryption model, a real decrypted image is generated from the encrypted image under the guidance of the real decryption key; and using the image-denial encryption model, a fake decrypted image is generated from the encrypted image under the guidance of the fake decryption key.

[0011] As can be seen from the technical solution provided by the present invention, the above method uses deep learning technology to solve the problem of semantically deniable encryption of image data, which can ensure that the real decrypted image and the original image have highly similar semantic information, thereby enhancing the privacy protection performance of the data. Attached Figure Description

[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of the image deniability encryption method based on the diffusion model provided in an embodiment of the present invention;

[0014] Figure 2 This is a schematic diagram of the image deniability encryption model described in an embodiment of the present invention;

[0015] Figure 3 The examples given in this invention are 12 original images selected from the MNIST dataset;

[0016] Figure 4 A schematic diagram illustrating the generation of an encrypted image from the original image using an image-denial encryption model, guided by an encryption key;

[0017] Figure 5 A schematic diagram illustrating the generation of a real decrypted image using an image-denied encryption model, guided by a real decryption key;

[0018] Figure 6 This diagram illustrates a fake decrypted image generated using an image-denied encryption model, guided by a fake decryption key. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments, and do not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0020] like Figure 1 The diagram shows a flowchart of an image deniability encryption method based on a diffusion model provided in an embodiment of the present invention. The method includes:

[0021] Step 1: Construct an image denial encryption model consisting of a variational autoencoder, a diffusion model, and a classifier;

[0022] In this step, such as Figure 2 The diagram shown is a structural schematic of the image deniability encryption model described in an embodiment of the present invention. The input image of the constructed image deniability encryption model is a grayscale image with a size of 28×28, specifically including:

[0023] A two-dimensional convolutional unit Conv(in_channels,out_channels,kernel_size,stride,padding) has the following input channels: in_channels, output channels: out_channels, kernel size: kernel_size, kernel stride: stride, and padding: padding.

[0024] MaxPool2d is the maximum pooling unit.

[0025] A fully connected layer Linear(in_channels,out_channels) with in_channels input channels and out_channels output channels;

[0026] The encoding unit of a variational autoencoder;

[0027] The decoding unit of a variational autoencoder;

[0028] Attention-based downsampling unit AttnDownBlock2D;

[0029] Attention-based intermediate unit AttnMidBlock2D;

[0030] Attention-based upsampling unit AttnUpBlock2D;

[0031] Downsampling unit DownBlock2D;

[0032] Upsampling unit UpBlock2D;

[0033] Time embedding;

[0034] Class embedding.

[0035] Step 2: Train a variational autoencoder using the original image, and transform the original image into the original latent signal through the coding unit of the variational autoencoder.

[0036] The specific process in this step is as follows:

[0037] (1) The original image set is denoted as x, and the loss function of the variational autoencoder is defined. for:

[0038]

[0039] Where x represents the original image in the original image set x; E is the encoding unit of the variational autoencoder; and D is the decoding unit of the variational autoencoder. This represents the expectation operation based on the statistical distribution of the original image; The square of the l2 norm of the difference between the original image and the image generated by the encoding and decoding units sequentially;

[0040] (2) Train the variational autoencoder, that is, minimize the loss function of the variational autoencoder to obtain the corresponding coding unit E. * and decoding unit D * , represented as:

[0041]

[0042] in, This indicates that the optimal coding unit E is obtained by training a variational autoencoder. * and decoding unit D * Operations;

[0043] (3) Using the coding unit E of a variational autoencoder * Transform the original image x into the original deep-seated signal z = E * (x).

[0044] Step 3: Train the diffusion model using the original subsurface signal under the guidance of the category label, and transform the original subsurface signal into a reconstructed subsurface signal through the diffusion model;

[0045] The specific process in this step is as follows:

[0046] (1) Set the maximum time step to T, and generate Gaussian noise that follows a distribution with a mean of 0 and a variance of I.

[0047] (2) Using Gaussian noise The noise addition operation is performed stepwise on the original deep-seated signal z, as follows:

[0048]

[0049] in, It is Gaussian noise that follows a distribution with a mean of 0 and a variance of I; z0 = z is the noisy latent layer signal when t = 0, and 0 < α t <1; z t It is a noisy latent layer signal;

[0050] (3) Define the loss function of the diffusion model for:

[0051]

[0052] in, The diffusion model uses the noisy latent layer signal z t The time step t and the class label y are the prediction noise generated from the input signal; the class label y represents the class of the original image x.

[0053] (4) Train the diffusion model, that is, minimize the diffusion model loss function to obtain the corresponding model parameters θ. * :

[0054]

[0055] (5) Use predictive noise For the noisy latent layer signal z t The noise removal operation is performed step by step to obtain the predicted noisy latent layer signal.

[0056] in, It is Gaussian noise that follows a distribution with a mean of 0 and a variance of I. It is the predicted noisy latent layer signal. The mean, expressed as:

[0057]

[0058] and It is the predicted noisy latent layer signal. The variance is expressed as:

[0059]

[0060] (6) The reconstructed deep-seated signal is obtained as follows

[0061] in, It is the noisy latent layer signal predicted when t=0; It is the noisy latent layer signal predicted when t=1. The mean; It is the noisy latent layer signal predicted when t=1. The variance; It is Gaussian noise that follows a distribution with a mean of 0 and a variance of I when t=1.

[0062] Step 4: Use the decoding unit of the variational autoencoder to decode and reconstruct the latent signal to generate a reconstructed image with semantic information;

[0063] The specific process in this step is as follows:

[0064] (1) Using the decoding unit D of the variational autoencoder * Reconstructing the subsurface signal Transform into reconstructed image

[0065] (2) Define the classifier loss function Represented as:

[0066]

[0067] Where m represents the number of images in the original image set x; c represents the number of image categories in the original image set x; and y represents the set of true category labels for the original images. y represents the set of predicted class labels obtained by the classifier from the reconstructed image; i (j) represents the true class label of the reconstructed image corresponding to the j-th class; This indicates that the reconstructed image corresponds to the predicted category label of the j-th class;

[0068] (3) Train the classifier, that is, minimize the classifier loss function to obtain the corresponding model parameters ω. * , represented as:

[0069]

[0070] Step 5: Using the trained image-denial encryption model, an encrypted image is generated from the original image under the guidance of the encryption key; using the image-denial encryption model, a real decrypted image is generated from the encrypted image under the guidance of the real decryption key; and using the image-denial encryption model, a fake decrypted image is generated from the encrypted image under the guidance of the fake decryption key.

[0071] The specific process in this step is as follows:

[0072] (1) Using the coding unit E of a variational autoencoder * Transform the original image x into the original deep-seated signal z = E * (x);

[0073] (2) Using Gaussian noise The original latent layer signal z is subjected to noise addition operations step by step to obtain the noisy latent layer signal z corresponding to the original image. t ;

[0074] (3) Using the noisy latent layer signal z tThe time step t and the target category label y as the encryption key * Generate prediction noise for the input signal For the noisy latent layer signal z t The reconstructed latent layer signal is obtained by performing noise removal operations step by step. And using the decoding unit D of the variational autoencoder * Reconstructing the subsurface signal Transform into an encrypted image

[0075] (4) Using the coding unit E of a variational autoencoder * Encrypt images Transformed into the original latent signal corresponding to the encrypted image

[0076] (5) Use Gaussian noise For the original latent signal corresponding to the encrypted image The noise addition operation is performed step by step to obtain the noisy latent layer signal.

[0077] (6) Using noisy latent layer signals Time step t and the original image category label as the actual decryption key Generate prediction noise for the input signal Noisy latent layer signals corresponding to encrypted images The noise removal operation is performed step by step to obtain the true reconstructed deep layer signal. And using the decoding unit D of the variational autoencoder * To truly reconstruct the deep-seated signals Transform into a real decrypted image

[0078] (7) Using noisy latent layer signals Time step t and fake category label as fake decryption key Generate prediction noise for the input signal Noisy latent layer signals corresponding to encrypted images Stepwise noise removal operations are performed to obtain spurious reconstructed latent layer signals. And using the decoding unit D of the variational autoencoder * False reconstruction of latent signals Transformed into a fake decryption image

[0079] It is worth noting that the contents not described in detail in the embodiments of the present invention belong to the prior art known to those skilled in the art.

[0080] To test the privacy protection performance of the method described in this embodiment of the invention, subjective and objective testing methods were used to evaluate the performance of the method in generating encrypted images with semantic information, as well as the semantic information similarity between the real decrypted image and the original image.

[0081] When testing privacy protection performance, the MNIST dataset was used, and AdamW was used as the optimization algorithm for the image deniable encryption model. The number of training epochs for the image deniable encryption model was set to 50, the batch sampling dataset size was set to 64, and the learning rate for the image deniable encryption model was set to 0.0004.

[0082] like Figure 3 The image shown is an example of 12 original images selected from the MNIST dataset, with class labels of 2, 0, 2, 4, 0, 3, 1, 6, 0, 9, 0 and 0.

[0083] like Figure 4 The diagram illustrates the generation of an encrypted image from the original image using an image-denial encryption model guided by an encryption key. The target category labels used as the encryption key are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, and 1. From... Figure 4 It can be seen that the encrypted image possesses explicit semantic information, but its semantic information has changed compared to the original image. Furthermore, the classifier achieves a classification accuracy of 97.41% for the encrypted image. Therefore, the diffusion model-based image denial encryption method can generate encrypted images with semantic information.

[0084] like Figure 5 The diagram shows a real decrypted image generated using an image-denied encryption model guided by the real decryption key. The original image category labels used as the real decryption key are 2, 0, 2, 4, 0, 3, 1, 6, 0, 9, 0, and 0. From... Figure 5 It can be seen that the real decrypted image and the original image have highly similar semantic information.

[0085] like Figure 6 The diagram illustrates a fake decrypted image generated using an image-denied encryption model guided by a fake decryption key. The category labels for the fake decryption key are 2, 0, 2, 5, 1, 2, 3, 1, 2, 3, 5, and 9. From... Figure 6 It can be seen that the fake decrypted image and the original image have different semantic information.

[0086] In summary, the image deniability encryption method based on the diffusion model described in this embodiment of the invention uses deep learning technology to solve the semantic deniability encryption problem of image data, which can ensure that the real decrypted image and the original image have highly similar semantic information, thereby enhancing the privacy protection performance of the data.

[0087] Furthermore, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the corresponding program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0088] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The information disclosed in the background section is intended only to enhance the understanding of the overall background technology of the present invention and should not be construed as an admission or implication in any way that such information constitutes prior art known to those skilled in the art.

Claims

1. A method of image unrecognizable encryption based on a diffusion model, characterized by, The method comprises: Step 1, constructing an image deniable encryption model composed of a variational autoencoder, a diffusion model and a classifier; Step 2, training the variational autoencoder using the original image, and transforming the original image into an original latent layer signal through the encoding unit of the variational autoencoder; Step 3, training the diffusion model using the original latent layer signal under the guidance of the category label, and transforming the original latent layer signal into a reconstructed latent layer signal through the diffusion model; Step 4, decoding the reconstructed latent layer signal using the decoding unit of the variational autoencoder to generate a reconstructed image with semantic information; The specific process of step 4 is: (1) decoding unit D of a variational autoencoder * reconstructing the latent signal transforming into a reconstructed image (2) defining a classifier loss function is represented as: wherein m represents the number of images in the original image set x; c represents the number of image categories in the original image set x; y represents the real category label set of the original image; represents the predicted category label set of the reconstructed image obtained by the classifier; y i (j) represents the real category label of the reconstructed image corresponding to the jth category; represents the predicted category label of the reconstructed image corresponding to the jth category; (3) Train the classifier, i.e. minimize the classifier loss function to get the corresponding model parameters ω * is denoted as: Step 5, using the trained image deniable encryption model to generate an encrypted image under the guidance of the encryption key, and generating a real decrypted image under the guidance of the real decryption key and a false decrypted image under the guidance of the false decryption key using the image deniable encryption model on the encrypted image; The specific process of step 5 is: (1) an encoding unit E using a variational autoencoder * transforming the original image x into an original latent signal z = E * (x); (2) using Gaussian noise The noise addition operation is performed stepwise on the original latent layer signal z to obtain a noised latent layer signal z corresponding to the original image t ; (3) the noisy latent signal z t , the time step t, and the target class label y as an encryption key * generating prediction noise for the input signal to the noisy latent signal z t performing a noise removal operation step by step to obtain a reconstructed latent signal and using the decoding unit D of the variational autoencoder * transforming the reconstructed latent signal into an encrypted image (4) an encoding unit E using a variational autoencoder * transforming the encrypted image into an original latent signal corresponding to the encrypted image (5) using Gaussian noise an original latent signal corresponding to the encrypted image the noise addition operation is performed step by step to obtain a noisy latent signal (6) the noisy latent signal a time step t and the original image class label as the true decryption key generating a prediction noise for the input signal the noisy latent signal corresponding to the encrypted image performing the noise removal operation step by step to obtain the true reconstructed latent signal and using the decoding unit D of the variational autoencoder * the true reconstructed latent signal transformed into the true decrypted image (7) the noisy latent signal a time step t and a fake class label as a fake decryption key generating a prediction noise for the input signal the noisy latent signal corresponding to the encrypted image performing the noise removal operation step by step to obtain a fake reconstructed latent signal and using a decoding unit D of a variational autoencoder * the fake reconstructed latent signal into a fake decrypted image 2. The image unrecognizable encryption method based on the diffusion model according to claim 1, characterized in that, In step 1, the input image of the constructed image deniable encryption model is a gray-scale image with a size of 28x28, which specifically comprises: The classifier comprises a two-dimensional convolution operation unit Conv(in_channels, out_channels, kernel_size, stride, padding) with an input channel number of in_channels, an output channel number of out_channels, a convolution kernel size of kernel_size, a convolution kernel step of stride and a padding number of padding; a maximum value pooling operation unit MaxPool2d; a fully connected layer Linear(in_channels, out_channels) with an input channel number of in_channels and an output channel number of out_channels; The variational autoencoder comprises an encoding unit Encoder of the variational autoencoder; a decoding unit Decoder of the variational autoencoder; The diffusion model comprises an attention mechanism-based down-sampling unit AttnDownBlock2D; an attention mechanism-based intermediate unit AttnMidBlock2D; an attention mechanism-based up-sampling unit AttnUpBlock2D; a down-sampling unit DownBlock2D; an up-sampling unit UpBlock2D; a time step embedding unit Time embedding; and a category label embedding unit Class embedding.

3. The image unrecognizable encryption method based on the diffusion model according to claim 1, characterized in that, The specific process of step 2 is: (1) The original image set is denoted as x, and the loss function of the variational autoencoder is defined as is: wherein a lower case x represents an original image in the original image set x; E is an encoding unit of the variational autoencoder; D is a decoding unit of the variational autoencoder; represents an expectation operation based on the statistical distribution of the original image; represents the square of the l2 norm of the difference between the image generated by the original image sequentially passing through the encoding unit and the decoding unit and the original image. (2) training the variational autoencoder, i.e. minimizing the loss function of the variational autoencoder to obtain the corresponding encoding unit E * and the decoding unit D * is represented as: wherein, denotes training the variational autoencoder to obtain an optimal encoding unit E * and a decoding unit D * operations; (3) an encoding unit E using a variational autoencoder * transforming the original image x into an original latent signal z = E * (x).

4. The image steganography method based on diffusion model according to claim 3, wherein, The specific process of step 3 is: (1) Set the maximum time step to T and generate Gaussian noise that obeys a distribution with mean 0 and variance I (2) Using Gaussian noise The noise addition operation is performed stepwise on the original latent layer signal z, denoted as: wherein is a Gaussian noise subject to a mean of 0 and a variance of I; z0= z is the noisy latent signal when t = 0, and 0 < a t < 1 ; z t is a noisy latent signal; (3) defining a diffusion model loss function is: wherein, is a diffusion model to add noise to the latent signal z t , a time step t, and a class label y as input signals; the class label y represents a class of the original image x; (4) training the diffusion model, i.e., minimizing the diffusion model loss function to obtain the corresponding model parameters θ * : (5) using the predicted noise to the noisy latent signal z t The noise removal operation is performed step by step to obtain a predicted noisy latent signal wherein is a Gaussian noise subject to a mean of 0 and a variance of I; is a predicted noisy latent signal whose mean is expressed as: And is the predicted noise-free latent signal is the variance of the predicted noisy latent signal, denoted as: (6) obtaining the reconstructed latent signal as wherein is the predicted noisy latent signal when t = 0; is the predicted noisy latent signal when t = 1 is the mean of is the predicted noisy latent signal when t = 1 is the variance of is the Gaussian noise with mean 0 and variance I when t = 1.

Citation Information

Patent Citations

  • Image steganography method based on diffusion model

    CN116091288A

  • Flow data set generation method and device based on conditional diffusion model

    CN116304705A