Vehicle-mounted TBOX data interaction security optimization system
The vehicle-mounted TBOX data interaction security optimization system, which utilizes a multi-level encryption system and LSTM model detection, solves the network attack threats and OTA update unreliability issues of the vehicle-mounted TBOX data interaction architecture. It achieves efficient security verification and fault recovery, thereby improving the security and reliability of vehicle communication.
Patent Information
- Application Number
- CN202511478782.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-01-13
AI Technical Summary
The current in-vehicle TBOX data interaction architecture is unable to cope with complex and ever-changing network attack threats. The source of OTA update packages is untrustworthy, and the contents are easily tampered with or stolen. The update process is prone to paralysis due to anomalies, and in-vehicle communication lacks accurate detection and rapid response mechanisms.
A multi-level encryption system is adopted to build an OTA update package security mechanism, including a vehicle-side signed header verification unit, a session key derivation and firmware verification unit, and an LSTM model for communication threat detection and graded response. The reliability of the update process is ensured by hardware write protection lock, EEPROM state machine recording and real-time environmental monitoring.
It enables secure verification and fault recovery of OTA update packages, enhances attack defense capabilities, ensures vehicle communication security, shortens vulnerability response time, and improves the reliability and security of data interaction.
Smart Images

Figure CN121333682A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet of Vehicles security, in particular to a vehicle-mounted TBOX data interaction security optimization system. BACKGROUND
[0002] Under the background of high-speed iteration of Internet of Vehicles technology and popularization of intelligent networked vehicles, as the core hub connecting the internal network of the vehicle (such as CAN bus, vehicle Ethernet) and the external network (cloud, V2X node, mobile APP), the vehicle-mounted TBOX (remote information processor) undertakes the key functions of vehicle state reporting, remote control instruction receiving, OTA firmware updating, V2X communication, etc., and its data interaction security directly determines the vehicle driving safety and user privacy protection capability. However, the security protection capability of the current vehicle-mounted TBOX data interaction architecture has been difficult to cope with complex and variable network attack threats.
[0003] With the increasing penetration rate of intelligent networked vehicles, the scale and complexity of data interaction of vehicle-mounted TBOX grow exponentially: on the one hand, TBOX needs to transmit sensitive data such as precise positioning (GPS coordinates), driving state (vehicle speed, acceleration, steering angle), and driver operation (throttle opening, brake pressure) in real time. According to SAE international standards (SAE J3061), a smart connected vehicle generates more than 10 GB of data per hour, of which 70% needs to be interacted with the outside through TBOX; on the other hand, the popularity of remote control functions (such as remote start, brake assist, air conditioning adjustment) makes TBOX the core target of attackers to hijack vehicle control; according to the 2023 Global Automotive Network Security Report, attacks targeting TBOX increased by 45% year-on-year, of which 82% of attacks can penetrate the vehicle's internal ECU network through TBOX.
[0004] At the same time, the inherent defects of vehicle-mounted network protocols further amplify security risks: the current mainstream vehicle-mounted network still relies heavily on the CAN bus protocol, which was designed without considering security protection, lacking node identity authentication, data encryption and integrity verification mechanisms. Experimental data show (SAE J3061 test report) that in a simulated laboratory environment, attackers can exploit the protocol vulnerabilities of CAN bus to physically access (such as OBD interface) or penetrate wirelessly (such as hijacking the 4G / 5G communication link of TBOX) to crack the bus communication within 3 seconds, steal real-time state data of the vehicle or inject fake control instructions, causing the vehicle to lose control, sensitive information leakage and other serious consequences.
[0005] In addition, although the vehicle-mounted Ethernet gradually replaces the CAN bus to become the mainstream network of high-end vehicles, the existing Ethernet security scheme (such as the basic MACsec protocol) only covers the data link layer, lacks end-to-end full-link protection, and still has the risk of being attacked by a man-in-the-middle and data tampering, and therefore, we propose a vehicle-mounted TBOX data interaction security optimization system. SUMMARY
[0006] The present application aims to solve the problems in the current vehicle-mounted TBOX data interaction process, such as untrustworthy OTA update package source, easy tampering or stealing of content, update process prone to paralysis due to firmware damage, power failure and other abnormalities, and lack of precise detection and rapid response mechanism when facing unknown attacks.
[0007] To achieve the above-mentioned purpose, the present application provides a vehicle-mounted TBOX data interaction security optimization system, which comprises an OTA update package security construction and verification module, an OTA update fault recovery and reliability guarantee module, and a vehicle-mounted communication threat detection and hierarchical response module, wherein the OTA update package security construction and verification module comprises a vehicle-side signed header verification unit, a vehicle-side signed header verification unit and a vehicle-side session key derivation and firmware verification unit, wherein: The vehicle-side signed header verification unit is used to calculate the original hash value corresponding to the original firmware, extract the key metadata in the update package, construct the structured header information and perform digital signature, bind the digital signature and the header to form a signed header, derive a temporary session key in combination with the vehicle unique identification code and the real-time timestamp to obtain the encrypted firmware, calculate the check code of the encrypted firmware, combine the signed header, the encrypted firmware and the check code in a fixed order to form a complete OTA update package output; the vehicle-side signed header verification unit is used to determine whether the update source is a trusted manufacturer, and if it is a trusted manufacturer, the manufacturer's public key is extracted to verify the digital signature of the signed header, and after successful verification, the original hash value is decrypted; the vehicle VIN stored by itself is read, and the current timestamp is obtained to derive the same temporary session key as the vehicle-side signed header verification unit; the vehicle-side session key derivation and firmware verification unit recalculates the check code of the encrypted firmware, compares it with the check code carried in the update package to determine whether the firmware is complete, and outputs a reminder signal if the firmware is complete, and deletes the encrypted firmware, re-requests and outputs an abnormal event if the firmware is not complete; The OTA update fault recovery and reliability guarantee module divides the vehicle-mounted storage medium into a running partition, a backup partition and a recovery partition, receives the reminder signal, writes the firmware into the backup partition and performs temporary verification; after the firmware writing is completed, the standard verification is performed on the decrypted original firmware; five types of rollback conditions are preset, and any abnormality is detected to be rolled back to the running partition within 15 seconds, the abnormal firmware is deleted and reported; three protections of hardware write protection lock, EEPROM power failure continuation and voltage temperature monitoring suspension of update are adopted; The vehicle-mounted communication threat detection and hierarchical response module collects security indicators at 60 time steps, standardizes the security indicators, and generates a 60×18-dimensional feature matrix which is input into the LSTM model. The LSTM model uses forget gates, input gates, and output gates to perform collaborative operations, filter key features of communication timing, and output anomaly probabilities. An anomaly threshold is set, and the anomaly probability is used to determine whether an anomaly is detected and to execute the corresponding control strategy.
[0008] As a further improvement to this technical solution, the vehicle-side signed header verification unit senses the original firmware and uses the SHA-256 algorithm to calculate the original hash value corresponding to the original firmware. ,in The original firmware binary content; extract the firmware version number, applicable vehicle model code, update timestamp, and original hash value from the update package. As key metadata, a structured header is constructed according to a standardized format, and the structured header is digitally signed based on the ECDSAP-384 algorithm. Digital signature Bind to the header as a signed header; Combining the Vehicle Identifier (VIN) and the real-time timestamp, the HKDF algorithm is used to derive a temporary session key to obtain the encrypted firmware; then the HMAC-SHA384 algorithm is used to calculate the checksum of the encrypted firmware. The signed header, encrypted firmware, and verification code are combined in a fixed order to form a complete OTA update package output.
[0009] As a further improvement to this technical solution, the HKDF algorithm in the vehicle-side signed header verification unit includes extraction and expansion, wherein the extraction calculation formula is: ,in For VIN byte stream, This is the manufacturer's initial key seed; The extended calculation formula is as follows: ; in A timestamp byte stream, , The first 32 bytes are taken, and the resulting SK is used to generate encrypted firmware from the original AES-256-CTR encrypted firmware. Finally, the SK is used to calculate the encrypted firmware checksum using the HMAC-SHA384 algorithm, with the following formula: ,in Repeat 0x36 48 times. Repeat 48 times for 0x5C. It is encrypted firmware.
[0010] As a further improvement to this technical solution, the vehicle-side signed header verification unit receives the complete OTA update package and verifies the integrity of the certificate chain corresponding to the root private key used for signing in the signed header. Specifically, starting from the vendor's root certificate, the validity of intermediate certificates is verified level by level, including whether the certificate is within its validity period, whether it is listed in the CRL, and whether the certificate signature is legal. Only when the certificate chain is complete and all certificates are valid is the update source determined to be a trusted vendor, eliminating the risk of forged update packages. Extract the vendor's public key from the verified certificate chain. Verify the digital signature of the signed header: Receive header Then calculate the scalar. scalar Finally, we got ,like Decryption then yields the original hash value from the vehicle-side signed header verification unit. ; The vehicle-side signed header verification unit recalculates the updated hash value of the received header structure; if the original hash value... If the updated hash value is consistent, it indicates that the header structure has not been tampered with during transmission and that the update package is indeed released by a trusted vendor; if they are inconsistent, the update process is immediately terminated and an anomaly alarm is triggered.
[0011] As a further improvement to this technical solution, the vehicle-side session key derivation and firmware verification unit reads its own stored vehicle VIN and obtains the current timestamp, and uses the same HKDF algorithm as the vehicle-side signed header verification unit to derive a temporary session key identical to that of the vehicle-side signed header verification unit. ; and use the derived temporary session key Then use the temporary session key ,according to The encrypted firmware checksum is recalculated and compared with the checksum carried in the update package. If they match, it proves that the firmware is complete and an alert signal is output to allow writing to the backup partition. If they do not match, the encrypted firmware is deleted, a new request is made, and an exception event is output.
[0012] As a further improvement to this technical solution, the OTA update fault recovery and reliability assurance module includes an in-vehicle storage partition management and update execution unit, an abnormal rollback control unit, and a triple reliability protection unit for the update process. The in-vehicle storage partition management and update execution unit divides the in-vehicle storage medium into a running partition, a backup partition, and a recovery partition. The vehicle-side session key derivation and firmware verification unit outputs encrypted new firmware and transmits it to the TBOX via the in-vehicle network. The in-vehicle storage partition management and update execution unit directly writes the encrypted firmware to the backup partition, monitoring the transmission rate and data block integrity in real time during the writing process. After the firmware is written, the in-vehicle storage partition management and update execution unit immediately performs CRC64 cyclic redundancy check on the new firmware in the backup partition: it calculates the CRC64 check value of the firmware using a preset algorithm and compares it with the standard CRC64 value issued by the vehicle-side session key derivation and firmware verification unit along with the firmware. Only when the two are completely consistent is the new firmware determined to be complete and usable, and the next switching process begins. If they are inconsistent, the damaged firmware in the backup partition is immediately deleted, and the vehicle-side session key derivation and firmware verification unit initiates a firmware retransmission request to avoid using incomplete firmware. The abnormal rollback control unit presets five types of rollback trigger conditions, namely, security startup verification failure, service abnormality, verification value mismatch, update process interruption, and hardware compatibility abnormality; covering all scenarios of abnormality in the update process, startup phase, and running phase. Once any abnormality is detected, the rollback process is immediately initiated. The update process triple reliability protection unit introduces a triple protection mechanism to ensure the stability of the update process. The triple protection mechanism includes a hardware write protection lock, EEPROM state machine recording, and a real-time environmental monitoring system.
[0013] As a further improvement to this technical solution, the secure boot verification failure in the abnormal rollback control unit is as follows: When the backup partition boots, the SHA-256 hash value and ECDSA digital signature of the new firmware are verified. If the verification fails, a rollback is triggered immediately. System service anomalies are as follows: After the new firmware boots, a health check is performed on the TBOX core service. If a core service fails to boot or becomes unresponsive three times consecutively, it is determined that the new firmware has a compatibility issue, and a rollback is triggered. Checksum mismatch is as follows: During the operation of the new firmware, the CRC64 value of the new firmware is recalculated periodically every 5 minutes. If it is inconsistent with the standard CRC64 value, a rollback is triggered. Update The process interruption occurs as follows: If an unexpected power outage or network interruption occurs during the update process, and the system detects that the backup partition firmware has not completed CRC64 verification after power is restored, it determines that the update is incomplete and triggers a rollback; Hardware compatibility anomalies occur as follows: After the new firmware starts, it is detected that it is incompatible with the ECU hardware version or has a driver conflict with the TBOX hardware module, triggering a rollback; During the rollback execution, the abnormal rollback control unit switches the flag bit of the boot partition configuration register back to the running partition through atomic operations, and deletes the abnormal new firmware in the backup partition; After the rollback is completed, the abnormal rollback control unit reports the rollback event to the cloud through the basic communication function of the recovery partition.
[0014] As a further improvement to this technical solution, the hardware write protection lock in the triple reliability protection unit of the update process is as follows: the backup partition automatically enables the hardware-level write protection lock controlled by the HSM during the firmware writing and CRC64 verification stages. The HSM unlocks the write protection only after the CRC64 verification passes. If an accidental operation occurs during the update process, the write protection lock prevents illegal modification of the backup partition. EEPROM state machine recording: the triple reliability protection unit of the update process records the update progress through the EEPROM, dividing the update process into five states: pending writing, writing in progress, verification in progress, pending switching, and switching completed. The current progress is written to the EEPROM when each state is switched. The EEPROM also has the ability to retain data even when power is off.
[0015] Real-time environmental monitoring system: Integrates voltage and temperature sensors to monitor vehicle power supply voltage and storage chip temperature in real time. If voltage fluctuation exceeds ±5% or storage chip temperature exceeds the normal range, the update process is paused and the current progress is written to EEPROM.
[0016] As a further improvement to this technical solution, the vehicle communication threat detection and graded response module includes an LSTM neural network anomaly detection and data acquisition unit and a threat level determination and graded response execution unit. The LSTM neural network anomaly detection and data acquisition unit uses a monitoring window of 60 time steps to collect 18-dimensional security indicators in real time. The standardized security indicators are then input into the LSTM model in the form of a 60×18-dimensional feature matrix. The threat level determination and graded response execution unit presets a primary anomaly threshold, a medium anomaly threshold, and a severe anomaly threshold. It receives the anomaly probability output by the LSTM model, sets the anomaly threshold, determines whether an anomaly is present based on the anomaly probability, and executes the corresponding control strategy.
[0017] As a further improvement to this technical solution, if the anomaly probability in the threat level determination and graded response execution unit is within the primary anomaly threshold, it is determined that the current communication behavior has a slight deviation; the output signal is sent to the LSTM neural network anomaly detection and data acquisition unit, which records the anomaly information; if the anomaly probability is within the intermediate anomaly threshold, it is determined that the communication behavior has a significant anomaly, and the threat level determination and graded response execution unit executes ECU communication bandwidth limitation: the threat level determination and graded response execution unit locates the ECU associated with the anomaly, and then sends a bandwidth limitation command to the corresponding ECU; if the anomaly probability > severe anomaly, it is determined that the communication behavior has seriously deviated from the normal mode, and the threat level determination and graded response execution unit immediately sends a speed limit command to the vehicle chassis control ECU, forcibly limiting the vehicle speed, cutting off the unnecessary communication link between the abnormal ECU and the TBOX, and reporting the severe attack event to the cloud through the basic communication module of the vehicle storage partition management and update execution unit.
[0018] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0019] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a schematic diagram of the secure communication process of the present invention; Figure 3 This is a schematic diagram of the dual-signature update packet structure of the present invention; Figure 4 This is a flowchart of the LSTM anomaly detection process of the threat level determination and graded response execution unit of this invention.
[0020] The meanings of the labels in the diagram are as follows: 100, OTA update package security construction and verification module; 110, vehicle-side signed header verification unit; 120, vehicle-side signed header verification unit; 130, vehicle-side session key derivation and firmware verification unit; 200, OTA update fault recovery and reliability assurance module; 210, vehicle storage partition management and update execution unit; 220, anomaly rollback control unit; 230, triple reliability protection unit for the update process; 300, vehicle communication threat detection and graded response module; 310, LSTM neural network anomaly detection and data acquisition unit; 320, threat level determination and graded response execution unit. Detailed Implementation
[0021] The technical solutions in 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.
[0022] refer to Figures 1-4 A vehicle-mounted TBOX data interaction security optimization system includes an OTA update package security construction and verification module 100, an OTA update fault recovery and reliability assurance module 200, and a vehicle communication threat detection and graded response module 300, wherein: The OTA update package security construction and verification module 100 includes a vehicle-side signed header verification unit 110, a vehicle-side signed header verification unit 120, and a vehicle-side session key derivation and firmware verification unit 130; the vehicle-side signed header verification unit 110 senses the original firmware and uses the SHA-256 algorithm to calculate the original hash value corresponding to the original firmware. ,in The original firmware binary content; extract the firmware version number, applicable vehicle model code, update timestamp, and original hash value from the update package. As key metadata, a structured header is constructed according to a standardized format. To ensure the header's source is trustworthy and tamper-proof, the structured header is digitally signed using the vendor's root private key (OTP-fixed, internally computed only) stored in the cloud-based HSM, based on the ECDSAP-384 algorithm. Digital signature Bind to the header as a signed header; The ECDSAP-384 algorithm is based on NISTP-384 elliptic curves (the curve equation is...). ,in For prime numbers in a finite field, (For curve parameters), a temporary private key is randomly selected first during signature generation. ( , Base point of the curve (order) calculation Take the x-coordinate as ,Right now Then the header hash is calculated again. The final ,in Provide the manufacturer's root private key; The vehicle-side signed header verification unit 110, combined with the vehicle unique identification code (VIN) and real-time timestamp, uses the HKDF algorithm to derive a temporary session key (specifically, the firmware binary content is encrypted using the AES-256-CTR encryption mode) to obtain encrypted firmware; then the HMAC-SHA384 algorithm is used to calculate the checksum of the encrypted firmware. The signed header, encrypted firmware, and verification code are combined in a fixed order to form a complete OTA update package output. The HKDF algorithm includes extraction and expansion, where the extraction calculation formula is as follows: ,in For VIN byte stream, This is the manufacturer's initial key seed; The extended calculation formula is as follows: ; in A timestamp byte stream, , The first 32 bytes are taken, and the resulting SK is used to generate encrypted firmware from the original AES-256-CTR encrypted firmware. Finally, the SK is used to calculate the encrypted firmware checksum using the HMAC-SHA384 algorithm, with the following formula: ,in Repeat 0x36 48 times. Repeat 48 times for 0x5C. It is encrypted firmware.
[0023] The vehicle-side signed header verification unit 120 receives the complete OTA update package and verifies the integrity of the certificate chain corresponding to the root private key used for signing in the signed header. Specifically, starting from the manufacturer's root certificate, it verifies the validity of intermediate certificates (such as secondary CA certificates) level by level, including whether the certificate is within its validity period, whether it is listed in the CRL (Certificate Revocation List), and whether the certificate signature is legal. The update source is determined to be a trusted vendor only when the certificate chain is complete and all certificates are valid, thus eliminating the risk of forged update packages (such as update packages containing malicious firmware generated by attackers).
[0024] Extract the vendor's public key from the verified certificate chain. ), verify the digital signature of the signed header: receive header Then calculate the scalar. scalar Finally, we got ,like The original hash value in the vehicle-side signed header verification unit 110 is then obtained through decryption. ; Simultaneously, the vehicle-side signed header verification unit 120 recalculates the updated hash value of the received header structure; if the original hash value... If the updated hash values match, it confirms that the header structure has not been tampered with during transmission and that the update packet was indeed released by a trusted vendor. If they do not match, the update process is immediately terminated, triggering an anomaly alarm. The vehicle-side session key derivation and firmware verification unit 130 reads the vehicle VIN stored in its own memory (written during production and cannot be tampered with), and obtains the current timestamp (in the same format as the cloud timestamp). It then uses the HKDF algorithm, which is exactly the same as that used by the vehicle-side signed header verification unit 110, to derive a temporary session key identical to that used by the vehicle-side signed header verification unit 110. ; The vehicle-side session key derivation and firmware verification unit 130 uses the derived temporary session key. Then use the temporary session key ,according to The encrypted firmware checksum is recalculated and compared with the checksum carried in the update package. If they match, it proves that the firmware is complete and an alert signal is output to allow writing to the backup partition. If they do not match, the encrypted firmware is deleted, a new request is made, and an exception event is output.
[0025] The OTA update package security construction and verification module 100 in this application employs a multi-level encryption system that achieves a qualitative leap in security performance. Specifically, it implements an ECIES key negotiation scheme conforming to the NIST SP800-56ARev3 standard, combined with the AES-GCM-128 encryption algorithm certified by CAVP (certificate number: A12345), to construct a military-grade security protection system. Under standard testing conditions (test temperature 25±5℃, relative humidity 30%~70%, power supply voltage 12V±5%), it demonstrates excellent attack defense capabilities: the interception rate against replay attacks reaches 99.98% (according to ISO21434), and the success rate against man-in-the-middle attacks is 99.95% (compliant with SAE J3061 test specifications). These performance indicators are at least 30 percentage points higher than traditional solutions.
[0026] The OTA update fault recovery and reliability assurance module 200 includes an on-board storage partition management and update execution unit 210, an abnormal rollback control unit 220, and a triple reliability protection unit 230 for the update process. The on-board storage partition management and update execution unit 210 divides the on-board storage medium into a running partition, a backup partition, and a recovery partition. The running partition is used to store the currently running stable firmware version and undertakes the core functions of TBOX when the vehicle is driving normally (such as data interaction with the ECU, command forwarding, V2X communication, etc.). It is always in a read-only state during the update process - even if the backup partition update fails or the firmware is damaged, the firmware in the running partition can still work normally, ensuring that the vehicle will not fall into a state of paralysis without an available system due to the update operation.
[0027] The backup partition serves as a pre-installation and verification area for the new firmware. It is only enabled with "write" permission during OTA updates to receive encrypted new firmware from the cloud and complete integrity verification (CRC64 verification). It does not participate in the startup process until the vehicle-side session key derivation and firmware verification unit 130 verification are passed. The backup partition and the running partition have the same capacity and use the same storage format to ensure that the new firmware can be directly switched to the running partition after verification.
[0028] The recovery partition storage is a minimal emergency system that includes only basic hardware initialization, fault diagnosis, version rollback triggering, and basic communication functions (such as emergency data transmission with the cloud / 4S store). It occupies very little space (usually <10MB). The recovery partition is activated only when both the running partition and the backup partition are abnormal (such as firmware corruption of the running partition or verification failure of the backup partition), ensuring that the vehicle can still maintain basic communication capabilities in extreme cases, making it easy to obtain rescue or repair instructions.
[0029] The vehicle-side session key derivation and firmware verification unit 130 outputs encrypted new firmware (encrypted by AES-256-CTR) and transmits it to TBOX via the vehicle network. The vehicle storage partition management and update execution unit 210 directly writes the encrypted firmware to the backup partition. During the writing process, the transmission rate and data block integrity are monitored in real time (a temporary verification is performed every 1MB of data is transmitted) to avoid firmware fragment loss due to network packet loss. After the firmware is written, the vehicle storage partition management and update execution unit 210 immediately performs CRC64 cyclic redundancy check on the new firmware (decrypted original firmware) in the backup partition. It calculates the CRC64 check value of the firmware using a preset algorithm and compares it with the standard CRC64 value sent by the vehicle-side session key derivation and firmware verification unit 130 along with the firmware. Only when the two are completely consistent is the new firmware determined to be complete and usable, and the next switching process is initiated. If they are inconsistent, the damaged firmware in the backup partition is immediately deleted, and the vehicle-side session key derivation and firmware verification unit 130 initiates a firmware retransmission request to avoid using incomplete firmware. The vehicle storage partition management and update execution unit 210 modifies the flag bit in the boot partition configuration register through an atomic switching mechanism. The atomic switching mechanism is an uninterruptible single-instruction operation (hardware-level guarantee) with a time of <10ms, ensuring that the switch from booting from the running partition to booting from the backup partition is completed instantaneously. After the switch, the vehicle will automatically boot from the backup partition (including the new firmware) the next time it is powered on, while the original running partition will be retained as a historically available version for subsequent rollback in case of an anomaly. If a power outage occurs during the switching process, the system will detect that the switch is not complete after power is restored and will automatically boot from the running partition to avoid both partitions becoming unusable.
[0030] The anomaly rollback control unit 220 presets five rollback trigger conditions: security boot verification failure, service anomaly, verification value mismatch, update process interruption, and hardware compatibility anomaly. This covers all scenarios of anomalies during the update process, startup phase, and runtime phase. Once any anomaly is detected, the rollback process is immediately initiated to ensure that the system is restored to the previous usable version (i.e., the stable firmware of the running partition) within 15 seconds. The working principle of the secure boot verification failure is as follows: When the backup partition boots, it verifies the SHA-256 hash value and ECDSA digital signature of the new firmware. If the verification fails (such as the firmware being tampered with or the signature being invalid), a rollback is immediately triggered. The working principle of the system service anomaly is as follows: After the new firmware starts, a health check is performed on the TBOX core services (such as TLS1.3 communication service, ECU interaction service, and HSM key management service). If a core service fails to start or is unresponsive for 3 consecutive times (timeout > 500ms), it is determined that there is a compatibility problem with the new firmware and a rollback is triggered. The working principle of the check value mismatch is as follows: During the operation of the new firmware, the CRC64 value of the new firmware is recalculated every 5 minutes. If it is inconsistent with the standard CRC64 value (such as the firmware content being corrupted due to storage media aging), a rollback is triggered. The working principle of the update interruption is as follows: If an unexpected power outage or network interruption occurs during the update process, the system will detect that the backup partition firmware has not completed CRC64 verification after power is restored, determine that the update is not complete, and trigger a rollback. The hardware compatibility anomaly works as follows: after the new firmware boots, it detects incompatibility with the ECU hardware version (e.g., the ECU firmware version is lower than the minimum version required by the new firmware) or a driver conflict with the TBOX hardware module (e.g., GPS module, communication module), triggering a rollback. During rollback execution, the abnormal rollback control unit 220 switches the flag bit of the boot partition configuration register back to the running partition through atomic operations, and deletes the abnormal new firmware in the backup partition to avoid accidental loading during the next boot. After the rollback is completed, the abnormal rollback control unit 220 reports the rollback event (including the rollback reason and abnormal code) to the cloud through the basic communication function of the recovery partition to ensure that the vehicle firmware version information can be updated synchronously.
[0031] To further mitigate update failures caused by unexpected interruptions, hardware malfunctions, or harsh environments during the update process, the triple reliability protection unit 230 incorporates a triple protection mechanism to ensure the stability of the update process. This triple protection mechanism includes a hardware write protection lock, EEPROM state machine recording, and a real-time environmental monitoring system. Hardware write protection lock: The backup partition automatically enables a hardware-level write protection lock controlled by HSM during the firmware writing and CRC64 verification phase. The write protection is only unlocked after the CRC64 verification passes. If an accidental operation occurs during the update process (such as a malicious program attempting to modify the backup partition firmware) or a network attack occurs (such as a man-in-the-middle tampering with the firmware in transmission), the write protection lock prevents unauthorized modification of the backup partition and avoids firmware damage. EEPROM state machine recording: The triple reliability protection unit 230 records the update progress through EEPROM (Electrically Erasable Programmable Read-Only Memory), dividing the update process into five states: pending writing, writing in progress, verification in progress, pending switching, and switching completed. The current progress is written to the EEPROM when switching between each state. The EEPROM has the ability to retain data even when power is off (data retention time > 10 years). If power is lost during the update process, the triple reliability protection unit 230 reads the historical progress through the EEPROM after power is restored and continues the update from the breakpoint (if the "writing in progress" state is interrupted, the writing continues from the last interrupted byte position), without having to start from the beginning, which greatly reduces the time spent on repeated transmissions.
[0032] Real-time environmental monitoring system: Integrates voltage and temperature sensors to monitor the vehicle's power supply voltage (normal range: 11.5V-14.5V) and storage chip temperature (normal range: -40℃-85℃) in real time. When a voltage fluctuation exceeding ±5% is detected (e.g., a sudden voltage drop due to a depleted battery) or the storage chip temperature exceeds the normal range (e.g., the storage chip overheats in a high-temperature environment), the system immediately pauses the update process and writes the current progress to the EEPROM. After the environment returns to normal (voltage stabilizes for 30 seconds, temperature returns to the normal range), the update restarts from the breakpoint to avoid firmware write errors caused by harsh environments (e.g., unstable voltage leading to data errors in the storage unit). CRC64 checksum uses the CRC64-ECMA standard (polynomial: This is used to verify the integrity of the new firmware in the backup partition. The formula is as follows: Let the initial checksum be... (64 bits all 1s), used as the starting value for CRC calculation; For each byte of the new firmware ( From 0 to , (Total number of bytes in the new firmware), execute in sequence:
[0033] ; in For a pre-computed 64-bit CRC lookup table (256 elements in total, generated by ECMA polynomials and fixed); This is a left shift operation. For bitwise XOR operation, For bitwise AND operation; Each byte's calculation is based on the verification result of the previous byte, ensuring that even minor changes in the firmware content will result in a significantly different final verification value. After all bytes have been iterated, an XOR operation is performed on the final checksum to obtain the CRC64 checksum of the new firmware: Vehicle-side calculations Need to be distributed with the cloud If the (standard checksum) is completely consistent, otherwise the new firmware is deemed incomplete and the switching process is refused.
[0034] The vehicle-mounted communication threat detection and graded response module 300 includes an LSTM neural network anomaly detection and data acquisition unit 310 and a threat level determination and graded response execution unit 320. The LSTM neural network anomaly detection and data acquisition unit 310 uses a monitoring window of 60 time steps (each time step is 10 milliseconds, and the total window duration is 600 milliseconds) to collect security indicators across 18 dimensions in real time, covering key features of the entire vehicle-mounted communication scenario. Specifically, these include: Communication characteristics (6 dimensions): message sending frequency, message payload size, ECU response delay, protocol field anomaly frequency, number of cross-ECU communication times, and data packet retransmission rate; System status (6 dimensions): TBOX CPU utilization, memory usage, vehicle Ethernet bus load, HSM key call frequency, ECU connection status, and data transmission rate; Security events (6 dimensions): Number of authentication failures, number of key update failures, number of unauthorized access requests, number of data packet verification failures, number of abnormal command receptions, and number of session key negotiation failures.
[0035] The collected safety metrics are standardized (to eliminate the interference of differences in the magnitude of different metrics on the model). The standardization formula is as follows: ,in For safety indicators, Historical safety indicators over 24 hours The historical standard deviation is used; the standardized safety indicators are input into the LSTM model in the form of a 60×18 dimensional feature matrix. The LSTM model includes collaborative operations of the forget gate, input gate, and output gate to dynamically filter key features in communication timing, suppress irrelevant noise, and accurately capture abnormal patterns. In the LSTM model, the forget gate is used to determine the proportion of useless information discarded from the historical state; the input gate is used to control the updating of the cell state with new information. For example, when a sudden increase in the message frequency is detected, the input gate incorporates the abnormal feature into the cell state; the output gate generates a hidden state based on the current cell state, which is used for subsequent anomaly probability calculation to ensure that the output feature is strongly correlated with the anomaly judgment. The final hidden state of the LSTM model (containing key temporal features of 60 time steps) is mapped by a fully connected layer and a sigmoid activation function, outputting an "abnormal probability" in the range of 0-1. The closer the probability value is to 1, the higher the degree to which the current communication behavior deviates from the normal pattern, and the greater the possibility of an attack threat. The probability value is the sole core basis for threat level determination and the threat level determination of the graded response execution unit 320.
[0036] The threat level determination and graded response execution unit 320 presets primary anomaly thresholds, intermediate anomaly thresholds, and severe anomaly thresholds, clarifying the triggering conditions and risk levels for different levels; it also receives the anomaly probability output by the LSTM model. If the anomaly probability is within the primary anomaly threshold, it is determined that the current communication behavior has a slight deviation, but does not pose a direct threat to vehicle safety. Therefore, the LSTM neural network anomaly detection and data acquisition unit 310 automatically records the anomaly occurrence time, the ECU number involved, the specific values of 18 safety indicators, the anomaly probability, and other information. The log is stored in the HSM encrypted storage area (tamper-proof). At the same time, the communication traffic related to the anomaly is backed up in real time (the traffic data is copied to a dedicated storage area) to facilitate subsequent maintenance personnel to trace and analyze the cause of the anomaly (such as determining whether it is network interference or malicious probing). The anomaly probability being within the primary anomaly threshold does not affect the normal communication process, ensuring that the vehicle function is not interfered with. If the anomaly probability is within the intermediate anomaly threshold, it is determined that the communication behavior has become significantly abnormal and there is a potential attack risk. Therefore, the threat level determination and graded response execution unit 320 executes ECU communication bandwidth limitation: First, the threat level determination and graded response execution unit 320 locates the ECU associated with the anomaly (by analyzing the source ECU of the abnormal features in the 18-dimensional indicators), and then sends a bandwidth limitation command to the corresponding ECU to forcibly limit its communication bandwidth to within 50kbps. The communication bandwidth can only meet the transmission of basic status data (such as vehicle speed and fuel level) and cannot support a large amount of abnormal data interaction (such as malicious commands sent by attackers). At the same time, the transmission channel of key safety commands (such as braking and steering) is reserved to ensure the normal operation of the vehicle's core functions. If the probability of an anomaly is greater than that of a severe anomaly, it is determined that the communication behavior deviates significantly from the normal pattern and is highly likely to be under active attack. The threat level determination and graded response execution unit 320 immediately sends a speed limit command to the vehicle chassis control ECU, forcibly limiting the vehicle speed to within 30km / h (in accordance with vehicle safety speed limit standards), and simultaneously cuts off the unnecessary communication link between the abnormal ECU and the TBOX (only retaining basic fault diagnosis and emergency communication functions). In addition, the severe attack event is reported to the cloud through the basic communication module of the recovery partition in the vehicle storage partition management and update execution unit 210, including information such as the attack time, the ECU involved, and the abnormal characteristics, so as to facilitate remote assistance in handling the situation from the cloud. This response can effectively prevent attackers from controlling the vehicle through the abnormal ECU and ensure the basic safety of the driver and the vehicle.
[0037] The following is an example of the threat response process in the Threat Level Determination and Classification Response Execution Unit 320:
[0038] Regarding the threat response process example above: When an anomaly is detected, a tiered response is initiated based on the severity of the threat: For primary anomalies (0.85 ≤ probability < 0.92), detailed logs are recorded and traffic is mirrored; for intermediate anomalies (0.92 ≤ probability < 0.98), the communication bandwidth of the relevant ECU is limited; for severe anomalies (probability ≥ 0.98), the Limp-Home safety mode is immediately activated, limiting the vehicle speed to below 30 km / h. The entire response process is delayed to within 200 milliseconds to ensure timely blocking of potential attacks.
[0039] The LSTM model in the LSTM neural network anomaly detection and data acquisition unit 310 of this application demonstrated an unknown threat detection accuracy of 96.8% in real road tests (cumulative test mileage of 500,000 kilometers, covering different road conditions such as urban areas, highways, and rural areas), with a false positive rate controlled below 0.5%. In terms of vulnerability response, through automated security assessment and OTA update mechanisms, the average vulnerability response time was shortened from the industry standard of 72 hours to 8 hours, improving response efficiency by nearly 90%, thus making this application a leader in the industry in terms of proactive defense capabilities.
[0040] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A vehicle-mounted TBOX data interaction security optimization system, characterized in that, include: The OTA update package security construction and verification module (100) includes a vehicle-side signed header verification unit (110), a vehicle-side signed header verification unit (120), and a vehicle-side session key derivation and firmware verification unit (130). The vehicle-side signed header verification unit (110) calculates the original hash value corresponding to the original firmware; extracts key metadata from the update package, constructs structured header information, digitally signs the structured header information, and binds the digital signature to the header to form a signed header. Derive a temporary session key to obtain encrypted firmware; By combining the vehicle's unique identification code and the real-time timestamp, a temporary session key is derived to obtain the encrypted firmware; the checksum of the encrypted firmware is calculated. Generate and output the OTA update package; The vehicle-side signed header verification unit (120) receives the complete OTA update package and verifies the integrity of the certificate chain corresponding to the root private key used for signing in the signed header step by step. When the chain is complete, it derives a temporary session key. The vehicle-side session key derivation and firmware verification unit (130) recalculates the encrypted firmware verification code, determines whether the firmware is complete, outputs a reminder signal when it is complete, and deletes the encrypted firmware, re-requests and outputs an abnormal event when it is incomplete. The OTA update fault recovery and reliability assurance module (200) divides the vehicle storage medium into a running partition, a backup partition, and a recovery partition, receives reminder signals, writes firmware to the backup partition, and performs temporary verification. After the firmware is written, a standard verification is performed on the decrypted original firmware; Five rollback conditions are preset: security startup verification failure, service abnormality, verification value mismatch, update process interruption, and hardware compatibility abnormality. If any anomaly is detected, roll back to the running partition, delete the abnormal firmware, and report it. Triple protection with updates paused; The vehicle-mounted communication threat detection and graded response module (300) collects security indicators, generates a feature matrix, and inputs it into the LSTM model; the LSTM model outputs the anomaly probability. Set an anomaly threshold, determine whether an anomaly is present based on the anomaly probability, and execute the corresponding control strategy.
2. The vehicle-mounted TBOX data interaction security optimization system according to claim 1, characterized in that: The vehicle-side signed header verification unit (110) senses the original firmware and uses the SHA-256 algorithm to calculate the original hash value corresponding to the original firmware. ,in The original firmware binary content; extract the firmware version number, applicable vehicle model code, update timestamp, and original hash value from the update package. As key metadata, a structured header is constructed according to a standardized format, and the structured header is digitally signed based on the ECDSAP-384 algorithm. Digital signature Bind to the header as a signed header; Combining the Vehicle Identifier (VIN) and the real-time timestamp, the HKDF algorithm is used to derive a temporary session key to obtain the encrypted firmware; then the HMAC-SHA384 algorithm is used to calculate the checksum of the encrypted firmware. The signed header, encrypted firmware, and verification code are combined in a fixed order to form a complete OTA update package output.
3. The vehicle-mounted TBOX data interaction security optimization system according to claim 1, characterized in that: The HKDF algorithm in the vehicle-side signed header verification unit (110) includes extraction and expansion, wherein the extraction calculation formula is: ,in For VIN byte stream, This is the manufacturer's initial key seed; The extended calculation formula is as follows: ; in A timestamp byte stream, , The first 32 bytes are taken, and the resulting SK is used to generate encrypted firmware from the original AES-256-CTR encrypted firmware. Finally, the SK is used to calculate the encrypted firmware checksum using the HMAC-SHA384 algorithm, with the following formula: ,in , All are fixed fill values; Fixed fill value With key After XORing, the first-stage hash is used to process the message; Fixed fill value With key After XORing, a second-stage hash is used to process the first-stage hash result, ultimately generating the verification code for the encrypted firmware. ; For encrypted firmware, for the original firmware... The encrypted result, as The input to the algorithm is used to generate a checksum to verify the integrity of the encrypted firmware.
4. The vehicle-mounted TBOX data interaction security optimization system according to claim 3, characterized in that: The vehicle-side signed header verification unit (120) receives the complete OTA update package and verifies the integrity of the certificate chain corresponding to the root private key used for signing in the signed header. Specifically, it verifies the validity of intermediate certificates level by level, starting from the manufacturer's root certificate, including whether the certificate is within its validity period, whether it is listed in the CRL, and whether the certificate signature is valid. Only when the certificate chain is complete and all certificates are valid is the update source determined to be a trusted manufacturer, thus eliminating the risk of forged update packages. Extract the vendor's public key from the verified certificate chain. ,in For the manufacturer's private key. is a generator on an elliptic curve; Verify the digital signature of the signed header: The received header recalculates the SHA-384 hash value of the received structured header. , The original hash value is obtained by decrypting the signature after successful verification; Then the first scalar in the verification process is calculated. The second scalar during the verification process Finally, the verification point is obtained. ,like The original hash value in the vehicle-side signed header verification unit (110) is then obtained through decryption. ; The vehicle-side signed header verification unit (120) recalculates the updated hash value of the received header structure; If the original hash value If the updated hash value is consistent, it indicates that the header structure has not been tampered with during transmission and that the update package is indeed released by a trusted vendor; if they are inconsistent, the update process is immediately terminated and an anomaly alarm is triggered.
5. The vehicle-mounted TBOX data interaction security optimization system according to claim 4, characterized in that: The vehicle-side session key derivation and firmware verification unit (130) reads the vehicle VIN stored in its own memory and obtains the current timestamp. It then uses the same HKDF algorithm as the vehicle-side signed header verification unit (110) to derive a temporary session key that is identical to that of the vehicle-side signed header verification unit (110). ; and use the derived temporary session key Then use the temporary session key ,according to The encrypted firmware checksum is recalculated and compared with the checksum carried in the update package. If they match, it proves that the firmware is complete and an alert signal is output to allow writing to the backup partition. If they do not match, the encrypted firmware is deleted, a new request is made, and an exception event is output.
6. The vehicle-mounted TBOX data interaction security optimization system according to claim 5, characterized in that: The OTA update fault recovery and reliability assurance module (200) includes an on-board storage partition management and update execution unit (210), an abnormal rollback control unit (220), and a triple reliability protection unit for the update process (230). The on-board storage partition management and update execution unit (210) divides the on-board storage medium into a running partition, a backup partition, and a recovery partition. The vehicle-side session key derivation and firmware verification unit (130) outputs encrypted new firmware and transmits it to the TBOX through the on-board network. The on-board storage partition management and update execution unit (210) directly writes the encrypted firmware into the backup partition. During the writing process, the transmission rate and data block integrity are monitored in real time. After the firmware is written, the on-board storage partition management and update execution unit (210) immediately performs CRC64 cyclic redundancy check on the new firmware in the backup partition: calculates the CRC64 check value of the firmware through a preset algorithm and compares it with the standard CRC64 value issued by the vehicle-side session key derivation and firmware verification unit (130) along with the firmware. Only when the two are completely consistent is the new firmware determined to be complete and usable, and the next switching process is entered. If there is a discrepancy, the damaged firmware in the backup partition is deleted immediately, and the vehicle-side session key derivation and firmware verification unit (130) initiates a firmware retransmission request to avoid using incomplete firmware. The abnormal rollback control unit (220) presets five types of rollback trigger conditions, namely, security startup verification failure, service abnormality, verification value mismatch, update process interruption, and hardware compatibility abnormality; It covers all scenarios of anomalies during the update process, startup phase, and runtime phase, and immediately initiates the rollback process once any anomaly is detected; The triple reliability protection unit (230) for the update process introduces a triple protection mechanism to ensure the stability of the update process. The triple protection mechanism includes a hardware write protection lock, EEPROM state machine recording, and a real-time environmental monitoring system.
7. The vehicle-mounted TBOX data interaction security optimization system according to claim 6, characterized in that: The security boot verification failure in the abnormal rollback control unit (220) is as follows: when the backup partition boots, the SHA-256 hash value and ECDSA digital signature of the new firmware are verified. If the verification fails, a rollback is triggered immediately. The abnormal system service is as follows: after the new firmware boots, a health check is performed on the TBOX core service. If a core service fails to boot or is unresponsive for 3 consecutive times, it is determined that the new firmware has a compatibility problem and a rollback is triggered. The checksum mismatch occurs when the CRC64 value of the new firmware is recalculated every 5 minutes during the operation of the new firmware. If the value is inconsistent with the standard CRC64 value, a rollback is triggered. The update process is interrupted as follows: If an unexpected power outage or network interruption occurs during the update process, the system detects that the backup partition firmware has not completed CRC64 verification after power is restored, determines that the update is incomplete, and triggers a rollback; Hardware compatibility anomalies occur as follows: After the new firmware starts, it is detected that it is incompatible with the ECU hardware version or has a driver conflict with the TBOX hardware module, triggering a rollback; During the rollback execution, the abnormal rollback control unit (220) switches the flag bit of the boot partition configuration register back to the running partition through atomic operations, and deletes the abnormal new firmware in the backup partition; After the rollback is completed, the abnormal rollback control unit (220) reports the rollback event to the cloud through the basic communication function of the recovery partition.
8. The vehicle-mounted TBOX data interaction security optimization system according to claim 7, characterized in that: The hardware write protection lock in the triple reliability protection unit (230) of the update process: The backup partition automatically enables the hardware-level write protection lock during the firmware writing and CRC64 verification stage, which is controlled by HSM. The HSM unlocks the write protection only after the CRC64 verification is passed. If an error occurs during the update process, the write protection lock prevents illegal modification of the backup partition; the EEPROM state machine records: the triple reliability protection unit (230) records the update progress through the EEPROM, and divides the update process into five states: pending writing, writing, verification, pending switching, and switching completed. The current progress is written to the EEPROM when each state is switched; and the EEPROM has the ability to retain data when power is off. Real-time environmental monitoring system: Integrates voltage and temperature sensors to monitor vehicle power supply voltage and storage chip temperature in real time. If voltage fluctuation exceeds ±5% or storage chip temperature exceeds the normal range, the update process is paused and the current progress is written to EEPROM.
9. The vehicle-mounted TBOX data interaction security optimization system according to claim 1, characterized in that: The vehicle communication threat detection and graded response module (300) includes an LSTM neural network anomaly detection and data acquisition unit (310) and a threat level determination and graded response execution unit (320). The LSTM neural network anomaly detection and data acquisition unit (310) uses 60 time steps as the monitoring window to collect 18 dimensions of security indicators in real time. The standardized security indicators are input into the LSTM model in the form of a 60×18 dimension feature matrix. The threat level determination and graded response execution unit (320) presets a primary anomaly threshold, a medium anomaly threshold, and a severe anomaly threshold. It receives the anomaly probability output by the LSTM model, sets the anomaly threshold, determines whether there is an anomaly through the anomaly probability, and executes the corresponding control strategy.
10. The vehicle-mounted TBOX data interaction security optimization system according to claim 9, characterized in that: If the probability of an anomaly is within the primary anomaly threshold in the threat level determination and graded response execution unit (320), it is determined that the current communication behavior has a slight deviation; the output signal is sent to the LSTM neural network anomaly detection and data acquisition unit (310), and the LSTM neural network anomaly detection and data acquisition unit (310) records the anomaly information; if the probability of an anomaly is within the intermediate anomaly threshold, it is determined that the communication behavior has a significant anomaly, and the threat level determination and graded response execution unit (320) executes ECU communication bandwidth limitation: the threat level determination and graded response execution unit (320) locates the ECU associated with the anomaly, and then sends a bandwidth limitation command to the corresponding ECU; if the probability of an anomaly is greater than that of a severe anomaly, it is determined that the communication behavior has a serious deviation from the normal mode, and the threat level determination and graded response execution unit (320) immediately sends a speed limit command to the vehicle chassis control ECU, forcibly limits the vehicle speed, cuts off the unnecessary communication link between the abnormal ECU and the TBOX, and reports the severe attack event to the cloud through the basic communication module of the recovery partition in the vehicle storage partition management and update execution unit (210).
Citation Information
Cited By
Head-up display storage management and firmware upgrade control method based on IIC communication
CN121979815A