Chaos enhanced credible authentication method based on vehicle-mounted gateway
By using the improved Tent chaotic map and cellular automaton, combined with the dynamic perturbation and two-way challenge-response mechanism of the SM4 encryption algorithm, the problems of insufficient flexibility and anti-attack capability of communication security in vehicle networks are solved, and efficient and secure key update and identity authentication are achieved.
Patent Information
- Application Number
- CN202511179876.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-22
AI Technical Summary
In existing vehicle networks, the communication security between the vehicle gateway and the electronic control unit has problems such as lack of flexibility and security in the authentication mechanism, delayed and lack of dynamic key updates, insufficient anti-attack capabilities of traditional encryption algorithms, and high resource consumption.
A chaos-enhanced trusted authentication method based on vehicle-mounted gateway is adopted. The improved Tent chaotic map is used to generate a chaotic sequence, which is used to dynamically perturb the round constant of the SM4 encryption algorithm. The cellular automaton and chaotic mapping mechanism are combined to synchronously update the session key, and a two-way challenge-response mechanism is used to perform identity authentication.
Significantly improve anti-attack capabilities, adapt to embedded environments, achieve low computing overhead and real-time performance, enhance system reliability, prevent malicious node disguise and key update delays, and improve the anti-analysis capabilities of encryption algorithms.
Smart Images

Figure CN120729503A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of trusted authentication, and in particular to a chaos-enhanced trusted authentication method based on an on-board gateway. Background Art
[0002] Currently, communication security between the vehicle gateway and the electronic control unit (ECU) in in-vehicle networks has been a key research focus. Existing authentication schemes mostly rely on traditional symmetric encryption-based identity 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 in-vehicle network environments remains limited, particularly in the resource constraints of embedded platforms, dynamic security requirements, and rapid key updates. Key drawbacks of existing authentication schemes include: a lack of flexibility and security in authentication mechanisms; delayed and undynamic key updates; insufficient attack resistance of 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] In order to solve at least some of the technical problems in the related art, the present invention provides a chaos-enhanced trusted authentication method based on a vehicle-mounted gateway.
[0005] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a chaos-enhanced trusted authentication method based on an in-vehicle gateway, comprising the following steps: Step S1: Generate a chaotic sequence using an improved Tent chaotic map, wherein the improvement is 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 an obfuscated round key; Step S3: Based on the cellular automaton and chaotic mapping mechanism, the session key is synchronously updated between the vehicle gateway and the ECU without the need to transmit the key in plain text; Step S4: Perform identity authentication through a two-way challenge-response mechanism: Step S4-1: The vehicle gateway sends an encrypted challenge frame containing the 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 sending a reverse challenge frame containing the random number R2; Step S4-3: The vehicle gateway verifies the response frame and generates a reverse response frame. After the ECU verification is successful, both parties update the session key.
[0006] Optionally, the improvement is implemented by introducing a bit-level perturbation operation based on Hamming weights, specifically comprising: converting the state quantity output by the Tent mapping into a 32-bit integer; Perform two rounds of cyclic left shift and XOR operations based on Hamming weight on the perturbation factor formed by the integer and the previous state: Step S1-1: Perform a left rotation operation according to the Hamming weight value of the perturbation factor; Step S1-2: Perform a bitwise XOR operation on the left-rotation result; Step S1-3: Perform a left rotation operation on the XOR result again to obtain the final disturbance result.
[0007] Optionally, in step S2, the dynamic perturbation specifically includes: quantizing the chaotic sequence to generate a pseudo-random sequence to replace the fixed round constant sequence in SM4, so as to construct an uncertain round constant flow.
[0008] Optionally, in step S3, synchronously updating the session key specifically includes: Step S3-1: After each successful authentication, the local counter value CNT of the vehicle gateway and ECU is incremented; Step S3-2: Generate a disturbance value using the current local counter value CNT combined with the ECU's device ID and random number , after chaotic mapping iteration, the final disturbance value is output ; Step S3-3: As the initial seed of the cellular automaton, it evolves for several rounds to generate multiple intermediate states.
[0009] Optionally, in step S3-3, the cellular automaton adopts a one-dimensional binary Rule30 rule to evolve, and the evolution rule is: using the states of the current cell and its left and right adjacent cells to jointly determine the next state.
[0010] Optionally, the session key is generated by superimposing the 128-bit states of all rounds evolved in step S3-3 in a bitwise XOR manner to generate a final 128-bit symmetric key.
[0011] 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, and the counter value used is and key Restore to the last valid value.
[0012] Optionally, step S4 specifically includes: Step S4-0-1: When the car is powered on and the ECU nodes are initialized, the vehicle gateway broadcasts a start authentication frame containing the vehicle gateway unique identifier ID1 and the start authentication instruction MSG1 to all ECU nodes.
[0013] 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 identification ID2 and authentication request instruction MSG2 to the vehicle gateway; Step S4-0-3: After receiving the authentication request frame, the vehicle gateway saves ID2, then generates a random number R1 through the hardware random number generator, encrypts R1 using the key corresponding to ID2 and the improved SM4 algorithm to generate a 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 the random number R1, and then uses the SipHash function to decrypt the data. Perform calculations, generate a response frame, and return it to the vehicle gateway. Then, generate a random number R2, encrypt R2 using the improved SM4 algorithm to generate a reverse challenge ciphertext, and send it to the vehicle gateway. Step S4-0-5: After the vehicle gateway receives the response frame, the local calculation And compare and verify it with the received response frame. If the verification is successful, the vehicle gateway decrypts the reverse challenge ciphertext to obtain R2, and uses the SipHash function to 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 calculates the local And compare it with the reverse response frame for verification. If the verification is successful, the symmetric encryption key KEY1 is updated based on the cellular automaton and chaotic mapping, and the The value is sent to the vehicle gateway, and authentication is terminated if verification fails.
[0014] Optionally, step S4 further includes: Step S4-0-7, locally calculate the new symmetric encryption key KEY2, and then calculate The value is compared and verified with the value sent by ECU, and the calculation is performed after the verification is passed. Send to ECU, at the same time, the local counter CNT increases by 1; Step S4-0-8, ECU local calculation The value is compared and verified with the value sent by the vehicle gateway. After the verification is passed, the local counter CNT is increased by 1, completing this trusted authentication.
[0015] Optionally, the random number R1 is generated by the vehicle gateway through a hardware random number generator, and is encrypted using an improved SM4 algorithm and sent to the ECU; the random number R2 is generated by the ECU through a hardware random number generator, and is encrypted using an improved SM4 algorithm and sent to the vehicle gateway.
[0016] Beneficial effects: 1. Through the above-described technical solution, the method of the present invention can achieve the following technical effects: First, it can significantly enhance attack resistance and improve security. Specifically, to prevent spoofing and replay attacks, the bidirectional 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. To resist key analysis attacks, the method of step S2 of the present invention utilizes a chaotic sequence to dynamically perturb the SM4 round constants, thereby breaking the predictability of the traditional SM4 fixed round constants.
[0017] Second, it can be efficiently adapted to embedded environments. Specifically, first, it can achieve low computational overhead. In step S1 of the present invention, the improved Tent chaotic map is designed as a lightweight bit-level perturbation, using bit operations throughout, eliminating the need for complex mathematical calculations and adapting to resource-constrained platforms. Second, it can ensure real-time performance. The bidirectional challenge-response mechanism in step S4 and the local key update in step S2 of the present invention can avoid the high latency of traditional key negotiation.
[0018] Third, it can effectively enhance system reliability. Specifically, first, it can achieve key synchronization without plaintext transmission. The present invention uses cellular automata and chaotic mapping mechanisms to achieve implicit key synchronization, eliminating the need to transmit plaintext keys, avoiding man-in-the-middle attacks and key leakage risks. At the same time, successful authentication events drive local updates to ensure key consistency between both parties. Second, it can achieve forward security. The present invention's dynamic key update mechanism ensures the independence of session keys. Even if the key is leaked at a certain moment, an attacker cannot decrypt historical communication content. At the same time, each round of key updates is independent, blocking key association.
[0019] Fourth, it can effectively address core defects in vehicle networks. Specifically, for the rigidity of the authentication mechanism, the two-way challenge-response mechanism in step S4 of the present invention, combined with dynamic random numbers, can prevent malicious nodes from disguising themselves. For the key update lag defect, the chaos-driven implicit key update in step S3 of the present invention can achieve high-frequency dynamic rotation. For the insufficient anti-attack defect of the encryption algorithm, the chaotic perturbation of the SM4 round key in step S2 of the present invention can improve the anti-analysis capability.
[0020] 2. Other beneficial effects or advantages of the present invention will be described in detail in the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments. 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 paying any creative labor.
[0022] in: Figure 1 This is a flowchart of a chaos-enhanced trusted authentication method based on an in-vehicle gateway provided by an exemplary embodiment of the present invention; Figure 2 is the system bifurcation diagram corresponding to the original Tent map; Figure 3 It is the system bifurcation diagram corresponding to the improved Tent mapping of the present invention; Figure 4 It is the Shannon entropy value graph corresponding to the Tent map; Figure 5 It is the Shannon entropy value graph corresponding to the Tent map + cellular automaton; Figure 6 It is the Shannon entropy value graph corresponding to the Tent mapping + Hamming weight perturbation mechanism; Figure 7 is a schematic diagram of a key update algorithm flow provided by an exemplary embodiment of the present invention; 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; Figure 9 is a flow chart of a trusted authentication algorithm provided by an exemplary embodiment of the present invention; Figure 10 It is a schematic diagram of the time consumption of a two-way trusted authentication algorithm provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to facilitate relevant technical personnel to have a clearer and more accurate understanding of the technical solution of the present invention, the existing related technologies and the technical problems existing therein are first described in more detail below.
[0024] In-vehicle networks, authentication schemes between the vehicle gateway and the ECU often rely on traditional symmetric encryption-based authentication mechanisms and key exchange protocols, such as SM4, the AES encryption algorithm, and Diffie-Hellman (DH) key exchange. To ensure communication security, many schemes employ a challenge-response (CR) mechanism to verify the legitimacy of both parties. While these existing technologies can provide basic authentication and key exchange capabilities in certain situations, their application in in-vehicle network environments still has certain limitations, particularly in terms of resource constraints on embedded platforms, dynamic security requirements, and rapid key updates. The shortcomings of existing technologies are primarily reflected in the following aspects: First, the authentication mechanism lacks flexibility and security. Traditional authentication schemes, such as identity verification based on the CR mechanism, can ensure the identities of both communicating parties to a certain extent, but they lack protection against complex security threats such as malicious node impersonation and replay attacks. In an in-vehicle network, attackers can bypass traditional authentication by masquerading as legitimate nodes, resulting in the leakage of sensitive information and network security risks.
[0025] Second, key updates are delayed and lack dynamism. In existing authentication mechanisms, key updates are typically periodic, and the key exchange process requires additional communication overhead, making it difficult to adapt to the high-speed, dynamic security requirements of in-vehicle networks. Furthermore, the use of static keys increases the risk of key leakage, allowing attackers to exploit known key information and compromise the network.
[0026] Third, traditional encryption algorithms lack attack resistance. Although symmetric encryption algorithms such as SM4 and AES are widely used in in-vehicle networks, existing encryption algorithms often rely on fixed key scheduling, making the encryption process somewhat predictable to attackers. In in-vehicle networks, in particular, systems are vulnerable to analytical attacks such as differential attacks, and traditional encryption methods lack both attack resistance and flexibility.
[0027] Fourth, resource consumption is high. Existing encryption algorithms and authentication protocols mostly rely on high-computing devices. This imposes a heavy computational burden when applied to resource-constrained embedded platforms (such as in-vehicle gateways and ECUs), resulting in slower response times and even impacting system real-time performance and efficiency. Furthermore, traditional DH / ECDH key update mechanisms and authentication processes can incur significant computational overhead.
[0028] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.
[0029] like Figures 1 to 10 As shown, the present invention provides a chaos-enhanced trusted authentication method based on a vehicle-mounted gateway, comprising the following steps: Step S1: Generate a chaotic sequence using an improved Tent chaotic map, wherein the improvement is 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 an obfuscated round key; Step S3: Based on the cellular automaton and chaotic mapping mechanism, the session key is synchronously updated between the vehicle gateway and the ECU without the need to transmit the key in plain text; 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 sending a reverse challenge frame containing the random number R2; Step S4-3: The vehicle gateway verifies the response frame and generates a reverse response frame. After the ECU passes the verification, both parties update the session key.
[0030] Through the above technical solution, the technical effects that can be achieved by the method of the present invention include: first, it can significantly improve the ability to resist attacks and enhance security. Specifically, with respect to anti-masquerading and anti-replay attacks, the two-way challenge-response mechanism in step S4 of the present invention can ensure that attackers cannot forge authentication messages through dynamic random numbers (R1 / R2) and SipHash verification. For example, the attacker cannot obtain the fresh random number for this authentication, and the old replayed message will become an illegal message. At the same time, the response value between the gateway and the ECU depends on the shared key and random number, and the attacker cannot forge a legitimate identity. With respect to resisting key analysis attacks, in step S2 of the present invention, the SM4 round constant is dynamically perturbed by a chaotic sequence, which can break the predictability of the traditional SM4 fixed round constant. This is because the uncertainty of the chaotic system makes the encryption process difficult to predict, thereby improving the ability to resist differential attacks. At the same time, the improved SM4 round key obfuscation mechanism can effectively improve the overall encryption's ability to resist analysis.
[0031] Second, it can be efficiently adapted to embedded environments. Specifically, first, it can achieve low computational overhead. In step S1 of the present invention, the improved Tent chaotic map is designed as a lightweight bit-level perturbation, using bit operations throughout, eliminating the need for complex mathematical calculations and adapting to resource-constrained platforms. Second, it can ensure real-time performance. The bidirectional challenge-response mechanism in step S4 and the local key update in step S2 of the present invention can avoid the high latency of traditional key negotiation.
[0032] Third, it can effectively enhance system reliability. Specifically, first, it can achieve key synchronization without plaintext transmission. The present invention uses cellular automata and chaotic mapping mechanisms to achieve implicit key synchronization, eliminating the need to transmit plaintext keys, avoiding man-in-the-middle attacks and key leakage risks. At the same time, successful authentication events drive local updates to ensure key consistency between both parties. Second, it can achieve forward security. The present invention's dynamic key update mechanism ensures the independence of session keys. Even if the key is leaked at a certain moment, an attacker cannot decrypt historical communication content. At the same time, each round of key updates is independent, blocking key association.
[0033] Fourth, it can effectively address core defects in vehicle networks. Specifically, for the rigidity of the authentication mechanism, the two-way challenge-response mechanism in step S4 of the present invention, combined with dynamic random numbers, can prevent malicious nodes from disguising themselves. For the key update lag defect, the chaos-driven implicit key update in step S3 of the present invention can achieve high-frequency dynamic rotation. For the insufficient anti-attack defect of the encryption algorithm, the chaotic perturbation of the SM4 round key in step S2 of the present invention can improve the anti-analysis capability.
[0034] An exemplary embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0035] 1. Chaos Enhancement Mechanism Design for Authentication 1. Improve Tent Mapping When deploying chaotic systems on embedded platforms, in addition to requiring them to possess good chaotic properties, computational efficiency and resource overhead must also be considered. To select the one-dimensional chaotic mapping most suitable for embedded applications, this paper evaluates the performance of nine typical chaotic mapping functions, including Logistic, Tent, Sine, Piecewise, Bernoulli, PWLCM, Cubic, and two improved versions of piecewise Logistic. The time taken to execute 50,000 iterations of each mapping was calculated using a DWT clock cycle counter. The results are shown in Table 1 below. The test results show that the average single 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.
[0036] Table 1 Comparison of time consumption of common one-dimensional chaotic mapping The formula for traditional tent mapping is , achieving complete chaos with a control parameter of r = 2.0. However, its simple structure and lack of additional security enhancements make it difficult to meet the higher perturbability, unpredictability, and ergodicity requirements of practical authentication systems. To this end, the present invention proposes a Tent chaotic system based on a Hamming weight perturbation mechanism. This mechanism converts the state quantity generated by the Tent mapping into a 32-bit integer, then performs two rounds of Hamming weight-based cyclic left shifts and exclusive-OR operations with the perturbation factor formed by the previous round of states, thereby achieving 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.
[0037] The Hamming Confuse transform is a perturbation mechanism based on Hamming weights. It calculates the Hamming weights of input values A and B and generates a new perturbation value using a left rotation and an exclusive-or operation. 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 common symbol for modulo operations in programming languages). Next, A_rot1 is bitwise exclusive-ored with B to obtain the 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 data uncertainty and complexity, thereby enhancing system security. Especially when applied to chaotic systems, it can provide stronger protection and anti-attack capabilities.
[0038] See also Figure 2 and Figure 3 ,exist Figure 2 and Figure 3 In the example, 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 the control parameters fixed and the initial value set to 0.5). By comparing the bifurcation diagrams of the system before and after the perturbation, we can observe that the introduction of the Hamming Confuse mechanism makes the state distribution of the Tent mapping more uniform within the parameter interval r∈[1.0,2.0], significantly improving the original Tent's lack of ergodicity in low parameter intervals. After iterative convergence, the improved system's output states can almost cover the entire real number interval [0,1], effectively improving the diffusibility and unpredictability of the pseudo-random sequence, providing security for key perturbations and challenge construction during the authentication process.
[0039] Shannon entropy is an important concept used to measure the uncertainty or information content of a random variable. When evaluating the randomness of a chaotic system, Shannon entropy provides a quantitative indicator of the complexity of its output sequence. A chaotic system's output sequence with a high entropy value indicates strong randomness and is suitable for applications such as cryptography and random number generation. For a discrete random variable X, its entropy H(X) is given by the following formula: in, is the discretized value, is the probability of occurrence, and 𝑛 is the number of different values after discretization. When applying this formula, it is necessary to first discretize the output sequence of the chaotic system. For the improved Tent mapping in the present invention, the discrete sequence values are obtained by mapping the continuous output x_n∈[0,1) to several discrete intervals. Then, the probability distribution of each discrete value is calculated based on its frequency of occurrence. Once the probability distribution is obtained , 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 greater the randomness and unpredictability of the sequence.
[0040] See also Figures 4 to 6 The results show that the Shannon entropy of the 10,000-point sequence generated by the original Tent mapping with an initial value of x=0.5 and a parameter of r=1.99 is 7.7456 bits, reflecting, to a certain extent, the distributional skewness and structural deviations of its output. After introducing cellular automata perturbations, the entropy value rises to 7.8542 bits, indicating a significant improvement in pseudo-randomness and distribution uniformity. Furthermore, the entropy value of the Tent chaotic system using a Hamming weight perturbation mechanism is further increased to 7.9810 bits, significantly approaching the theoretical maximum entropy limit (8 bits), indicating that this mechanism can significantly enhance the statistical randomness and unpredictability of chaotic sequences.
[0041] 2. Improved SM4 encryption algorithm Block ciphers are one of the most commonly used encryption methods and are widely used in data encryption. To improve information security, it is crucial to ensure that the initial key has a sufficiently large key space. To address the threat posed by quantum computers to short keys, this paper proposes a key expansion algorithm based on an improved Tent chaotic map. By incorporating the improved Tent chaotic map into the round key obfuscation step of the SM4 key expansion process, this algorithm effectively increases the key space and enhances encryption security.
[0042] In this algorithm, the quantization generated by the chaotic map The round key expansion process of SM4 is enhanced by using the value of t, resulting in a key expansion scheme based on improved Tent mapping. This improvement has the following advantages: First, the improved Tent mapping introduces the uncertainty and nonlinear characteristics of the chaotic system, making key expansion more complex and effectively resisting differential attacks.
[0043] Second, due to The value can be pre-generated before encryption, thus saving computation time during the encryption process.
[0044] Third, the chaotic system is only used to confuse round keys, so it does not change the original key expansion framework. At the same time, it ensures that the encryption and decryption process still uses the same algorithm structure and does not occupy additional resources.
[0045] 3. Key update mechanism based on cellular automata and chaos In symmetric authentication systems, key update strategies are directly related to communication security and system performance. In embedded devices, traditional key agreement algorithms such as Diffie-Hellman (DH) and Elliptic Curve Diffie-Hellman (ECDH), while offering excellent cryptographic security, face limitations in practical deployment. First, DH and ECDH rely on complex mathematical calculations involving large integers or elliptic curves, placing high demands on computing resources and runtime. Furthermore, these algorithms often require the use of third-party cryptographic libraries such as OpenSSL and mbedTLS, which not only increases system integration complexity but also introduces portability and other burdens. To mitigate the security risks and communication overhead associated with frequent key exchanges, this paper designs a local key update mechanism that combines chaotic mapping with cellular automata. This mechanism eliminates the need for plaintext key transmission and relies solely on successful authentication events to drive state synchronization. It exhibits excellent initial value sensitivity and unpredictability, making it suitable for resource-constrained embedded devices.
[0046] See also Figure 7 The key update algorithm process of the present invention may specifically include: Step 1: After each successful authentication, the local counter CNT (i.e., Counter) of both parties increments. The counter acts as a disturbance source, driving changes in the chaotic system to ensure the uniqueness of the input state in each round of key update.
[0047] Step 2: Generate the initial disturbance value by combining the current counter value CNT with the ECU's device ID and random number R1 , and use it as the input of the chaotic mapping system, iterate several rounds to enhance the nonlinearity and initial value sensitivity of the chaotic output, and obtain the final disturbance value .
[0048] Step 3: As the initial seed of the Rule30 cellular automaton, ensure that the seed has good uniformity and sensitivity. Evolve several rounds to generate multiple intermediate states. Superimpose the 128-bit states of all rounds through bitwise exclusive OR (XOR) to generate the final 128-bit symmetric key. This method can effectively enhance the diffusion and complexity of the key space.
[0049] Step 4: To ensure the consistency of the keys generated by both parties, the gateway can send a verification tag , calculated and compared locally by the ECU to confirm the key synchronization status, to avoid communication failure or security risks caused by incorrect key use, among which, is generated and the SipHash calculated value of the ECU ID, is a keyed hash function (which is a pseudo-random function optimized for speed for short messages).
[0050] Step 5: If the consecutive authentication failures exceed the threshold N, both parties will automatically roll back to the state when the last authentication was successful, including the counter and key , thereby ensuring that subsequent authentication is re-established on the synchronized state.
[0051] The key update time of the present invention and the DH algorithm and ECDH algorithm update time can be found in Table 2 below.
[0052] Table 2 Key update algorithm time table The algorithm of the present invention has the following advantages: First, there is no need to exchange keys in plain text: 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 in key negotiation, and defending against man-in-the-middle attacks and replay attacks.
[0053] Second, it has extremely low computational overhead and is suitable for embedded platforms: the core components include improved Tent mapping and Rule30 cell evolution, both of which can be implemented using simple bit operations. The typical update delay is in the microsecond range, which is better than the time consumption of DH / ECDH.
[0054] Third, no high randomness and key space complexity: introducing an initial value-sensitive chaotic mapping system and combining hashing and cellular automata iterative superposition to enhance diffusion can effectively prevent key periodicity or weak entropy problems, and ensure the security and unpredictability of symmetric keys.
[0055] Fourth, the stateless fault tolerance is strong: an authentication failure rollback mechanism is designed, which can restore to the last synchronization state in the event of an authentication anomaly, enhancing the robustness of the system.
[0056] In summary, compared with the traditional DH / ECDH key agreement 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.
[0057] In the aforementioned "I. Chaos-enhanced Mechanism Design for Authentication," this paper 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 the Logistic and Sine mappings and the Tent mapping with cellular automata perturbations, the improved Tent scheme demonstrates significant advantages in performance and randomness, particularly in terms of low computational overhead and high efficiency on embedded platforms.
[0058] This paper proposes a local key update mechanism that combines an improved Tent chaotic system with the Rule30 cellular automaton. This scheme increments the CNT counter with each authentication event, generating a chaotic perturbation source based on the CNT and the device ID. This perturbation is then evolved through cellular automata to generate a 128-bit SM4 symmetric encryption key. Experimental evaluation demonstrates the efficiency and low latency of this scheme on embedded devices, making it suitable for resource-constrained platforms.
[0059] 2. Design of a trusted authentication strategy based on a two-way challenge-response mechanism (the overall design of the trusted authentication strategy can be found in Figure 9 ) In the vehicle network, in order to ensure the security of node communication and prevent attacks from malicious nodes, the present 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 the identity of each node and preventing malicious nodes from disguising themselves as legitimate nodes to steal sensitive information. The detailed process of the trusted authentication based on the two-way CR mechanism designed by the present invention is as follows: Figure 9 shown.
[0060] For example, the steps of the trusted authentication process can be found in Figure 8 As shown, it specifically includes: Step 1: When the car is powered on and the ECU node is initialized, the vehicle gateway sends a broadcast frame. The frame data segment contains the start authentication message MSG1 and the gateway's unique node ID1. This frame notifies other nodes in the network that the authentication process is complete, the gateway is ready for authentication, and the node can begin authentication.
[0061] Step 2: After receiving the start authentication frame, the ECU node saves the gateway's node identification ID1, and then sends an authentication request frame to the gateway. The data segment in the request frame is MSG2 and the ECU's device unique identification ID2, indicating that it is ready to participate in the authentication.
[0062] Step 3: After receiving the authentication request frame from the ECU, the gateway saves the device ID2. The gateway then 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.
[0063] Step 4: After receiving the challenge frame from the gateway, the ECU node first decrypts the challenge message using its locally stored key to obtain the random number R1. The ECU node then 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 the reverse challenge ciphertext, which it sends to the gateway. The SipHash key can be directly selected from the SM4 key or configured at the factory.
[0064] Step 5: After receiving the response frame from the ECU, 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 verification succeeds, the gateway decrypts R2 and then processes the data (ID1||R2) using the SipHash function to generate a reverse response frame and send it to the ECU. If verification fails, the authentication process is terminated and the exception information is recorded.
[0065] Step 6: After receiving the gateway's reverse response frame, the ECU node begins verifying the gateway's response frame. It first generates verification data locally using the SipHash function, then verifies the consistency between the gateway's response frame and the verification data. If verification succeeds, bidirectional authentication between the gateway and the node has been successfully completed. The symmetric encryption key KEY is then updated based on a cellular automation and chaotic mapping, and the SipHash (KEY||R1) value is calculated and sent to the gateway. If failure occurs, the authentication process is terminated and the exception information is recorded.
[0066] Step 7: The gateway receives the response frame, calculates the new symmetric encryption key KEY, then calculates the SipHash(KEY||R1) value, verifies and verifies the consistency of the response frame and the verification data. If the verification passes, it calculates and sends SipHash(KEY||R2) to the ECU node, and the local CNT count increases by one.
[0067] 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 increased by one, and this trusted authentication is completed. Both parties can use the updated key for subsequent symmetric encryption communication.
[0068] Based on the above technical solution, the present invention can achieve the following beneficial effects: First, it ensures physical bidirectional security. According to the authentication steps of this solution, 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. The gateway then verifies the correctness of the response and receives an encrypted random number R2 from the ECU. After decrypting R2, the gateway calculates a SipHash value and returns it, allowing the ECU to verify the legitimacy of the gateway, thereby securely completing the entire bidirectional authentication process. In addition, all key authentication elements (such as R1 and R2) are protected by a symmetric key that is dynamically updated during the session. This key is generated based on chaotic mapping and cellular automation. Even if an attacker physically invades the device and obtains the current key, it is difficult to derive subsequent keys and cannot forge valid authentication messages. Therefore, an attacker who lacks synchronized key state and dynamic authentication data cannot impersonate a legitimate node.
[0069] Second, forward security is guaranteed. In this solution, 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. Because each round of session keys is independently generated, and the random number is encrypted during transmission, even if the current key is compromised, it cannot affect any past sessions. Therefore, this design ensures that even if the key is exposed at any point in time, the previously exchanged authentication data remains protected and unhackable.
[0070] Third, it effectively protects against replay attacks. In this scheme, each round of authentication uses a newly generated session key and random number R1, which is encrypted before being sent. Without access to the latest key, an attacker cannot recover or reuse R1, rendering replayed messages invalid. Furthermore, because the shared key evolves after each successful authentication, messages encrypted with an expired key are inconsistent with the current session state and will be rejected during authentication, thus providing resistance to replay attacks.
[0071] Fourth, it effectively defends against desynchronization attacks. These attacks typically manifest in two forms: tampering with messages to cause inconsistent key updates between the gateway and ECU, or blocking critical messages (such as confirmation frames) to disrupt key synchronization. In this solution, 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 is aborted, and both parties retain the previous key state, thus avoiding desynchronization. Furthermore, if an attacker causes the session counter CNT to drift, resulting in continuous authentication failures, the system automatically rolls back to the last successful state (including the counter and session key) to re-establish synchronization.
[0072] 3. Experimental Verification To verify the randomness of the improved SM4 algorithm and the effectiveness of the implementation of the authentication strategy based on Tent-HC mapping and cellular automata designed in the present invention, the present invention first performed a NIST-based randomness test on the round keys of the improved SM4 algorithm in a Linux environment. A CAN-FD network was then established based on NXP's S32K344 evaluation and test development board to verify the authentication strategy designed in the present invention between the on-board gateway and ECU nodes. The performance of the authentication process in the CAN network was analyzed through repeated tests.
[0073] Specifically, the experimental process is described below with reference to the accompanying drawings.
[0074] 1. Experimental Environment. First, we configured the CLion development environment under the Windows operating system. The platform used was a workstation equipped with an Intel i9-13900HX processor (@2.20GHz), 32GB of DDR5 memory, and Windows 11 (64-bit). This platform was primarily used for the development and testing of improved Tent chaos maps and the SM4 encryption algorithm. Subsequently, we developed, debugged, and burned driver and application software for the S32K344 chip in the S32 Design Studio for S32 Platform development environment. (The S32K344, with its excellent performance, rich peripheral interfaces, and flexible power management, is particularly well-suited for demanding automotive control systems and embedded applications.)
[0075] 2. Randomness Test. To verify the pseudo-randomness of the chaotic sequence generated by the improved Tent mapping, this paper uses the NIST randomness test method. Each NIST test corresponds to a P_value (probability of significance). When P_value∈(α,1), the sequence passes the test. α is usually set to 0.01. A sequence passes the NIST test only if it passes all 15 tests.
[0076] To test the pseudorandomness of the round key sequence after the improved Tent mapping, we selected a chaotic parameter r = 1.999, an initial value of 0.654321, and a key of 0123456789abcdeffedcba987654321. We then sequentially selected 1,000,000 chaotic sequences from the iterated round key sequence and binarized them as input for the NIST test. BlockLength was set to 32, and all other parameters remained at their default values.
[0077] To ensure the accuracy and universality of the test results, a pseudorandom function was used to generate 100 random numbers. The chaotic parameter r = 1.99 was selected, and the key was 0123456789abcdeffedcba987654321. These 100 random numbers were used to generate 100 byte sequences using an improved Tent chaotic system. The first 1,000,000 chaotic sequences were sequentially selected and binarized as input for the SP800-22 standard test. The Block Length was set to 32, and the remaining parameters remained at their default values. The minimum value of each test item for each of the 100 pseudorandom sequences during the test was listed. A value greater than 0.01 indicated a pass.
[0078] The test results are shown in Table 3. As can be seen from the test results, the generated sequence successfully passed the 15 criteria of the NIST randomness test, proving that the chaotic sequence generated by the improved Tent mapping has sufficient randomness and can be effectively used to construct a pseudo-random CK sequence.
[0079] Table 3 NIST test results 4. Experimental Testing and Analysis of Authentication Strategy Based on Bidirectional Challenge-Response Mechanism By simulating the communication process between the in-vehicle gateway and the ECU, the authentication strategy's authentication time was evaluated under different conditions. The primary goal of the experiment was to verify whether the designed authentication strategy could meet the real-time requirements of in-vehicle networks 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 authentication verification. This test aimed to assess whether the authentication strategy could respond in real time within an in-vehicle network environment, particularly on resource-constrained embedded platforms.
[0080] During the experiment, the MCU's built-in DWT (Data Watchpoint and Trace) timer was used to accurately measure the duration of the authentication process. The experiment was repeated 20 times, and the time complexity of the authentication process between the two nodes in each experiment was calculated. The experimental results are shown in the figure below. Figure 10 shown.
[0081] Analysis of experimental data shows that the average authentication process takes approximately 7.5ms, fully meeting the real-time requirements of in-vehicle networks. This low authentication time is achieved through multiple optimizations. First, the SM4 encryption algorithm itself has low computational complexity, enabling rapid encryption and decryption operations within the in-vehicle network, significantly reducing the time overhead associated with encryption and decryption. Furthermore, the introduction of the SipHash hash algorithm significantly improves authentication efficiency. It rapidly generates authentication response values and exhibits high collision resistance, ensuring message integrity without adding additional computational overhead. The optimization of the authentication process also benefits from the improved efficiency of the Tent chaotic map and cellular automaton. The combination of chaotic maps and cellular automata improves the efficiency of key updates and perturbations. These operations mostly rely on simple and fast local computations, avoiding complex global calculations, further reducing computation time. Finally, an authentication strategy based on a bidirectional CR mechanism further optimizes communication and computational overhead during the authentication process. The challenge-response mechanism utilizes a concise message exchange and low-complexity verification operations, enabling rapid authentication.
[0082] Experimental results demonstrate that the proposed authentication strategy ensures the security of in-vehicle network communications while fully meeting the real-time requirements of the in-vehicle network environment. Particularly 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.
[0083] The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A chaos-enhanced trusted authentication method based on an in-vehicle gateway, characterized in that: The steps include: Step S1: Generate a chaotic sequence using an improved Tent chaotic map, wherein the improvement is 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 an obfuscated round key; Step S3: Based on the cellular automaton and chaotic mapping mechanism, the session key is synchronously updated between the vehicle gateway and the ECU without the need to transmit the key in plain text; 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 sending a reverse challenge frame containing the random number R2; Step S4-3: The vehicle gateway verifies the response frame and generates a reverse response frame. After the ECU passes the verification, both parties update the session key.
2. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 1 is characterized in that: The improvement is achieved by introducing a bit-level perturbation operation based on Hamming weights, specifically including: Convert the state quantity output by the Tent mapping into a 32-bit integer; Perform two rounds of cyclic left shift and XOR operations based on Hamming weight on the perturbation factor formed by the integer and the previous state: Step S1-1: Perform a left rotation operation according to the Hamming weight value of the perturbation factor; Step S1-2: Perform a bitwise XOR operation on the left-rotation result; Step S1-3: Perform a left rotation operation on the XOR result again to obtain the final disturbance result.
3. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 1 is 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 round constant sequence in SM4 to construct an uncertain round constant flow.
4. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 1 is characterized in that: In step S3, synchronously updating the session key specifically includes: Step S3-1: After each successful authentication, the local counter value CNT of the vehicle gateway and ECU is incremented; Step S3-2: Generate a disturbance value using the current local counter value CNT combined with the ECU's device ID and random number , after chaotic mapping iteration, the final disturbance value is output ; Step S3-3: As the initial seed of the cellular automaton, it evolves for several rounds to generate multiple intermediate states.
5. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 4 is characterized in that: In step S3-3, the cellular automaton is evolved using the one-dimensional binary Rule30 rule, and the evolution rule is: the state of the current cell and its left and right adjacent cells are used to jointly determine the next state.
6. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 5 is characterized in that: The session key is generated by superimposing the 128-bit states of all rounds evolved in step S3-3 in a bitwise XOR manner to generate a final 128-bit symmetric key.
7. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 6 is characterized in that: A key rollback mechanism is also included: If the number of consecutive authentication failures exceeds the preset threshold, the vehicle gateway and ECU automatically roll back to the state of the last successful authentication, and the counter value used and key Restore to the last valid value.
8. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 1 is characterized in that: The step S4 specifically includes: Step S4-0-1: When the car is powered on and the ECU nodes are initialized, the vehicle gateway broadcasts a start authentication frame containing the vehicle gateway unique identifier ID1 and the start authentication instruction MSG1 to all ECU nodes; 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 identification ID2 and authentication request instruction MSG2 to the vehicle gateway; Step S4-0-3: After receiving the authentication request frame, the vehicle gateway saves ID2, then generates a random number R1 through the hardware random number generator, encrypts R1 using the key corresponding to ID2 and the improved SM4 algorithm to generate a 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 the random number R1, and then uses the SipHash function to decrypt the data. Perform calculations, generate a response frame, and return it to the vehicle gateway. Then, generate a random number R2, encrypt R2 using the improved SM4 algorithm to generate a reverse challenge ciphertext, and send it to the vehicle gateway. Step S4-0-5: After the vehicle gateway receives the response frame, the local calculation And compare and verify it with the received response frame. If the verification is successful, the vehicle gateway decrypts the reverse challenge ciphertext to obtain R2, and uses the SipHash function to 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 calculates the local And compare it with the reverse response frame for verification. If the verification is successful, the symmetric encryption key KEY1 is updated based on the cellular automaton and chaotic mapping, and the The value is sent to the vehicle gateway, and authentication is terminated if verification fails.
9. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 8, characterized in that: The step S4 further includes: Step S4-0-7, locally calculate the new symmetric encryption key KEY2, and then calculate The value is compared and verified with the value sent by ECU, and the calculation is performed after the verification is passed. Send to ECU, at the same time, the local counter CNT increases by 1; Step S4-0-8, ECU local calculation The value is compared and verified with the value sent by the vehicle gateway. After the verification is passed, the local counter CNT is increased by 1, completing this trusted authentication.
10. The chaos-enhanced trusted authentication method based on an in-vehicle gateway according to claim 8, characterized in that: The random number R1 is generated by the vehicle gateway through a hardware random number generator, and is encrypted using the improved SM4 algorithm and sent to the ECU; the random number R2 is generated by the ECU through a hardware random number generator, and is encrypted using the improved SM4 algorithm and sent to the vehicle gateway.
Citation Information
Patent Citations
Communication secrecy circuit design method based on public chaos stream password encryption
CN113343609A
Vehicle-mounted network continuous authentication method with privacy protection based on reputation management
CN117768877A
Data encryption method and device, equipment and medium
CN120263411A
Method and Apparatus for a Computable, Large, Variable and Secure Substitution Box
US20140198913A1
Defeating solution to phishing attacks through counter challenge authentication
US20200084237A1
Cited By
Transmission data security system and method adaptive to switch, and medium
CN121193405A
Transmission data security system, method and medium adapted to a switch
CN121193405B