In-vehicle network communication method and system based on dynamic identity

By introducing dynamic identity authentication and quantum random number generation keys into the car's in-car network communication, combined with dual identity authentication and intelligent gateway relay, the security of the in-car network communication is strengthened, masquerading attacks and information leakage are prevented, and the system is improved. complexity and security.

CN118473663BActive Publication Date: 2024-09-06HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410912626.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-06
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

Existing automotive intra-vehicle network communications lack message authentication and access control mechanisms and are vulnerable to masquerade attacks. The IDS system may have false positives and false negatives. The security of the ECU shared group key is not reliable enough. Once the preset long-term key is cracked, the There is a greater risk of information leakage or tampering.

Method used

Adopt an in-vehicle network communication method based on dynamic identity, generate an initial MAC key through quantum random numbers, and dynamically update the key during the authentication process. Double identity authentication and smart gateway relay encryption and decryption are introduced to ensure the confidentiality of message transmission. and integrity.

Benefits of technology

Effectively prevent replay attacks and password cracking, increase system complexity and security, defend against man-in-the-middle attacks and session key leaks, ensure forward secrecy, and improve the security and reliability of intra-vehicle network communications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118473663B
    Figure CN118473663B
Patent Text Reader

Abstract

The present invention relates to the technical field of in-vehicle network communication, and discloses an in-vehicle network communication method and system based on dynamic identity. The method includes an authentication stage, a key negotiation stage, and an in-vehicle communication stage. In the authentication stage, each ECU generates a random number kana as its old pseudonym, and uses the quantum random number QRNG as the first MAC generation key to generate a message authentication code MAC1; the ECU and the gateway and the cloud realize message authentication through MAC1 when transmitting messages; the cloud generates a random number kana' for each ECU as the new pseudonym of the ECU to complete the first authentication. In the authentication process after the first authentication, the new pseudonym obtained by the ECU in the previous authentication is used as the old pseudonym for the next authentication; at the same time, the current number of authentications is recorded, and the first MAC generation key is updated according to the current number of authentications. The dynamic key generation mechanism and pseudonym dynamic update mechanism of the present invention increase the security of communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of in-vehicle network communication, and in particular to an in-vehicle network communication method and system based on dynamic identity. Background Art

[0002] With the development of intelligence and information technology, automotive electrical systems have become increasingly complex. Currently, cars generally have dozens of electronic control units (ECUs), and attackers can exploit vulnerabilities in the on-board ECUs to remotely attack the communication between ECUs, resulting in frequent automotive information security incidents.

[0003] At present, the in-vehicle network communication of automobiles lacks message authentication and access control mechanisms, making vehicles vulnerable to spoofing attacks. Attackers can easily forge or tamper with messages on the CAN bus, resulting in leakage or tampering of internal vehicle information. Although some security mechanisms have been proposed, such as intrusion detection systems (IDS) and ECU shared group keys, they also have some problems. IDS systems may have false positives and false negatives, especially when dealing with high-frequency detection and reporting, which may affect the response time of the vehicle and even be deceived by attackers by injecting false data. The security of ECU shared group keys is not very reliable. Once an ECU is damaged, it may lead to the leakage of group keys, thus affecting information protection and the ability to resist spoofing attacks. In addition, some manufacturers use the form of pre-set long-term keys, but the pre-set keys lack the means to update. Once cracked, there is a greater risk.

[0004] Therefore, it is urgent to improve the security of existing in-vehicle network communication solutions. Summary of the invention

[0005] In order to solve the technical problem in the prior art that the security of in-vehicle network communication needs to be improved, the present invention provides an in-vehicle network communication method and system based on dynamic identity.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] The invention discloses an in-vehicle network communication method based on dynamic identity, comprising: an authentication phase, a key negotiation phase and an in-vehicle communication phase.

[0008] Authentication phase: Each electronic control unit, or ECU, generates a random number kana as its old pseudonym, and uses a quantum random number QRNG as the first MAC generation key to generate a message authentication code MAC1; MAC1 is used to authenticate messages between the ECU and the gateway and the cloud; the cloud generates a random number kana' for each ECU as the new pseudonym of the ECU, thereby completing the first authentication.

[0009] Among them, in the authentication process after the first authentication, the new pseudonym obtained by the ECU in the previous authentication is used as the old pseudonym for the next authentication; at the same time, the current authentication number is recorded, and the first MAC generation key is updated according to the current authentication number.

[0010] Key negotiation phase: The gateway negotiates the same session key GK for each ECU.

[0011] In-vehicle communication stage: When the sender ECUa sends a message M to the receiver ECUb, the sender ECUa uses h(kana') as the second MAC generation key to generate a message authentication code MAC2, uses GK to encrypt the message {M||t1||MAC2} and sends it to ECUb; after receiving the message, ECUb uses GK to decrypt it and obtains the message M after verifying that the timestamp t1 and MAC2 are qualified; h(·) is the hash operation, and t1 is the encrypted timestamp.

[0012] As a further improvement of the above scheme, the first certification includes the following specific steps:

[0013] S1. Any ECU i Generate random number kana i As its old pseudonym, the quantum random number QRNG is used as the first MAC generation key to generate a message authentication code MAC1, and then the first message {kana i ⊕h(EID i )||h(EID i )||MAC1}; where h(·) represents a hash operation, ⊕ represents an XOR operation, || represents a logical AND, and EID i Indicates ECU i identity information;

[0014] S2. After the gateway receives and verifies the integrity of the first message, it stores the first message and sends the second message to the cloud. i ⊕h(EID i )||h(EID i )||h(GID)||MAC1}; where GID represents the identity information of the gateway;

[0015] S3. After the cloud receives and verifies the integrity of the second message, it sends the message to the ECU. i Generate a set of random numbers Kv i and another set of random numbers kana i ', send the third message {kana i ⊕h(GID)||Kv i ⊕h(GID)||kana i '⊕h(GID)||MAC1};

[0016] S4. After the gateway receives and verifies the integrity of the third message, the fourth message {Kv i ⊕h(EID i )||kana i '⊕h(EID i )||MAC1} is broadcast on the CAN bus, allowing ECU i Get your own Kv i and the new kana i ';

[0017] S5.ECU i The fifth message {Kv i ⊕kana i ||kana i '⊕h(EID i )} is forwarded to the cloud via the gateway; after the cloud receives and verifies the integrity of the fifth message, it determines that the ECU i Receive the correct Kv i and Kana i ', thus completing the authentication.

[0018] As a further improvement of the above solution, before the authentication stage, the in-vehicle network communication method further includes: a registration stage.

[0019] Registration phase: The cloud database pre-stores the identity information of the gateway and each ECU.

[0020] ECU i The message {h(EID i )} to the gateway, which then sends the message {h(EID i )||h(GID)}.

[0021] The cloud receives the message {h(EID i )||h(GID)}, verify the EID according to the identity information stored in the database i and GID, then generates a quantum random number QRNG and sends a message {QRNG||h(GID)} to the gateway.

[0022] After the gateway receives the message {QRNG||h(GID)} and verifies the integrity, it broadcasts QRNG on the CAN bus, allowing the ECU i Get a QRNG.

[0023] ECU i The message {QRNG⊕EID i ||h(EID i)} is forwarded to the cloud through the gateway, and the cloud receives and verifies the message {QRNG⊕EID i ||h(EID i )}, determine the integrity of the ECU i QRNG received, registration completed.

[0024] As a further improvement of the above scheme, the key negotiation phase includes the following specific steps:

[0025] The gateway generates a partial session key seed ck for each ECU; for ECU i Part of the session key seed ck i , ck i For Kv i The XOR value of Kv of all other ECUs except .

[0026] The gateway generates the sixth message {kana i ||ck i ⊕h(EID i )||MAC1||t2} and broadcast it on the CAN bus, so that the ECU i Get ck after receiving the broadcast message i , by calculating ck i ⊕Kv i =GK, each ECU obtains the same session key; where t2 is the timestamp for generating the sixth message.

[0027] As a further improvement of the above scheme, the first MAC generation key in the first authentication process is KMAC1, KMAC1=QRNG; in the authentication process after the first authentication, the update expression formula of the first MAC generation key is: KMAC m =h(KMAC m-1 ); KMAC m Indicates the first MAC key generated after update in the m-th authentication, m≥2.

[0028] The present invention also discloses an in-vehicle network communication system based on dynamic identity, including a cloud, a gateway and multiple ECUs. The in-vehicle network communication system is used to implement the in-vehicle network communication method based on dynamic identity.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] 1. The present invention sets a dynamic key generation mechanism in the authentication stage. The initial first MAC generation key is generated by quantum random numbers. As the number of authentications increases, the first MAC generation key also changes. At the same time, a new random number Kv is generated for each authentication, which increases the complexity and security of the in-vehicle network communication system and effectively prevents replay attacks and password cracking. On this basis, a pseudonym dynamic update mechanism is also set. During the authentication process, the new pseudonym obtained for each authentication will become the old pseudonym for the next authentication, thereby increasing the system's dynamicity and security and effectively preventing identity forgery and attacks.

[0031] 2. The present invention can provide higher security and defend against more types of attacks, such as man-in-the-middle attacks and session key leaks, by introducing technologies such as quantum random numbers and multi-layer identity authentication. In addition, through the relay and encryption and decryption of the intelligent gateway, the intelligent gateway is used as a relay node to perform encryption and decryption operations, which helps to ensure the confidentiality and integrity of the message during transmission, thereby improving the security of communication.

[0032] 3. The dual identity authentication mechanism of the present invention will not leak the real identities of the gateway and ECU during all processes. The cloud can verify the hash value of the real identity of the ECU and the hash value of the real identity of the gateway, and ensure the reliability of the ECU and the gateway through the verification of the two real identities.

[0033] 4. The present invention has forward secrecy guarantee. By hashing the transmitted real identity information and combining it with the dynamically generated first MAC to generate a key, the forward secrecy of the system is ensured. Even if the communication is intercepted, the attacker cannot obtain the original identity information and the key relationship used for authentication through analysis, which improves the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a framework diagram of an in-vehicle network communication system based on dynamic identity according to an embodiment of the present invention.

[0035] Figure 2 The present invention is a flowchart of an in-vehicle network communication method based on dynamic identity according to an embodiment of the present invention.

[0036] Figure 3 This is a timing diagram of the first authentication phase of an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] See also Figure 1 An embodiment of the present invention provides an in-vehicle network communication system based on dynamic identity, including a cloud, a gateway and n ECUs. The in-vehicle network communication system is used to implement an in-vehicle network communication method based on dynamic identity.

[0039] See also Figure 2 ,The in-vehicle network communication method based on dynamic identity includes: a registration phase, an authentication phase, a key negotiation phase, and an in-vehicle communication phase.

[0040] Registration stage:

[0041] The registration phase is carried out on a secure channel. The cloud database pre-stores the identity information of the gateway and each ECU (i.e., the real ID). This phase is for the gateway and ECU to register with the cloud.

[0042] The registration phase may include the following steps 1 to 4.

[0043] Step 1: ECU i The message {h(EID i )} to the gateway, which then sends the message {h(EID i )||h(GID)}. Among them, h(·) represents hash operation, || represents logical AND, and EID i Indicates ECU i GID represents the identity information of the gateway.

[0044] It should be noted that hash operations can return a fixed-length output for inputs of different lengths. The reason why hash operations are widely used in cryptography is that they have the following characteristics: ① Determinism: No matter how many times the hash operation is performed on the same input, the resulting hash value is a fixed value. ② Fast computing power: Hash operations are faster and less time-consuming than other security algorithms. ③ Preimage resistance: It is very difficult, almost impossible, to reverse the original value through the hash value. ④ If the input value has a slight change, the hash value will be completely different. ⑤ Collision resistance: The probability that the output value after hash operation is the same even if the input value is different is almost zero.

[0045] Step 2: The cloud receives the message {h(EID i )||h(GID)}, verify the EID according to the identity information stored in the database i and GID, then generates a quantum random number QRNG and sends a message {QRNG||h(GID)} to the gateway.

[0046] Step 3: After the gateway receives the message {QRNG||h(GID)} and verifies the integrity, it broadcasts QRNG on the CAN bus, allowing the ECU i Get a QRNG.

[0047] Step 4: ECU i The message {QRNG⊕EID i ||h(EID i )} is forwarded to the cloud through the gateway, and the cloud receives and verifies the message {QRNG⊕EID i ||h(EID i )}, determine the integrity of the ECU i QRNG is received and registration is completed. ⊕ represents XOR operation.

[0048] It should be noted that in the process of in-vehicle communication, encryption keys also have a very important impact on information encryption. The generation of keys is often based on random numbers and passwords, and the randomness of random numbers will affect the security of the generated keys. In front of computers with powerful computing power, pseudo-random numbers generated by elements such as seed information, preset functions, and constants will become extremely unsafe. True random numbers are often generated through some unpredictable physical phenomena. For example, a quantum random number generator generates random numbers through the physical phenomenon of photons. Using true random numbers to generate quantum keys will have higher security.

[0049] Certification stage:

[0050] Each electronic control unit, i.e., ECU, generates a random number kana as its old pseudonym, and uses a quantum random number QRNG as the first MAC generation key to generate a message authentication code MAC1; MAC1 is used to authenticate messages between the ECU and the gateway and the cloud; the cloud generates a random number kana' for each ECU as the new pseudonym of the ECU, thereby completing the first authentication.

[0051] See also Figure 3 ,The first authentication includes the following specific steps S1~S5.

[0052] S1. Any ECU i Generate random number kana i As its old pseudonym, the quantum random number QRNG is used as the first MAC generation key to generate a message authentication code MAC1, and then the first message {kana i ⊕h(EID i )||h(EID i )||MAC1}.

[0053] It should be noted that the Message Authentication Code (MAC) is a technology used to verify the integrity, authenticity and source authentication of a message. It is a fixed-length data generated by using a key and an encryption algorithm on the message, and is attached to the message to ensure that the message is not tampered with or forged during transmission. During the communication process, the use of a message authentication code can ensure that the message is not subject to unauthorized modification or tampering during transmission, and that the source of the message is credible. The MAC generation process involves keys and hash functions. Usually, an encryption key is used to calculate the hash value of the message, and this hash value is added to the original message as an authentication code.

[0054] The process of generating a MAC can be divided into the following steps, namely (1) to (6).

[0055] (1) Select an encryption key: First, select a key for calculating the MAC. This key is usually known only to the sender and receiver of the message.

[0056] (2) Select a hash function: Select a hash function, such as HMAC (keyed hash function), which combines the message and the key to generate a fixed-length hash value.

[0057] (3) Calculate MAC: Using the selected hash function and encryption key, input the message and the key into the hash function. The resulting hash value is called MAC.

[0058] (4) Append MAC to message: Append the generated MAC to the original message to form an authenticated message.

[0059] (5) Sending message: The sender sends the authenticated message together with the MAC to the receiver.

[0060] (6) Verification process: After receiving the message, the receiver uses the same key and hash function to calculate the MAC of the received message. Then, the receiver compares the calculated MAC with the MAC attached to the message to see if they are consistent. If they are consistent, it means that the message has not been tampered with and the source is credible; if they are inconsistent, it means that the message may have been tampered with or forged.

[0061] S2. After receiving the first message, the gateway verifies the integrity of the first message through MAC1, then stores the first message, and then adds the GID to the first message, thereby sending the second message to the cloud {kana i ⊕h(EID i )||h(EID i )||h(GID)||MAC1}.

[0062] S3. After receiving the second message, the cloud first verifies the integrity of the second message through MAC1, and then verifies the EID based on the identity information in the database i and GID, get ECU i Kana i , then for ECU i Generate a set of random numbers Kv i and another set of random numbers kana i ', send the third message {kana i ⊕h(GID)||Kv i ⊕h(GID)||kana i '⊕h(GID)||MAC1}.

[0063] S4. After the gateway receives and verifies the integrity of the third message, it will i and the new kana i 'Store, and then the fourth message {Kv i ⊕h(EID i )||kana i '⊕h(EID i )||MAC1} is broadcast on the CAN bus, allowing ECU i Get your own Kv i and the new kana i '.

[0064] S5.ECU i The fifth message {Kv i ⊕kana i ||kana i '⊕h(EID i )} is forwarded to the cloud via the gateway; after the cloud receives and verifies the integrity of the fifth message, it determines that the ECU i Receive the correct Kv i and Kana i ', thus completing the authentication.

[0065] Among them, in the authentication process after the first authentication, the new pseudonym obtained by the ECU in the previous authentication is used as the old pseudonym for the next authentication; at the same time, the current authentication times are recorded, and the first MAC generation key is updated according to the current authentication times. The update expression formula of the first MAC generation key is: KMAC m =h(KMAC m-1 ); KMAC mIndicates the first MAC key generated after the update in the mth authentication, m ≥ 2. For example, the first authentication KMAC = QRNG, the second authentication KMAC = h(QRNG), the third authentication KMAC = h(h(QRNG)), and so on.

[0066] Key negotiation phase:

[0067] The gateway negotiates the same session key GK for each ECU. The key negotiation phase includes the following specific steps:

[0068] The gateway generates a partial session key seed ck for each ECU; for ECU i Part of the session key seed ck i , ck i For Kv i The XOR value of Kv of all other ECUs except .

[0069] The gateway generates the sixth message {kana i ||ck i ⊕h(EID i )||MAC1||t2} and broadcast it on the CAN bus, so that the ECU i Get ck after receiving the broadcast message i , by calculating ck i ⊕Kv i =GK, each ECU obtains the same session key; wherein t2 is the timestamp of generating the sixth message. In this embodiment, four ECUs (ECU1~ECU4) are taken as an example, and their corresponding ck, Kv and session key GK examples are shown in Table 1.

[0070] Table 1: ck, Kv and GK expressions corresponding to the four ECUs

[0071]

[0072] The parameters in Table 1 are simplified by letters A, B, C, and D. It can be seen that each ECU ultimately has the same session key GK.

[0073] In-car communication stage:

[0074] When the sender ECUa sends a message M to the receiver ECUb, ECUa uses h(kana') as the second MAC generation key to generate a message authentication code MAC2, uses GK to encrypt the message {M||t1||MAC2} and sends it to ECUb; after receiving the message, ECUb uses GK to decrypt it and obtains the message M after verifying that the timestamp t1 and MAC2 are qualified; h(·) is the hash operation, and t1 is the encrypted timestamp.

[0075] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A dynamic identity-based in-vehicle network communication method, characterized in that: include: Authentication phase: Each electronic control unit (ECU) generates a random number kana as its old pseudonym, and uses a quantum random number QRNG as the first MAC generation key to generate a message authentication code MAC1; MAC1 is used to authenticate messages between the ECU and the gateway and the cloud; the cloud generates a random number kana' for each ECU as the new pseudonym of the ECU, thus completing the first authentication; In the authentication process after the first authentication, the new pseudonym obtained by the ECU in the previous authentication is used as the old pseudonym for the next authentication; at the same time, the current authentication number is recorded, and the first MAC generation key is updated according to the current authentication number; Key negotiation phase: The gateway negotiates the same session key GK for each ECU; In-vehicle communication stage: When the sender ECUa sends a message M to the receiver ECUb, ECUa uses h(kana') as the second MAC generation key to generate a message authentication code MAC2, uses GK to encrypt the message {M||t1||MAC2} and sends it to ECUb; after receiving the message, ECUb uses GK to decrypt it and obtains the message M after verifying that the timestamp t1 and MAC2 are qualified; h(·) is the hash operation, and t1 is the encrypted timestamp.

2. The method for in-vehicle network communication based on dynamic identity according to claim 1, characterized in that: The initial certification process includes the following specific steps: S1. Any ECU i Generate random number kana i As its old pseudonym, the quantum random number QRNG is used as the first MAC generation key to generate a message authentication code MAC1, and then the first message {kana i ⊕h(EID i )||h(EID i )||MAC1}; where h(·) represents a hash operation, ⊕ represents an XOR operation, || represents a logical AND, and EID i Indicates ECU i identity information; S2. After the gateway receives and verifies the integrity of the first message, it stores the first message and sends the second message to the cloud. i ⊕h(EID i )||h(EID i )||h(GID)||MAC1}; where GID represents the identity information of the gateway; S3. After the cloud receives and verifies the integrity of the second message, it sends the message to the ECU. i Generate a set of random numbers Kv i and another set of random numbers kana i ', send the third message {kana i ⊕h(GID)||Kv i ⊕h(GID)||kana i '⊕h(GID)||MAC1}; S4. After the gateway receives and verifies the integrity of the third message, the fourth message {Kv i ⊕h(EID i )||kana i '⊕h(EID i )||MAC1} is broadcast on the CAN bus, allowing ECU i Get your own Kv i and the new kana i '; S5.ECU i The fifth message {Kv i ⊕kana i ||kana i '⊕h(EID i )} is forwarded to the cloud via the gateway; after the cloud receives and verifies the integrity of the fifth message, it determines the ECU i Receive the correct Kv i and Kana i ', thus completing the authentication.

3. The method for in-vehicle network communication based on dynamic identity according to claim 2, characterized in that: Before the authentication stage, the in-vehicle network communication method further includes: Registration stage: The cloud database pre-stores the identity information of the gateway and each ECU; ECU i The message {h(EID i )} to the gateway, which then sends the message {h(EID i )||h(GID)}; The cloud receives the message {h(EID i )||h(GID)}, verify the EID according to the identity information stored in the database i and GID, then generate a quantum random number QRNG and send a message {QRNG||h(GID)} to the gateway; After the gateway receives the message {QRNG||h(GID)} and verifies the integrity, it broadcasts QRNG on the CAN bus, allowing the ECU i Get QRNG; ECU i The message {QRNG⊕EID i ||h(EID i )} is forwarded to the cloud through the gateway, and the cloud receives and verifies the message {QRNG⊕EID i ||h(EID i )}, determine the integrity of the ECU i QRNG received, registration completed.

4. The method for in-vehicle network communication based on dynamic identity according to claim 1, characterized in that: The key negotiation phase includes the following specific steps: The gateway generates a partial session key seed ck for each ECU; for ECU i Part of the session key seed ck i , ck i For Kv i XOR value of Kv of all other ECUs except The gateway generates the sixth message {kana i ||ck i ⊕h(EID i )||MAC1||t2} and broadcast it on the CAN bus, so that the ECU i Get ck after receiving the broadcast message i , by calculating ck i ⊕Kv i =GK, each ECU obtains the same session key; where t2 is the timestamp for generating the sixth message.

5. The method for in-vehicle network communication based on dynamic identity according to claim 1, characterized in that: The first MAC generation key in the initial authentication process is KMAC1, KMAC1 = QRNG; in the authentication process after the initial authentication, the update expression formula of the first MAC generation key is: KMAC m =h(KMAC m-1 ); KMAC m Indicates the first MAC key generated after update in the m-th authentication, m≥2.

6. A dynamic identity-based in-vehicle network communication system, comprising a cloud, a gateway and multiple ECUs, characterized in that: The in-vehicle network communication system is used to implement an in-vehicle network communication method based on dynamic identity as described in any one of claims 1 to 5.