A method and system for lightweight secure communication between in-vehicle network ECUs
By using elliptic curve-based batch authentication and the ASCON encryption algorithm, combined with data sensitivity differentiation processing, the security and efficiency issues in communication between ECUs in the vehicle network are solved, achieving lightweight secure communication, preventing attacks and reducing computational overhead.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2025-11-07
- Publication Date
- 2026-04-17
AI Technical Summary
The existing communication between ECUs in the vehicle network via the CAN protocol suffers from problems such as plaintext broadcasting, lack of integrity/authenticity verification, and lack of anti-replay mechanism, resulting in low security. At the same time, traditional encryption methods have high computational overhead, which affects the efficiency of in-vehicle network communication.
ECU authentication is performed using elliptic curve-based batch authentication technology, combined with a data sensitivity-differentiated encryption mechanism. The ASCON encryption algorithm is used to encrypt and authenticate confidential data, while non-confidential data is signed. Timestamps are used to prevent replay attacks, and session keys are updated periodically.
It enables secure communication between ECUs, ensures the confidentiality and integrity of data transmission, prevents attackers from forging messages or tampering with data, reduces computational overhead and communication latency, and improves the communication efficiency and security of the in-vehicle network.
Smart Images

Figure CN121077828B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of in-vehicle network communication technology, specifically a lightweight and secure communication method and system for in-vehicle network ECUs. Background Technology
[0002] As more and more cars become connected to the internet, while bringing convenience, the information security situation has become increasingly severe and complex. For vehicles, vehicle-to-everything (V2X) networks are divided into external networks and internal networks. External networks include vehicle-to-vehicle, vehicle-to-infrastructure, vehicle-to-cloud, and cloud-to-infrastructure connections, while internal networks refer to the network within the vehicle itself. Various vehicle ECUs (Electronic Control Units) and CAN (Controller Area Network) buses are the main components of the internal network. An ECU is a microcomputer inside the car used to control and manage various electronic systems, such as the engine, transmission, braking system, airbags, and infotainment system. CAN is a multi-master bus network that allows multiple nodes in the network to send and receive messages in an unpredictable order. In the internal network system, communication between ECUs is currently mainly conducted through the CAN bus. ECUs use the CAN communication protocol to efficiently exchange data and coordinate control with other ECUs, forming a networked vehicle control system. This communication method has high reliability and anti-interference capabilities, ensuring the stable and efficient operation of the vehicle's electronic systems during driving. For example, the engine ECU communicates with the transmission ECU via the CAN bus to optimize shift timing and improve fuel efficiency; simultaneously, the ABS ECU (Anti-lock Braking System) can exchange information with the ESP ECU (Electronic Stability Program) in real time to enhance the vehicle's active safety performance. Through CAN communication, the various ECUs in a car can perform distributed control, making vehicle functions more complex and intelligent.
[0003] While CAN communication between ECUs offers advantages such as high reliability, real-time performance, strong anti-interference capabilities, flexibility, and cost-effectiveness, making it suitable for automotive systems requiring rapid response, its initial design did not consider security and suffers from three critical problems: 1. Plaintext broadcasting: All data is transmitted in plaintext without encryption, making it vulnerable to eavesdropping (e.g., obtaining sensitive data such as engine speed and acceleration / deceleration commands); 2. Lack of integrity / authenticity verification: The absence of tamper detection and authentication allows attackers to forge ECU messages (e.g., impersonating the engine ECU to send incorrect commands) or tamper with data (e.g., modifying brake signals); 3. Lack of replay protection: Attackers can intercept legitimate messages and resend them, causing the ECU to repeatedly execute the same command (e.g., repeatedly triggering door lock switches). Therefore, it is urgent to improve the security of CAN bus communication between in-vehicle ECUs.
[0004] To address these security concerns, and considering the heavy load on the CAN bus with hundreds of vehicle ECUs connected to it, frequent negotiation or key distribution would overwhelm the CAN bus, significantly impacting the efficiency of in-vehicle network (IVN) information transmission. Common existing technologies improve IVN security and reliability by establishing additional secure communication channels between each vehicle ECU and performing authentication and authorization. However, these methods not only increase the computational overhead of each vehicle ECU but also require each ECU to store the identity and key information of all other potentially communicating vehicle ECUs. This leads to significant storage space consumption for each ECU, severe IVN communication delays, and a substantial reduction in IVN information transmission efficiency, even affecting the vehicle system's response speed. Summary of the Invention
[0005] To address the technical issues of low security in existing in-vehicle network ECU communication scenarios via the CAN protocol, and the unsuitability of traditional encryption methods due to their high computational overhead, this invention provides a lightweight and secure communication method and system for in-vehicle network ECUs.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] This invention discloses a lightweight and secure communication method for inter-ECU communication in a vehicle network, comprising:
[0008] ECU authentication phase: Each ECU interacts with the CAN gateway, and the CAN gateway performs batch authentication to verify the legitimacy of all ECUs;
[0009] Data classification stage: The data to be transmitted is classified as confidential or non-confidential based on its sensitivity.
[0010] Data transmission phase: If the data to be transmitted is confidential data, the sending ECU uses the session key and the ASCON encryption algorithm to encrypt and authenticate the plaintext of the confidential data, generating ciphertext and authentication parameters, and sends the data packet containing the ciphertext and authentication parameters to the receiving ECU; if the data to be transmitted is non-confidential data, the sending ECU uses the session key and the ASCON encryption algorithm to sign but not encrypt the plaintext of the non-confidential data, generating an authentication tag, and sends the data packet containing the plaintext of the non-confidential data and the authentication tag to the receiving ECU.
[0011] As a further improvement to the above scheme, prior to the ECU identity authentication stage, the communication method further includes:
[0012] System initialization phase: The in-vehicle network system generates basic safety parameters and publishes them to the CAN gateway and all ECUs; wherein, the in-vehicle network system performs the following specific steps:
[0013] Choose a one-way hash function H (·) is used for data tamper prevention and signature verification;
[0014] Determine the parameters of the elliptic curve, including the finite field. Elliptic curve equation E Base point P and prime order q ;
[0015] Generate a public / private key pair for the vehicle's internal network; where the private key for the vehicle's internal network is... The in-vehicle network public key is ; For prime numbers of order 1 q The prime group;
[0016] Set a safety threshold Subsequently, the in-vehicle network system forms a common parameter set. M 0, and broadcasts to the CAN gateway and all ECUs via a secure channel. .
[0017] As a further improvement to the above solution, for any ECU i The following specific steps are performed during the system initialization phase:
[0018] Generate its own public / private key pair; among which, ECU i The private key is ECU i The public key is ;
[0019] Calculate certification benchmark parameters ;in, For ECU i Identity information;
[0020] ECU i Store relevant registration information Simultaneously, the registration information is sent to the CAN gateway via a secure channel, thus completing the system initialization phase.
[0021] As a further improvement to the above solution, ECU i The following specific steps are performed during the ECU authentication phase:
[0022] Generate random numbers With timestamp Simultaneously calculate hash digest public key binding parameters ;in, ; ; This indicates splicing / joining.
[0023] Generate digital signature ;in, modq Represents an elliptic curve E right q Take the remainder;
[0024] Constructing the bulk authentication request message body And send the message body to the CAN gateway;
[0025] The CAN gateway receives the message body Generating timestamps ,judge and Does the time difference exceed the set time difference threshold? If not, then proceed according to the message body. Extract pre-acquired data and and obtained from the message body and Comparison;
[0026] If the comparison matches, the CAN gateway continues to calculate the following signature verification parameters: random number bound data. Authentication benchmark binding parameters and public key validity parameters ;in, ; ; ;
[0027] The CAN gateway calculates the batch summation signature verification equation and determines whether the equation is true. If it is true, all ECU identities are valid; otherwise, some ECU identities are invalid. The batch summation signature verification equation is as follows:
[0028] ;
[0029] In the formula, n The total number of ECUs participating in the authentication process.
[0030] As a further improvement to the above scheme, the process of transmitting confidential data specifically includes:
[0031] The sending ECU, i.e., ECU1, generates the timestamp. and generate session keys. The plaintext is encrypted using the ASCON encryption algorithm to calculate the ciphertext and authentication parameters. The calculation formula is as follows: Then an encrypted message is generated. and timestamp Together they are sent to the receiving ECU; among which, PT For plain text; CT It is encrypted; APauth For authentication parameters; Indicates use Perform ASCON encryption; N The random number used for ASCON encryption; AD Associated data when ASCON is encrypted; ; This indicates the use of ECU2's public key. Encrypt;
[0032] The receiving ECU, i.e., ECU2, receives the message. Generating timestamps ,judge and Does the time difference exceed the set time difference threshold? If not, use the private key. Regarding the message Decryption The plaintext was then calculated using the ASCON decryption algorithm. PT and authentication parameters APauth The calculation formula is: Final verification APauth 'and Apauth If they are equal, output the plaintext. PT Correct, terminate the process.
[0033] As a further improvement to the above scheme, the transmission process of non-confidential data specifically includes:
[0034] The sending ECU, i.e., ECU1, generates the timestamp. and generate session keys. The plaintext is encrypted using the ASCON algorithm, and only authentication tags are generated. The calculation formula is as follows: Then a message is generated. and timestamp Together they are sent to the receiving ECU; among which, PT For plain text; CT It is encrypted; Indicates use Perform ASCON encryption; N The random number used for ASCON encryption; AD For data associated with ASCON encryption, AD Assigning a value to null null , PT The position is assigned the null value, and after processing by the algorithm, the null value is output. null of CT sign Tag ; ;
[0035] The receiving ECU, i.e., ECU2, receives the message. Generating timestamps ,judge and If the time difference does not exceed the set time difference threshold, the plaintext is calculated using the ASCON decryption algorithm. PT and signature Tag The calculation formula is: Final verification Tag 'and Tag If they are equal, output the plaintext. PT Correct, terminate the process.
[0036] As a further improvement to the above scheme, during the data transmission phase, the session key... Updates are performed according to a set period, and the formula for the update is:
[0037] ;
[0038] In the formula, A random number generated for ECU1.
[0039] As a further improvement to the above solution, during the system initialization phase, when the CAN gateway receives data from the ECU... i After registering the information, the ECU in the registration information will also be included. i public key The message is broadcast to the other ECUs so that the sending and receiving ECUs can obtain each other's public key information.
[0040] This invention also discloses a lightweight secure communication system for inter-ECU communication in a vehicle network, applying the lightweight secure communication method for inter-ECU communication in a vehicle network as described above; the communication system includes:
[0041] The CAN gateway is used to store the registration information of ECUs; it is also used to interact with multiple ECUs and perform batch authentication to verify the legitimacy of the ECUs.
[0042] Multiple ECUs, each acting as a data sender, classify the data to be transmitted as confidential or non-confidential based on data sensitivity. If the data to be transmitted is confidential, the sending ECU uses a session key and the ASCON encryption algorithm to encrypt and authenticate the plaintext of the confidential data, generating ciphertext and authentication parameters, and sends a data packet containing the ciphertext and authentication parameters to the receiving ECU. If the data to be transmitted is non-confidential, the sending ECU uses a session key and the ASCON encryption algorithm to sign but not encrypt the plaintext of the non-confidential data, generating an authentication tag, and sends a data packet containing the plaintext of the non-confidential data and the authentication tag to the receiving ECU.
[0043] As a further improvement to the above solution, the communication system further includes:
[0044] The identity authentication module is used to perform batch identity authentication of ECUs by the CAN gateway;
[0045] The ASCON encryption module is used to perform encryption, decryption, and verification operations of the ASCON encryption algorithm.
[0046] Compared with the prior art, the beneficial effects of the present invention are:
[0047] This invention discloses a lightweight and secure communication method for inter-ECU communication within a vehicle network. ECU authentication utilizes elliptic curve batch authentication technology to verify the overall legitimacy of the ECU identity, minimizing computational overhead. Simultaneously, a differentiated encryption mechanism based on data sensitivity is employed. Confidential data is secured through both signing and encryption, while non-confidential data is signed but not encrypted, balancing security and overhead within the vehicle network system. The session keys used for data transmission between ECUs are periodically updated, ensuring forward and backward security. Finally, the core encryption algorithm, ASCON, is a lightweight encryption algorithm that exhibits excellent performance in CAN protocol-based communication scenarios between ECUs within the vehicle network, without consuming excessive resources, significantly increasing communication latency, or reducing information transmission efficiency.
[0048] The present invention discloses a lightweight and secure communication method for ECUs in an in-vehicle network. It enables encrypted data transmission based on different encryption mechanisms during communication between ECUs, ensuring that data transmission cannot be stolen. It also has integrity and authenticity verification to prevent attackers from forging ECU messages or tampering with data. Finally, the introduction of timestamps in ECU interaction can effectively resist replay attacks and achieve secure communication between ECUs in the in-vehicle network. Attached Figure Description
[0049] Figure 1This is a flowchart of a lightweight and secure communication method for inter-ECU communication in a vehicle network, as described in Embodiment 1 of the present invention.
[0050] Figure 2 This is a signaling diagram of the system initialization phase in Embodiment 1 of the present invention.
[0051] Figure 3 This is a signaling diagram of the ECU authentication stage in Embodiment 1 of the present invention.
[0052] Figure 4 This is a signaling diagram of the confidential data transmission process in Embodiment 1 of the present invention.
[0053] Figure 5 This is a signaling diagram of the non-confidential data transmission process in Embodiment 1 of the present invention.
[0054] Figure 6 This is a schematic diagram of the lightweight and secure communication system between ECUs in an in-vehicle network according to Embodiment 2 of the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] Example 1
[0057] Please see Figure 1 To ensure the security of communication when transmitting messages between ECUs, and to solve the problem that traditional encryption methods have high computational overhead and are not suitable for in-vehicle network communication scenarios, this embodiment provides a lightweight and secure communication method for in-vehicle network ECUs. The method mainly includes four stages: system initialization stage, ECU identity authentication stage, data classification stage, and data transmission stage.
[0058] S1. System Initialization Phase: The in-vehicle network (IVN) system generates the fundamental safety parameters required for the entire process and publishes them to the CAN gateway and all ECUs. The specific process is as follows: Figure 2 As shown, that is, steps S11 to S14.
[0059] S11. Provide unified rules for batch authentication: Select a one-way hash function. H (·) is used for data tamper-proofing and signature verification.
[0060] S12. Determine the parameters of the elliptic curve, including the finite field. Elliptic curve equation E : Base point P and prime order q The equation of the elliptic curve satisfies .
[0061] S13. Generate a public / private key pair for the in-vehicle network; where the in-vehicle network private key is... The in-vehicle network public key is ; For prime numbers of order 1 q The prime group is used to generate the in-vehicle network private key. The in-vehicle network public key is obtained by multiplying the private key by its elliptic curve. This ensures that the public key can be derived from the private key, but the private key cannot be derived from the public key, thus guaranteeing key security.
[0062] S14. Additionally, to prevent replay attacks, the in-vehicle network system will set a security threshold. Subsequently, the in-vehicle network system forms a common parameter set. M 0, and broadcasts to the CAN gateway and all ECUs via a secure channel. .
[0063] Each ECU (Electronic Control Unit, such as the engine ECU and chassis ECU) is referred to as ECU. i During the system initialization phase, the following specific steps are executed, namely S15~S17.
[0064] S15. Generate its own public / private key pair; where ECU i The private key is ECU i The public key is That is, the ECU private key is generated from the prime number group, and the public key is obtained by the elliptic curve dot product of the private key.
[0065] S16. Calculate certification baseline parameters ;in, For ECU i Identity information.
[0066] S17.ECU i Store relevant registration information Simultaneously, the registration information is sent to the CAN gateway via a secure channel, thus completing the system initialization phase.
[0067] In some embodiments, when the CAN gateway receives data from the ECU during the system initialization phase... i After registering the information, the ECU in the registration information will also be included. i public key The message is broadcast to the other ECUs so that the sending and receiving ECUs can obtain each other's public key information.
[0068] S2. ECU Authentication Phase: Each ECU interacts with the CAN gateway, which performs batch authentication to verify the legitimacy of all ECUs. Among these, the ECU... i The following specific steps are performed during the ECU identity authentication stage, namely S21~S23.
[0069] S21. Generate random numbers With timestamp Simultaneously calculate hash digest public key binding parameters ;in, ; ; This indicates concatenation processing, i.e., random numbers. Also from prime order q Generating random numbers from the prime group, using random numbers... , , Concatenate hash to obtain .
[0070] S22. Generate a digital signature, represented as follows:
[0071] ;
[0072] in, modq Represents an elliptic curve E right q Take the remainder.
[0073] S23. Construct the bulk authentication request message body And send the message body to the CAN gateway.
[0074] In step S2, the CAN gateway performs the following specific steps, namely S24~S26.
[0075] The S24.CAN gateway receives the message body. Generating timestamps ,judge and Does the time difference exceed the set time difference threshold? If the limit is exceeded, the CAN gateway will not perform further processing. If the limit is not exceeded, it will proceed according to the information in the message body. Extract pre-acquired data and and obtained from the message body and If the comparison is not consistent, the authentication process ends.
[0076] S25. If the comparison matches, the CAN gateway continues to calculate the following signature verification parameters: random number bound data. Authentication benchmark binding parameters and public key validity parameters ;in, ; ; .
[0077] S26. Finally, the CAN gateway replaces "individual signature verification" with "overall equation verification." It calculates a batch summation signature verification equation and determines whether the equation is true. If true, all ECU identities are valid; otherwise, some ECU identities are invalid. The batch summation signature verification equation is as follows:
[0078] ;
[0079] In the formula, n This represents the total number of ECUs participating in the authentication process. Specifically, if a single ECU... i If the signature is valid, the individual verification equation is satisfied; if the sum of the equations for all valid signatures is true, then all ECU identities are valid; if there is even one invalid signature, the total equation will not be true. If the equation is true, all ECU identities are valid, and the process proceeds to the next stage.
[0080] S3. Data Classification Stage: Classify the data to be transmitted as confidential or non-confidential based on its sensitivity.
[0081] In this embodiment, the sensitivity of various types of transmitted data can be preset at the vehicle factory. For confidential data such as commands that affect the core operation of the vehicle (e.g., engine speed, acceleration / deceleration commands, clutch operation, etc.), signature and encryption methods are used. For non-confidential data such as parameters that have no control impact (e.g., exhaust gas concentration, in-vehicle temperature, etc.), only signature without encryption is used to balance the security and overhead of in-vehicle network communication and reduce the overall computational load of the system.
[0082] S4. Data Transmission Stage: If the data to be transmitted is confidential data, the sending ECU uses the session key and the ASCON encryption algorithm to encrypt and authenticate the plaintext of the confidential data, generating ciphertext and authentication parameters, and sends the data packet containing the ciphertext and authentication parameters to the receiving ECU; if the data to be transmitted is non-confidential data, the sending ECU uses the session key and the ASCON encryption algorithm to sign but not encrypt the plaintext of the non-confidential data, generating an authentication tag, and sends the data packet containing the plaintext of the non-confidential data and the authentication tag to the receiving ECU.
[0083] This embodiment provides a brief explanation of ASCON. The ASCON algorithm, with its advantages of high efficiency and security, is widely used in data security protection. The ASCON algorithm consists of encryption and decryption. The encryption process comprises initialization, associated data verification, plaintext encryption, decoding, and tag generation. The decryption process is similar to the encryption process, but differs in that during each iteration in the decryption phase, the input ciphertext group is compared with S... r Perform an XOR operation, absorb the ciphertext, and output the plaintext. The initialization phase process is as follows: the first step is to build... IV The initial vector, its calculation formula is as follows: In the formula, a and b Indicates the number of permutation rounds; IV It represents a constant vector; r This represents the outer portion of the permutation performed by the ASCON algorithm. The second step yields a 320-bit length S, calculated as follows: In the formula, N Represents a random sequence; K This represents the key. The third step involves... a of p The XOR operation between the permutation and the key is expressed as follows: In the formula p a This indicates the substitution methods used in the initialization and label generation phases. This concludes the initialization process, and associated data processing begins. Next, [the process will proceed as follows]. A 1 to A s implement S Next, during this period each piece A i All with S The first r bits of data are XORed, and then concatenated with c to form a 320-bit data set. This data is then used to run p round b. b Permutation, calculation formula: In the formula p b Permutation methods when representing related data; S r They represent passing through a Wheel replacement and b The round permutation divides the 320-bit content into its external and internal parts, namely, respectively... r Bit and c Bits. This concludes the associated data processing, and then the plaintext encryption phase begins. Processing starts from the first block and continues until the... tDuring the process of each module, it is necessary to obtain the ciphertext corresponding to the module. The ciphertext block is obtained by XORing the module with the first r bits of the current 320-bit big data block. The calculation expression is: In the formula, C i This represents the ciphertext block. Then proceed... b Permutation operation , gain new S The next module will proceed with the processing; its calculation expression is: Finally, a final processing step is performed to generate a 128-bit tag, which is used for verification during decryption. During decryption, if the tag is verified, an error flag is returned instead of plaintext if the verification fails. Otherwise, plaintext is returned. During tag verification, the key is transformed into its internal state and subjected to a round of permutation. p a The state transition is calculated using the following expression: Furthermore, permutation is the most important component of the ASCON algorithm, and it plays a crucial role throughout the entire permutation process. p a and p b The permutation structure is consistent, but unlike the number of rounds, the permutation steps involve first dividing the 320 bits into 5 parts, and the calculation formula is as follows: In the formula, , , , , It consists of 5 parts totaling 320 bits. Next, The XOR operation takes the value of a constant, and its calculation formula is as follows: In the formula C r This is a constant. Next, replacements are performed in 5-bit units. Following this, [the process is repeated for each unit]. , , , , Shift and XOR operations are performed. Additionally, the diffusion layer in the ASCON algorithm allows the influence of the plaintext and key to quickly spread throughout the ciphertext. The obfuscation layer uses obfuscation to hide and change the relationship between the ciphertext and key, thereby increasing the complexity between them. The initialization and associated data processing in the ASCON algorithm decryption process are the same as in the encryption process; the remaining steps involve, in each iteration of the phase, when processing the input ciphertext group, combining it with... S r Perform an XOR operation, absorb the ciphertext, and output the plaintext.
[0084] In this embodiment, the process of transmitting confidential data specifically includes:
[0085] The sending ECU, i.e., ECU1, generates the timestamp. and generate session keys. The plaintext is encrypted using the ASCON encryption algorithm to calculate the ciphertext and authentication parameters. The calculation formula is as follows: Then an encrypted message is generated. and timestamp Together they are sent to the receiving ECU; among which, PT For plain text; CT It is encrypted; APauth For authentication parameters; Indicates use Perform ASCON encryption; N The random number used for ASCON encryption; AD Associated data when ASCON is encrypted; ; This indicates the use of ECU2's public key. Encrypt;
[0086] The receiving ECU, i.e., ECU2, receives the message. Generating timestamps ,judge and If the time difference exceeds the set time difference threshold, ECU2 will not perform further processing; otherwise, the private key will be used. Regarding the message Decryption The plaintext was then calculated using the ASCON decryption algorithm. PT and authentication parameters APauth The calculation formula is: Final verification APauth 'and Apauth If they are equal, output the plaintext. PT Correct, terminate the process.
[0087] The transmission process of non-confidential data specifically includes:
[0088] The sending ECU, i.e., ECU1, generates the timestamp. and generate session keys. The plaintext is encrypted using the ASCON algorithm, and only authentication tags are generated. The calculation formula is as follows: Then a message is generated. and timestamp Together they are sent to the receiving ECU; among which, PT For plain text; CT It is encrypted; Indicates use Perform ASCON encryption;N The random number used for ASCON encryption; AD For data associated with ASCON encryption, AD Assigning a value to null null , PT The position is assigned the null value, and after processing by the algorithm, the null value is output. null of CT sign Tag ; ;
[0089] The receiving ECU, i.e., ECU2, receives the message. Generating timestamps ,judge and If the time difference does not exceed the set time difference threshold, the plaintext is calculated using the ASCON decryption algorithm. PT and signature Tag The calculation formula is: Final verification Tag 'and Tag If they are equal, output the plaintext. PT Correct, terminate the process.
[0090] In this embodiment, during the data transmission phase, the session key... Updates are performed according to a set period, and the formula for the update is:
[0091] ;
[0092] In the formula, A random number generated for ECU1. Forward and backward security of the key are ensured by periodically updating the session key.
[0093] In summary, the lightweight secure communication method for in-vehicle network ECUs proposed in this embodiment utilizes batch authentication technology to verify the legitimacy of each ECU, ensuring that the identity authentication process does not incur excessive computational overhead. Simultaneously, it employs a flexible encryption mechanism based on data sensitivity, differentiating between confidential and non-confidential data to balance security and overhead. Furthermore, the periodic updating of the key guarantees forward and backward security, ensuring that even if an attacker cracks a key by collecting historical data and analyzing encryption patterns, the communication process remains unaffected. Finally, this invention uses the lightweight encryption algorithm ASCON, which does not significantly increase communication latency or reduce the efficiency of information transmission within the in-vehicle network.
[0094] Example 2
[0095] This embodiment provides a lightweight secure communication system for in-vehicle network ECUs, applying the lightweight secure communication method for in-vehicle network ECUs in Embodiment 1; the communication system includes: a CAN gateway and multiple ECUs, and may also include an identity authentication module and an ASCON encryption module.
[0096] The CAN gateway is used to store the registration information of ECUs; it is also used to interact with multiple ECUs and perform batch authentication to verify the legitimacy of the ECUs.
[0097] When each ECU acts as a data sender, it classifies the data to be transmitted as confidential or non-confidential based on data sensitivity. If the data to be transmitted is confidential, the sending ECU uses a session key and the ASCON encryption algorithm to encrypt and authenticate the plaintext of the confidential data, generating ciphertext and authentication parameters, and sends a data packet containing the ciphertext and authentication parameters to the receiving ECU. If the data to be transmitted is non-confidential, the sending ECU uses a session key and the ASCON encryption algorithm to sign but not encrypt the plaintext of the non-confidential data, generating an authentication tag, and sends a data packet containing the plaintext of the non-confidential data and the authentication tag to the receiving ECU.
[0098] The identity authentication module is used to perform batch identity authentication of ECUs by the CAN gateway; the ASCON encryption module is used to perform encryption, decryption and verification operations of the ASCON encryption algorithm.
[0099] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for lightweight secure communication between in-vehicle network ECUs, characterized by, include: ECU authentication phase: Each ECU interacts with the CAN gateway, and the CAN gateway performs batch authentication to verify the legitimacy of all ECUs; Data classification stage: The data to be transmitted is classified as confidential or non-confidential based on its sensitivity. Data transmission phase: If the data to be transmitted is confidential data, the sending ECU uses the session key and ASCON encryption algorithm to encrypt and authenticate the plaintext of the confidential data, generate ciphertext and authentication parameters, and send the data packet containing the ciphertext and authentication parameters to the receiving ECU. If the data to be transmitted is non-confidential, the sending ECU uses the session key and the ASCON encryption algorithm to sign but not encrypt the plaintext of the non-confidential data, generates an authentication tag, and sends the data packet containing the plaintext of the non-confidential data and the authentication tag to the receiving ECU. The specific process of transmitting confidential data includes: The sending ECU, i.e., ECU1, generates the timestamp. and generate session keys. The plaintext is encrypted using the ASCON encryption algorithm to calculate the ciphertext and authentication parameters. The calculation formula is as follows: Then an encrypted message is generated. and timestamp Together they are sent to the receiving ECU; among which, PT For plain text; CT It is encrypted; APauth For authentication parameters; Indicates use Perform ASCON encryption; N The random number used for ASCON encryption; AD Associated data when ASCON is encrypted; ; This indicates the use of ECU2's public key. Encrypt; The receiving ECU, i.e., ECU2, receives the message. Timestamp generated later ,judge and Does the time difference exceed the set time difference threshold? If not, use the private key. Regarding the message Decryption The plaintext was then calculated using the ASCON decryption algorithm. PT and authentication parameters APauth The calculation formula is: Final verification APauth 'and Apauth If they are equal, output the plaintext. PT Correct, terminate the process.
2. The lightweight and secure communication method for inter-ECU communication in a vehicle network according to claim 1, characterized in that, Prior to the ECU authentication phase, the communication method further includes: System initialization phase: The in-vehicle network system generates basic safety parameters and publishes them to the CAN gateway and all ECUs; wherein, the in-vehicle network system performs the following specific steps: Choose a one-way hash function H (·) is used for data tamper-proofing and signature verification; Determine the parameters of the elliptic curve, including the finite field. Elliptic curve equation E Base point P and prime order q ; Generate a public / private key pair for the vehicle's internal network; where the vehicle's internal network private key is... The in-vehicle network public key is ; For prime numbers of order 1 q The prime group; Set a safety threshold Subsequently, the in-vehicle network system forms a common parameter set. M 0, and broadcasts to the CAN gateway and all ECUs via a secure channel. .
3. A lightweight and secure communication method for inter-ECU communication in a vehicle network according to claim 2, characterized in that, For any one ECU i The following specific steps are performed during the system initialization phase: Generate its own public / private key pair; among which, ECU i The private key is ECU i The public key is ; Calculate certification benchmark parameters ;in, For ECU i Identity information; ECU i Store relevant registration information Simultaneously, the registration information is sent to the CAN gateway via a secure channel, thus completing the system initialization phase.
4. A lightweight and secure communication method for inter-ECU communication in a vehicle network according to claim 3, characterized in that, ECU i The following specific steps are performed in the ECU identity authentication phase: Generate random numbers With timestamp Simultaneously calculate hash digest public key binding parameters ;in, ; ; This indicates splicing / joining. Generate digital signature ;in, modq Represents an elliptic curve E right q Take the remainder; Constructing the bulk authentication request message body And send the message body to the CAN gateway; The CAN gateway receives the message body Timestamp generated later ,judge and Does the time difference exceed the set time difference threshold? If not, then proceed according to the message body. Extract pre-acquired data and and obtained from the message body and Comparison; If the comparison matches, the CAN gateway continues to calculate the following signature verification parameters: random number bound data. Authentication benchmark binding parameters and public key validity parameters ;in, ; ; ; The CAN gateway calculates the batch summation signature verification equation and determines whether the equation is true. If it is true, all ECU identities are valid; otherwise, some ECU identities are invalid. The batch summation signature verification equation is as follows: In the formula, n The total number of ECUs participating in the authentication process.
5. A lightweight and secure communication method for inter-ECU communication in a vehicle network according to claim 4, characterized in that, The transmission process of non-confidential data specifically includes: The sending ECU, i.e., ECU1, generates the timestamp. and generate session keys. The plaintext is encrypted using the ASCON algorithm, and only authentication tags are generated. The calculation formula is as follows: Then a message is generated. and timestamp Together they are sent to the receiving ECU; among which, PT For plain text; CT It is encrypted; Indicates use Perform ASCON encryption; N The random number used for ASCON encryption; AD For data associated with ASCON encryption, AD Assigning a null value null , PT The position is assigned the null value, and after processing by the algorithm, the null value is output. null of CT sign Tag ; ; The receiving ECU, i.e., ECU2, receives the message. Timestamp generated later ,judge and If the time difference does not exceed the set time difference threshold, the plaintext is calculated using the ASCON decryption algorithm. PT and signature Tag The calculation formula is: Final verification Tag 'and Tag If they are equal, output the plaintext. PT Correct, terminate the process.
6. A lightweight and secure communication method for inter-ECU communication in a vehicle network according to claim 5, characterized in that, Session key during data transmission Updates are performed according to a set period, and the formula for the update is: In the formula, A random number generated for ECU1.
7. A lightweight and secure communication method for inter-ECU communication in a vehicle network according to claim 6, characterized in that, During the system initialization phase, when the CAN gateway receives data from the ECU... i After registering the information, the ECU in the registration information will also be included. i public key The message is broadcast to the other ECUs so that the sending and receiving ECUs can obtain each other's public key information.
8. A lightweight and secure communication system for inter-ECU communication within a vehicle network, characterized in that, The method for lightweight and secure communication between ECUs in a vehicle network, as described in any one of claims 1 to 7, is applied; the communication system includes: The CAN gateway is used to store the registration information of ECUs; it is also used to interact with multiple ECUs and perform batch authentication to verify the legitimacy of the ECUs. Multiple ECUs, each acting as a data sender, classify the data to be transmitted as confidential or non-confidential based on data sensitivity. If the data to be transmitted is confidential, the sending ECU uses a session key and the ASCON encryption algorithm to encrypt and authenticate the plaintext of the confidential data, generating ciphertext and authentication parameters, and sends a data packet containing the ciphertext and authentication parameters to the receiving ECU. If the data to be transmitted is non-confidential, the sending ECU uses a session key and the ASCON encryption algorithm to sign but not encrypt the plaintext of the non-confidential data, generating an authentication tag, and sends a data packet containing the plaintext of the non-confidential data and the authentication tag to the receiving ECU.
9. A lightweight and secure communication system for inter-ECU communication in a vehicle network according to claim 8, characterized in that, The communication system also includes: The identity authentication module is used to perform batch identity authentication of ECUs by the CAN gateway; The ASCON encryption module is used to perform encryption, decryption, and verification operations of the ASCON encryption algorithm.
Citation Information
Patent Citations
Method for secure communication of ECUs (Electronic control unit) in a vehicle network
CN106533655A
Intranet lightweight node identity authentication and hierarchical encryption and decryption method and system
CN118337371A