A chaos-enhanced trusted authentication method based on a vehicle-mounted gateway
By combining improved Tent chaotic mapping and cellular automata, and dynamically perturbing the SM4 wheel constant, efficient and secure identity authentication between the vehicle gateway and the ECU is achieved. This solves the problems of insufficient flexibility and anti-attack capability in communication security in vehicle networks and is suitable for embedded platforms.
Patent Information
- Application Number
- CN202511179876.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-08-22
AI Technical Summary
In existing vehicle networks, the communication security between vehicle gateways and electronic control units suffers from problems such as a lack of flexibility and security in the authentication mechanism, lagging and undynamic key updates, insufficient resistance to attacks by traditional encryption algorithms, and high resource consumption, making them particularly unsuitable for embedded systems.
A chaotic enhanced trusted authentication method based on vehicle gateway is adopted. A chaotic sequence is generated by improving Tent chaotic mapping to dynamically perturb the round constant of SM4 encryption algorithm. The session key is updated synchronously by combining cellular automata and chaotic mapping mechanism, and identity authentication is performed using a two-way challenge-response mechanism.
Significantly enhances anti-attack capabilities, adapts to embedded environments, achieves low computational overhead and real-time performance, strengthens system reliability, prevents malicious node spoofing and key update lag, and improves the anti-analysis capabilities of encryption algorithms.
Smart Images

Figure CN120729503B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of trusted authentication technology, and specifically to a chaotic enhanced trusted authentication method based on an in-vehicle gateway. Background Technology
[0002] Currently, communication security between the vehicle gateway and the electronic control unit (ECU) in vehicular networks has been a key research focus. Most existing authentication schemes rely on traditional symmetric encryption-based authentication mechanisms and key exchange protocols, such as SM4, AES encryption algorithms, and Diffie-Hellman (DH) key exchange.
[0003] While existing authentication schemes can provide basic identity authentication and key exchange functions in certain situations, their application in vehicular network environments remains limited, particularly in terms of resource constraints on embedded platforms, dynamic security requirements, and rapid key updates. The main shortcomings of existing authentication schemes include: lack of flexibility and security in the authentication mechanism; delayed and undynamic key updates; insufficient resistance to attacks by traditional encryption algorithms; high resource consumption, making them unsuitable for embedded systems; and a lack of efficient random number generation and perturbation mechanisms. Summary of the Invention
[0004] To address at least some of the technical problems in related technologies, this invention provides a chaos-enhanced trusted authentication method based on an in-vehicle gateway.
[0005] To achieve the above objectives, the technical solution adopted by this invention is: a chaotic enhanced trusted authentication method based on an in-vehicle gateway, comprising the following steps:
[0006] Step S1: Generate a chaotic sequence using an improved Tent chaotic map, the improvement being achieved by introducing a bit-level perturbation operation based on Hamming weights;
[0007] Step S2: Dynamically perturb the round constant CK of the SM4 encryption algorithm using the chaotic sequence to generate a confused round key;
[0008] Step S3: Based on cellular automata and chaotic mapping mechanism, the session key is updated synchronously between the vehicle gateway and the ECU without the need to transmit the key in plaintext;
[0009] Step S4: Perform identity authentication through a two-way challenge-response mechanism: Step S4-1: The vehicle gateway sends an encrypted challenge frame containing a random number R1 to the ECU; Step S4-2: After decryption, the ECU uses the SipHash function to generate a response frame and returns it, while simultaneously sending a reverse challenge frame containing a random number R2; Step S4-3: After verifying the response frame, the vehicle gateway generates a reverse response frame. After the ECU verifies the response frame, both parties update the session key.
[0010] Optionally, the improvement is achieved by introducing a bit-level perturbation operation based on Hamming weights, specifically including: converting the state quantity output by the Tent map into a 32-bit integer;
[0011] Perform two rounds of cyclic left shift and XOR operations based on Hamming weights on the perturbation factor formed by the integer and the previous round's state:
[0012] Step S1-1: Perform a left rotation operation based on the Hamming weights of the perturbation factor;
[0013] Step S1-2: Perform a bitwise XOR operation on the left-hand rotation result;
[0014] Step S1-3: Perform a left-hand rotation on the XOR result again to obtain the final perturbation result.
[0015] Optionally, in step S2, the dynamic perturbation specifically includes: quantizing the chaotic sequence to generate a pseudo-random sequence to replace the fixed wheel constant sequence in SM4, so as to construct an uncertain wheel constant flow.
[0016] Optionally, in step S3, synchronously updating the session key specifically includes:
[0017] Step S3-1: After each successful authentication, the local counter value CNT of the vehicle gateway and ECU increments automatically;
[0018] Step S3-2: Generate a disturbance value by combining the current local counter value CNT with the ECU's device ID and a random number. The final perturbation value is output through chaotic mapping iteration. ;
[0019] Step S3-3: ... As the initial seed of the cellular automaton, it evolves through several rounds to generate multiple intermediate states.
[0020] Optionally, in step S3-3, the cellular automaton adopts a one-dimensional binary Rule30 evolution rule, which is: the next state is determined by the state of the current cell and its left and right adjacent cells.
[0021] Optionally, the session key is generated by superimposing the 128-bit states of all rounds evolved in step S3-3 using a bitwise XOR method to generate the final 128-bit symmetric key.
[0022] Optionally, a key rollback mechanism is also included: if the number of consecutive authentication failures exceeds a preset threshold, the vehicle gateway and ECU automatically roll back to the state of the last successful authentication, using the counter value. and key Restore to the previous valid value.
[0023] Optionally, step S4 specifically includes:
[0024] Step S4-0-1: When the car is powered on and started, after the ECU node initialization is completed, the vehicle gateway broadcasts a start authentication frame containing the vehicle gateway's unique identifier ID1 and the start authentication command MSG1 to all ECU nodes.
[0025] In step S4-0-2, after receiving the start authentication frame, the ECU node saves ID1 and sends an authentication request frame containing its own device identifier ID2 and authentication request instruction MSG2 to the vehicle gateway.
[0026] In step S4-0-3, after receiving the authentication request frame, the vehicle gateway saves ID2, then generates a random number R1 through a hardware random number generator, encrypts R1 using the key corresponding to ID2 and the improved SM4 algorithm to generate the challenge ciphertext, and sends it to the ECU.
[0027] Step S4-0-4: After receiving the challenge ciphertext from the vehicle gateway, the ECU first decrypts it to obtain a random number R1, and then uses the SipHash function to process the data. The system performs calculations, generates a response frame and returns it to the vehicle gateway. Then, it generates a random number R2 and encrypts R2 using the improved SM4 algorithm to generate a reverse challenge ciphertext, which is then sent to the vehicle gateway.
[0028] Step S4-0-5: After receiving the response frame, the vehicle gateway performs local calculations. The data is then compared with the received response frame for verification. If the verification passes, the vehicle gateway decrypts the reverse challenge ciphertext to obtain R2, and uses the SipHash function to process the data. Perform calculations, generate a reverse response frame and send it to the ECU; if the verification fails, the authentication is terminated.
[0029] Step S4-0-6: After receiving the reverse response frame, the ECU performs local calculations. The verification is then compared with the reverse response frame. If the verification passes, the symmetric encryption key KEY1 is updated based on cellular automata and chaotic mapping, and the calculation is performed. The value is sent to the vehicle gateway; if the verification fails, the authentication process is terminated.
[0030] Optionally, step S4 further includes:
[0031] Step S4-0-7: Calculate the new symmetric encryption key KEY2 locally, then calculate... The value is compared and verified with the value sent by the ECU. Calculation is performed after verification. The message is sent to the ECU, and simultaneously, the local counter CNT is incremented by 1.
[0032] Step S4-0-8, ECU local calculation The value sent by the vehicle gateway is compared and verified. If the verification is successful, the local counter CNT is incremented by 1, thus completing the trusted authentication.
[0033] Optionally, the random number R1 is generated by the vehicle gateway through a hardware random number generator and encrypted using an improved SM4 algorithm before being sent to the ECU; the random number R2 is generated by the ECU through a hardware random number generator and encrypted using an improved SM4 algorithm before being sent to the vehicle gateway.
[0034] Beneficial effects:
[0035] 1. The technical effects achievable by the method of the present invention through the above technical solution include: First, it can significantly improve anti-attack capability and enhance security. Specifically, for anti-spoofing and anti-replay attacks, the two-way challenge-response mechanism in step S4 of the present invention, through dynamic random numbers (R1 / R2) and SipHash verification, can ensure that attackers cannot forge authentication messages. For resisting key analysis attacks, in step S2 of the present invention, the dynamic perturbation of the SM4 round constant using chaotic sequences can break the predictability of the traditional fixed round constant of SM4.
[0036] Secondly, it can be efficiently adapted to embedded environments. Specifically, firstly, it can achieve low computational overhead. In step S1 of this invention, the improved Tent chaotic mapping design is a lightweight bit-level perturbation, using bit operations throughout, requiring no complex mathematical calculations, and adapting to resource-constrained platforms. Secondly, it can guarantee real-time performance. The bidirectional challenge-response mechanism in step S4 and the local key update in step S2 of this invention can avoid the high latency of traditional key negotiation.
[0037] Third, it can effectively enhance system reliability. Specifically, firstly, it can achieve key synchronization without plaintext transmission. This invention achieves implicit key synchronization through cellular automata and chaotic mapping mechanisms, eliminating the need to transmit plaintext keys and avoiding the risks of man-in-the-middle attacks and key leakage. At the same time, the successful authentication event drives local updates, ensuring key consistency between the two parties. Secondly, it can achieve forward security. The dynamic key update mechanism of this invention can ensure the independence of session keys. Even if a key is leaked at some point, attackers cannot decrypt historical communication content. In addition, each round of key updates is independent, preventing key association.
[0038] Fourth, it can effectively address the core deficiencies of vehicular networks. Specifically, regarding the rigidity of the authentication mechanism, the two-way challenge-response mechanism combined with dynamic random numbers in step S4 of this invention can prevent malicious node spoofing. Regarding the lag in key updates, the chaos-driven implicit key update in step S3 of this invention can achieve high-frequency dynamic rotation. Regarding the insufficient resistance to attacks in the encryption algorithm, the SM4 round key chaotic perturbation in step S2 of this invention can improve resistance to analysis.
[0039] 2. Other beneficial effects or advantages of the present invention will be described in detail in the specific embodiments. Attached Figure Description
[0040] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] in:
[0042] Figure 1 This is a flowchart illustrating the steps of a chaotic enhanced trusted authentication method based on an in-vehicle gateway, provided by an exemplary embodiment of the present invention.
[0043] Figure 2 It is the system bifurcation diagram corresponding to the original Tent mapping;
[0044] Figure 3 This is the system bifurcation diagram corresponding to the improved Tent mapping of this invention;
[0045] Figure 4 This is the Shannon entropy map corresponding to the Tent mapping;
[0046] Figure 5 It is the Shannon entropy graph corresponding to the Tent map and cellular automata;
[0047] Figure 6It is the Shannon entropy map corresponding to the Tent mapping + Hamming weight perturbation mechanism;
[0048] Figure 7 This is a schematic diagram of a key update algorithm provided in an exemplary embodiment of the present invention;
[0049] Figure 8 This is a schematic diagram of the overall process of a trusted authentication strategy based on a two-way challenge-response mechanism provided by an exemplary embodiment of the present invention;
[0050] Figure 9 This is a schematic diagram of a trusted authentication algorithm provided in an exemplary embodiment of the present invention;
[0051] Figure 10 This is a schematic diagram illustrating the time consumption of a two-way trusted authentication algorithm provided in an exemplary embodiment of the present invention. Detailed Implementation
[0052] To facilitate a clearer and more accurate understanding of the technical solutions of this invention by those skilled in the art, the existing related technologies and their technical problems will be described in more detail below.
[0053] In vehicular networks, authentication schemes between vehicle gateways and ECUs largely rely on traditional symmetric encryption-based authentication mechanisms and key exchange protocols, such as SM4, AES encryption algorithms, and Diffie-Hellman (DH) key exchange. To ensure communication security, many schemes employ challenge-response (CR) mechanisms to verify the legitimacy of both parties. While these existing technologies can provide basic authentication and key exchange functions in certain situations, their application in vehicular network environments still has limitations, especially in terms of embedded platform resource constraints, dynamic security requirements, and rapid key updates. The shortcomings of existing technologies are mainly reflected in the following aspects:
[0054] First, the authentication mechanism lacks flexibility and security. Traditional authentication schemes, such as CR-based identity verification, can ensure the identities of communicating parties to a certain extent, but they are insufficiently protected against complex security threats such as malicious node spoofing and replay attacks. In vehicular networks, attackers can bypass traditional authentication by impersonating legitimate nodes, leading to the leakage of sensitive information and network security risks.
[0055] Second, key updates are delayed and lack dynamism. In existing authentication mechanisms, key updates are typically performed at fixed intervals, and the key exchange process requires additional communication overhead, making it difficult to adapt to the high-speed, dynamic security requirements of vehicular networks. Furthermore, the use of static keys increases the risk of key leakage, allowing attackers to potentially exploit known key information to attack the network.
[0056] Third, traditional encryption algorithms lack sufficient resistance to attacks. Although symmetric encryption algorithms such as SM4 and AES are widely used in vehicular networks, existing encryption algorithms are often based on fixed key scheduling methods, which makes the encryption process somewhat predictable for attackers. Especially in vehicular networks, the system is vulnerable to analytical attacks such as differential attacks, and traditional encryption methods lack sufficient resistance and flexibility.
[0057] Fourth, resource consumption is high. Most existing encryption algorithms and authentication protocols rely on devices with high computing power. When applied to resource-constrained embedded platforms (vehicle gateways and ECUs), this results in a significant computational burden, leading to slower response times and even impacting system real-time performance and efficiency. Furthermore, traditional DH / ECDH key update mechanisms and authentication processes can incur substantial computational overhead.
[0058] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0059] like Figures 1 to 10 As shown, this invention provides a chaos-enhanced trusted authentication method based on an in-vehicle gateway, comprising the following steps:
[0060] Step S1: Generate a chaotic sequence using an improved Tent chaotic map, the improvement being achieved by introducing a bit-level perturbation operation based on Hamming weights;
[0061] Step S2: Dynamically perturb the round constant CK of the SM4 encryption algorithm using the chaotic sequence to generate a confused round key;
[0062] Step S3: Based on cellular automata and chaotic mapping mechanism, the session key is updated synchronously between the vehicle gateway and the ECU without the need to transmit the key in plaintext;
[0063] Step S4: Perform identity authentication via a two-way challenge-response mechanism:
[0064] Step S4-1: The vehicle gateway sends an encrypted challenge frame containing a random number R1 to the ECU;
[0065] Step S4-2: After the ECU decrypts, it uses the SipHash function to generate a response frame and returns it, while simultaneously sending a reverse challenge frame containing a random number R2;
[0066] Step S4-3: After the vehicle gateway verifies the response frame, it generates a reverse response frame. After the ECU verifies the frame, both parties update the session key.
[0067] Through the above technical solutions, the technical effects achieved by the method of the present invention include: First, it can significantly improve anti-attack capabilities and enhance security. Specifically, regarding anti-spoofing and anti-replay attacks, the two-way challenge-response mechanism in step S4 of the present invention, through dynamic random numbers (R1 / R2) and SipHash verification, can ensure that attackers cannot forge authentication messages. For example, if an attacker cannot obtain the fresh random number for this authentication, the old replay message will become an invalid message. At the same time, the response values of the gateway and the ECU depend on the shared key and the random number, preventing attackers from forging legitimate identities. Regarding resistance to key analysis attacks, in step S2 of the present invention, the dynamic perturbation of the SM4 round constant using chaotic sequences can break the predictability of the traditional fixed round constant of SM4. This is because the uncertainty of chaotic systems makes the encryption process difficult to predict, thereby improving the resistance to differential attacks. At the same time, the improved SM4 round key obfuscation mechanism can effectively improve the overall encryption's resistance to analysis.
[0068] Secondly, it can be efficiently adapted to embedded environments. Specifically, firstly, it can achieve low computational overhead. In step S1 of this invention, the improved Tent chaotic mapping design is a lightweight bit-level perturbation, using bit operations throughout, requiring no complex mathematical calculations, and adapting to resource-constrained platforms. Secondly, it can guarantee real-time performance. The bidirectional challenge-response mechanism in step S4 and the local key update in step S2 of this invention can avoid the high latency of traditional key negotiation.
[0069] Third, it can effectively enhance system reliability. Specifically, firstly, it can achieve key synchronization without plaintext transmission. This invention achieves implicit key synchronization through cellular automata and chaotic mapping mechanisms, eliminating the need to transmit plaintext keys and avoiding the risks of man-in-the-middle attacks and key leakage. At the same time, the successful authentication event drives local updates, ensuring key consistency between the two parties. Secondly, it can achieve forward security. The dynamic key update mechanism of this invention can ensure the independence of session keys. Even if a key is leaked at some point, attackers cannot decrypt historical communication content. In addition, each round of key updates is independent, preventing key association.
[0070] Fourth, it can effectively address the core deficiencies of vehicular networks. Specifically, regarding the rigidity of the authentication mechanism, the two-way challenge-response mechanism combined with dynamic random numbers in step S4 of this invention can prevent malicious node spoofing. Regarding the lag in key updates, the chaos-driven implicit key update in step S3 of this invention can achieve high-frequency dynamic rotation. Regarding the insufficient resistance to attacks in the encryption algorithm, the SM4 round key chaotic perturbation in step S2 of this invention can improve resistance to analysis.
[0071] The following detailed description of an exemplary embodiment of the present invention is provided in conjunction with the accompanying drawings.
[0072] I. Design of Chaos Enhancement Mechanism for Authentication
[0073] 1. Improve Tent mapping
[0074] When deploying chaotic systems on embedded platforms, in addition to requiring good chaotic properties, computational efficiency and resource consumption must also be considered. To select the most suitable one-dimensional chaotic mapping for embedded applications, this invention evaluated the performance of nine typical chaotic mapping functions, including Logistic, Tent, Sine, Piecewise, Bernoulli, PWLCM, Cubic, and two improved forms of piecewise Logistic. The time taken for each mapping to undergo 50,000 iterations was statistically analyzed using a DWT clock cycle counter, and the results are shown in Table 1. The test results show that the average iteration time of the Tent mapping is 0.62 μs, significantly lower than that of common chaotic systems such as Logistic and Sine, demonstrating higher embedded adaptability.
[0075] Table 1. Comparison of time consumption for common one-dimensional chaotic mappings
[0076]
[0077] The formula for traditional Tent mapping is: While complete chaos can be achieved with a control parameter r=2.0, its structure is simplistic and lacks additional security enhancement mechanisms, making it difficult to meet the higher requirements of practical authentication systems for perturbation, unpredictability, and ergodicity. Therefore, this invention proposes a Tent chaotic system based on the Hamming Confuse perturbation mechanism. This mechanism converts the state variables generated by the Tent mapping into 32-bit integers, and then performs two rounds of cyclic left shift and XOR operations with the perturbation factor formed by the previous round's states, based on Hamming weights, to achieve dynamic bit-level perturbation. This design not only maintains the efficiency and chaos of the original Tent mapping but also effectively enhances the perturbation diffusion of the output sequence.
[0078] The Hamming Confuse transform is a perturbation mechanism based on Hamming weights. Its principle is to calculate the Hamming weights of input values A and B, and then generate a new perturbation value using left rotation and XOR operations. First, the Hamming weights of A and B are calculated as wa and wb, respectively. Then, A is left-rotated by wb%32 bits to obtain the rotated value A_rot1, where % represents the modulo operation (a commonly used notation in programming languages). Next, A_rot1 is XORed with B to obtain an intermediate result C. Finally, C is left-rotated by wa%32 bits to obtain the final perturbation result C_rot. In this way, the Hamming Confuse transform effectively increases the uncertainty and complexity of the data, thereby enhancing system security, especially in chaotic systems, providing stronger protection and resistance to attacks.
[0079] Please see Figure 2 and Figure 3 ,exist Figure 2 and Figure 3 In the diagram, the vertical axis x represents the value of x after a certain number of iterations (where x represents the state reached by the mapping function after a sufficient number of iterations with fixed control parameters and an initial value of 0.5). By comparing the bifurcation diagrams of the system before and after the perturbation, it can be observed that after introducing the Hamming Confuse mechanism, the state distribution of the Tent mapping within the parameter interval r∈[1.0,2.0] is more uniform, significantly improving the problem of insufficient ergodicity of the original Tent in the low parameter interval. After the improved system converges iteratively, its output state can almost cover the entire real number interval [0,1], effectively improving the diffusion and unpredictability of the pseudo-random sequence, and providing security guarantees for key perturbation and challenge construction in the authentication process.
[0080] Shannon entropy is an important concept used to measure the uncertainty or information content of a random variable. When assessing the randomness of chaotic systems, it provides a quantitative indicator of the complexity of their output sequence. A high entropy value in the output sequence of a chaotic system indicates strong randomness, making it suitable for applications such as cryptography and random number generation. For a discrete random variable X, its information entropy H(X) is given by the following formula:
[0081]
[0082] in, It is the discretized value. Let be the probability of occurrence, and be the number of distinct values after discretization. When applying this formula, the output sequence of the chaotic system first needs to be discretized. For the improved Tent mapping in this invention, discrete sequence values are obtained by mapping the continuous output x_n∈[0,1) to several discrete intervals. Then, the probability distribution is calculated based on the frequency of occurrence of each discrete value. Once the probability distribution is obtained... Then, the values can be substituted into the formula to calculate the information entropy. This process can quantify the randomness of the output sequence; the higher the entropy value, the stronger the randomness and unpredictability of the sequence.
[0083] Please see Figures 4 to 6 The results show that the original Tent mapping, with initial value x=0.5 and parameter r=1.99, generates a 10,000-point sequence with a Shannon entropy of 7.7456 bits, reflecting to some extent the skewness and structural bias in its output. After introducing cellular automata perturbation, the entropy increases to 7.8542 bits, indicating a significant improvement in its pseudo-randomness and distribution uniformity. Furthermore, the Tent chaotic system based on the Hamming weight perturbation mechanism further increases the entropy to 7.9810 bits, significantly approaching the theoretical upper limit of full entropy (8 bits), demonstrating that this mechanism can significantly enhance the statistical randomness and unpredictability of chaotic sequences.
[0084] 2. Improved SM4 encryption algorithm
[0085] Block ciphers are a commonly used encryption method widely applied in data encryption. To enhance information security, ensuring a sufficiently large key space for the initial key is crucial. To address the threat posed by quantum computers to short keys, this invention proposes a key expansion algorithm based on an improved Tent chaotic map. This algorithm effectively increases the key space and improves encryption security by incorporating the improved Tent chaotic map into the round key confusion step of the SM4 key expansion process.
[0086] In this algorithm, quantization is generated through chaotic mapping. This improves the round key expansion process of SM4 by using a value that enhances the key expansion scheme, resulting in a key expansion scheme based on an improved Tent mapping. This improvement offers the following advantages:
[0087] First, the improved Tent mapping introduces the uncertainty and nonlinearity of chaotic systems, making key expansion more complex and effectively resisting differential attacks.
[0088] Second, because The value can be pre-generated before encryption, thus saving computation time during the encryption process.
[0089] Third, the chaotic system is only used to confuse the round keys, so it does not change the original key expansion framework, and at the same time ensures that the encryption and decryption processes still use the same algorithm structure, without consuming additional resources.
[0090] 3. Key update mechanism based on cellular automata and chaos
[0091] In symmetric authentication systems, the key update strategy directly affects communication security and system performance. In embedded devices, traditional key exchange algorithms such as Diffie-Hellman (DH) and Elliptic Curve Diffie-Hellman (ECDH), while possessing good cryptographic security, have certain limitations in practical deployment. First, DH and ECDH rely on complex mathematical calculations involving large integers or elliptic curves, placing high demands on computational resources and runtime. Furthermore, these algorithms typically require the use of third-party cryptographic libraries such as OpenSSL and mbedTLS, which not only increases system integration complexity but may also introduce additional burdens such as portability issues. To avoid the security risks and communication burdens caused by frequent key exchanges, this invention designs a local key update mechanism that combines chaotic mapping and cellular automata. This mechanism does not require the transmission of plaintext keys, relying solely on successful authentication events to drive state synchronization, exhibiting good initial value sensitivity and unpredictability, and is suitable for resource-constrained embedded devices.
[0092] Please see Figure 7 The key update algorithm process of the present invention may specifically include:
[0093] Step 1: After each successful authentication, the local counter CNT (i.e., Counter) of both parties increments. The counter acts as a perturbation source to drive changes in the chaotic system, ensuring the uniqueness of the input state in each round of key update.
[0094] Step 2: Generate an initial disturbance value by combining the current counter value CNT with the ECU's device ID and the random number R1. This is then used as input to the chaotic mapping system, iterating for several rounds to enhance the nonlinearity and initial value sensitivity of the chaotic output, ultimately yielding the final perturbation value. .
[0095] Step 3, This seed serves as the initial seed for the Rule30 cellular automaton, ensuring good uniformity and sensitivity. It evolves through several rounds to generate multiple intermediate states. The 128-bit states from all rounds are then XORed to generate the final 128-bit symmetric key. This method can effectively enhance diffusivity and reduce the complexity of the key space.
[0096] Step 4: To ensure the consistency of the keys generated by both parties, the gateway can send a verification tag. The ECU locally calculates and compares the key synchronization status to prevent communication failures or security risks caused by incorrect key usage. It is generated The SipHash calculation value of the ECU ID, It is a key hash function (which is a pseudo-random function optimized for short message speed).
[0097] Step 5: If consecutive authentication failures exceed the threshold N, both parties will automatically roll back to the state of the last successful authentication, including the counter. and key This ensures that subsequent authentication is re-established on a synchronized state.
[0098] The key update time and update time of the DH algorithm and ECDH algorithm of the present invention can be found in Table 2 below.
[0099] Table 2 Key Update Algorithm Time Consumption Table
[0100]
[0101] The algorithm of this invention has the following advantages:
[0102] First, no plaintext key exchange is required: the entire key update process is based on the synchronization of counters and authentication status between the two parties, avoiding the transmission of intermediate key values or public keys during key negotiation, and resisting man-in-the-middle attacks and replay attacks.
[0103] Second, it has extremely low computational overhead and is compatible with embedded platforms: the core components include improved Tent mapping and Rule30 cell evolution, both of which can be implemented with simple bit operations, and the typical update latency is on the order of microseconds, which is better than the time consumption of DH / ECDH.
[0104] Third, it avoids high randomness and key space complexity: by introducing an initial value-sensitive chaotic mapping system, and combining hashing and cellular automata iterative superposition to enhance diffusion, it can effectively prevent key periodicity or weak entropy problems, and ensure the security and unpredictability of symmetric keys.
[0105] Fourth, it has strong stateless fault tolerance: it is designed with an authentication failure rollback mechanism, which can restore the system to the previous synchronization state when an authentication failure occurs, thereby enhancing the system's robustness.
[0106] In summary, compared with the traditional DH / ECDH key negotiation mechanism, the local cellular automaton + chaotic key evolution mechanism proposed in this invention significantly improves computational efficiency and embedded adaptability, and is particularly suitable for scenarios requiring high-frequency authentication and key rotation between vehicle gateways and ECU nodes.
[0107] In the section "I. Design of a Chaotic Enhancement Mechanism for Authentication" above, this invention designs and optimizes a key update mechanism based on chaotic mapping and cellular automata, aiming to provide an efficient, secure, and adaptable local key update scheme for embedded authentication systems. First, the Tent mapping is introduced and improved through a Hamming weight perturbation mechanism to enhance its randomness and unpredictability. Compared with traditional methods such as Logistic mapping, Sine mapping, and Tent mapping perturbed by cellular automata, the improved Tent scheme exhibits significant advantages in performance and randomness, especially in terms of low computational overhead and high efficiency on embedded platforms.
[0108] The following paper proposes a local key update mechanism combining an improved Tent chaotic system and a Rule30 cellular automaton. This scheme generates a chaotic perturbation source based on the CNT and device ID by incrementing a CNT counter with each authentication event, and then evolves this perturbation using a cellular automaton to generate a 128-bit SM4 symmetric encryption key. Experimental evaluations demonstrate the high efficiency and low latency of this scheme on embedded devices, making it suitable for resource-constrained platforms.
[0109] II. Design of a Trusted Authentication Strategy Based on a Two-Way Challenge-Response Mechanism (For the overall design of the trusted authentication strategy, please refer to...) Figure 9 )
[0110] In vehicular networks, to ensure the security of node communication and prevent attacks from malicious nodes, this invention designs an authentication strategy based on a two-way challenge-response mechanism. This authentication strategy is mainly used for identity authentication between the gateway and the ECU, ensuring the reliability of each node's identity and preventing malicious nodes from impersonating legitimate nodes to steal sensitive information. The detailed process of the trusted authentication based on the two-way challenge-response mechanism designed in this invention is as follows: Figure 9 As shown.
[0111] For example, the steps of the trusted authentication process can be found in [reference needed]. Figure 8 As shown, it specifically includes:
[0112] Step 1: When the vehicle is powered on and the ECU node has completed initialization, the onboard gateway sends a broadcast frame. The frame data segment contains the Start Authentication MSG1 and the gateway's unique node identifier ID1. This frame is used to notify other nodes in the network that the authentication process is ready, the gateway is ready to perform authentication, and nodes can begin authentication.
[0113] Step 2: After receiving the start authentication frame, the ECU node saves the gateway's node identifier ID1, and then sends an authentication request frame to the gateway. The data segment in the request frame is MSG2 and the ECU's unique device identifier ID2, indicating that it is ready to participate in authentication.
[0114] Step 3: After receiving the authentication request frame from the ECU, the gateway saves the device identifier ID2. Then, the gateway generates a random number R1 using a hardware random number generator (TRNG), encrypts it using the key corresponding to ID2 and the improved SM4 algorithm, generates a challenge ciphertext, and sends the ciphertext to the node as a challenge.
[0115] Step 4: After receiving the challenge frame from the gateway, the ECU node first decrypts the challenge message using the locally stored key to obtain a random number R1. Then, the ECU node uses the pre-agreed SipHash function to calculate the data (ID2||R1), generates a response frame, and returns it to the gateway. Next, the node generates a random number R2 and encrypts it using the improved SM4 algorithm to generate a reverse challenge ciphertext, which is then sent to the gateway. The SipHash key can be either the SM4 key or configured at the factory.
[0116] Step 5: After receiving the response frame from the ECU node, the gateway uses the SipHash function to generate verification data for ID2 and R1, and verifies the consistency between the response frame and the verification data. If the verification passes, the gateway decrypts to obtain R2, then uses the SipHash function to process the data (ID1||R2) to generate a reverse response frame and sends it to the ECU node. If the verification fails, the authentication process is terminated and the exception information is recorded.
[0117] Step 6: After receiving the gateway's reverse response frame, the ECU node begins verifying the gateway's response frame. First, it generates verification data locally using the SipHash function, then verifies the consistency between the gateway's response frame and the verification data. If the verification passes, it indicates that the two-way authentication between the gateway and the node has been successfully completed. Subsequently, it updates the symmetric encryption key KEY based on cellular automata and chaotic mapping, calculates the SipHash(KEY||R1) value, and sends it to the gateway. If the authentication fails, it terminates the authentication process and records the exception information.
[0118] Step 7: The gateway receives the response frame, calculates the new symmetric encryption key KEY, then calculates the SipHash(KEY||R1) value, verifies and checks the consistency between the response frame and the verification data. If the verification passes, it calculates and sends SipHash(KEY||R2) to the ECU node, and increments the local CNT count by one.
[0119] Step 8: The ECU node receives the response frame and verifies the value of SipHash(KEY||R2). If the verification passes, it indicates that the key update is successful, the local CNT count is incremented by one, and this trusted authentication ends. Both parties can use the updated key for subsequent symmetric encrypted communication.
[0120] Based on the above technical solution, the present invention can achieve the following beneficial effects:
[0121] First, it ensures physical two-way security. According to the authentication steps of this scheme, the gateway initiates the authentication process by generating and encrypting a random number R1 and sending it to the ECU. After decryption, the ECU calculates a SipHash value based on the identifier ID and R1 and returns it as a response. Subsequently, the gateway verifies the correctness of this response and receives an encrypted random number R2 from the ECU. After decrypting R2, the gateway calculates the SipHash value and returns it, allowing the ECU to verify the gateway's legitimacy, thus securely completing the entire two-way authentication process. Furthermore, all key authentication elements (such as R1 and R2) are protected by a dynamically updated symmetric key during the session, generated based on chaotic mappings and cellular automata. Even if an attacker physically compromises the device and obtains the current key, it is difficult to deduce subsequent keys and forge valid authentication messages. Therefore, attackers lacking synchronized key states and dynamic authentication data cannot impersonate legitimate nodes.
[0122] Secondly, it ensures forward security. In this scheme, after each successful authentication, the gateway and ECU jointly update the shared key based on the session counter (CNT), the device identifier (ID), and a newly generated random number. Since each round's session key is generated independently, and the random number is encrypted during transmission, even if the current key is leaked, it cannot affect any past sessions. Therefore, this design guarantees that even if the key is exposed at some point, the previously exchanged authentication data remains protected and cannot be cracked.
[0123] Third, it effectively defends against replay attacks. In this scheme, each round of authentication uses a newly generated session key and a random number R1, and R1 is encrypted before being sent. If an attacker cannot obtain the latest key, they cannot recover or reuse R1, rendering the replayed message invalid. Furthermore, since the shared key evolves after each successful authentication, messages encrypted with an expired key are inconsistent with the current session state and will therefore be rejected during verification, thus providing resistance to replay attacks.
[0124] Fourth, it effectively defends against desynchronization attacks. Such attacks typically manifest in two forms: tampering with messages to cause inconsistencies in key updates between the gateway and the ECU, or blocking critical messages (such as acknowledgment frames) to hinder key synchronization. In this scheme, all authentication messages are encrypted and include integrity checks, ensuring that tampered messages cannot pass verification and will not trigger erroneous updates. If an attacker blocks key update messages, the protocol will be terminated, and both parties retain the previous key state, thus avoiding desynchronization. Furthermore, if an attacker causes a shift in the session counter (CNT) and results in consecutive authentication failures, the system will automatically roll back to the last successful state (including the counter and session key) to re-establish synchronization.
[0125] III. Experimental Verification
[0126] To verify the randomness of the improved SM4 algorithm and the implementation effect of the authentication strategy based on Tent-HC mapping and cellular automata designed in this invention, this invention first conducted a NIST-based randomness test on the round key of the improved SM4 algorithm in a Linux environment. Then, a CAN-FD network was built based on the NXP S32K344 evaluation and test development board to verify the authentication strategy between the vehicle gateway and ECU node designed in this invention. The performance of the authentication process in the CAN network was analyzed through repeated experiments.
[0127] Specifically, the experimental process is explained below with reference to the accompanying drawings.
[0128] 1. Experimental Environment. First, a CLion development environment was configured under a Windows operating system. The platform used was a workstation equipped with an Intel i9-13900HX processor (@2.20GHz), 32 GB of DDR5 memory, and running Windows 11 (64-bit). This platform was primarily used for the development and testing of improvements to the Tent chaotic mapping and SM4 encryption algorithms. Subsequently, the driver software and application software for the S32K344 chip (the S32K344, with its superior performance, rich peripheral interfaces, and flexible power management, is particularly suitable for demanding automotive control systems and embedded applications) were developed, debugged, and programmed using the S32 Design Studio for S32 Platform development environment.
[0129] 2. Randomness Test. To verify the pseudo-randomness of the chaotic sequences generated by the improved Tent mapping, this invention employs the NIST randomness test method. Each NIST test corresponds to a P_value (significance probability value). A P_value ∈ (α, 1) indicates that the sequence passes that test, where α is typically set to 0.01. Only sequences that pass all 15 tests are considered to have passed the NIST test.
[0130] To test the pseudo-randomness of the round key sequence after the improved Tent mapping, this invention selects a chaotic parameter r=1.999, with an initial value of 0.654321, and a key of 0123456789abcdeffedcba987654321. From the iterated round key sequence, 1,000,000 chaotic sequences are selected sequentially, and these sequences are binarized and used as input for the NIST test. BlockLength is set to 32, and other parameters remain at their default values.
[0131] To ensure the accuracy and generalizability of the test results, 100 random numbers were generated using a pseudo-random function, with a chaos parameter r=1.99 and a key of 0123456789abcdeffedcba987654321. These 100 random numbers were then used to generate 100 sets of byte sequences using an improved Tent chaotic system. The first 1,000,000 chaotic sequences were selected sequentially and binarized, serving as input for the SP800-22 standard test. The Block Length was set to 32, while other parameters remained at their default values. The minimum value of each test item was listed for the 100 sets of pseudo-random sequences during the test. A test value greater than 0.01 indicated that the test was passed.
[0132] The test results are shown in Table 3 below. The results show that the generated sequence successfully passed all 15 criteria of the NIST randomness test, proving that the chaotic sequence generated by the improved Tent mapping possesses sufficient randomness and can be effectively used to construct pseudo-random CK sequences.
[0133] Table 3 NIST Test Results
[0134]
[0135] IV. Experimental Testing and Analysis of Authentication Strategy Based on Two-Way Challenge-Response Mechanism
[0136] This experiment evaluates the authentication time of the proposed authentication strategy under different conditions by simulating the communication process between the in-vehicle gateway and the ECU. The main objective of the experiment is to verify whether the designed authentication strategy can meet the real-time requirements of in-vehicle networks in practical applications while ensuring security. Authentication time refers to the total time required from the start to the completion of the authentication process, including message exchange between the gateway and the ECU, encryption and decryption operations, key updates, and the authentication verification process. This test aims to evaluate whether the authentication strategy can respond in real time in an in-vehicle network environment, especially on resource-constrained embedded platforms.
[0137] During the experiment, the MCU's built-in DWT (Data Watchpoint and Trace) timer was used to accurately measure the authentication process time. The experiment was repeated 20 times, and the time complexity of the authentication process between the two nodes was calculated in each experiment. The experimental results are as follows: Figure 10 As shown.
[0138] Analysis of the experimental data shows that the average authentication time is approximately 7.5ms, fully meeting the real-time requirements of vehicular networks. This low authentication time is attributed to several optimizations. First, the SM4 encryption algorithm itself has low computational complexity, enabling rapid encryption and decryption operations in vehicular networks, significantly reducing the time overhead associated with encryption and decryption. Furthermore, the introduction of the SipHash hash algorithm also significantly improves authentication efficiency. It quickly generates authentication response values and has high collision resistance, ensuring message integrity without adding additional computational burden. The optimization of the authentication process also benefits from the improved efficiency of the Tent chaotic map and cellular automata. The combination of chaotic map and cellular automata improves the efficiency of key updates and perturbations, and these operations mostly rely on simple and fast local computations, avoiding complex global computations, thus further reducing computation time. Finally, the authentication strategy based on a bidirectional CR mechanism further optimizes the communication and computational overhead in the authentication process. The challenge-response mechanism employs a concise message exchange method and low-complexity verification operations, enabling the authentication process to be completed quickly.
[0139] Experimental results show that the authentication strategy proposed in this invention fully meets the real-time requirements of the in-vehicle network environment while ensuring the security of in-vehicle network communication. Especially on resource-constrained embedded platforms, the authentication process is completed with low computational overhead and high efficiency, providing reliable support for secure communication between the in-vehicle gateway and the ECU.
[0140] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A chaotic enhanced trusted authentication method based on an in-vehicle gateway, characterized in that, Includes the following steps: Step S1: Generate a chaotic sequence using an improved Tent chaotic map, the improvement being achieved by introducing a bit-level perturbation operation based on Hamming weights; Step S2: Dynamically perturb the round constant CK of the SM4 encryption algorithm using the chaotic sequence to generate a confused round key; Step S3: Based on cellular automata and chaotic mapping mechanism, the session key is updated synchronously between the vehicle gateway and the ECU without the need to transmit the key in plaintext; Step S4: Perform identity authentication via a two-way challenge-response mechanism: Step S4-1: The vehicle gateway sends an encrypted challenge frame containing a random number R1 to the ECU; Step S4-2: After the ECU decrypts, it uses the SipHash function to generate a response frame and returns it, while simultaneously sending a reverse challenge frame containing a random number R2; Step S4-3: After the vehicle gateway verifies the response frame, it generates a reverse response frame. After the ECU verifies the frame, both parties update the session key. The improvement is achieved by introducing bit-level perturbation operations based on Hamming weights, specifically including: Convert the state values output by the Tent mapping to 32-bit integers; Perform two rounds of cyclic left shift and XOR operations based on Hamming weights on the perturbation factor formed by the integer and the previous round's state: Step S1-1: Perform a left rotation operation based on the Hamming weights of the perturbation factor; Step S1-2: Perform a bitwise XOR operation on the left-hand rotation result; Step S1-3: Perform a left-hand rotation on the XOR result again to obtain the final perturbation result; Step S4 specifically includes: Step S4-0-1: When the car is powered on and started, after the ECU node initialization is completed, the vehicle gateway broadcasts a start authentication frame containing the vehicle gateway's unique identifier ID1 and the start authentication command MSG1 to all ECU nodes. In step S4-0-2, after receiving the start authentication frame, the ECU node saves ID1 and sends an authentication request frame containing its own device identifier ID2 and authentication request instruction MSG2 to the vehicle gateway. In step S4-0-3, after receiving the authentication request frame, the vehicle gateway saves ID2, then generates a random number R1 through a hardware random number generator, encrypts R1 using the key corresponding to ID2 and the improved SM4 algorithm to generate challenge ciphertext, and sends it to the ECU. Step S4-0-4: After receiving the challenge ciphertext from the vehicle gateway, the ECU first decrypts it to obtain a random number R1, and then uses the SipHash function to process the data. The system performs calculations, generates a response frame and returns it to the vehicle gateway. Then, it generates a random number R2 and encrypts R2 using the improved SM4 algorithm to generate a reverse challenge ciphertext, which is then sent to the vehicle gateway. Step S4-0-5: After receiving the response frame, the vehicle gateway performs local calculations. The data is then compared with the received response frame for verification. If the verification passes, the vehicle gateway decrypts the reverse challenge ciphertext to obtain R2, and uses the SipHash function to process the data. Perform calculations, generate a reverse response frame and send it to the ECU; if the verification fails, the authentication is terminated. Step S4-0-6: After receiving the reverse response frame, the ECU performs local calculations. The verification is then compared with the reverse response frame. If the verification passes, the symmetric encryption key KEY1 is updated based on cellular automata and chaotic mapping, and the calculation is performed. The value is sent to the vehicle gateway; if the verification fails, the authentication process is terminated.
2. The chaotic enhanced trusted authentication method based on an in-vehicle gateway according to claim 1, characterized in that, In step S2, the dynamic disturbance specifically includes: The chaotic sequence is quantized to generate a pseudo-random sequence to replace the fixed wheel constant sequence in SM4, so as to construct an uncertain wheel constant flow.
3. The chaotic enhanced trusted authentication method based on an in-vehicle gateway according to claim 1, characterized in that, In step S3, the synchronous update of the session key specifically includes: Step S3-1: After each successful authentication, the local counter value CNT of the vehicle gateway and ECU increments automatically; Step S3-2: Generate a disturbance value by combining the current local counter value CNT with the ECU's device ID and a random number. The final perturbation value is output through chaotic mapping iteration. ; Step S3-3: ... As the initial seed of the cellular automaton, it evolves through several rounds to generate multiple intermediate states.
4. The chaotic enhanced trusted authentication method based on an in-vehicle gateway according to claim 3, characterized in that, In step S3-3, the cellular automaton uses a one-dimensional binary Rule30 evolution rule, which is: the next state is determined by the state of the current cell and its left and right adjacent cells.
5. The chaotic enhanced trusted authentication method based on an in-vehicle gateway according to claim 4, characterized in that, The session key is generated by superimposing the 128-bit states of all rounds evolved in step S3-3 using a bitwise XOR method to generate the final 128-bit symmetric key.
6. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 5, characterized in that, It also includes a key rollback mechanism: If the number of consecutive authentication failures exceeds a preset threshold, the vehicle gateway and ECU will automatically roll back to the state of the last successful authentication, using the counter value. and key Restore to the previous valid value.
7. The chaotic enhanced trusted authentication method based on an in-vehicle gateway according to claim 1, characterized in that, Step S4 further includes: Step S4-0-7: Calculate the new symmetric encryption key KEY2 locally, then calculate... The value is compared and verified with the value sent by the ECU. Calculation is performed after verification. The message is sent to the ECU, and simultaneously, the local counter CNT is incremented by 1. Step S4-0-8, ECU local calculation The value sent by the vehicle gateway is compared and verified. If the verification is successful, the local counter CNT is incremented by 1, thus completing the trusted authentication.
8. The chaotic enhanced trusted authentication method based on a vehicle gateway according to claim 1, characterized in that, The random number R1 is generated by the vehicle gateway through a hardware random number generator and encrypted using the improved SM4 algorithm before being sent to the ECU; the random number R2 is generated by the ECU through a hardware random number generator and encrypted using the improved SM4 algorithm before being sent to the vehicle gateway.
Citation Information
Patent Citations
Communication secrecy circuit design method based on public chaos stream password encryption
CN113343609A
Data encryption method and device, equipment and medium
CN120263411A