Data communication method and device of vehicle-mounted system, storage medium and electronic equipment
By employing a two-way authentication method using a random number seed and a signature value in the vehicle system, the problem of low data transmission security in multimedia controllers is solved, ensuring the security and integrity of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2026-04-10
AI Technical Summary
The lack of an effective authentication mechanism in the multimedia controller of the vehicle system makes data transmission vulnerable to illegal theft or tampering, affecting the normal operation of the vehicle and threatening driver safety.
A forward and reverse verification method is adopted. Two-way authentication is performed by using a random number seed and a signature value between the first and second controllers to ensure that data communication is only carried out after the identity information is verified.
It effectively prevents attackers from forging identities, ensures that data transmission is not tampered with or stolen during the transmission process, and improves the security of data communication within the vehicle system.
Smart Images

Figure CN121841640A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data communication technology, and in particular to a data communication method, apparatus, storage medium and electronic device for a vehicle system. Background Technology
[0002] In in-vehicle systems, the multimedia controller, as a core component, is responsible for handling various in-vehicle information and entertainment functions. When the multimedia controller is performing data transmission tasks, without an effective security mechanism, the transmitted data may be illegally stolen or tampered with. This could not only affect the normal operation of the vehicle but also pose a threat to the driver's life.
[0003] In related technologies, the data communication within the multimedia controller lacks an effective authentication mechanism, making the transmitted data easy to be illegally stolen or tampered with, resulting in low data communication security. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this application provides a data communication method, device, storage medium and electronic device for vehicle systems, which can improve the security of data communication within vehicle systems.
[0005] According to a first aspect of the embodiments of this application, a data communication method for an in-vehicle system is provided, applied to an in-vehicle system including a first controller and a second controller, the method including the following steps:
[0006] A forward verification method is executed; the forward verification method includes: the second controller sends a first authentication request to the first controller, the first controller generates a first random number seed, sends the first random number seed to the second controller, the second controller generates a first signature value according to the first random number seed, sends the first signature value to the first controller, and the first controller verifies the first signature value;
[0007] After the first controller verifies the first signature value, a reverse verification method is executed. The reverse verification method includes: the first controller sends a second authentication request to the second controller; the second controller generates a second random number seed and sends the second random number seed to the first controller; the first controller generates a second signature value based on the second random number seed and sends the second signature value to the second controller; and the second controller verifies the second signature value.
[0008] After the second controller verifies the second signature value, the second controller communicates with the first controller.
[0009] According to a second aspect of the embodiments of this application, a data communication device for a vehicle-mounted system is provided, comprising:
[0010] A forward verification method execution module is used to execute a forward verification method. The forward verification method includes: the second controller sending a first authentication request to the first controller; the first controller generating a first random number seed and sending the first random number seed to the second controller; the second controller generating a first signature value based on the first random number seed and sending the first signature value to the first controller; and the first controller verifying the first signature value.
[0011] The reverse verification method execution module is used to execute the reverse verification method after the first controller verifies the first signature value. The reverse verification method includes: the first controller sends a second authentication request to the second controller; the second controller generates a second random number seed and sends the second random number seed to the first controller; the first controller generates a second signature value according to the second random number seed and sends the second signature value to the second controller; and the second controller verifies the second signature value.
[0012] The data communication module is used to enable the second controller to communicate with the first controller after the second controller verifies the second signature value.
[0013] According to a third aspect of the embodiments of this application, an electronic device is provided, including a display, a processor, and a memory; the memory stores a computer program adapted to be loaded by the processor and executed as described above for a data communication method of an in-vehicle system.
[0014] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the data communication method of the vehicle system as described above.
[0015] This application embodiment executes a forward verification method; the forward verification method includes: a second controller sending a first authentication request to a first controller; the first controller generating a first random number seed and sending the first random number seed to the second controller; the second controller generating a first signature value based on the first random number seed and sending the first signature value to the first controller; the first controller verifying the first signature value; after the first controller successfully verifies the first signature value, a reverse verification method is executed; the reverse verification method includes: the first controller sending a second authentication request to the second controller; the second controller generating a second random number seed and sending the second random number seed to the first controller; the first controller generating a second signature value based on the second random number seed and sending the second signature value to the second controller; the second controller verifying the second signature value; after the second controller successfully verifies the second signature value, the second controller and the first controller communicate with each other. In this embodiment of the application, before data communication, the first controller and the second controller perform bidirectional verification of identity information based on a random number seed and a signature value. After the identity information of both the first controller and the second controller is verified, the first controller and the second controller communicate with each other. This can prevent attackers from forging identities and ensure that data is not tampered with or stolen during transmission, thereby improving the security of data communication within the vehicle system.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application.
[0017] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a data communication method for an in-vehicle system according to one embodiment of this application;
[0019] Figure 2 This is a schematic block diagram illustrating the structure of a data communication device for an in-vehicle system according to one embodiment of this application;
[0020] Figure 3 This is a schematic block diagram illustrating the structure of an electronic device according to one embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0022] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0023] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. The singular forms "a," "the," and "the" used in this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. The word "if" as used herein can be interpreted as "when," "when," or "in response to determination."
[0024] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0025] The application environment of the data communication method for the vehicle system provided in this application embodiment includes the data communication equipment of the vehicle system.
[0026] The data communication method for the vehicle system provided in this application embodiment can be executed by the data communication device of the vehicle system. This data communication device can be implemented through software and / or hardware. The data communication device can consist of two or more physical entities, or it can consist of a single physical entity. The data communication device can be any electronic device with a data communication application installed, such as a computer, mobile phone, tablet, or vehicle center console, etc.
[0027] The data communication method for an in-vehicle system according to embodiments of this application can be applied to data communication scenarios within an in-vehicle multimedia controller. The in-vehicle multimedia controller includes a first controller and a second controller. The first controller can be a microcontroller unit (MCU) for performing basic control tasks, such as monitoring sensor data, controlling actuators, and executing simple control logic, such as button input and LED indicator control. The second controller can be a system-on-a-chip (SOC) for processing multimedia data such as audio, video, and images, such as audio decoding, video rendering, and image processing. The first controller and the second controller communicate data to process various in-vehicle information and entertainment functions.
[0028] In the process of developing this invention, the inventors discovered that in related technologies, the data communication within the multimedia controller lacks an effective authentication mechanism. Attackers can easily impersonate legitimate clients or servers to communicate with the first or second controller, resulting in the illegal theft or tampering of data transmitted between the first and second controllers, leading to low data communication security. This not only affects the normal operation of the vehicle but may also pose a threat to the driver's life.
[0029] Therefore, before data communication, the first controller and the second controller perform bidirectional verification of identity information based on a random number seed and a signature value. After the identity information of both the first controller and the second controller is verified, the first controller and the second controller communicate with each other. This can prevent attackers from forging identities and ensure that data is not tampered with or stolen during transmission, thereby improving the security of data communication within the vehicle system.
[0030] Based on this, this application proposes a data communication method, apparatus, storage medium, and electronic device for an in-vehicle system.
[0031] Please see Figure 1 The data communication method for an in-vehicle system provided in this application embodiment is applied to an in-vehicle system, which includes a first controller and a second controller. The method includes the following steps:
[0032] S10: Execute the forward verification method; the forward verification method includes: the second controller sends a first authentication request to the first controller, the first controller generates a first random number seed, sends the first random number seed to the second controller, the second controller generates a first signature value according to the first random number seed, sends the first signature value to the first controller, and the first controller verifies the first signature value.
[0033] The first controller is a microcontroller unit within the vehicle multimedia controller, used to control multiple electronic components and execute basic control logic. The second controller is a system-on-a-chip within the vehicle multimedia controller, used to process vehicle multimedia data.
[0034] The first authentication request is used to trigger the first controller to verify the identity information of the second controller. Specifically, the first authentication request can be a message, command, or instruction.
[0035] In this embodiment of the application, when the first controller receives a first authentication request sent by the second controller, it generates a first random number seed according to a preset random number seed generation algorithm. The first random number seed is a 16-byte binary number.
[0036] Specifically, the first controller may acquire the time information of the vehicle system, process the time information according to a preset random number seed generation algorithm, and obtain a first random number seed. The preset random number seed generation algorithm includes, but is not limited to, the linear congruence method and the Mason tween rotation algorithm.
[0037] When the second controller receives the first random number seed, it uses a preset digital signature algorithm to sign the first random number seed, obtains a first signature value, and sends the first signature value to the first controller. The preset digital signature algorithm includes, but is not limited to, RSA digital signature algorithm, ECDSA (Elliptic Curve Digital Signature Algorithm), and Schnorr digital signature algorithm.
[0038] When the first controller receives the first signature value, it can use the public key to verify the first signature value to confirm whether the first signature value was generated by the private key corresponding to the public key, and whether the first random number seed was tampered with during transmission.
[0039] S20: After the first controller verifies the first signature value, a reverse verification method is executed; the reverse verification method includes: the first controller sends a second authentication request to the second controller, the second controller generates a second random number seed and sends the second random number seed to the first controller, the first controller generates a second signature value according to the second random number seed and sends the second signature value to the second controller, and the second controller verifies the second signature value.
[0040] The second authentication request is used to trigger the second controller to verify the identity information of the first controller. Specifically, the second authentication request can be a message, command, or instruction.
[0041] In this embodiment, when the first signature value verification passes, the first controller sends a second authentication request to the second controller. When the first signature value verification fails, the first controller actively restarts.
[0042] When the second controller receives the second authentication request, it generates a second random number seed according to a preset random number seed generation algorithm and sends the second random number seed to the first controller. The second random number seed is a 16-byte binary number.
[0043] When the first controller receives the second random number seed, it uses a preset digital signature algorithm to sign the second random number seed, obtains a second signature value, and sends the second signature value to the second controller. The preset digital signature algorithm includes, but is not limited to, RSA digital signature algorithm, ECDSA (Elliptic Curve Digital Signature Algorithm), and Schnorr digital signature algorithm.
[0044] When the second controller receives the second signature value, it can use the public key to verify the second signature value to confirm whether the second signature value was generated by the private key corresponding to the public key, and whether the second random number seed was tampered with during transmission.
[0045] S30: After the second controller verifies the second signature value, the second controller communicates with the first controller.
[0046] In this embodiment, when the second signature value verification passes, the first controller and the second controller communicate data. When the second signature value verification fails, the second controller stops responding. If the first controller does not receive a response signal from the second controller within a preset time interval, the first controller actively restarts. The preset time interval can be manually set according to actual needs. For example, the preset time interval is 10 seconds.
[0047] Applying the embodiments of this application, a forward verification method is executed. The forward verification method includes: a second controller sending a first authentication request to a first controller; the first controller generating a first random number seed and sending the first random number seed to the second controller; the second controller generating a first signature value based on the first random number seed and sending the first signature value to the first controller; and the first controller verifying the first signature value. After the first controller successfully verifies the first signature value, a reverse verification method is executed. The reverse verification method includes: the first controller sending a second authentication request to the second controller; the second controller generating a second random number seed and sending the second random number seed to the first controller; the first controller generating a second signature value based on the second random number seed and sending the second signature value to the second controller; and the second controller verifying the second signature value. After the second controller successfully verifies the second signature value, the second controller and the first controller communicate with each other. In this embodiment of the application, before data communication, the first controller and the second controller perform bidirectional verification of identity information based on a random number seed and a signature value. After the identity information of both the first controller and the second controller is verified, the first controller and the second controller communicate with each other. This can prevent attackers from forging identities and ensure that data is not tampered with or stolen during transmission, thereby improving the security of data communication within the vehicle system.
[0048] In an optional embodiment, the first controller stores a first public key, and the second controller stores a first private key paired with the first public key. Step S10, where the second controller generates the first signature value based on the first random number seed, includes step S11, as follows:
[0049] S11: The second controller uses the first private key to sign the first random number seed and obtain the first signature value;
[0050] Step S10, which involves the first controller verifying the first signature value, includes:
[0051] S12: The first controller uses the first public key to verify the first signature value.
[0052] The first public key and the first private key form a key pair. Specifically, the first public key and the first private key can be generated using an asymmetric encryption algorithm. The asymmetric encryption algorithm can be the RSA algorithm, and the key length of both the first public key and the first private key is 2048 bits.
[0053] In this embodiment, when the second controller receives the first random number seed, it signs the first random number seed using the first private key to obtain a first signature value. When the first controller receives the first signature value, it verifies the first signature value using the first public key.
[0054] During the verification of the identity information of the second controller, only the first random number seed and the first signature value need to be transmitted, without transmitting the first public key and the first private key. This avoids the leakage of sensitive key information and can improve the security and reliability of identity information verification.
[0055] In an optional embodiment, step S12 includes steps S121 to S124, as follows:
[0056] S121: The first controller uses the first public key to decrypt the first signature value and obtain the first hash value.
[0057] In this embodiment, when the second controller receives the first random number seed, it performs a hash operation on the first random number seed according to a preset hash algorithm to obtain a first hash value. The first hash value is then encrypted using a first private key to obtain a first signature value, which is then sent to the first controller. The preset hash algorithm includes, but is not limited to, MD5, SHA-1, and SHA-256 algorithms.
[0058] The first controller receives the first signature value, decrypts the first signature value using the first public key, and obtains the first hash value.
[0059] S122: The first controller performs a hash operation on the first random number seed according to a preset hash algorithm to obtain a second hash value.
[0060] In this embodiment of the application, the first controller stores the same hash algorithm as the second controller, and performs a hash operation on the first random number seed to obtain the second hash value.
[0061] S123: If the second hash value is consistent with the first hash value, the first controller determines that the first signature value has passed the verification.
[0062] In this embodiment of the application, if the second hash value is consistent with the first hash value, it indicates that the first random number seed has not been tampered with during transmission, and the first signature value was indeed sent by the second controller.
[0063] S124: If the second hash value is inconsistent with the first hash value, the first controller determines that the first signature value verification has failed.
[0064] In this embodiment of the application, if the second hash value is inconsistent with the first hash value, it indicates that the first random number seed may have been tampered with during transmission, or that the first signature value was not sent by the second controller.
[0065] The validity of the second controller's identity information can be determined by comparing the first hash value obtained from decryption with the calculated second hash value.
[0066] In an optional embodiment, the first controller stores a second private key, and the second controller stores a second public key paired with the second private key. Step S20, where the first controller generates the second signature value based on the second random number seed, includes step S21, as follows:
[0067] S21: The first controller uses the second private key to sign the second random number seed and obtain the second signature value;
[0068] Step S20, which involves the second controller verifying the second signature value, includes:
[0069] S22: The second controller uses the second public key to verify the second signature value.
[0070] The second public key and the second private key form a key pair. Specifically, the second public key and the second private key can be generated using an asymmetric encryption algorithm. The asymmetric encryption algorithm can be the RSA algorithm, and the key length of both the second public key and the second private key is 2048 bits.
[0071] In this embodiment, the first controller receives a second random number seed, signs the second random number seed according to a second private key to obtain a second signature value, and sends the second signature value to the second controller. The second controller receives the second signature value and verifies the second signature value according to a second public key.
[0072] During the verification of the identity information of the first controller, only the second random number seed and the second signature value need to be transmitted. There is no need to transmit the second public key and the second private key, which avoids the leakage of sensitive key information and can improve the security and reliability of identity information verification.
[0073] In an optional embodiment, step S21 includes steps S211 to S212, as follows:
[0074] S211: The first controller performs a hash operation on the second random number seed according to a preset hash algorithm to obtain a third hash value.
[0075] The preset hash algorithms include, but are not limited to, MD5, SHA-1, and SHA-256.
[0076] In this embodiment, considering the large amount of data in the second random number seed, directly encrypting it would be time-consuming and inefficient. Therefore, a third hash value is obtained by hashing the second random number seed using a preset hash algorithm. The amount of data in the third hash value is less than the amount of data in the second random number seed.
[0077] S212: The first controller uses the second private key to encrypt the third hash value to obtain the second signature value.
[0078] In this embodiment of the application, the second private key is used to encrypt the third hash value to obtain the second signature value. Since the amount of data in the third hash value is less than the amount of data in the second random number seed, the encryption processing time is shortened and the encryption processing efficiency is improved.
[0079] In an optional embodiment, step S30 includes steps S31 to S32, as follows:
[0080] S31: The second controller generates an encryption key based on the first random number seed and / or the second random number seed.
[0081] In this embodiment, the second controller can use an encryption algorithm to encrypt the first random number seed to generate an encryption key. The second controller can also use an encryption algorithm to encrypt the second random number seed to generate an encryption key. Furthermore, the second controller can use an encryption algorithm to encrypt both the first and second random number seeds to generate an encryption key. The encryption algorithms include, but are not limited to, symmetric encryption algorithms and asymmetric encryption algorithms.
[0082] S32: The second controller uses an encryption key to encrypt the communication data between itself and the first controller.
[0083] In this embodiment of the application, after the encryption key is generated, the communication data between the second controller and the first controller is transmitted in encrypted form using the encryption key.
[0084] Specifically, the data frame format of the communication data includes a synchronization character (SYNC), an acknowledgment character (ACK), a LEN character (CMD + frame sequence number + PARAM), a command character (CMD), a frame sequence number, and transmitted data (PARAM). The synchronization character is 2 bytes long, the acknowledgment character is 1 byte long, the LEN character is 2 bytes long, the command character is 2 bytes long, the frame sequence number is 2 bytes long, and the transmitted data (PARAM) is N bytes long. The frame sequence number and transmitted data are encrypted and transmitted using an encryption key.
[0085] Using an encryption key to encrypt the communication data between the first controller and the second controller can improve the security of data transmission.
[0086] In an optional embodiment, step S31 includes steps S311 to S313, as follows:
[0087] S311: The second controller uses the first random number seed as the encryption key; or...
[0088] In this embodiment of the application, the second controller can use a first random number seed to encrypt and decrypt the communication data between the second controller and the first controller.
[0089] S312: The second controller uses the second random number seed as the encryption key; or...
[0090] In this embodiment of the application, the second controller may use a second random number seed to encrypt and decrypt the communication data between the second controller and the first controller.
[0091] S313: The second controller performs an XOR operation on the first random number seed and the second random number seed to obtain the encryption key.
[0092] The XOR operation means that if two inputs are different, the output result is 1; if two inputs are the same, the output result is 0.
[0093] In this embodiment, the second controller performs an XOR operation on the first random number seed and the second random number seed to obtain an encryption key, and uses the encryption key to encrypt and decrypt the communication data between the second controller and the first controller.
[0094] An encryption key can be automatically and quickly generated based on a first random number seed and / or a second random number seed.
[0095] In an optional embodiment, the data communication method of the vehicle system further includes steps S100 to S300, as follows:
[0096] S100: An anomaly was detected in the communication data during the data communication process. The forward verification method is re-executed.
[0097] S200: After the first controller verifies the first signature value, the reverse verification method is executed again;
[0098] S300: After the second controller verifies the second signature value, the second controller and the first controller resume data communication.
[0099] During data communication between the first and second controllers, a data replay attack may occur. A data replay attack refers to an attacker intercepting legitimate data transmissions and retransmitting them to deceive the receiver into believing they are legitimate messages.
[0100] In this embodiment, when the first controller detects a replay attack on the communication data, it re-verifies the identity information of the second controller, and the second controller re-verifies the identity information of the first controller. Specifically, the processes of steps S100 to S300 are the same as those of steps S10 to S30, and will not be described again here.
[0101] Optionally, when the second controller detects a replay attack in the communication data, it will re-verify the identity information of the first controller, and the first controller will re-verify the identity information of the second controller. Specifically, the re-verification process of the identity information is the same as steps S10 to S30, and will not be described again here.
[0102] When a replay attack is detected in the communication data, the identity information of the first controller and the second controller is re-verified, which can effectively prevent the security risks caused by the replay attack.
[0103] In an optional embodiment, step S100, which detects an anomaly in the communication data during data communication, includes step S101, as follows:
[0104] S101: The first controller and / or the second controller detect the frame sequence number of each data frame during the data communication process. If a duplicate frame sequence number is detected, it is determined that an anomaly has occurred during the data communication process.
[0105] In the data communication process, the frame number of each data frame is unique.
[0106] In this embodiment of the application, when a data replay attack occurs, the same data frame will be resent to the first controller by the attacker. Thus, in addition to receiving the data frame sent by the second controller, the first controller will also receive the same data frame sent by the attacker. Since the frame sequence number of the data frame is unique, the first controller will detect the duplicate frame sequence number and thus identify the data replay attack.
[0107] Optionally, when a data replay attack occurs, the same data frame will be resent to the second controller by the attacker. Thus, in addition to receiving the data frames sent by the first controller, the second controller will also receive the same data frames sent by the attacker. Since the frame sequence number of the data frame is unique, the second controller will detect the duplicate frame sequence number, thereby identifying the data replay attack.
[0108] By detecting whether the frame sequence number of data frames is repeated, data replay attacks that occur during data communication can be automatically and quickly identified.
[0109] This application also provides an apparatus embodiment that can be used to execute the data communication method of the vehicle system in the embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the content of the data communication method of the vehicle system in the embodiments of this application.
[0110] Please see Figure 2 The present application discloses a data communication device 4 for a vehicle-mounted system, comprising:
[0111] The forward verification method execution module 41 is used to execute the forward verification method. The forward verification method includes: the second controller sends a first authentication request to the first controller, the first controller generates a first random number seed, sends the first random number seed to the second controller, the second controller generates a first signature value according to the first random number seed, sends the first signature value to the first controller, and the first controller verifies the first signature value.
[0112] The reverse verification method execution module 42 is used to execute the reverse verification method after the first controller verifies the first signature value. The reverse verification method includes: the first controller sends a second authentication request to the second controller, the second controller generates a second random number seed and sends the second random number seed to the first controller, the first controller generates a second signature value according to the second random number seed and sends the second signature value to the second controller, and the second controller verifies the second signature value.
[0113] The data communication module 43 is used to perform data communication between the second controller and the first controller after the second controller verifies the second signature value.
[0114] The data communication device for the vehicle system provided in the above embodiments and the data communication method for the vehicle system provided in the embodiments of this application belong to the same concept. For details of its implementation process, please refer to steps S10 to S30 of the method embodiment, which will not be repeated here.
[0115] Applying the embodiments of this application, a forward verification method is executed. The forward verification method includes: a second controller sending a first authentication request to a first controller; the first controller generating a first random number seed and sending the first random number seed to the second controller; the second controller generating a first signature value based on the first random number seed and sending the first signature value to the first controller; and the first controller verifying the first signature value. After the first controller successfully verifies the first signature value, a reverse verification method is executed. The reverse verification method includes: the first controller sending a second authentication request to the second controller; the second controller generating a second random number seed and sending the second random number seed to the first controller; the first controller generating a second signature value based on the second random number seed and sending the second signature value to the second controller; and the second controller verifying the second signature value. After the second controller successfully verifies the second signature value, the second controller and the first controller communicate with each other. In this embodiment of the application, before data communication, the first controller and the second controller perform bidirectional verification of identity information based on a random number seed and a signature value. After the identity information of both the first controller and the second controller is verified, the first controller and the second controller communicate with each other. This can prevent attackers from forging identities and ensure that data is not tampered with or stolen during transmission, thereby improving the security of data communication within the vehicle system.
[0116] This application also provides a device embodiment that can be used to execute the data communication method of the vehicle system in the embodiments of this application. For details not disclosed in the device embodiments of this application, please refer to the content of the data communication method of the vehicle system in the embodiments of this application.
[0117] Please see Figure 3 This application also provides an electronic device 300, which can be a computer, a data communication device for a vehicle system, etc. In an exemplary embodiment of this application, the electronic device 300 is a data communication device for a vehicle system, which includes: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304, and at least one communication bus 305.
[0118] The user interface 304 is primarily used to provide an input interface for the user and to acquire user input data. Optionally, the user interface may also include a standard wired interface or a wireless interface.
[0119] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0120] The communication bus 305 is used to enable communication between these components.
[0121] The processor 301 may include one or more processing cores. The processor connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory. Optionally, the processor may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0122] The memory 302 may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor. Figure 3 As shown, a memory, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and operating applications.
[0123] The processor can be used to call the application program of the data communication method of the vehicle system stored in the memory, and specifically execute the method steps of the above-described embodiments. For the specific execution process, please refer to the detailed description shown in the method embodiments, which will not be repeated here.
[0124] This application also provides a computer-readable storage medium storing a computer program thereon, the instructions of which are adapted to be loaded by a processor and executed by the method steps of the embodiments shown above. For details of the execution process, please refer to the specific descriptions shown in the embodiments, which will not be repeated here. The device containing the storage medium can be an electronic device such as a personal computer, laptop computer, smartphone, tablet computer, or video production equipment.
[0125] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function selected in one or more boxes.
[0128] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function selected in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0130] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0131] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape storage, disk storage, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0133] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data communication method for an in-vehicle system, applied to the in-vehicle system, the in-vehicle system comprising a first controller and a second controller, characterized in that, The method includes the following steps: A forward verification method is executed; the forward verification method includes: the second controller sends a first authentication request to the first controller, the first controller generates a first random number seed, sends the first random number seed to the second controller, the second controller generates a first signature value according to the first random number seed, sends the first signature value to the first controller, and the first controller verifies the first signature value; After the first controller verifies the first signature value, a reverse verification method is executed; the reverse verification method includes: the first controller sends a second authentication request to the second controller, the second controller generates a second random number seed and sends the second random number seed to the first controller, the first controller generates a second signature value according to the second random number seed and sends the second signature value to the second controller, and the second controller verifies the second signature value; After the second controller verifies the second signature value, the second controller communicates with the first controller.
2. The data communication method for an in-vehicle system according to claim 1, characterized in that: The first controller stores a first public key, and the second controller stores a first private key that is paired with the first public key; The step of the second controller generating a first signature value based on the first random number seed includes: The second controller uses the first private key to sign the first random number seed and obtain a first signature value; The step of the first controller verifying the first signature value includes: The first controller uses the first public key to verify the first signature value.
3. The data communication method for an in-vehicle system according to claim 2, characterized in that: The step of the first controller verifying the first signature value using the first public key includes: The first controller uses the first public key to decrypt the first signature value to obtain the first hash value; The first controller performs a hash operation on the first random number seed according to a preset hash algorithm to obtain a second hash value; If the second hash value matches the first hash value, the first controller determines that the first signature value has been verified. If the second hash value is inconsistent with the first hash value, the first controller determines that the first signature value verification has failed.
4. The data communication method for an in-vehicle system according to claim 1, characterized in that: The first controller stores a second private key, and the second controller stores a second public key that is paired with the second private key; The step of the first controller generating the second signature value based on the second random number seed includes: The first controller uses the second private key to sign the second random number seed to obtain a second signature value; The steps for the second controller to verify the second signature value include: The second controller uses the second public key to verify the second signature value.
5. The data communication method for an in-vehicle system according to claim 4, characterized in that: The first controller uses the second private key to sign the second random number seed to obtain the second signature value. This step includes: The first controller performs a hash operation on the second random number seed according to a preset hash algorithm to obtain a third hash value; The first controller uses the second private key to encrypt the third hash value to obtain the second signature value.
6. The data communication method of the vehicle-mounted system according to any one of claims 1 to 5, characterized in that: The step of the second controller communicating with the first controller after the second controller verifies the second signature value includes: The second controller generates an encryption key based on the first random number seed and / or the second random number seed; The second controller uses the encryption key to encrypt communication data with the first controller.
7. The data communication method for an in-vehicle system according to claim 6, characterized in that: The step of the second controller generating an encryption key based on the first random number seed and / or the second random number seed includes: The second controller uses the first random number seed as the encryption key; or, The second controller uses the second random number seed as the encryption key; or, The second controller performs an XOR operation on the first random number seed and the second random number seed to obtain the encryption key.
8. The data communication method of the vehicle-mounted system according to any one of claims 1 to 5, characterized in that: The first controller is a microcontroller unit used to control multiple electronic components in the vehicle system; the second controller is a system-on-a-chip used to process in-vehicle multimedia data.
9. The data communication method of the vehicle-mounted system according to any one of claims 1 to 5, characterized in that, Also includes: An anomaly was detected in the communication data during the data communication process, and the forward verification method was re-executed. After the first controller verifies the first signature value, the reverse verification method is executed again. After the second controller verifies the second signature value, the second controller and the first controller resume data communication.
10. The data communication method for a vehicle-mounted system according to claim 9, characterized in that: The step of detecting an anomaly in communication data during data communication includes: The first controller and / or the second controller detect the frame sequence number of each data frame during the data communication process. If a duplicate frame sequence number is detected, it is determined that an anomaly has occurred in the communication data during the data communication process.
11. A data communication device for a vehicle-mounted system, characterized in that, include: The forward verification method execution module is used to execute the forward verification method; The forward verification method includes: the second controller sending a first authentication request to the first controller; the first controller generating a first random number seed and sending the first random number seed to the second controller; the second controller generating a first signature value based on the first random number seed and sending the first signature value to the first controller; and the first controller verifying the first signature value. The reverse verification method execution module is used to execute a reverse verification method after the first controller verifies the first signature value; the reverse verification method includes: the first controller sending a second authentication request to the second controller, the second controller generating a second random number seed and sending the second random number seed to the first controller, the first controller generating a second signature value according to the second random number seed and sending the second signature value to the second controller, and the second controller verifying the second signature value; The data communication module is used to enable the second controller to communicate with the first controller after the second controller verifies the second signature value.
12. An electronic device comprising a display, a processor, and a memory; characterized in that, The memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 10, for a data communication method of an in-vehicle system.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the data communication method of the vehicle system as described in any one of claims 1 to 10.