Data communication method and device based on hybrid data encryption algorithm
By combining multi-objective particle swarm optimization algorithm and chaotic mapping model with parameter negotiation of identity authentication and timestamp, a dynamic session key is generated, which solves the problem of insufficient regularity and security in session key generation in hybrid encryption schemes, and realizes efficient data encryption and decryption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-28
- Publication Date
- 2026-04-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing hybrid encryption schemes, session key generation is highly predictable, chaotic parameters cannot be adaptively optimized, system security is insufficient, and it is difficult to resist attacks.
A multi-objective particle swarm optimization algorithm and a chaotic mapping model are adopted. A dynamic session key is generated through parameter negotiation between identity authentication and timestamp. The chaotic parameters are optimized by combining Pareto optimal solution set and TOPSIS method. A symmetric encryption algorithm is used for data transmission.
It achieves adaptive optimization and dynamic generation of chaotic parameters, which increases the difficulty of cracking, prevents replay attacks, ensures the legitimacy of communication, balances system performance under the premise of high security, and enhances the ability to resist differential analysis and linear analysis.
Smart Images

Figure CN121907589A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security technology, and in particular to a data communication method and apparatus based on a hybrid data encryption algorithm. Background Technology
[0002] With the rapid development of information technology, data communication plays a crucial role in finance, healthcare, military, and all aspects of daily life. However, the openness of the network environment exposes data to various security threats during transmission, such as eavesdropping, tampering, and replay attacks. Therefore, ensuring the confidentiality, integrity, and timeliness of data communication has become a current research hotspot.
[0003] Traditional data encryption methods are generally divided into asymmetric encryption and symmetric encryption. Asymmetric encryption algorithms offer high security but have high computational complexity and slow processing speed, making them unsuitable for encrypting and transmitting large amounts of data. Symmetric encryption algorithms are fast and suitable for processing large amounts of data, but key management and distribution are more difficult. To combine the advantages of both, hybrid encryption mechanisms are widely used, which utilize asymmetric encryption to negotiate session keys and symmetric encryption to transmit data.
[0004] However, existing hybrid encryption schemes still have some shortcomings: First, the generation method of session keys is often relatively fixed, making them vulnerable to attacks targeting the key generation pattern; second, simply generating keys by random numbers is difficult to resist increasingly powerful exhaustive attacks and statistical analysis attacks; in addition, in a dynamically changing network environment, how to adaptively select the optimal chaos parameters according to the communication scenario to balance the security and computational efficiency of the encryption system is also a technical problem that urgently needs to be solved.
[0005] Therefore, a hybrid data encryption communication method that combines identity authentication, has dynamic adaptive parameter optimization capabilities, and is highly resistant to attacks is needed. Summary of the Invention
[0006] This invention provides a data communication method and apparatus based on a hybrid data encryption algorithm, which solves the problems of strong regularity in session key generation, inability to adaptively optimize chaotic parameters, and insufficient system security in existing technologies.
[0007] In a first aspect, embodiments of the present invention provide a data communication method based on a hybrid data encryption algorithm, the method comprising: Asymmetric encryption algorithms are used at both the sending and receiving ends to negotiate parameters based on authentication and timestamps, and to calculate a shared session base key. At both the sending and receiving ends, a multi-objective particle swarm optimization algorithm is run based on the session base key to obtain the Pareto optimal solution set of the optimal chaotic parameters. At the sending end, the target optimal chaotic parameters are selected from the Pareto optimal solution set, and a dynamic session key stream is generated using a chaotic mapping model configured with the target optimal chaotic parameters. At the sending end, the plaintext data to be transmitted is encrypted using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence to obtain ciphertext data, which is then sent to the receiving end. At the receiving end, the encrypted data is parsed and synchronized, the corresponding target optimal chaotic parameter is matched in the Pareto optimal solution set, and a dynamic session key stream consistent with the sending end is generated based on the target optimal chaotic parameter. At the receiving end, based on the dynamic session key stream and the standard round key, a symmetric decryption algorithm is used to decrypt the received ciphertext data to obtain the plaintext data.
[0008] The technical solution provided in this application has at least the following beneficial effects: By introducing a multi-objective particle swarm optimization algorithm and a chaotic mapping model, adaptive optimization of chaotic parameters and dynamic key generation are achieved, avoiding the security risks caused by fixed keys and greatly increasing the difficulty of cracking. A handshake protocol based on identity authentication and timestamps ensures the legitimacy of both communicating parties and effectively prevents replay attacks. A Pareto optimal solution set is used to store multiple sets of optimal chaotic parameters, and the TOPSIS method is combined to flexibly select the target optimal chaotic parameters according to the communication mode, balancing system performance according to actual scenario requirements while ensuring high security. A dynamic session key stream is used to XOR-perturb the round keys of standard symmetric encryption, changing the round key structure of traditional encryption algorithms and enhancing the algorithm's resistance to differential and linear analysis.
[0009] In one alternative implementation, asymmetric encryption algorithms are used at both the sending and receiving ends to negotiate parameters based on authentication and timestamps, and to calculate a shared session base key, including: At the sending end, a basic key based on authentication and timestamp is initialized, generating a handshake message plaintext. The plaintext of the handshake message includes the sender version. Sender's identity identifier Sending end system time and the random number sent ; Based on the preset public key of the receiving end, an asymmetric encryption algorithm is used to encrypt the plaintext of a handshake message, generate a handshake ciphertext, and send the handshake ciphertext to the receiving end. At the receiving end, using the receiver's private key and an asymmetric decryption algorithm, the ciphertext of the handshake is decrypted to obtain the plaintext handshake message. The receiving end's system time is then compared with the sending end's system time of the plaintext handshake message. Perform validity verification; At the receiving end, perform basic key initialization based on identity authentication and timestamp, and generate plaintext for the two-way handshake message. The plaintext of the second handshake message includes the receiver version. Receiver identification Receiver system time and the receiver's random number ; Based on the preset sender public key, the plaintext of the second handshake message is encrypted using an asymmetric encryption algorithm to generate the second handshake ciphertext, and the second handshake ciphertext is returned to the sender. At the sending end, the ciphertext of the second handshake is decrypted using an asymmetric decryption algorithm based on the sending end's private key to obtain the plaintext of the second handshake message. The validity is then verified based on the sending end's system time and the receiving end's system time of the plaintext of the second handshake message. After the validity verification is successful, the shared session base key is calculated using a hash function at both the sending and receiving ends. The session base key includes a sender random number, a receiver random number, a sender system time, a receiver system time, a sender identity identifier, and a receiver identity identifier.
[0010] In one alternative implementation, a multi-objective particle swarm optimization algorithm is run at both the sending and receiving ends based on the session base key to obtain a Pareto optimal solution set for the optimal chaotic parameters, including: The chaotic parameters are encoded into the position vectors of particles in the multi-objective particle swarm optimization algorithm. The multi-objective optimization function of the multi-objective particle swarm optimization algorithm is defined and used as the fitness function. Send the session base key at the sending end As a key seed, the key seed is evenly divided into several unsigned integer blocks, and the unsigned integer blocks are used as the initial seed value. A deterministic random number generation algorithm is used to generate a random floating-point number sequence. By mapping the random floating-point sequence to the search space of the multi-objective particle swarm optimization algorithm, the initial particle swarm and the initial velocity of each initial particle in the initial particle swarm are obtained. Use the fitness function to calculate the fitness value of each initial particle in the initial particle swarm. Based on the fitness value, the initial particle swarm is sorted into different non-dominated layers. All non-dominated solutions of the first non-dominated layer are stored in the external archive, and the upper limit of the archive capacity of the external archive is maintained by the crowding distance. By introducing a convergence factor and an adaptive Cauchy mutation mechanism, the initial particle swarm is updated to obtain an updated particle swarm, and the fitness function is used to calculate the fitness value of each updated particle in the updated particle swarm. Until the number of iterations reaches the iteration threshold, all non-dominated solutions in the external archive are taken as the Pareto optimal solution set of the optimal chaotic parameters and stored in the local database. Repeat the above steps at the receiving end to store a consistent Pareto optimal solution set in the local database at the receiving end.
[0011] In one alternative implementation, the formula for the floating-point sequence mapping is: In the formula, For the initial particle swarm, the first i An initial particle; The first of the random floating-point number sequences i A random floating-point number; These are the upper and lower bounds of the search space; For particle indication; In the formula, For the first i The initial velocity of the initial particle; It is a random number in the range (-1, 1).
[0012] In one alternative implementation, the multi-objective optimization function includes an information entropy function and a Lyapunov exponential function; The formula for the multi-objective optimization function is: In the formula, For particles X The fitness values of the corresponding alternative chaotic parameters; For particles X The information entropy of the corresponding alternative chaotic parameters; For particles X The Lyapunov exponents of the corresponding alternative chaotic parameters; X For particle variables, i.e., the position vectors of particles in the multi-objective particle swarm algorithm; The formula for the information entropy function is: In the formula, For particles X The Shannon entropy calculation function for the corresponding alternative chaotic parameters; The formula for the Lyapunov exponential function is as follows: In the formula, For particles X The Lyapunov exponential calculation function for the corresponding alternative chaotic parameters.
[0013] In one alternative implementation, the sender filters the target optimal chaotic parameters from the Pareto optimal solution set, and uses a chaotic mapping model configured with the target optimal chaotic parameters to generate a dynamic session key stream, including: Based on the communication mode between the sender and receiver, the TOPSIS method is used to select the target optimal chaotic parameters from the externally archived Pareto optimal solution set. Construct a chaotic mapping model based on the target optimal chaotic parameters; Initial state value The input is a chaotic mapping model configured with the target optimal chaotic parameters. Several chaotic iterations are performed, and the chaotic variables output by each chaotic iteration are quantized to generate an infinitely long bit stream sequence, i.e., a dynamic session key stream.
[0014] In one alternative implementation, based on the communication mode between the sender and receiver, the TOPSIS method is used to select the target optimal chaotic parameters from the Pareto optimal solution set, including: Using the TOPSIS method, an initial decision matrix for the Pareto optimal solution set is constructed, and the fitness values of each non-dominated solution in the matrix are normalized to obtain a normalized decision matrix. Based on the communication mode matching parameters of the sending and receiving ends, the weighted parameters are applied to the normalized decision matrix to form a weighted normalized matrix. Define the positive and negative ideal solutions in the weighted normalized matrix, calculate the distance between the Pareto optimal solution set and the positive and negative ideal solutions, and calculate the corresponding relative proximity based on the distance; The non-dominated solution corresponding to the maximum relative proximity in the Pareto optimal solution set is taken as the optimal solution, and the position vector of the optimal solution is decoded to obtain the target optimal chaotic parameters.
[0015] In one optional implementation, the plaintext data to be transmitted is encrypted at the sending end using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence to obtain ciphertext data, which is then sent to the receiving end, including: The standard symmetric encryption original key expansion algorithm is loaded at the sending end to generate a fixed standard round key sequence; The perturbation key is obtained by sequentially extracting a bit stream of the same length as the standard round key from the dynamic session key stream. The perturbation key is divided into a few perturbation key blocks, and an XOR perturbation operation is performed on the standard round key sequence based on the few perturbation key blocks to obtain the dynamic round key used for encryption. Based on the dynamic round key, a hybrid data encryption algorithm is used to encrypt the plaintext data to be transmitted, resulting in ciphertext data; Construct an encrypted data packet of ciphertext data, the encrypted data packet including a data packet header. Optimize indexes Data transmission time and encrypted data And send the encrypted data packet to the receiving end.
[0016] In one optional implementation, the ciphertext data is parsed and synchronized at the receiving end, the corresponding target optimal chaotic parameter is matched in the Pareto optimal solution set, and a dynamic session key stream consistent with that of the sending end is generated based on the target optimal chaotic parameter, including: The receiving end receives encrypted data packets containing ciphertext data and extracts the optimized index from the encrypted data packets. and data transmission time ; Verify data sending time The validity of the encrypted data packet is verified. If the verification passes, proceed to the next step; otherwise, ignore the encrypted data packet. Based on optimized index Match the target optimal chaotic parameters consistent with those of the sender in the Pareto optimal solution set of the local database; Using a chaotic mapping model configured with the target optimal chaotic parameters, a dynamic session key stream is generated, and based on the dynamic session key stream and the standard round key sequence, the dynamic round key consistent with the one that generated the key is restored. Based on the dynamic round key, a hybrid data decryption algorithm is used to decrypt the ciphertext data in the encrypted data packet to obtain the plaintext data.
[0017] Secondly, embodiments of the present invention provide a data communication device based on a hybrid data encryption algorithm for implementing a data communication method. The device includes: The parameter negotiation unit is used to negotiate parameters based on authentication and timestamps at the sending and receiving ends using asymmetric encryption algorithms, and to calculate the shared session base key. The parameter optimization unit is used to run a multi-objective particle swarm optimization algorithm at the sending and receiving ends based on the session base key to obtain the Pareto optimal solution set of the optimal chaotic parameters. The key stream generation unit is used to filter the target optimal chaotic parameters in the Pareto optimal solution set at the sending end, and generate a dynamic session key stream using a chaotic mapping model configured with the target optimal chaotic parameters. The data encryption unit is used at the sending end to encrypt the plaintext data to be transmitted using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence, to obtain ciphertext data, and then send it to the receiving end. The parsing and synchronization unit is used to parse and synchronize the ciphertext data at the receiving end, match the corresponding target optimal chaotic parameter in the Pareto optimal solution set, and generate a dynamic session key stream consistent with the sending end based on the target optimal chaotic parameter. The data decryption unit is used at the receiving end to decrypt the received ciphertext data using a symmetric decryption algorithm based on the dynamic session key stream and the standard round key, in order to obtain plaintext data.
[0018] A third aspect of this invention provides an electronic device, which includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by at least one processor, such that the at least one processor can perform the method proposed in the first aspect of the present invention.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the steps of a data communication method based on a hybrid data encryption algorithm provided in an embodiment of the present invention. Figure 3 This is a functional unit diagram of a data communication device based on a hybrid data encryption algorithm provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0022] The present invention will be further described below with reference to the accompanying drawings.
[0023] Reference Figure 1 , Figure 1This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention.
[0024] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0025] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0026] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and an electronic program for a data communication device based on a hybrid data encryption algorithm.
[0027] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device. The electronic device calls the electronic program of the data communication device based on the hybrid data encryption algorithm stored in the memory 1005 through the processor 1001, and executes the data communication method based on the hybrid data encryption algorithm provided in the embodiment of the present invention.
[0028] Reference Figure 2 The present invention provides a data communication method based on a hybrid data encryption algorithm, the method comprising: S201: At the sending and receiving ends, asymmetric encryption algorithms are used to negotiate parameters based on identity authentication and timestamps, and a shared session base key is calculated. S202: At the sending and receiving ends, based on the session base key, run the multi-objective particle swarm optimization algorithm to obtain the Pareto optimal solution set of the optimal chaotic parameters. S203: At the sending end, filter the target optimal chaotic parameters in the Pareto optimal solution set, and use the chaotic mapping model configured with the target optimal chaotic parameters to generate a dynamic session key stream; S204: At the sending end, the plaintext data to be transmitted is encrypted using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence to obtain ciphertext data, which is then sent to the receiving end. S205: At the receiving end, the encrypted data is parsed and synchronized, the corresponding target optimal chaotic parameter is matched in the Pareto optimal solution set, and a dynamic session key stream consistent with the sending end is generated based on the target optimal chaotic parameter. S206: At the receiving end, the received ciphertext data is decrypted using a symmetric decryption algorithm based on the dynamic session key stream and the standard round key to obtain the plaintext data.
[0029] The technical solution provided in this application has at least the following beneficial effects: By introducing a multi-objective particle swarm optimization algorithm and a chaotic mapping model, adaptive optimization of chaotic parameters and dynamic key generation are achieved, avoiding the security risks associated with fixed keys and greatly increasing the difficulty of cracking. A handshake protocol based on identity authentication and timestamps ensures the legitimacy of both communicating parties and effectively prevents replay attacks. A Pareto optimal solution set is used to store multiple sets of optimal chaotic parameters, and the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) is combined to flexibly select the target optimal chaotic parameters according to the communication mode, balancing system performance based on actual scenario requirements while ensuring high security. A dynamic session key stream is used to XOR-perturb the round keys of standard symmetric encryption, changing the round key structure of traditional encryption algorithms and enhancing the algorithm's resistance to differential and linear analysis.
[0030] In one alternative implementation, asymmetric encryption algorithms are used at both the sending and receiving ends to negotiate parameters based on authentication and timestamps, and to calculate a shared session base key, including: S2011: At the sending end, perform basic key initialization based on identity authentication and timestamp, and generate a handshake message plaintext. The plaintext of the handshake message includes the sender version. Sender's identity identifier Sending end system time and the random number sent ; In this embodiment, the parameters are generated as follows: The sending end initializes its protocol version number. (e.g., v1.0), reads the identity identifier from local storage. (e.g., MAC address or unique device ID), call the system's high-precision timer to obtain the current timestamp. (Accurate to milliseconds), using a hardware random number generator to generate a 256-bit random number for the sending end. ; The formula is: In the formula, A handshake message in plaintext; S2012: Based on the preset receiver public key, use an elliptic curve cryptography algorithm (such as ECC-ECDH) to encrypt the plaintext of a handshake message, generate a handshake ciphertext, and send the handshake ciphertext to the receiver. S2013: At the receiving end, using the receiving end's private key and an asymmetric decryption algorithm, the ciphertext of the handshake is decrypted to obtain the plaintext of the handshake message. The decryption is then performed based on the receiving end's system time and the sending end's system time of the plaintext handshake message. Perform validity verification; S2014: At the receiving end, perform basic key initialization based on identity authentication and timestamp, and generate plaintext for the two-way handshake message. The plaintext of the second handshake message includes the receiver version. Receiver identification Receiver system time and the receiver's random number ; The formula is: In the formula, The message is in plaintext for the second handshake. S2015: Based on the preset sender public key, use an asymmetric encryption algorithm to encrypt the plaintext of the second handshake message, generate the second handshake ciphertext, and return the second handshake ciphertext to the sender. S2016: At the sending end, the ciphertext of the second handshake is decrypted using an asymmetric decryption algorithm based on the sending end's private key to obtain the plaintext of the second handshake message, and the validity is verified based on the sending end's system time and the receiving end's system time of the plaintext of the second handshake message. S2017: After the validity verification is successful, the shared session base key is calculated using a hash function at both the sending and receiving ends. The session base key includes a sender random number, a receiver random number, a sender system time, a receiver system time, a sender identity identifier, and a receiver identity identifier. The formula is: In the formula, The base key for the session; It is a 256-bit secure hash function; This is a binary bit concatenation symbol.
[0031] In one alternative implementation, a multi-objective particle swarm optimization algorithm is run at both the sending and receiving ends based on the session base key to obtain a Pareto optimal solution set for the optimal chaotic parameters, including: S2021: Encode the chaotic parameters into the position vectors of particles in the multi-objective particle swarm optimization algorithm, set the multi-objective optimization function of the multi-objective particle swarm optimization algorithm, and use the multi-objective optimization function as the fitness function; S022: Send the session base key at the sending end As a key seed, the key seed is evenly divided into several 64-bit unsigned integer blocks, and the unsigned integer blocks are used as the initial seed value. A deterministic random number generation algorithm (such as the Mason rotation algorithm MT19937) is used to generate a random floating-point number sequence. S2023: Map the random floating-point sequence to the search space range [3.57, 4.0] of the multi-objective particle swarm optimization algorithm to obtain the initial particle swarm and the initial velocity of each initial particle in the initial particle swarm; S2024: Using the fitness function, calculate the fitness value of each initial particle in the initial particle swarm; S2025: Based on the fitness value, perform non-dominated sorting on the initial particle swarm to obtain different non-dominated layers. Store all non-dominated solutions of the first non-dominated layer in the external archive and use the crowding distance to maintain the upper limit of the archive capacity of the external archive. S2026: Introduces a convergence factor and an adaptive Cauchy mutation mechanism to update the position of the initial particle swarm, obtain an updated particle swarm, and use a fitness function to calculate the fitness value of each updated particle in the updated particle swarm. The formula is: In the formula, Number of iterations t+ 1 of i The rate of update of each particle; Number of iterations t The i The update rate of each particle, which is the initial rate during the first iteration; Number of iterations t The convergence factor improves the inertia weight; Number of iterations t The globally optimal particle; Number of iterations t The i A new particle is generated, which is the initial particle in the first iteration; Number of iterations t The i The historical optimal position of each particle; t This represents the current iteration number; The cooperation coefficient; A random number between (0, 1); i For particle indication; In the formula, These represent the maximum and minimum values of the inertia weight; This is the threshold for the number of iterations; , To adjust the parameters; It is a hyperbolic tangent function; this design results in a larger weight in the early stage, which is beneficial for global search; and a smaller weight with a gradual change in the later stage, which is beneficial for fine-grained local mining. In the formula, Number of iterations t+ 1 of i An updated first particle; An adaptive Cauchy mutation mechanism is introduced, in which several updated first particles are randomly selected from the updated first particle swarm for mutation, resulting in an updated second particle swarm that includes several updated second particles. In the formula, Number of iterations t+ 1 of i An updated second particle; It is a standard Cauchy distributed random variable; For the first t The convergence factor of the next iteration; Integrate the updated first particle group and the updated second particle group to obtain an updated particle group; S2027: Until the number of iterations reaches the iteration threshold, all non-dominated solutions in the external archive are used as the Pareto optimal solution set for the optimal chaotic parameters and stored in the local database. S2028: Repeat steps S2021 to S2027 at the receiving end to store a consistent Pareto optimal solution set in the local database at the receiving end.
[0032] In one alternative implementation, the formula for the floating-point sequence mapping is: In the formula, For the initial particle swarm, the first i An initial particle; The first of the random floating-point number sequences i A random floating-point number; These are the upper and lower bounds of the search space; For particle indication; In the formula, For the first i The initial velocity of the initial particle; It is a random number in the range (-1, 1).
[0033] In one alternative implementation, the multi-objective optimization function includes an information entropy function and a Lyapunov exponential function; The formula for the multi-objective optimization function is: In the formula, For particles X The fitness values of the corresponding alternative chaotic parameters; For particles X The information entropy of the corresponding alternative chaotic parameters; For particles X The Lyapunov exponents of the corresponding alternative chaotic parameters; X For particle variables, i.e., the position vectors of particles in the multi-objective particle swarm algorithm; The formula for the information entropy function is: In the formula, For particles X The Shannon entropy calculation function for the corresponding alternative chaotic parameters; measures the randomness of the chaotic sequence, with an ideal value close to 8 (bit / byte); The formula for the Lyapunov exponential function is as follows: In the formula, For particles X The corresponding alternative chaotic parameters are calculated using Lyapunov exponential functions; these measures the sensitivity to initial conditions, with larger values indicating greater unpredictability.
[0034] In one alternative implementation, the sender filters the target optimal chaotic parameters from the Pareto optimal solution set, and uses a chaotic mapping model configured with the target optimal chaotic parameters to generate a dynamic session key stream, including: S2031: Based on the communication mode between the sender and receiver, the TOPSIS method is used to select the target optimal chaotic parameters from an externally archived Pareto optimal solution set. ; S2032: Construct a chaotic mapping model based on the target optimal chaotic parameters, with the following formula: The formula is: In the formula, For the first n+ 1. n One chaotic variable; The target is the optimal chaotic parameters; n For chaotic variable indicators; S2033: Transfer the session base key Extract several bits and convert them into fixed floating-point numbers in the range [0,1], which are then used as the initial state values for the chaotic iteration of the chaotic mapping model. ; S2034: Set the initial state value The input is a chaotic mapping model configured with the target optimal chaotic parameters. Several chaotic iterations are performed, and the chaotic variables output by each chaotic iteration are quantized to generate an infinitely long bit stream sequence, i.e., a dynamic session key stream.
[0035] In one alternative implementation, based on the communication mode between the sender and receiver, the TOPSIS method is used to select the target optimal chaotic parameters from the Pareto optimal solution set, including: S20311: Using the TOPSIS method, construct the initial decision matrix of the Pareto optimal solution set, and perform normalization on the fitness values of each non-dominated solution in the matrix to obtain the normalized decision matrix. The formula for the decision matrix is: In the formula, For decision matrix; The Shannon entropy for the first to m non-dominated solutions; Lyapunov exponents for the first to m nondominated solutions; m This represents the total number of non-dominated solutions in the Pareto optimal solution set. In the formula, For the first The first non-dominated solution The normalized values of the objective function form the normalized decision matrix.R ; Objective function indicator for conflict resolution multi-objective functions; This is an indicator of a non-dominated solution; S20312: Based on the communication mode matching parameter weighting of the sender and receiver, the parameter weighting is applied to the normalized decision matrix to form a weighted normalized matrix; In this embodiment, the sending end presets multiple communication modes, each mode corresponding to a set of weighted weights for the optimization target. The specific matching logic is as follows: Mode A: High-security financial transaction mode Scenario characteristics: The data is of extremely high value, has a relatively high tolerance for transmission delay, and is extremely dependent on the unpredictability of the key to resist brute-force attacks; Weighting principle: Maximize the weight of "information entropy", because a high entropy value means that the key stream is closer to true randomness and can effectively resist statistical analysis; Weighting: Set the weight of information entropy to 0.8 and the weight of Lyapunov exponent to 0.2; Mode B: High Real-Time Industrial Control Mode Scenario characteristics: The data is mainly used for real-time control, is extremely sensitive to transmission delay, and usually has a high communication frequency, requiring extremely fast key generation speed; Weighting principle: Maximize the weight of the Lyapunov exponent; because the larger the Lyapunov exponent value, the faster the chaotic system's orbits separate, the stronger the initial value sensitivity, and the shorter the iteration length (pre-iteration number) can be used to achieve sufficient disorder, thereby reducing computation time. Weighting: Set the weight of information entropy to 0.3 and the weight of Lyapunov exponent to 0.7. Mode C: Balanced General Communication Mode Scenario characteristics: Regular web browsing or file transfer, balancing security and efficiency; Weighting principle: Both are equally important; Weighting: Set the weight of information entropy to 0.5 and the weight of Lyapunov exponent to 0.5. Matching process: The sending end reads the type identifier of the current communication task and looks up the corresponding weight vector in the table; The formula is: In the formula, For the first The first non-dominated solution The weighted normalized values of the objective function form the weighted normalization matrix. V ; For the first The weighted values of the parameters of the objective function; S20313: Define the positive and negative ideal solutions in the weighted normalized matrix, calculate the distance between the Pareto optimal solution set and the positive and negative ideal solutions, and calculate the corresponding relative proximity based on the distance; Positive Ideal Solution The set of minimum values for each objective function (since the objective is to be as small as possible), i.e. ,in, The minimum fitness value The weighted normalized value; Negative ideal solution The set of maximum values for each objective function (since the objective is to be as small as possible), i.e. ,in, The maximum fitness value The weighted normalized value; Calculate the first The formulas for the distances from a non-dominated solution to a positive ideal solution and to a negative ideal solution are: In the formula, For the first The distance from the normalized set of optimization objective values of non-dominated solutions to the positive ideal solution; For the first The weighted normalized value of the non-dominated solution; The ideal solution; In the formula, For the first The distance from the normalized set of optimization objective values of non-dominated solutions to the positive ideal solution; It is a negative ideal solution; In the formula, For the first The relative proximity of the non-dominated solution is between [0,1], with the closer to 1 indicating a better solution; S20314: Take the non-dominated solution corresponding to the maximum relative proximity in the Pareto optimal solution set as the optimal solution, and decode the position vector of the optimal solution to obtain the target optimal chaotic parameters.
[0036] In one optional implementation, the plaintext data to be transmitted is encrypted at the sending end using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence to obtain ciphertext data, which is then sent to the receiving end, including: S2041: Load the original key expansion algorithm of standard symmetric encryption at the sending end to generate a fixed standard round key sequence; S2042: Extract a bit stream of equal length to the standard round key from the dynamic session key stream to obtain the perturbation key; S2043: Divide the perturbation key into a few perturbation key blocks, and perform an XOR perturbation operation on the standard round key sequence according to the few perturbation key blocks to obtain the dynamic round key used for encryption; The formula is: In the formula, For the first in the dynamic round key j Dynamic wheel key block; The first in the standard round key sequence j Standard round key block; The perturbation key j Disrupt the key block; j This is a key block indicator; It is the XOR symbol; S2044: Based on the dynamic round key, use a hybrid data encryption algorithm to encrypt the plaintext data to be transmitted to obtain ciphertext data; S2045: Construct an encrypted data packet containing the encrypted data, the encrypted data packet including a data packet header. Optimize indexes Data transmission time and encrypted data And send the encrypted data packet to the receiving end; In this embodiment, the data packet header Includes protocol version number, optimization algorithm identifier, and chaos model type; Optimize indexes A new key field indicating which solution from the external archive the receiver uses (or sends directly). (A brief summary).
[0037] In one optional implementation, the ciphertext data is parsed and synchronized at the receiving end, the corresponding target optimal chaotic parameter is matched in the Pareto optimal solution set, and a dynamic session key stream consistent with that of the sending end is generated based on the target optimal chaotic parameter, including: S2051: The receiving end receives an encrypted data packet containing ciphertext data and extracts the optimized index from the encrypted data packet. and data transmission time ; S2052: Verify data transmission time The validity of the encrypted data packet is verified. If the verification passes, proceed to the next step; otherwise, ignore the encrypted data packet. S2053: Based on optimized index Match the target optimal chaotic parameters consistent with those of the sender in the Pareto optimal solution set of the local database; S2054: Using a chaotic mapping model configured with the target optimal chaotic parameters, generate a dynamic session key stream, and restore the dynamic round key consistent with the originating end based on the dynamic session key stream and the standard round key sequence; S2055: Based on the dynamic round key, use a hybrid data decryption algorithm to decrypt the ciphertext data in the encrypted data packet to obtain the plaintext data.
[0038] This invention also provides a data communication device based on a hybrid data encryption algorithm, see reference. Figure 3 The device may include the following units: The parameter negotiation unit 301 is used to perform parameter negotiation based on identity authentication and timestamp using asymmetric encryption algorithms at the sending end and the receiving end respectively, and to calculate the shared session base key. The parameter optimization unit 302 is used to run a multi-objective particle swarm optimization algorithm at the sending end and the receiving end respectively based on the session base key to obtain the Pareto optimal solution set of the optimal chaotic parameters; The key stream generation unit 303 is used to filter the target optimal chaotic parameters in the Pareto optimal solution set at the sending end, and generate a dynamic session key stream using a chaotic mapping model configured with the target optimal chaotic parameters. The data encryption unit 304 is used at the sending end to encrypt the plaintext data to be transmitted using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence, to obtain ciphertext data, and then send it to the receiving end. The parsing and synchronization unit 305 is used to parse and synchronize the ciphertext data at the receiving end, match the corresponding target optimal chaotic parameter in the Pareto optimal solution set, and generate a dynamic session key stream consistent with the sending end based on the target optimal chaotic parameter. The data decryption unit 306 is used at the receiving end to decrypt the received ciphertext data using a symmetric decryption algorithm based on the dynamic session key stream and the standard round key, to obtain plaintext data.
[0039] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the data communication method based on a hybrid data encryption algorithm of the present invention.
[0040] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned terminal and other devices. The memory can include Random Access Memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.
[0041] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0042] Furthermore, to achieve the above objectives, embodiments of the present invention also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the data communication method based on a hybrid data encryption algorithm according to embodiments of the present invention.
[0043] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable hardware devices (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0044] The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (apparatus), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0045] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0046] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0047] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. "And / or" indicates that either one or both can be chosen. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.
[0048] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data communication method based on a hybrid data encryption algorithm, characterized in that, The method includes: Asymmetric encryption algorithms are used at both the sending and receiving ends to negotiate parameters based on authentication and timestamps, and to calculate a shared session base key. At both the sending and receiving ends, a multi-objective particle swarm optimization algorithm is run based on the session base key to obtain the Pareto optimal solution set of the optimal chaotic parameters. At the sending end, the target optimal chaotic parameters are selected from the Pareto optimal solution set, and a dynamic session key stream is generated using a chaotic mapping model configured with the target optimal chaotic parameters. At the sending end, the plaintext data to be transmitted is encrypted using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence to obtain ciphertext data, which is then sent to the receiving end. At the receiving end, the encrypted data is parsed and synchronized, the corresponding target optimal chaotic parameter is matched in the Pareto optimal solution set, and a dynamic session key stream consistent with the sending end is generated based on the target optimal chaotic parameter. At the receiving end, based on the dynamic session key stream and the standard round key, a symmetric decryption algorithm is used to decrypt the received ciphertext data to obtain the plaintext data.
2. The data communication method based on a hybrid data encryption algorithm according to claim 1, characterized in that, At both the sending and receiving ends, asymmetric encryption algorithms are used to negotiate parameters based on authentication and timestamps, and a shared session base key is calculated, including: At the sending end, a basic key based on authentication and timestamp is initialized, generating a handshake message plaintext. The plaintext of the handshake message includes the sender version. Sender's identity identifier Sending end system time and the random number sent ; Based on the preset public key of the receiving end, an asymmetric encryption algorithm is used to encrypt the plaintext of a handshake message, generate a handshake ciphertext, and send the handshake ciphertext to the receiving end. At the receiving end, using the receiver's private key and an asymmetric decryption algorithm, the ciphertext of the handshake is decrypted to obtain the plaintext handshake message. The receiving end's system time is then compared with the sending end's system time of the plaintext handshake message. Perform validity verification; At the receiving end, perform basic key initialization based on identity authentication and timestamp, and generate plaintext for the two-way handshake message. The plaintext of the second handshake message includes the receiver version. Receiver identification Receiver system time and the receiver's random number ; Based on the preset sender public key, the plaintext of the second handshake message is encrypted using an asymmetric encryption algorithm to generate the second handshake ciphertext, and the second handshake ciphertext is returned to the sender. At the sending end, the ciphertext of the second handshake is decrypted using an asymmetric decryption algorithm based on the sending end's private key to obtain the plaintext of the second handshake message. The validity is then verified based on the sending end's system time and the receiving end's system time of the plaintext of the second handshake message. After the validity verification is successful, the shared session base key is calculated using a hash function at both the sending and receiving ends. The session base key includes a sender random number, a receiver random number, a sender system time, a receiver system time, a sender identity identifier, and a receiver identity identifier.
3. The data communication method based on a hybrid data encryption algorithm according to claim 2, characterized in that, At both the sending and receiving ends, a multi-objective particle swarm optimization algorithm is run based on the session base key to obtain the Pareto optimal solution set of the optimal chaotic parameters, including: The chaotic parameters are encoded into the position vectors of particles in the multi-objective particle swarm optimization algorithm. The multi-objective optimization function of the multi-objective particle swarm optimization algorithm is defined and used as the fitness function. Send the session base key at the sending end As a key seed, the key seed is evenly divided into several unsigned integer blocks, and the unsigned integer blocks are used as the initial seed value. A deterministic random number generation algorithm is used to generate a random floating-point number sequence. By mapping the random floating-point sequence to the search space of the multi-objective particle swarm optimization algorithm, the initial particle swarm and the initial velocity of each initial particle in the initial particle swarm are obtained. Use the fitness function to calculate the fitness value of each initial particle in the initial particle swarm. Based on the fitness value, the initial particle swarm is sorted into different non-dominated layers. All non-dominated solutions of the first non-dominated layer are stored in the external archive, and the upper limit of the archive capacity of the external archive is maintained by the crowding distance. By introducing a convergence factor and an adaptive Cauchy mutation mechanism, the initial particle swarm is updated to obtain an updated particle swarm, and the fitness function is used to calculate the fitness value of each updated particle in the updated particle swarm. Until the number of iterations reaches the iteration threshold, all non-dominated solutions in the external archive are taken as the Pareto optimal solution set of the optimal chaotic parameters and stored in the local database. Repeat the above steps at the receiving end to store a consistent Pareto optimal solution set in the local database at the receiving end.
4. The data communication method based on a hybrid data encryption algorithm according to claim 3, characterized in that, The formula for mapping the floating-point number sequence is: In the formula, For the initial particle swarm, the first i An initial particle; The first of the random floating-point number sequences i A random floating-point number; These are the upper and lower bounds of the search space; For particle indication; In the formula, For the first i The initial velocity of the initial particle; It is a random number in the range (-1, 1).
5. The data communication method based on a hybrid data encryption algorithm according to claim 4, characterized in that, The multi-objective optimization function includes the information entropy function and the Lyapunov exponential function; The formula for the multi-objective optimization function is: In the formula, For particles X The fitness values of the corresponding alternative chaotic parameters; For particles X The information entropy of the corresponding alternative chaotic parameters; For particles X The Lyapunov exponents of the corresponding alternative chaotic parameters; X For particle variables, i.e., the position vectors of particles in the multi-objective particle swarm algorithm; The formula for the information entropy function is: In the formula, For particles X The Shannon entropy calculation function for the corresponding alternative chaotic parameters; The formula for the Lyapunov exponential function is as follows: In the formula, For particles X The Lyapunov exponential calculation function for the corresponding alternative chaotic parameters.
6. The data communication method based on a hybrid data encryption algorithm according to claim 5, characterized in that, At the sending end, the target optimal chaotic parameters are selected from the Pareto optimal solution set. A chaotic mapping model configured with the target optimal chaotic parameters is then used to generate a dynamic session key stream, including: Based on the communication mode between the sender and receiver, the TOPSIS method is used to select the target optimal chaotic parameters from the externally archived Pareto optimal solution set. Construct a chaotic mapping model based on the target optimal chaotic parameters; Initial state value The input is a chaotic mapping model configured with the target optimal chaotic parameters. Several chaotic iterations are performed, and the chaotic variables output by each chaotic iteration are quantized to generate an infinitely long bit stream sequence, i.e., a dynamic session key stream.
7. The data communication method based on a hybrid data encryption algorithm according to claim 6, characterized in that, Based on the communication mode between the sender and receiver, the TOPSIS method is used to select the target optimal chaotic parameters from the Pareto optimal solution set, including: Using the TOPSIS method, an initial decision matrix for the Pareto optimal solution set is constructed, and the fitness values of each non-dominated solution in the matrix are normalized to obtain a normalized decision matrix. Based on the communication mode matching parameters of the sending and receiving ends, the weighted parameters are applied to the normalized decision matrix to form a weighted normalized matrix. Define the positive and negative ideal solutions in the weighted normalized matrix, calculate the distance between the Pareto optimal solution set and the positive and negative ideal solutions, and calculate the corresponding relative proximity based on the distance; The non-dominated solution corresponding to the maximum relative proximity in the Pareto optimal solution set is taken as the optimal solution, and the position vector of the optimal solution is decoded to obtain the target optimal chaotic parameters.
8. The data communication method based on a hybrid data encryption algorithm according to claim 7, characterized in that, At the sending end, based on the dynamic session key stream and the standard round key sequence, a symmetric encryption algorithm is used to encrypt the plaintext data to be transmitted, obtaining ciphertext data, which is then sent to the receiving end, including: The standard symmetric encryption original key expansion algorithm is loaded at the sending end to generate a fixed standard round key sequence; The perturbation key is obtained by sequentially extracting a bit stream of the same length as the standard round key from the dynamic session key stream. The perturbation key is divided into a few perturbation key blocks, and an XOR perturbation operation is performed on the standard round key sequence based on the few perturbation key blocks to obtain the dynamic round key used for encryption. Based on the dynamic round key, a hybrid data encryption algorithm is used to encrypt the plaintext data to be transmitted, resulting in ciphertext data; Construct an encrypted data packet of ciphertext data, the encrypted data packet including a data packet header. Optimize indexes Data transmission time and encrypted data And send the encrypted data packet to the receiving end.
9. The data communication method based on a hybrid data encryption algorithm according to claim 8, characterized in that, At the receiving end, the encrypted data is parsed and synchronized. The corresponding target optimal chaotic parameter is matched within the Pareto optimal solution set. Based on the target optimal chaotic parameter, a dynamic session key stream consistent with that of the sending end is generated, including: The receiving end receives encrypted data packets containing ciphertext data and extracts the optimized index from the encrypted data packets. and data transmission time ; Verify data sending time The validity of the encrypted data packet is verified. If the verification passes, proceed to the next step; otherwise, ignore the encrypted data packet. Based on optimized index Match the target optimal chaotic parameters consistent with those of the sender in the Pareto optimal solution set of the local database; Using a chaotic mapping model configured with the target optimal chaotic parameters, a dynamic session key stream is generated, and based on the dynamic session key stream and the standard round key sequence, the dynamic round key consistent with the one that generated the key is restored. Based on the dynamic round key, a hybrid data decryption algorithm is used to decrypt the ciphertext data in the encrypted data packet to obtain the plaintext data.
10. A data communication device based on a hybrid data encryption algorithm, used to implement the data communication method as described in any one of claims 1-9, characterized in that, The device includes: The parameter negotiation unit is used to negotiate parameters based on authentication and timestamps at the sending and receiving ends using asymmetric encryption algorithms, and to calculate the shared session base key. The parameter optimization unit is used to run a multi-objective particle swarm optimization algorithm at the sending and receiving ends based on the session base key to obtain the Pareto optimal solution set of the optimal chaotic parameters. The key stream generation unit is used to filter the target optimal chaotic parameters in the Pareto optimal solution set at the sending end, and generate a dynamic session key stream using a chaotic mapping model configured with the target optimal chaotic parameters. The data encryption unit is used at the sending end to encrypt the plaintext data to be transmitted using a symmetric encryption algorithm based on the dynamic session key stream and the standard round key sequence, to obtain ciphertext data, and then send it to the receiving end. The parsing and synchronization unit is used to parse and synchronize the ciphertext data at the receiving end, match the corresponding target optimal chaotic parameter in the Pareto optimal solution set, and generate a dynamic session key stream consistent with the sending end based on the target optimal chaotic parameter. The data decryption unit is used at the receiving end to decrypt the received ciphertext data using a symmetric decryption algorithm based on the dynamic session key stream and the standard round key, in order to obtain plaintext data.