An encryption and decryption method based on a generative neural network model
The cryptography built using a generative neural network model and classifier solves the security problems of existing encryption technologies in key management and quantum computing environments, realizes lightweight management and flexible adjustment of encryption rules, and enhances the ability to resist quantum computing.
Patent Information
- Application Number
- CN202610472988.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-10
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2046-04-10
AI Technical Summary
Existing encryption technologies have shortcomings in key management, lack of dynamic adjustment capability of encryption algorithms, difficulty in updating codebooks, and inability to resist quantum computing attacks, especially in terms of security in quantum computing environments.
A generative neural network model and a classifier model are jointly used to construct a codebook that can be updated on demand. The "one plaintext, multiple ciphertexts" encryption mode is realized through latent space mapping. The selection function is combined to simplify key management and enhance the ability to resist quantum computing attacks.
It achieves lightweight key management, flexible adjustment of encryption rules, and resistance to quantum computing, reducing system deployment complexity and improving semantic security.
Smart Images

Figure CN122247726B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information encryption technology, specifically to an encryption and decryption method based on a generative neural network model. Background Technology
[0002] Currently, mainstream encryption technologies primarily rely on the computational complexity of mathematical problems, such as the computational difficulty of large integer factorization and discrete logarithms. The security of these encryption systems (such as RSA and ECC) rests on the computational complexity of specific mathematical problems, and they possess high security in traditional computing environments. However, with the rapid development of computing technology, especially the breakthroughs in quantum computing, traditional encryption systems face severe challenges. Shor's algorithm in quantum computing can break asymmetric encryption algorithms based on number theory problems in polynomial time, making existing encryption systems vulnerable to quantum computers. Furthermore, traditional encryption technologies also have inherent flaws in key management and algorithmic flexibility, making it difficult to meet the ever-increasing security demands.
[0003] Existing encryption technologies suffer from the following limitations: First, in terms of key management, symmetric encryption requires a secure key distribution mechanism, while asymmetric encryption requires a complex public-key infrastructure, increasing the complexity of system implementation. Second, existing encryption algorithms and patterns are relatively fixed, making them vulnerable to targeted attacks and lacking dynamic adjustment capabilities. Furthermore, updating the codebook is difficult, hindering dynamic changes in encryption rules and reducing system adaptability. Most importantly, most existing encryption schemes lack effective defenses against quantum computing attacks, posing significant security risks in the post-quantum era. While some research has attempted to apply machine learning techniques to encryption, it primarily focuses on optimizing traditional encryption algorithms or assisting in analysis, without yet forming a systematic solution. Although generative neural network models have demonstrated powerful data generation capabilities, their application potential in encryption and decryption remains to be explored in greater depth. Summary of the Invention
[0004] To address the technical problems of existing encryption technologies, such as complex key management, lack of dynamic adjustment capabilities in encryption algorithms, difficulty in updating the cryptography, and vulnerability to quantum computing attacks, this invention provides an encryption and decryption method based on a generative neural network model. This invention primarily utilizes a generative neural network model and a classifier model to jointly construct an on-demand updated cryptography. By mapping plaintext symbols to multiple candidate latent vectors in the latent space and combining this with a selection function, a "one plaintext, multiple ciphertexts" encryption mode is achieved. This simplifies key management, enables dynamic changes in encryption rules and flexible updates to the cryptography, enhances resistance to statistical analysis attacks and quantum computing attacks, and achieves semantically secure encryption without the need for complex key distribution through the randomness of the generative model and the continuity of the latent space.
[0005] The technical means employed in this invention are as follows:
[0006] An encryption / decryption method based on a generative neural network model includes the following steps: Construct a decryption model, which includes a connected neural network and a classifier; The decryption model is trained using the target dataset. The input of the trained decryption model is the latent space, and the output is the plaintext space. The parameters of the trained decryption model are fixed. Based on each symbol in the plaintext space, a corresponding set of valid vectors is searched in the latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold. A codebook is constructed based on the correspondence between symbols and sets of valid vectors; A selection function is used to find the corresponding ciphertext sequence in the codebook for the plaintext sequence to be encrypted; The ciphertext sequence is input into the trained decryption model to obtain the recovered plaintext sequence.
[0007] Furthermore, the training process of the neural network employs an adversarial training strategy. The neural network is a generative adversarial network (GAN), which includes a generator and a discriminator. The minimax game objective function of the adversarial training strategy is:
[0008] in, For the true image distribution, It follows a standard normal distribution. For discriminator, For generator, These are the trainable network parameters for the generator. These are the trainable network parameters for the discriminator.
[0009] Furthermore, the process of constructing the effective vector set includes: Randomly sample a vector in the latent space; The vector is optimized using gradient descent, and the loss function of gradient descent is:
[0010] in, For loss function, Let C be the confidence level by which the classifier C identifies the generated image as target p. To generate an image, The regularization coefficient is . For regularization terms; When the confidence level is greater than a preset threshold When the current vector is determined to be a valid vector, it is added to the set of valid vectors.
[0011] Furthermore, the selection function includes uniform random selection and deterministic pseudo-random selection based on an auxiliary key.
[0012] Furthermore, during the training process of the neural network, first optimal parameters are obtained, and a fixed trained neural network model is obtained based on the first optimal parameters. During the training process of the classifier, a second optimal parameter is obtained, and a fixed trained classifier model is obtained based on the second optimal parameter.
[0013] Furthermore, the neural network and classifier in the decryption model are structurally optimized while maintaining the latent space mapping and symbol recognition functions. The generator in the neural network can introduce at least one of the following: convolutional layer, deconvolutional layer, normalization layer, residual connection or attention module. The classifier adopts a convolutional neural network or a residual classification network.
[0014] Furthermore, the determination of the effective vector also includes: The difference between the confidence level and the probability of the second-highest category is higher than the preset category interval threshold.
[0015] Furthermore, the uniform random selection includes weighted random selection, which assigns selection probabilities to each effective vector according to the score value corresponding to the effective vector, and selects latent space vectors from the corresponding effective vector set according to the selection probabilities.
[0016] Furthermore, the deterministic pseudo-random selection based on the auxiliary key determines the index of the target valid vector in the corresponding valid vector set by jointly using the auxiliary key, the symbol position number, and the current plaintext symbol.
[0017] Furthermore, let the first Each plaintext symbol is The set of valid vectors corresponding to the plaintext symbols is The size of the set is The index of the selected valid vector in the corresponding set The formula satisfies:
[0018] in, The index of the valid vector in the corresponding set. Auxiliary key, This indicates a join operation, where Hash is the hash function and mod is the modulo operation.
[0019] Compared with the prior art, the present invention has the following advantages: 1. This invention achieves lightweight key management and a significant reduction in system deployment complexity by constructing a latent space dynamic vector cryptography and relying on neural networks to complete end-side mapping and association.
[0020] 2. This invention filters and constructs a set of effective vectors in the latent space based on a fixed-trained decryption model, and can regenerate or update the codebook as needed, thereby achieving flexible adjustment of encryption rules and improving resistance to targeted attacks.
[0021] 3. This invention utilizes a large number of nonlinear mapping relationships in a high-dimensional latent space to construct encryption logic, thus breaking free from the constraints of the mathematical difficulties assumed in traditional cryptography and adapting to the needs of encryption applications.
[0022] Based on the above reasons, this invention can be widely applied in fields such as information encryption. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating an encryption and decryption method based on a generative neural network model according to the present invention.
[0025] Figure 2 This is a schematic diagram illustrating the principle of the encryption and decryption method of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] like Figure 1 and Figure 2 As shown, this invention provides an encryption and decryption method based on a generative neural network model, comprising the following steps: S1. Construct a decryption model, which includes interconnected neural networks and classifiers.
[0029] S2. Train the decryption model using the target dataset. The input of the trained decryption model is the latent space, and the output is the plaintext space. Fix the parameters of the trained decryption model.
[0030] The goal of this step is to obtain a generative neural network model with fixed parameters and a high-precision classifier model.
[0031] Using training datasets from the target domain ,in For data samples, The generative neural network model is trained using the target data space.
[0032] During the training of the neural network, the first optimal parameters are obtained, and a fixed trained neural network model is obtained based on the first optimal parameters. During the training of the classifier, the second optimal parameters are obtained, and a fixed trained classifier model is obtained based on the second optimal parameters.
[0033] Specifically, a generative neural network model is defined as a mapping ,in For one 3D continuous hidden space These are the model parameters. The training process aims to optimize the distribution of the generated data. Approximating the true data distribution Finally, the optimal parameters are obtained. and fixed model .
[0034] Specifically, training a classifier model ,in For a discrete plaintext symbol space, These are the classifier parameters. The training objective is to achieve high-accuracy classification on the independent test set and obtain a fixed model. Plain text symbol space It can be defined as a set of finite symbols such as numbers, letters, pictures, and control characters, depending on the application.
[0035] This repositions generative neural network models from traditional data synthesis tools as the core decryption engine within an encryption system. After training, the model parameters... and Being fixed in place constitutes an important part of system security.
[0036] The training process of the neural network employs an adversarial training strategy. The neural network is a generative adversarial network (GAN), which includes a generator and a discriminator. The minimax game objective function of the adversarial training strategy is:
[0037] in, For the true image distribution, It follows a standard normal distribution. For discriminator, For generator, These are the trainable network parameters for the generator. These are the trainable network parameters for the discriminator.
[0038] Furthermore, the neural network and classifier in the decryption model can be structurally optimized while maintaining the latent space mapping and symbol recognition functions. Preferably, the generator in the neural network can incorporate at least one of convolutional layers, deconvolutional layers, normalization layers, residual connections, or attention modules to improve the quality and stability of the generated samples; the classifier can employ a convolutional neural network or a residual classification network to improve the recognition accuracy and confidence level stability of the generated samples. By optimizing the structure of the generator and classifier, the reliability of subsequent effective vector selection and decryption recognition can be further improved.
[0039] S3. For each symbol in the plaintext space, search for the corresponding set of valid vectors in the latent space. The set of valid vectors satisfies: [Effective vector set...] Any vector in the vector can be correctly classified by the classifier as a symbol in the plaintext space with a confidence level higher than a preset threshold. .
[0040] The process of constructing an effective vector set includes: The first step is to randomly sample a vector in the latent space.
[0041] The second step is to optimize the vector using gradient descent. The loss function for gradient descent is:
[0042] in, For loss function, Let C be the confidence level by which the classifier C identifies the generated image as target p. To generate an image, The regularization coefficient is . This is a regularization term.
[0043] Step 3: When the confidence level is greater than the preset threshold When the current vector is determined to be a valid vector, it is added to the set of valid vectors.
[0044] Furthermore, to improve the stability and discrimination accuracy of the effective vector set, the determination of an effective vector requires, in addition to satisfying the target category confidence level being higher than a preset threshold, that it also satisfies the following conditions: In addition, joint constraints can be applied by combining the probability interval between the target category and the second-highest category. Preferably, a classifier is set... For latent space vectors Through generator generated samples The output probabilities for each category are The category corresponding to the target plaintext symbol is denoted as Then, if the following conditions are met: and When this happens, the corresponding latent space vector is determined to be a valid vector; where, Set the confidence threshold for the target category. This is the category interval threshold. This represents the second-highest category probability. Using this joint decision-making method reduces the probability of latent space vectors near the classification boundary being mistakenly selected into the codebook, thereby improving the reliability of the effective vector set.
[0045] This step constructs a "one-to-many" mapping relationship from the plaintext symbol space to the set of effective vectors in the latent space, forming the core codebook of the entire encryption system. This is crucial for realizing the "one plaintext, many ciphertexts" encryption mode. For any target plaintext symbol... The corresponding set of valid vectors Satisfy: for any vector By generating models Generated data samples All can be classified by classifier With a value higher than the preset threshold The confidence level is correctly classified as plaintext. The formula for a valid set is:
[0046] in, This represents the confidence score output by the classifier. Each set It contains multiple elements, denoted as , The size of the set.
[0047] S4. Construct a codebook based on the correspondence between symbols and the set of valid vectors.
[0048] The mapping was established in step S3: ,in Representing the latent space The power set of all mapping pairs. The set of all mapping pairs constitutes the codebook. .
[0049] This codebook is a many-to-one mapping database based on neural network mapping relationships. Each plaintext corresponds to a vector set, providing a natural and rich source of randomization for the encryption process, fundamentally ensuring the semantic security of the encryption.
[0050] S5. Based on the codebook, use a selection function to convert the plaintext sequence to be encrypted into a ciphertext sequence.
[0051] Given a plaintext sequence to be encrypted ,in The encryption process involves generating the corresponding ciphertext sequence. Each ciphertext unit .
[0052] For the sequence in the th plain text symbols Search the codebook for the corresponding set of valid vectors. Through a selection function Select a vector from this set as its ciphertext:
[0053] Select function The strategies include, but are not limited to: uniform random selection, deterministic pseudo-random selection based on auxiliary keys, etc.
[0054] Furthermore, the uniform random selection can be extended to weighted random selection, that is, selection weights are assigned based on at least one of the classification confidence, class boundary margin, or historical usage frequency corresponding to the effective vector, and latent space vectors are selected from the corresponding effective vector set according to the weights, so as to balance vector quality and usage balance and reduce the probability of the same effective vector being selected repeatedly. Preferably, let the first... Each plaintext symbol is The corresponding set of valid vectors is:
[0055] Then the first Valid vectors The selection probability can be expressed as:
[0056] in, For the first The score value of each effective vector. To adjust the parameters, For set The size of the score. It can be determined based on at least one of the following: classification confidence, class boundary margin, and historical usage count corresponding to the effective vector.
[0057] Furthermore, the deterministic pseudo-random selection based on the auxiliary key can determine the index of the target valid vector in the corresponding set according to the auxiliary key, the symbol position index, and the current plaintext symbol. This allows the encryption and decryption ends to consistently reconstruct the vector selection process under the same auxiliary key, ensuring the consistency and repeatability of the encryption and decryption process. Preferably, let the first... Each plaintext symbol is The corresponding set of valid vectors is The size of the set is Then the index of the selected valid vector in the corresponding set It can be represented as:
[0058] in, Auxiliary key, This indicates a join operation, where `Hash` is the hash function and `mod` is the modulo operation. Based on the index... From the set Select the corresponding effective vector from As the current plaintext symbol The corresponding ciphertext component.
[0059] The encryption operation is simplified to querying and randomly selecting from a pre-built codebook, resulting in extremely low computational overhead. Furthermore, since each encryption can randomly select different ciphertexts from a large pool of candidates for the same plaintext, there is no fixed, analyzable statistical relationship between the output ciphertext and the plaintext, effectively resisting chosen-plaintext attacks and frequency analysis.
[0060] S6. Input the ciphertext sequence into the trained decryption model to obtain the recovered plaintext sequence.
[0061] This step utilizes a fixed generative neural network model. and classifier , to recover the plaintext sequence from the ciphertext sequence.
[0062] Given the received ciphertext sequence The decryption process involves calculating the recovered plaintext sequence. .
[0063] For the first in the sequence Each encrypted unit Perform the following operations in sequence: Data Reconstruction: Input the generative model to obtain reconstructed data samples. ; Symbol recognition: Input the data into the classifier to obtain the identified plaintext symbols. .
[0064] According to the codebook construction definition in step S4, for valid ciphertext... Under ideal, error-free conditions, there must be This completes the decryption process.
[0065] The decryption process relies entirely on the forward computation capability of the generative model, essentially consisting of two deterministic neural network inferences. It requires no complex mathematical inverse operations (such as modular inverse operations), thus exhibiting high computational efficiency. Furthermore, the correctness of the decryption is guaranteed by the quality assurance during the codebook construction phase, ensuring high reliability. This process reveals the core security mechanism of this invention: security depends on... arrive One-dimensionality of mapping and high-dimensional latent space It is more complex than a traditional number theory problem.
[0066] Example This embodiment provides an encryption and decryption method based on a generative neural network model. It uses a Generative Adversarial Network (GAN) as the specific implementation of the generative neural network model and MNIST handwritten digits (0-9) as the encrypted plaintext. The embodiment comprehensively demonstrates the implementation process, technical details, and innovative effects of the method. The specific steps include: S1. Construct a decryption model, which includes interconnected neural networks and classifiers.
[0067] Neural networks consist of two core components: the generator and the generator. With discriminator ,in and These are the trainable network parameters for each of the two networks.
[0068] Generator The input is a 100-dimensional random noise vector. The output is a 28×28 pixel grayscale image; discriminator The input is a 28×28 pixel grayscale image, and the output is a scalar of the probability that the image is real data.
[0069] S2. Train the decryption model using a handwritten digit dataset. The input of the trained decryption model is the latent space, and the output is the plaintext space. Fix the parameters of the trained decryption model.
[0070] The MNIST handwritten digit dataset was used as training data. The dataset contains 60,000 training images and 10,000 test images, each image corresponding to a label from 0 to 9. The training process employs a classic adversarial training strategy.
[0071] After sufficient iterative training, the generator It can generate images that are visually highly similar to, and difficult to distinguish from, real MNIST handwritten digits. After training, the generator is fixed. The parameters are used as core components of the subsequent encryption and decryption system. This step directly uses the trained generative model, which has powerful data reconstruction capabilities, as the decryption engine.
[0072] Meanwhile, in order to achieve accurate mapping from generated images to plaintext symbols, this embodiment trains a high-precision classifier model. This model uses a convolutional neural network, taking a 28×28 grayscale image as input and outputting a 10-dimensional probability vector, corresponding to the predicted probabilities of the digits 0-9. After training, the classifier... The accuracy on the independent test set exceeds 99%, and its parameters are also fixed. The classifier's role is to construct the output space of the generative model into the plaintext symbol space. A reliable mapping is a key step in the decryption process.
[0073] S3. Based on each symbol in the plaintext space, search for the corresponding set of valid vectors in the latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold.
[0074] For each target number (For example, the number "1"), perform the following search process: (1) Initialization: Randomly sample a noise vector .
[0075] (2) Iterative optimization: Optimization using gradient descent method Minimize the following loss function :
[0076] in, For loss function, Let C be the probability that the classifier C classifies the generated image as target p. To generate an image, This is the regularization coefficient, used to ensure the stability of the optimization process. This is a regularization term.
[0077] (3) Convergence judgment and recording: When the optimization process meets the conditions (Set threshold) When determining the current noise vector, If it is a valid vector, add it to the set. This condition ensures that this... The generated images can not only be correctly classified, but also have high confidence, thus ensuring the reliability of the decryption process.
[0078] (4) Repeat sampling: To obtain sufficient diversity, for each digit Repeating the above process hundreds of times will eventually result in:
[0079] in, This represents the number of vectors in an effective vector assemblage.
[0080] S4. Construct a codebook based on the correspondence between symbols and the set of valid vectors.
[0081] The mapping relationship between all plaintext symbols and their corresponding sets of valid noise vectors together constitutes the codebook. .
[0082] S5. Use a selection function to find the corresponding ciphertext sequence in the codebook for the plaintext sequence to be encrypted.
[0083] S5 specifically includes: Suppose the plaintext number sequence to be encrypted is .
[0084] For the first plaintext "2", the encrypting party accesses the codebook. Find the corresponding set of valid noise vectors. .
[0085] Execute a random selection strategy: from A vector is randomly selected uniformly from the vector, denoted as . The randomness here ensures the semantic security of the encryption. In other implementations, vector selection can also be accomplished using weighted random selection based on score values or deterministic pseudo-random selection based on an auxiliary key.
[0086] Repeat this process: for "0", from Random selection For the second "2", it can be read again from... Randomly selected from (may result in the same) Different vectors ); for "6", from Selected from .
[0087] Ciphertext output: Ultimately, the plaintext sequence "2026" was encrypted into a ciphertext sequence. Each ciphertext unit is a 100-dimensional vector. This invention achieves a randomization effect that traditional encryption requires complex algorithms through this simple lookup-random selection mechanism, significantly simplifying the computational logic at the encryption end.
[0088] S6. Input the ciphertext sequence into the trained decryption model to obtain the recovered plaintext sequence.
[0089] Specifically, S6 includes: The receiver receives the ciphertext sequence Then, process each ciphertext vector sequentially. Perform the following operations: Step 1, Data Reconstruction: Input z into a fixed generator In the process, a forward propagation computation is performed to obtain the reconstructed image. This process can be completed extremely quickly on hardware such as GPUs.
[0090] Step 2, Symbol Recognition: Reconstructing the Image Input into a fixed classifier In the process, the classification results are obtained. That is, the recovered plaintext numbers.
[0091] Result verification: For the above ciphertext sequence, the expected decryption result is: The decryption process of this invention involves only two deterministic neural network forward computations, without the need for complex mathematical operations (such as modular exponentiation), thus exhibiting extremely high execution efficiency and making it particularly suitable for batch decryption or resource-constrained environments.
[0092] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0093] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An encryption and decryption method based on a generative neural network model, characterized in that, Includes the following steps: Construct a decryption model, which includes a connected neural network and a classifier; The decryption model is trained using the target dataset. The input of the trained decryption model is the latent space, and the output is the plaintext space. The parameters of the trained decryption model are fixed. Based on each symbol in the plaintext space, a corresponding set of valid vectors is searched in the latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold. A codebook is constructed based on the correspondence between symbols and sets of valid vectors; A selection function is used to find the corresponding ciphertext sequence in the codebook for the plaintext sequence to be encrypted; The ciphertext sequence is input into the trained decryption model to obtain the recovered plaintext sequence.
2. The encryption and decryption method based on a generative neural network model according to claim 1, characterized in that, The training process of the neural network employs an adversarial training strategy. The neural network is a generative adversarial network (GAN), which includes a generator and a discriminator. The minimax game objective function of the adversarial training strategy is: in, For the true image distribution, It follows a standard normal distribution. For discriminator, For generator, These are the trainable network parameters for the generator. These are the trainable network parameters for the discriminator.
3. The encryption and decryption method based on a generative neural network model according to claim 1, characterized in that, The process of constructing the effective vector set includes: Randomly sample a vector in the latent space; The vector is optimized using gradient descent, and the loss function of gradient descent is: in, For loss function, Let C be the confidence level by which the classifier C identifies the generated image as target p. To generate an image, The regularization coefficient is . For regularization terms; When the confidence level is greater than a preset threshold When the current vector is determined to be a valid vector, it is added to the set of valid vectors.
4. The encryption and decryption method based on a generative neural network model according to claim 1, characterized in that, The selection functions include uniform random selection and deterministic pseudo-random selection based on an auxiliary key.
5. The encryption and decryption method based on a generative neural network model according to claim 1, characterized in that, During the training process of the neural network, a first optimal parameter is obtained, and a fixed trained neural network model is obtained based on the first optimal parameter. During the training process of the classifier, a second optimal parameter is obtained, and a fixed trained classifier model is obtained based on the second optimal parameter.
6. The encryption and decryption method based on a generative neural network model according to claim 1, characterized in that, The neural network and classifier in the decryption model are structurally optimized while maintaining the latent space mapping and symbol recognition functions. The generator in the neural network can introduce at least one of the following: convolutional layer, deconvolutional layer, normalization layer, residual connection or attention module. The classifier adopts a convolutional neural network or a residual classification network.
7. The encryption and decryption method based on a generative neural network model according to claim 1, characterized in that, The determination of the effective vector also includes: The difference between the confidence level and the probability of the second-highest category is higher than the preset category interval threshold.
8. The encryption and decryption method based on a generative neural network model according to claim 4, characterized in that, The uniform random selection includes weighted random selection, which assigns selection probabilities to each effective vector according to the score value corresponding to the effective vector, and selects latent space vectors from the corresponding effective vector set according to the selection probabilities.
9. The encryption and decryption method based on a generative neural network model according to claim 4, characterized in that, The deterministic pseudo-random selection based on the auxiliary key determines the index of the target valid vector in the corresponding valid vector set by jointly using the auxiliary key, the symbol position number, and the current plaintext symbol.
10. The encryption and decryption method based on a generative neural network model according to claim 9, characterized in that, Let the first Each plaintext symbol is The set of valid vectors corresponding to the plaintext symbols is The size of the set is The index of the selected valid vector in the corresponding set The formula satisfies: in, The index of the valid vector in the corresponding set. Auxiliary key, Indicates a connection operation. For hash functions, This is a modulo operation.
Citation Information
Patent Citations
Commercial cryptographic algorithm identification method and system based on LeNet5-SVM and computer equipment
CN114722933A
Neural Network Models for Adversarial Robustness using Variational Randomized Smoothing
US20260017488A1
