An online encryption and decoding method based on adversarial deep neural networks
By constructing an adversarial deep neural network model and a multi-codebook mechanism, the problem of non-one-to-one mapping between ciphertext and plaintext in existing technologies is solved, realizing the reliability and flexibility of online encryption and decoding, and making it suitable for complex communication environments.
Patent Information
- Application Number
- CN202611581808.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-13
- Publication Date
- 2026-11-17
AI Technical Summary
Existing neural network-based information encryption methods cannot guarantee that the generated ciphertext and plaintext meet the requirements of reversibility and one-to-one mapping, resulting in the inability to accurately recover the original information during the decoding process. Furthermore, the reliance on manually preset cryptographic rules makes it difficult to flexibly expand in complex communication scenarios.
An adversarial deep neural network model is constructed, including a ciphertext generation network and a rule-based identification network. Through training, a ciphertext mapping relationship that satisfies preset constraints is generated, multiple codebooks are constructed, and auxiliary plaintext symbols are used to generate ciphertext mapping matching key information to achieve accurate matching between the sender and receiver.
It enables the automatic generation of cryptographic mapping rules and the construction of multiple codebooks, improving the reliability and flexibility of the encryption and decoding process and adapting to secure information transmission in complex communication scenarios.
Smart Images

Figure CN123123017A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information security and intelligent communication technology, and in particular to an online encryption and encoding / decoding method based on adversarial deep neural networks. Background Technology
[0002] With the development of communication technology, the security requirements for information transmission are constantly increasing. In existing communication systems, to prevent transmitted information from being illegally obtained, a preset cryptographic algorithm is usually used to encrypt the data to be transmitted, and the corresponding key is used at the receiving end to decrypt it.
[0003] Currently, deep neural networks have demonstrated strong capabilities in learning complex mapping relationships and representing nonlinear features, providing a new technical approach for constructing intelligent encryption coding methods. By learning the nonlinear mapping relationship between input and output through neural networks, the reliance on manually preset cryptographic rules can be reduced, and the automatic generation of cryptographic mapping relationships can be achieved.
[0004] However, some existing neural network-based encryption methods primarily utilize network models to perform data transformation or feature hiding, failing to adequately consider the constraints on the generated cryptographic mapping relationships. This makes it difficult to guarantee a one-to-one correspondence between the generated ciphertext and plaintext. When multiple plaintexts correspond to the same ciphertext, the decoding process cannot accurately recover the original information. Therefore, how to automatically construct cryptographic mapping relationships that satisfy reversibility and one-to-one mapping requirements using deep neural networks, and achieve reliable online encryption and decoding, remains a technical problem that needs further resolution. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an online encryption and decoding method based on adversarial deep neural networks. This method solves the problems of existing technologies in ensuring reversibility and one-to-one mapping between generated ciphertext and plaintext, as well as the difficulty in achieving reliable online encryption and decoding.
[0006] The technical means employed in this invention are as follows: In a first aspect, the present invention provides an online encryption and decoding method based on an adversarial deep neural network, comprising: A plaintext code space corresponding to the information to be encrypted is preset, and an adversarial deep neural network model is constructed. The adversarial deep neural network model includes a ciphertext generation network and a rule discrimination network. The plaintext symbols in the plaintext symbol space are input into the ciphertext generation network to obtain the first ciphertext symbol, and a candidate cipher mapping set for the current training period is constructed based on the first ciphertext symbol. The candidate password mapping set is input into the rule authentication network to determine whether the candidate password mapping set generates corresponding rule labels under preset constraints, and to obtain the rule evaluation result. When the rule evaluation result indicates that the candidate cipher mapping set does not generate the corresponding rule label under the preset constraint conditions, the parameters of the ciphertext generation network and the rule authentication network are updated, and the step of executing the plaintext symbol space corresponding to the preset information to be encrypted is returned. When the rule evaluation result is that the candidate cipher map set generates the corresponding rule label under the preset constraints, the training of the ciphertext generation network and the rule discrimination network is completed. Based on the trained ciphertext generation network, a set of password books including multiple password mapping rules is constructed; One of the codebooks in the codebook set is used as the target codebook. The information to be transmitted is encrypted and encoded using the target codebook to generate a ciphertext sequence. A ciphertext mapping matching key is then constructed for codebook matching at the receiving end. The ciphertext sequence and the ciphertext mapping matching key information are sent to the receiving end. The receiving end determines the corresponding ciphertext book based on the ciphertext mapping matching key information and decodes the ciphertext sequence to obtain the decoded plaintext code.
[0007] Furthermore, the preset constraints are: plaintext code elements and corresponding ciphertext code elements are not the same, and different plaintext code elements correspond to different ciphertext code elements.
[0008] Furthermore, based on the trained ciphertext generation network, a set of codebooks including multiple ciphertext mapping rules is constructed, including: The plaintext symbols in the plaintext symbol space are input into the trained ciphertext generation network to obtain the second ciphertext symbols. Construct a codebook based on the mapping relationship between plaintext code elements and second ciphertext code elements; Adjust the generation conditions of the cryptographic mapping rules and repeat the step of inputting plaintext symbols in the plaintext symbol space into the trained ciphertext generation network to obtain a set of cryptographic books including multiple cryptographic mapping rules.
[0009] Further, the information to be transmitted is encrypted using the target codebook to generate a ciphertext sequence, including: Encode the transmitted information into a continuous sequence of plaintext symbols; The plaintext code sequence is mapped according to the plaintext-ciphertext mapping relationship in the target codebook to obtain the corresponding ciphertext sequence.
[0010] Furthermore, constructing cryptographic mapping matching key information for receiving end codebook matching includes: The auxiliary plaintext code sequence is obtained by random generation; The auxiliary plaintext code sequence is input into the target codebook, and the corresponding ciphertext response is obtained according to the plaintext-ciphertext mapping relationship in the target codebook. Based on the auxiliary plaintext code sequence and the corresponding ciphertext response, a cryptographic mapping matching key information is constructed.
[0011] Furthermore, the parameters of the ciphertext generation network and the rule-based authentication network are updated, including: Based on the evaluation results of the rules, the parameters of the ciphertext generation network are updated; The parameters of the rule-based authentication network are updated based on the candidate cipher mapping set and the corresponding rule labels.
[0012] Furthermore, the plaintext code elements are represented in a binary encoding form of a preset length.
[0013] Secondly, the present invention also provides an online encryption and decoding system based on an adversarial deep neural network, comprising: The model building module is used to preset the plaintext code space corresponding to the information to be encrypted and build an adversarial deep neural network model, which includes a ciphertext generation network and a rule discrimination network. The candidate set generation module is used to input plaintext symbols in the plaintext symbol space into the ciphertext generation network to obtain the first ciphertext symbol, and to construct the candidate cipher mapping set for the current training period based on the first ciphertext symbol. The constraint judgment module is used to input the candidate password mapping set into the rule authentication network to determine whether the candidate password mapping set generates corresponding rule labels under preset constraint conditions, and to obtain the rule evaluation result. The parameter update module is used to update the parameters of the ciphertext generation network and the rule authentication network when the rule evaluation result is that the candidate ciphertext mapping set does not generate the corresponding rule label under the preset constraint conditions, and return to the step of executing the plaintext code space corresponding to the preset information to be encrypted; The training completion judgment model is used to complete the training of the ciphertext generation network and the rule discrimination network when the rule evaluation result is that the candidate ciphertext mapping set generates the corresponding rule label under the preset constraint conditions. The codebook set construction module is used to construct a codebook set including multiple ciphertext mapping rules based on the trained ciphertext generation network. The encryption encoding module is used to take one of the codebooks in the codebook set as the target codebook, encrypt and encode the information to be transmitted using the target codebook to generate a ciphertext sequence, and construct a ciphertext mapping matching key information for codebook matching at the receiving end. The transmission decoding module is used to send the ciphertext sequence and the password mapping matching key information to the receiving end. The receiving end determines the corresponding codebook according to the password mapping matching key information and decodes the ciphertext sequence to obtain the decoded plaintext code.
[0014] Thirdly, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the online encryption and decoding method based on an adversarial deep neural network as described in any one of the first aspects.
[0015] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the online encryption and decoding method based on an adversarial deep neural network as described in the first aspect.
[0016] Compared with the prior art, the present invention has the following advantages: This invention constructs an adversarial deep neural network model consisting of a ciphertext generation network and a rule-based authentication network to automatically generate and optimize the cryptographic mapping relationship between plaintext and ciphertext symbols, reducing reliance on manually preset fixed cryptographic rules. Based on the optimized cryptographic mapping rules, multiple codebooks are constructed to generate and select different cryptographic mapping rules. Auxiliary plaintext symbols are mapped through the target codebook to generate corresponding ciphertext responses, forming cryptographic mapping matching key information. This achieves accurate matching of codebooks between the sender and receiver, and completes the online encryption and decoding process. Compared to methods based on fixed cryptographic mapping rules, this invention achieves automatic generation of cryptographic mapping rules, construction of multiple codebooks, and synchronous matching of cryptographic rules, improving the reliability of the encryption and decoding process and the flexibility of cryptographic mapping rules, providing effective technical support for secure information transmission in complex communication scenarios. Attached Figure Description
[0017] 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.
[0018] Figure 1 This is a flowchart illustrating an online encryption and decoding method based on an adversarial deep neural network in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the principle of adversarial deep neural network cryptographic mapping generation in an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the principle of online encryption, matching, and decoding based on a codebook in an embodiment of the present invention. Detailed Implementation
[0019] 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.
[0020] 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.
[0021] With the development of communication technology, the security requirements for information transmission are constantly increasing. In existing communication systems, to prevent the unauthorized acquisition of transmitted information, preset cryptographic algorithms are typically used to encrypt the data to be transmitted, and the receiving end uses the corresponding key to decrypt it. However, some existing encryption methods based on preset encoding rules or fixed cryptographic mapping relationships usually rely on pre-designed cryptographic rules, and the mapping relationship between plaintext and ciphertext is highly deterministic. In scenarios that use fixed or long-term unchanging cryptographic mapping rules, when attackers obtain a large number of ciphertext samples or master some encoding patterns, they may be able to deduce the correspondence between plaintext and ciphertext through statistical analysis, pattern matching, and other methods, thereby increasing the risk of information leakage.
[0022] As the scale of communication data continues to increase and the complexity of application environments grows, methods relying on manually preset cryptographic mapping rules have certain limitations when facing complex and ever-changing communication scenarios. On the one hand, fixed-design cryptographic mappings are difficult to flexibly expand and form diverse encoding relationships; on the other hand, manually constructing cryptographic rules that meet the requirements of one-to-one mapping, reversible decoding, and diversity is a complex process that is difficult to adapt to the needs of intelligent communication systems for online encryption processing.
[0023] In recent years, deep neural networks have demonstrated strong capabilities in learning complex mapping relationships and representing nonlinear features, providing a new technical approach for constructing intelligent encryption coding methods. By learning the nonlinear mapping relationship between input and output through neural networks, the reliance on manually preset cryptographic rules can be reduced, enabling the automatic generation of cryptographic mapping relationships.
[0024] However, some existing neural network-based encryption methods primarily utilize network models to perform data transformation or feature hiding, failing to adequately consider the constraints on the generated cryptographic mapping relationships. This makes it difficult to guarantee a one-to-one correspondence between the generated ciphertext and plaintext. When multiple plaintexts correspond to the same ciphertext, the decoding process cannot accurately recover the original information. Therefore, how to automatically construct cryptographic mapping relationships that satisfy reversibility and one-to-one mapping requirements using deep neural networks, and achieve reliable online encryption and decoding, remains a technical problem that needs further resolution.
[0025] This invention provides an online encryption and decoding method based on adversarial deep neural networks, which addresses the problems of existing technologies in ensuring reversibility and one-to-one mapping between generated ciphertext and plaintext, as well as the difficulty in achieving reliable online encryption and decoding.
[0026] The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0027] Please see Figure 1 This invention provides an online encryption and decoding method based on an adversarial deep neural network, comprising the following steps: Step 101: Preset the plaintext code space corresponding to the information to be encrypted, and construct an adversarial deep neural network model. The adversarial deep neural network model includes a ciphertext generation network and a rule discrimination network.
[0028] Specifically, a plaintext code space corresponding to the encrypted information is preset, and the plaintext code space... Represented as:
[0029] in, Let N represent the i-th plaintext symbol, and let N represent the number of symbols in the plaintext symbol space.
[0030] For plaintext information represented in binary form, a single plaintext symbol can be represented as:
[0031] Where T represents the encoding length of a single plaintext symbol, and the encoding length can be set according to actual application requirements. When the plaintext symbol space contains all T-bit binary combinations, its symbol count satisfies... .
[0032] When the plaintext code is in the form of four-bit binary code, the plaintext code space is represented as follows:
[0033] The plaintext symbol space contains 16 different symbol states, namely... .
[0034] The ciphertext generation network takes plaintext symbols as input and generates corresponding ciphertext symbols based on the nonlinear mapping relationship learned by the network. The process can be represented as follows:
[0035] in, This represents the code elements output by the ciphertext generation network that are different from the plaintext code elements. The corresponding ciphertext code; This represents the ciphertext generation network; This represents the parameters of the ciphertext generation network.
[0036] The output of the ciphertext generation network is processed by codeword decision to form ciphertext codewords. The ciphertext codewords and plaintext codewords use the same encoding length to ensure consistent codeword space size during the cryptographic mapping process. When plaintext information is represented in binary form, that is: .
[0037] In this embodiment, both the ciphertext generation network and the rule discrimination network can be implemented using fully connected deep neural networks with multiple hidden layers, such as a multilayer perceptron (MLP). The ciphertext generation network performs the mapping transformation from plaintext symbols to ciphertext symbols, while the rule discrimination network performs an overall rule evaluation of the candidate ciphertext mapping set after completing one round of mapping generation in the plaintext symbol space, providing a foundation for subsequent ciphertext mapping optimization training.
[0038] Step 102: Input the plaintext code elements in the plaintext code element space into the ciphertext generation network to obtain the first ciphertext code element, and construct the candidate cipher mapping set for the current training cycle based on the first ciphertext code element.
[0039] Specifically, please refer to Figure 2 During each training cycle, the plaintext code space will be... Each plaintext code element is sequentially input into the ciphertext generation network. Obtain the corresponding ciphertext code. After completing one round of mapping generation for all plaintext codewords, a candidate cipher mapping set for the current training period is formed:
[0040] in, This represents the set of candidate cipher maps generated by the ciphertext generation network for the current plaintext code space.
[0041] It is worth noting that the first ciphertext code is the ciphertext code output by the ciphertext generation network during the training phase.
[0042] Step 103: Input the candidate password mapping set into the rule authentication network to determine whether the candidate password mapping set generates the corresponding rule label under the preset constraints, and obtain the rule evaluation result.
[0043] Specifically, the rule-based authentication network maps a set of candidate ciphers. As input, the rules for determining the overall generated cryptographic mapping relationship are applied, which is represented as follows:
[0044] in, The overall mapping rule evaluation result output by the rule-based identification network represents the representation of the rule evaluation result. Represents rules for identifying networks.
[0045] The preset constraints are: plaintext code elements and their corresponding ciphertext code elements are not the same, and different plaintext code elements correspond to different ciphertext code elements.
[0046] The plaintext codewords are different from their corresponding ciphertext codewords. This is to ensure that the generated ciphertext encoding is distinct from the original plaintext encoding, thus avoiding invalid mapping relationships. .
[0047] Different plaintext symbols correspond to different ciphertext symbols. This ensures a one-to-one correspondence between plaintext and ciphertext symbols, preventing multiple plaintext symbols from mapping to the same ciphertext symbol and thus avoiding inaccurate decoding. In other words, for any... ,satisfy: .
[0048] Step 104: When the rule evaluation result is that the candidate cipher mapping set does not generate the corresponding rule label under the preset constraints, update the parameters of the ciphertext generation network and the rule authentication network, and return to the step of executing the plaintext code space corresponding to the preset information to be encrypted.
[0049] The parameters of the ciphertext generation network and the rule-based authentication network are updated, including: updating the parameters of the ciphertext generation network based on the rule evaluation results; and updating the parameters of the rule-based authentication network based on the candidate cipher mapping set and the corresponding rule labels.
[0050] Specifically, during the training of the rule discrimination network, corresponding rule labels are generated based on whether the candidate password mapping set meets the preset constraints. The rule discrimination network is then trained using the candidate password mapping set and its rule labels as training samples, enabling it to acquire the ability to discriminate the overall rule compliance of the candidate password mapping set.
[0051] Step 105: When the rule evaluation result is that the candidate cipher mapping set generates the corresponding rule label under the preset constraints, the training of the ciphertext generation network and the rule discrimination network is completed.
[0052] Identify the evaluation results of the network output based on rules. Parameters of the ciphertext generation network The system was updated and optimized, and the network parameters for rule identification were combined with the candidate password mapping set and its rule labels. The process involves updating and optimizing the code; if the candidate cryptographic mapping set does not meet the preset constraints, the complete mapping generation and rule identification of the plaintext code space are re-executed; if the candidate cryptographic mapping set meets the preset constraints, the training of the current cryptographic mapping rule is completed.
[0053] After multiple rounds of training, through iterative optimization between the ciphertext generation network and the rule identification network, a generative model capable of generating cryptographic mapping relationships that satisfy preset constraints is obtained, providing a foundation for subsequent cryptographic mapping rule generation, codebook construction, and online encryption and decoding.
[0054] Step 106: Based on the trained ciphertext generation network, construct a set of codebooks that includes multiple ciphertext mapping rules.
[0055] It is worth noting that cryptographic mapping rules refer to the mapping constraints that need to be met when constructing a codebook.
[0056] Based on the trained ciphertext generation network, a set of password books including multiple password mapping rules is constructed, including the following steps: Step 1061: Input the plaintext symbols in the plaintext symbol space into the trained ciphertext generation network to obtain the second ciphertext symbols.
[0057] Specifically, please refer to Figure 3 For the k-th codebook, the parameters of the corresponding trained ciphertext generation network are... Fixed, and generated network using ciphertext. plaintext code space Map each plaintext codeword in the code to obtain the corresponding ciphertext codeword:
[0058] in, This represents the i-th plaintext codeword. This represents the corresponding ciphertext code generated under the k-th ciphertext mapping rule. This represents the network parameter configuration used to generate the k-th cryptographic mapping rule.
[0059] It is worth noting that the second ciphertext code is the ciphertext code output by the trained ciphertext generation network.
[0060] Step 1062: Construct a codebook based on the mapping relationship between plaintext code elements and second ciphertext code elements.
[0061] Specifically, based on the mapping relationship between all plaintext code elements and their corresponding second ciphertext code elements, a cryptographic mapping rule cipherbook is established:
[0062] in, This represents the k-th cipherbook, which consists of all plaintext code elements and their corresponding second ciphertext code elements, and is used to store the mapping rules between plaintext code elements and ciphertext code elements.
[0063] For example, when the plaintext code is in the form of four-bit binary code, the mapping relationship between some plaintext code and ciphertext code is as follows:
[0064] The above mapping relationship is a partial cryptographic mapping rule in this codebook. The remaining plaintext code elements obtain corresponding ciphertext code elements in the same way, which together constitute the complete codebook.
[0065] Step 1063: Adjust the generation conditions of the cryptographic mapping rules, and repeat the step of inputting plaintext symbols in the plaintext symbol space into the trained ciphertext generation network to obtain a set of codebooks including multiple cryptographic mapping rules.
[0066] Because the cryptographic mapping rules are constrained and optimized through the rule-based discrimination network during training, a one-to-one correspondence is maintained between plaintext and ciphertext symbols within the codebook. This means that for any different plaintext symbols... and ,satisfy:
[0067] Therefore, the constructed codebook can simultaneously support forward mapping during the encoding process and reverse mapping during the decoding process.
[0068] Furthermore, to increase the diversity of cryptographic mapping rules, different network parameter configurations can be obtained by changing the network initialization parameters, training parameter configurations, or other cryptographic mapping generation conditions. Different cryptographic mapping relationships are generated by fixing the corresponding parameters, thereby constructing multiple sets of cryptographic books with different mapping rules:
[0069] Where K represents the number of codebooks.
[0070] Furthermore, different codebooks correspond to different cryptographic mapping rules. The difference means that for any two different codebooks, at least one plaintext symbol corresponds to a different ciphertext symbol in each codebook. and There exists at least one plaintext code element. This ensures that the corresponding ciphertext codewords are different under the two codebooks, that is:
[0071] This results in different plaintext-ciphertext mappings between different codebooks, and at least some plaintext code elements can correspond to different ciphertext code elements under different codebooks.
[0072] For example, for the same plaintext code:
[0073] Different ciphertext codes can be generated under different codebooks:
[0074]
[0075] Right now:
[0076] This results in a multi-ciphertext mapping mechanism where at least some plaintext code elements correspond to different ciphertext code elements under different ciphertexts.
[0077] Through the above process, a set of password books consisting of multiple password mapping rules is established. The set of password books can be pre-configured on legitimate sending and receiving ends for subsequent online encryption encoding, password book matching and decoding.
[0078] Step 107: Take one of the codebooks in the codebook set as the target codebook, encrypt and encode the information to be transmitted using the target codebook to generate a ciphertext sequence, and construct a ciphertext mapping matching key information for codebook matching at the receiving end.
[0079] The process of encrypting the information to be transmitted using the target codebook to generate a ciphertext sequence includes the following steps: Step 10711: Encode the transmitted information into a continuous sequence of plaintext symbols.
[0080] Specifically, based on preset codec selection rules, the target codec used in the current encryption process is determined from the codec set. , where k represents the sequence number of the currently selected target codebook.
[0081] For plaintext information to be transmitted in encryption, it is encoded into a continuous sequence of plaintext code elements:
[0082] Where L represents the number of plaintext symbols contained in the information to be transmitted.
[0083] Step 10712: Map the plaintext code sequence according to the plaintext-ciphertext mapping relationship in the target codebook to obtain the corresponding ciphertext sequence.
[0084] Using the target codebook The plaintext-ciphertext mapping relationship stored in the database is used to perform a forward mapping on each plaintext codeword to obtain the corresponding ciphertext codeword:
[0085] in, This represents the i-th plaintext symbol in the current message to be encrypted. This represents the corresponding ciphertext code generated using the k-th codebook.
[0086] The encrypted ciphertext sequence is composed of all ciphertext code elements: .
[0087] Constructing the cryptographic mapping matching key information for receiving end passwordbook matching includes the following steps: Step 10721: Obtain the auxiliary plaintext code sequence using a random generation method.
[0088] Specifically, in order for the receiving end to accurately determine the target cipher currently used by the sending end from the shared cipher set, an auxiliary plaintext symbol sequence independent of the plaintext information to be transmitted is generated according to a preset auxiliary symbol generation rule:
[0089] in, q represents the length of the auxiliary plaintext symbol sequence. The auxiliary plaintext symbol sequence is generated according to a preset rule. Its symbol format is consistent with that of the plaintext symbol, but it is independent of the actual plaintext information to be transmitted. It does not carry the actual transmission content and is only used to generate cryptographic mapping matching key information.
[0090] Step 10722: Input the auxiliary plaintext code sequence into the target cipherbook, and obtain the corresponding ciphertext response according to the plaintext-ciphertext mapping relationship in the target cipherbook.
[0091] The plaintext-ciphertext mapping relationship refers to the correspondence between specific plaintext code elements and ciphertext code elements generated under the constraints of cryptographic mapping rules. The codebook is further formed based on the plaintext-ciphertext mapping relationship.
[0092] Specifically, the auxiliary plaintext codeword sequence is input into the target codebook. Obtain the corresponding ciphertext response sequence:
[0093] in, Indicates auxiliary plaintext code elements In the target codebook The corresponding generated ciphertext code.
[0094] Step 10723: Based on the auxiliary plaintext symbol sequence and the corresponding ciphertext response, construct the cryptographic mapping matching key information.
[0095] Specifically, the cryptographic mapping matching key information is constructed based on the auxiliary plaintext symbol sequence and its corresponding ciphertext response:
[0096] The cryptographic mapping matching key information is used to characterize the mapping features corresponding to the target codebook, and does not directly transmit the codebook number or codebook structure information.
[0097] If the cryptographic mapping matching key information formed by the current auxiliary plaintext symbol sequence is insufficient to distinguish the target codebook from other candidate codebooks, then the auxiliary plaintext symbol sequence is regenerated or the number of auxiliary symbols is increased until the cryptographic mapping matching key information can uniquely characterize the target codebook.
[0098] Match the ciphertext sequence C and the ciphermap with the key information. Both are sent to the receiving end so that the receiving end can complete the codebook matching and subsequent decoding.
[0099] Through the above process, online encryption encoding based on generative cryptographic mapping rules can be achieved, and a codebook matching mechanism between the sender and receiver can be established using auxiliary mapping responses.
[0100] For example, in this embodiment, the first codebook is selected from the codebook set P as the target codebook. Used for current information encryption encoding.
[0101] Using the target codebook The plaintext-ciphertext mapping relationship is stored in the database. Each plaintext code element is encoded and converted to obtain the corresponding ciphertext code element:
[0102] in, Represents plaintext code elements In the target codebook The corresponding generated ciphertext code.
[0103] For example, when the plaintext code sequence to be transmitted is:
[0104] Based on the constructed target codebook The corresponding plaintext-ciphertext mapping relationship:
[0105] The corresponding ciphertext sequence is then generated:
[0106] The encrypted sequence is then sent to the receiving end.
[0107] The auxiliary plaintext code sequence is obtained by random generation:
[0108] Input the auxiliary plaintext code sequence into the target codebook The corresponding ciphertext response is obtained based on the stored password mapping relationship:
[0109] For example:
[0110] The cryptographic mapping matching key information is composed of auxiliary plaintext symbols and their corresponding ciphertext responses:
[0111] Among them, the cryptographic mapping matching key information is used to represent the mapping response characteristics corresponding to the target codebook.
[0112] Step 108: Send the ciphertext sequence and the password mapping matching key information to the receiving end. The receiving end determines the corresponding codebook based on the password mapping matching key information and decodes the ciphertext sequence to obtain the decoded plaintext code.
[0113] Specifically, the receiving end obtains the ciphertext sequence sent by the sending end. and the corresponding cryptographic mapping matching key information In this context, the key information for matching the cryptographic mapping is generated by mapping the auxiliary plaintext codeword sequence through the target codebook.
[0114] The receiving end is based on a pre-shared set of passwords. The key information of the cryptographic mapping is matched and verified to determine the target codebook currently used by the sending end.
[0115] For any candidate codebook in the codebook set Input each symbol from the auxiliary plaintext symbol sequence into the candidate cipherbook to obtain the corresponding predicted ciphertext symbols:
[0116] in, Indicates auxiliary plaintext code elements In candidate codebooks The corresponding generated ciphertext code.
[0117] The predicted ciphertext symbols are compared with the ciphertext response in the key information matched by the cryptographic mapping. When the condition is met... If no other candidate codebook simultaneously meets this matching condition, then the candidate codebook is determined as the target codebook currently used by the sender. .
[0118] Through the above matching process, the consistent determination of the password mapping rules between the sending end and the receiving end is achieved.
[0119] In identifying the target codebook Then, using the reverse mapping relationship corresponding to this codebook, the received ciphertext symbols are decoded and converted:
[0120] in, This represents the reverse mapping relationship corresponding to the target codebook.
[0121] Perform reverse mapping on all ciphertext symbols sequentially to obtain the recovered plaintext symbol sequence:
[0122] This allows for the online decoding of transmitted information.
[0123] For example, the ciphertext sequence received by the receiving end is:
[0124] Simultaneously, password mapping matching key information was received:
[0125] The receiving end uses a pre-shared set of passwords:
[0126] Perform matching and verification on each codebook. For example, suppose the codebook... When mapping auxiliary plaintext symbols, we get Then it matches the key information in the cryptographic mapping. Inconsistent, therefore the codebook is excluded. When using a codebook During the verification, the following results were obtained:
[0127] The key information matched the cryptographic mapping perfectly, therefore it was determined that... This is the target codebook corresponding to the current communication process.
[0128] Using the target codebook The reverse mapping relationship stored in the database is used to decode the received ciphertext sequence. For example:
[0129] The final recovered plaintext code sequence is as follows: Complete the online decoding process.
[0130] This invention also provides an online encryption and decoding system based on an adversarial deep neural network, comprising: a model building module, used to preset the plaintext symbol space corresponding to the information to be encrypted, and build an adversarial deep neural network model, the adversarial deep neural network model including a ciphertext generation network and a rule discrimination network; a candidate set generation module, used to input plaintext symbols from the plaintext symbol space into the ciphertext generation network to obtain a first ciphertext symbol, and build a candidate ciphertext mapping set for the current training period based on the first ciphertext symbol; a constraint judgment module, used to input the candidate ciphertext mapping set into the rule discrimination network to determine whether the candidate ciphertext mapping set generates the corresponding rule label under preset constraint conditions, and obtain a rule evaluation result; and a parameter update module, used to update the parameters of the ciphertext generation network and the rule discrimination network when the rule evaluation result is that the candidate ciphertext mapping set does not generate the corresponding rule label under the preset constraint conditions. The system performs an update and returns to the step of executing the plaintext symbol space corresponding to the information to be encrypted; it trains a judgment model to complete the training of the ciphertext generation network and the rule discrimination network when the rule evaluation result is that the candidate ciphertext mapping set generates the corresponding rule label under the preset constraints; it constructs a ciphertext set construction module to build a ciphertext set including multiple ciphertext mapping rules based on the trained ciphertext generation network; it uses an encryption encoding module to use one of the ciphertext sets as the target ciphertext, encrypts and encodes the information to be transmitted using the target ciphertext, generates a ciphertext sequence, and constructs ciphertext mapping matching key information for ciphertext matching at the receiving end; and it sends the ciphertext sequence and ciphertext mapping matching key information to the receiving end, where the receiving end determines the corresponding ciphertext based on the ciphertext mapping matching key information and decodes the ciphertext sequence to obtain the decoded plaintext symbols.
[0131] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described online encryption and decoding method based on an adversarial deep neural network.
[0132] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described online encryption and decoding method based on an adversarial deep neural network.
[0133] The same or similar parts among the various embodiments in this specification can be referred to mutually, and will not be repeated here.
[0134] This invention constructs an adversarial deep neural network model consisting of a ciphertext generation network and a rule-based authentication network to automatically generate and optimize the cryptographic mapping relationship between plaintext and ciphertext symbols, reducing reliance on manually preset fixed cryptographic rules. Based on the optimized cryptographic mapping rules, multiple codebooks are constructed to generate and select different cryptographic mapping rules. Auxiliary plaintext symbols are mapped through the target codebook to generate corresponding ciphertext responses, forming cryptographic mapping matching key information. This achieves accurate matching of codebooks between the sender and receiver, and completes the online encryption and decoding process. Compared to methods based on fixed cryptographic mapping rules, this invention achieves automatic generation of cryptographic mapping rules, construction of multiple codebooks, and synchronous matching of cryptographic rules, improving the reliability of the encryption and decoding process and the flexibility of cryptographic mapping rules, providing effective technical support for secure information transmission in complex communication scenarios.
[0135] 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.
[0136] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 therein. Such 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 online encryption and decoding method based on adversarial deep neural networks, characterized in that, include: A plaintext code space corresponding to the information to be encrypted is preset, and an adversarial deep neural network model is constructed. The adversarial deep neural network model includes a ciphertext generation network and a rule discrimination network. The plaintext symbols in the plaintext symbol space are input into the ciphertext generation network to obtain the first ciphertext symbol, and a candidate cipher mapping set for the current training period is constructed based on the first ciphertext symbol. The candidate password mapping set is input into the rule authentication network to determine whether the candidate password mapping set generates corresponding rule labels under preset constraints, and to obtain the rule evaluation result. When the rule evaluation result indicates that the candidate cipher mapping set does not generate the corresponding rule label under the preset constraint conditions, the parameters of the ciphertext generation network and the rule authentication network are updated, and the step of executing the plaintext symbol space corresponding to the preset information to be encrypted is returned. When the rule evaluation result is that the candidate cipher mapping set generates the corresponding rule label under the preset constraints, the training of the ciphertext generation network and the rule discrimination network is completed. Based on the trained ciphertext generation network, a set of password books including multiple password mapping rules is constructed; One of the codebooks in the codebook set is used as the target codebook. The information to be transmitted is encrypted and encoded using the target codebook to generate a ciphertext sequence. A ciphertext mapping matching key is then constructed for codebook matching at the receiving end. The ciphertext sequence and the ciphertext mapping matching key information are sent to the receiving end. The receiving end determines the corresponding ciphertext book based on the ciphertext mapping matching key information and decodes the ciphertext sequence to obtain the decoded plaintext code.
2. The online encryption and decoding method based on adversarial deep neural networks according to claim 1, characterized in that, The preset constraint is as follows: Plaintext code elements are not the same as their corresponding ciphertext code elements, and different plaintext code elements correspond to different ciphertext code elements.
3. The online encryption and decoding method based on adversarial deep neural networks according to claim 1, characterized in that, Based on the trained ciphertext generation network, a set of ciphertext books is constructed, including multiple ciphertext mapping rules, including: The plaintext symbols in the plaintext symbol space are input into the trained ciphertext generation network to obtain the second ciphertext symbols. Construct a codebook based on the mapping relationship between plaintext code elements and second ciphertext code elements; Adjust the generation conditions of the cryptographic mapping rules and repeat the step of inputting plaintext symbols in the plaintext symbol space into the trained ciphertext generation network to obtain a set of cryptographic books including multiple cryptographic mapping rules.
4. The online encryption and decoding method based on adversarial deep neural networks according to claim 1, characterized in that, The target codebook is used to encrypt and encode the information to be transmitted to generate a ciphertext sequence, including: Encode the transmitted information into a continuous sequence of plaintext symbols; The plaintext code sequence is mapped according to the plaintext-ciphertext mapping relationship in the target codebook to obtain the corresponding ciphertext sequence.
5. The online encryption and decoding method based on adversarial deep neural networks according to claim 1, characterized in that, Construct the cryptographic mapping matching key information for receiving end-to-end cryptographic book matching, including: The auxiliary plaintext code sequence is obtained by random generation; The auxiliary plaintext code sequence is input into the target codebook, and the corresponding ciphertext response is obtained according to the plaintext-ciphertext mapping relationship in the target codebook. Based on the auxiliary plaintext code sequence and the corresponding ciphertext response, a cryptographic mapping matching key information is constructed.
6. The online encryption and decoding method based on adversarial deep neural networks according to claim 1, characterized in that, Updating the parameters of the ciphertext generation network and the rule-based authentication network includes: Based on the evaluation results of the rules, the parameters of the ciphertext generation network are updated; The parameters of the rule-based authentication network are updated based on the candidate cipher mapping set and the corresponding rule labels.
7. The online encryption and decoding method based on adversarial deep neural networks according to claim 1, characterized in that, The plaintext code elements are represented in a binary encoding format of a preset length.
8. An online encryption encoding / decoding system based on an adversarial deep neural network, characterized in that, include: The model building module is used to preset the plaintext code space corresponding to the information to be encrypted and build an adversarial deep neural network model, which includes a ciphertext generation network and a rule discrimination network. The candidate set generation module is used to input plaintext symbols in the plaintext symbol space into the ciphertext generation network to obtain the first ciphertext symbol, and to construct the candidate cipher mapping set for the current training period based on the first ciphertext symbol. The constraint judgment module is used to input the candidate password mapping set into the rule authentication network to determine whether the candidate password mapping set generates corresponding rule labels under preset constraint conditions, and to obtain the rule evaluation result. The parameter update module is used to update the parameters of the ciphertext generation network and the rule authentication network when the rule evaluation result is that the candidate ciphertext mapping set does not generate the corresponding rule label under the preset constraint conditions, and return to the step of executing the plaintext code space corresponding to the preset information to be encrypted; The training completion judgment model is used to complete the training of the ciphertext generation network and the rule discrimination network when the rule evaluation result is that the candidate ciphertext mapping set generates the corresponding rule label under the preset constraint conditions. The codebook set construction module is used to construct a codebook set including multiple ciphertext mapping rules based on the trained ciphertext generation network. The encryption encoding module is used to take one of the codebooks in the codebook set as the target codebook, encrypt and encode the information to be transmitted using the target codebook to generate a ciphertext sequence, and construct a ciphertext mapping matching key information for codebook matching at the receiving end. The transmission decoding module is used to send the ciphertext sequence and the password mapping matching key information to the receiving end. The receiving end determines the corresponding codebook according to the password mapping matching key information and decodes the ciphertext sequence to obtain the decoded plaintext code.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements an online encryption and decoding method based on an adversarial deep neural network according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements an online encryption and decoding method based on an adversarial deep neural network according to any one of claims 1 to 7.
