Vehicle safety communication method, system, electronic device, and vehicle

CN122932973APending Publication Date: 2026-10-16CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611150391.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0002]现有车载通信系统依赖云端分发会话密钥,网络切换时同步易失败,且预充注密钥泄露将导致指令伪造攻击

Benefits of technology

[0014] This invention ensures high security and unpredictability of the key generation source by acquiring truly random numbers output by an onboard quantum random number generator, fundamentally avoiding instruction forgery attacks caused by pre-filled key leakage. By generating key negotiation parameters based on these truly random numbers and directly using these parameters to negotiate a shared key with the peer, a key distribution mechanism completely independent of the cloud is achieved, effectively overcoming the problem of cloud key synchronization failure during network switching. Finally, the shared key is used to encrypt vehicle communication data for secure vehicle communication, comprehensively ensuring the real-time performance, reliability, and data security of vehicle communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122932973A_ABST
    Figure CN122932973A_ABST
Patent Text Reader

Abstract

The application provides a vehicle safety communication method, a system, an electronic device and a vehicle, and relates to the technical field of vehicle communication. The vehicle safety communication method guarantees the high security and unpredictability of the key generation source by acquiring a true random number output by a vehicle-mounted quantum random number generator, fundamentally avoiding instruction forgery attacks caused by pre-charged key leakage. The vehicle safety communication method generates key negotiation parameters based on the true random number, directly utilizes the parameters to perform key negotiation with a communication opposite end to obtain a shared key, realizes a key distribution mechanism completely independent of the cloud, effectively overcomes the problem that cloud key synchronization is prone to failure during network switching, and finally encrypts vehicle communication data by using the shared key to perform vehicle safety communication, comprehensively guaranteeing the real-time performance, reliability and data security of vehicle communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle communication technology, and in particular to a vehicle safety communication method, system, electronic device, and vehicle. Background Technology

[0002] Existing vehicle communication systems rely on cloud-based distribution of session keys, which is prone to synchronization failures during network switching, and leaks of pre-filled keys can lead to command forgery attacks. How to achieve secure local key negotiation between vehicles without cloud dependency is a pressing technical problem that needs to be solved. Summary of the Invention

[0003] The purpose of this invention is to provide a vehicle secure communication method, system, electronic device, and vehicle to ensure the real-time performance, reliability, and data security of vehicle communication.

[0004] In a first aspect, the present invention provides a vehicle secure communication method, comprising: generating key negotiation parameters based on true random numbers output by an on-board quantum random number generator, and using the key negotiation parameters to negotiate a shared key with a communication peer; and using the shared key to encrypt vehicle communication data to be sent for vehicle secure communication.

[0005] In an optional implementation, the method further includes: generating a coherent optical signal using a laser; converting the quantum phase noise of the coherent optical signal into a photocurrent signal using an interferometer; amplifying the photocurrent signal through a transimpedance amplifier to obtain a target analog electrical signal; converting the target analog electrical signal into a digital bitstream using an analog-to-digital converter; calculating the minimum entropy value of the digital bitstream using an entropy evaluation module; and outputting the digital bitstream as a true random number if the minimum entropy value is determined to be higher than a preset threshold.

[0006] In an optional implementation, key negotiation parameters are generated based on the true random number output by the vehicle-mounted quantum random number generator, including: processing the vehicle's current master key and the true random number through a first preset key derivation function to obtain a local session seed; processing the local session seed using a lightweight quantum key generation algorithm to obtain an asymmetric key pair containing a public key and a private key; the lightweight quantum key generation algorithm performs modular multiplication using a constant-time number theory transformation; and using the asymmetric key pair as key negotiation parameters.

[0007] In an optional implementation, the method further includes: obtaining the vehicle's root key; the root key is a true random number generated by the on-board quantum random number generator when the vehicle is first powered on; each time the vehicle is powered on and started, the root key is processed by a second preset key derivation function to obtain the vehicle's current master key.

[0008] In an optional implementation, a shared key is obtained by negotiating with the communication peer using key negotiation parameters, including: sending the public key to the communication peer; receiving the ciphertext returned by the communication peer; the ciphertext is the result obtained by the communication peer after encapsulating the shared key based on the public key; and performing a decapsulation operation on the ciphertext using the private key to obtain the shared key.

[0009] In an optional implementation, encrypting vehicle communication data using a shared key includes: obtaining the service type identifier of the vehicle communication data to be sent; querying a preset security policy based on the service type identifier to obtain the security level corresponding to the vehicle communication data; and selecting the corresponding encryption method to encrypt the vehicle communication data based on the security level.

[0010] In an optional implementation, the ciphertext is generated through the following process: obtaining a true random number output by an onboard quantum random number generator; converting the true random number into a noise vector conforming to a discrete Gaussian distribution using a rejection sampling technique; performing a polynomial modular multiplication operation based on the public key and the noise vector to obtain intermediate ciphertext; obtaining a true random number mask of the same length as the intermediate ciphertext; and performing an XOR modular operation between the true random number mask and the intermediate ciphertext to obtain the ciphertext.

[0011] Secondly, the present invention provides a vehicle secure communication system, comprising: an acquisition module for acquiring true random numbers output by an onboard quantum random number generator; a generation module for generating key negotiation parameters based on the true random numbers; a key negotiation module for using the key negotiation parameters to negotiate a shared key with a communication peer; and an encryption module for using the shared key to encrypt vehicle communication data to be sent for secure vehicle communication.

[0012] Thirdly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the vehicle safety communication method described in any of the foregoing embodiments.

[0013] Fourthly, the present invention provides a vehicle equipped with the vehicle safety communication system described in the foregoing embodiments.

[0014] This invention ensures high security and unpredictability of the key generation source by acquiring truly random numbers output by an onboard quantum random number generator, fundamentally avoiding instruction forgery attacks caused by pre-filled key leakage. By generating key negotiation parameters based on these truly random numbers and directly using these parameters to negotiate a shared key with the peer, a key distribution mechanism completely independent of the cloud is achieved, effectively overcoming the problem of cloud key synchronization failure during network switching. Finally, the shared key is used to encrypt vehicle communication data for secure vehicle communication, comprehensively ensuring the real-time performance, reliability, and data security of vehicle communication. Attached Figure Description

[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 A flowchart illustrating a vehicle safety communication method provided in an embodiment of the present invention; Figure 2 A flowchart for obtaining truly random numbers output by an onboard quantum random number generator is provided in this embodiment of the invention; Figure 3 A functional block diagram of a vehicle safety communication system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0018] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0019] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0020] Example 1 Figure 1 A flowchart of a vehicle safety communication method provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method specifically includes the following steps: Step S102: Obtain the true random number output by the vehicle-mounted quantum random number generator.

[0021] In this embodiment of the invention, a vehicle-mounted quantum random number generator is used to generate truly random numbers with physical randomness locally in the vehicle. These truly random numbers are then used to complete key negotiation with the communication peer locally. Finally, the vehicle communication data is encrypted and transmitted based on the negotiated shared key, thus achieving secure communication without relying on a cloud server.

[0022] Specifically, in the key material generation stage, a vehicle-mounted quantum random number generator first generates truly random numbers based on quantum physical processes. These truly random numbers are not generated through deterministic algorithms, but rather stem from the inherent randomness of quantum mechanics, possessing unpredictability and non-repeatability, thus providing a high-security entropy source for subsequent cryptographic operations.

[0023] Step S104: Based on the true random numbers output by the vehicle-mounted quantum random number generator, generate key negotiation parameters, and use the key negotiation parameters to negotiate with the communication peer to obtain a shared key.

[0024] After obtaining a truly random number, this embodiment of the invention uses the truly random number as input to generate parameters locally on the vehicle for key negotiation with the peer. These key negotiation parameters contain the cryptographic materials required by the vehicle itself to establish a secure communication channel and are the starting point of the entire key exchange process.

[0025] After generating the key negotiation parameters, this embodiment of the invention utilizes these parameters to perform an interactive key negotiation process with the communication peer. In this process, the vehicle exchanges necessary cryptographic information with the peer, and both parties jointly calculate a shared key through cryptographic operations without needing to share a secret beforehand. This shared key is calculated independently by each communicating party, and the results are identical. However, even if any third party intercepts all information during the interaction process, it cannot deduce the shared key.

[0026] Step S106: Encrypt the vehicle communication data to be sent using a shared key to enable secure vehicle communication.

[0027] Once the shared key is obtained, it can be used to encrypt the vehicle communication data to be sent. The encrypted data is then sent to the other end via the vehicle communication interface. The other end can decrypt and restore the original data using the same shared key, thus achieving secure communication between the vehicle and the other end.

[0028] This invention, through obtaining truly random numbers output by an onboard quantum random number generator, ensures high security and unpredictability of the key generation source, fundamentally avoiding instruction forgery attacks caused by pre-charged key leakage. By generating key negotiation parameters based on these truly random numbers and directly using these parameters to negotiate a shared key with the peer, a key distribution mechanism completely independent of the cloud is achieved, effectively overcoming the problem of cloud key synchronization failure during network switching. Finally, the shared key is used to encrypt vehicle communication data for secure vehicle communication, comprehensively ensuring the real-time performance, reliability, and data security of vehicle communication.

[0029] In one alternative implementation, such as Figure 2 As shown, step S102 above, obtaining the truly random number output by the vehicle-mounted quantum random number generator, specifically includes the following steps: Step S1021: Generate a coherent optical signal using a laser.

[0030] Specifically, a distributed feedback (DFB) laser can be used, which has a stable output wavelength and narrow linewidth, enabling it to generate a highly coherent continuous optical signal. This coherent optical signal serves as a carrier of quantum noise, and its phase component contains vacuum fluctuations originating from the Heisenberg uncertainty principle. These fluctuations are inherently unpredictable and unreplicable, providing a physical entropy source for the subsequent generation of truly random numbers.

[0031] Step S1022: The quantum phase noise of the coherent optical signal is converted into a photocurrent signal using an interferometer.

[0032] Specifically, the laser and the (high-precision) interferometer are connected via a polarization-maintaining fiber. The coherent light signal emitted by the laser is sent to the input of the interferometer via the polarization-maintaining fiber. After receiving the coherent light signal, the high-precision interferometer uses the interference principle to convert the quantum phase noise carried in the light signal into a measurable light intensity fluctuation signal. The laser and the high-precision interferometer are arranged adjacent to each other on the same optical base to reduce the impact of optical path loss and vibration on interference stability. When the coherent light interferes after passing through the two arms of the interferometer, the quantum phase fluctuations cause the interference fringes to exhibit random brightness variations in the light intensity distribution. The randomness of this light intensity fluctuation signal originates from the intrinsic randomness of quantum mechanics and cannot be reproduced by any deterministic algorithm.

[0033] To ensure the stability of the interferometer within a wide temperature range on-board, one or two interferometer arms of the high-precision interferometer are wound with temperature-compensating fiber optic rings. These rings are integrated with the interferometer and are not separate components. The temperature-compensating fiber optic rings are made of a special glass material with a negative coefficient of thermal expansion to compensate for optical path drift in the interferometer arms caused by temperature changes. In practical operation, when the ambient temperature increases, causing the interferometer arm length to increase, the temperature-compensating fiber optic rings deform in the opposite direction due to their negative thermal expansion characteristics, thereby compensating for the change in optical path and ensuring that the interferometric stability reaches over 99.97% within a wide temperature range of -40℃ to 125℃, thus maintaining a consistently stable conversion efficiency from quantum phase noise to light intensity fluctuations.

[0034] The high-precision interferometer integrates a photodetector at its output, forming a unified structure. The light intensity fluctuation signal output by the interferometer is directly received by this photodetector. The photodetector utilizes the photoelectric effect to convert the random fluctuations in light intensity into a corresponding weak photocurrent signal. The amplitude of this photocurrent signal fluctuates in real time with the random changes in light intensity, thus transmitting the randomness of quantum phase noise from the optical domain to the electrical domain. Therefore, the output of the interferometer is a photocurrent signal carrying quantum randomness.

[0035] Step S1023: The photocurrent signal is amplified by a transimpedance amplifier to obtain the target analog electrical signal.

[0036] Specifically, the output of the photodetector is electrically connected to the input of a low-noise transimpedance amplifier via a microstrip line or coaxial cable. The low-noise transimpedance amplifier is placed close to the photodetector to shorten the signal transmission path and reduce noise coupling. Since the photocurrent signal output by the photodetector has an extremely small amplitude, it is difficult for subsequent digital circuits to process it directly. After receiving this weak photocurrent signal, the transimpedance amplifier uses the transimpedance amplification principle to convert the photocurrent signal into a voltage signal and perform primary amplification. The internal noise figure of the transimpedance amplifier is optimized to amplify the target analog signal to a voltage range recognizable by the analog-to-digital converter without significantly introducing additional circuit noise, thus obtaining the target analog electrical signal.

[0037] Step S1024: Convert the target analog electrical signal into a digital bit stream using an analog-to-digital converter.

[0038] The output of the low-noise transimpedance amplifier is connected to the analog input of the analog-to-digital converter (ADC) via a differential signal line. The ADC and the low-noise transimpedance amplifier are located on the same printed circuit board and are arranged adjacently to ensure signal transmission integrity. After receiving the target analog electrical signal from the transimpedance amplifier, the ADC samples and quantizes the analog signal at a preset sampling rate, converting it into a raw digital bitstream. This ADC employs a high-resolution architecture to achieve fine sampling, ensuring that subtle fluctuations in quantum phase noise can be accurately captured and converted into a random bit sequence in the digital domain. The resulting digital bitstream is the original random number sequence carrying quantum randomness; however, the randomness quality of this sequence still needs to be evaluated and confirmed before it can be used.

[0039] Step S1025: Calculate the minimum entropy value of the digital bit stream through the entropy evaluation module, and output the digital bit stream as a true random number if the minimum entropy value is higher than a preset threshold.

[0040] Specifically, the entropy evaluation module continuously acquires the digital bitstream output from the analog-to-digital converter and calculates the minimum entropy value of the bitstream according to a preset randomness evaluation algorithm. The minimum entropy value is a core indicator for measuring the unpredictability of the random source output, used to quantify the true randomness carried by each bit in the digital bitstream. When the calculated minimum entropy value is higher than a preset threshold, it indicates that the randomness quality of the current digital bitstream meets the security requirements of cryptographic applications. At this point, the digital bitstream is used as the final true random number output for subsequent key generation and key negotiation steps.

[0041] When the minimum entropy value is lower than or equal to a preset threshold, it indicates that the entropy source quality of the quantum random number generator may have decreased due to environmental changes or device drift. At this time, the system triggers an internal self-calibration process to restore the entropy quality. The specific calibration mechanism is as follows: Specifically, the first stage of the self-calibration process is the optical feedback fine-tuning stage. The main control MCU adjusts the drive current of the distributed feedback laser via the I2C bus, for example, by a fine-tuning step of 1μA; or controls the PZT piezoelectric ceramic through the DAC output voltage to change the relative optical path difference between the two arms of the interferometer. This stage aims to compensate for laser wavelength drift or fiber thermal expansion caused by long-term high-temperature operation, so that the interferometer returns to the linear operating region and maximizes the extraction efficiency of quantum phase noise.

[0042] After the first stage of adjustment, if the minimum entropy value is still lower than the preset threshold, the self-calibration process enters the second stage: the back-end circuit gain adaptive stage. This stage monitors the DC bias voltage output of the transimpedance amplifier in real time. If the bias voltage deviates from the optimal sampling point by more than ±5%, the feedback resistor level is automatically switched or the digitally controlled gain amplifier is activated to maintain the signal-to-noise ratio of the transimpedance amplifier output at the optimal level (e.g., ≥30dB). The purpose of this stage is to prevent strong electromagnetic interference from causing clipping distortion in the analog signal, or weak signals from increasing the quantization error of the analog-to-digital converter, ensuring that the back-end analog-to-digital converter can accurately capture even slight fluctuations in light intensity.

[0043] If, after the first two stages of adjustment, the minimum entropy value calculated twice consecutively (e.g., with a 100ms interval) is still lower than the preset threshold, the self-calibration process enters the third stage: the secure erase and restart stage. At this point, the system determines that the physical entropy source has failed severely, immediately cuts off the random number output bus, encrypts and erases the internal entropy pool, and attempts a hardware reset. The purpose of this stage is to prevent the output of low-quality "pseudo-random numbers" due to complete hardware failure, which could lead to the subsequent cracking of the encryption key, and simultaneously reports a hardware fault code to the main control system.

[0044] The self-calibration process described above is automatically triggered each time the entropy value is assessed to be below the threshold, forming a complete closed loop from optical parameter adjustment and circuit gain adaptation to security protection, ensuring that the vehicle-mounted quantum random number generator continuously outputs true random numbers that meet cryptographic security requirements in the complex vehicle operating environment.

[0045] In this embodiment, all the components of the vehicle-mounted quantum random number generator are integrated into the same module. Optionally, this module adopts a six-layer printed circuit board design, including two complete ground layers and an electromagnetic shield to meet the CISPR 25 Class 5 standard and ensure stable operation in the complex electromagnetic environment inside the vehicle. The amplifier noise figure is optimized to 0.8nV / √Hz (meaning that the effective voltage generated by the noise source is 0.8nV within a 1Hz bandwidth), and the analog-to-digital converter (ADC) adopts a Σ-Δ architecture to achieve 24-bit resolution and a sampling rate of up to 10MS / s.

[0046] In one optional implementation, before generating the key negotiation parameters, the embodiments of the present invention further include a local key derivation step: Obtain the vehicle's root key; the root key is a truly random number generated by the onboard quantum random number generator when the vehicle is first powered on.

[0047] Each time the vehicle is powered on and started, the root key is processed through the second preset key derivation function to obtain the vehicle's current master key.

[0048] As can be seen from the above description, before generating key negotiation parameters based on true random numbers, the embodiments of the present invention also include a local key derivation step, which provides a secure and controllable entropy source input for the subsequent generation of key negotiation parameters.

[0049] Specifically, in this embodiment of the invention, when the vehicle is powered on for the first time, a truly random number is generated by an onboard quantum random number generator. This truly random number is used as the vehicle's root key. This root key is a truly random number directly generated by a quantum physical process, possessing inherent high entropy and unpredictability, and serves as the trust anchor for the entire vehicle's key system. To ensure the security of the root key, it is stored in the tamper-proof storage area of ​​the onboard security chip. This tamper-proof storage area employs a physical protection design, featuring an active shielding layer and a temperature / voltage anomaly detection circuit. When an external probe is detected or abnormal operation is performed, the stored content is immediately cleared, effectively resisting microprobe attacks, focused ion beam attacks, and bypass analysis attacks. The root key is stored permanently in this area; even if the vehicle suffers a physical intrusion attack, the attacker cannot extract the root key from this tamper-proof area.

[0050] Each time the vehicle is powered on and started, this embodiment of the invention processes the root key through a second preset key derivation function to obtain the vehicle's master key. Optionally, this second preset key derivation function is a cryptographically secure one-way function that can uniformly expand the entropy of the root key into the master key. Since the master key is re-derived from the root key each time the vehicle is powered on, the master keys in different power-on cycles are independent of each other. Even if the master key in a certain power-on cycle is leaked, an attacker cannot deduce the root key or the master key for other power-on cycles, thus achieving forward security. This master key serves as the top-level key material for all cryptographic operations within the current vehicle operation cycle, providing the basis for the derivation of subsequent session keys.

[0051] As can be seen from the above-described local key derivation steps, this embodiment of the invention establishes a two-layer key system locally in the vehicle: the root key serves as a long-term trust anchor, remaining unchanged throughout its life and never leaving the security chip; the master key serves as a short-term valid runtime key, refreshed each time power is applied. This two-layer key system ensures both the absolute security of the root key and the periodic updating of the key, effectively reducing the security risks associated with the long-term use of a single key, and providing a secure and controllable entropy source input for the generation of subsequent key negotiation parameters.

[0052] In an optional implementation, step S104 above, generating key negotiation parameters based on the truly random numbers output by the vehicle-mounted quantum random number generator, specifically includes the following steps: Step S1041: Process the vehicle's current master key and true random number using the first preset key derivation function to obtain the local session seed.

[0053] Specifically, in this embodiment of the invention, each time the vehicle initiates communication, the pre-derived master key and the truly random number output in real time by the onboard quantum random number generator are input into the first preset key derivation function. Optionally, this first preset key derivation function is a cryptographically secure one-way function that mixes the master key with the real-time fresh entropy of the truly random number to derive a number sequence with a preset bit length, which serves as the local session seed. This local session seed combines the stability and security of the master key with the physical randomness of the truly random number, possessing high entropy and instantaneous validity characteristics, and is specifically used for generating key negotiation parameters in this communication session. It should be noted that the first preset key derivation function is used for the derivation from the root key to the master key, and the first preset key derivation function is used for the derivation from the master key to the local session seed. Although both are cryptographically secure key derivation functions, users can configure them with the same or different algorithms according to their actual security strategy.

[0054] Step S1042: The local session seed is processed using a lightweight quantum key generation algorithm to obtain an asymmetric key pair containing a public key and a private key; the lightweight quantum key generation algorithm uses constant-time number theory transformation to perform modular multiplication.

[0055] This invention uses the local session seed as an entropy source input and processes it using a lightweight post-quantum key generation algorithm. This algorithm is based on the Ring-LWE problem in lattice cryptography and is resistant to known quantum attacks (such as Shor's algorithm). During computation, the algorithm calls a key generation function, using the local session seed as a source of randomness, and performs a series of polynomial and modular operations to finally output an asymmetric key pair containing a public and private key. The private key is secretly stored by the vehicle itself, while the public key is used for key negotiation with the communication peer.

[0056] To further improve the execution efficiency of the algorithm in automotive embedded environments and resist side-channel attacks, this lightweight post-quantum key generation algorithm employs constant-time number theory transformation (CTD) for its core modular multiplication operation. Specifically, in the CTD implementation of standard post-quantum cryptography algorithms, the execution path of the butterfly operation may involve data-dependent branch jumps. For example, when the sign bit or size comparison result of the intermediate result differs, the program may jump to different branches, leading to differences in the computation cycle for different inputs. Attackers can precisely measure these computation time differences and use timing side-channel analysis methods to deduce private information, thereby bypassing mathematically difficult problems. To eliminate this security risk, this embodiment of the invention uses a variant of the constant-time number theory transformation algorithm. In the butterfly operation, bitwise operations and conditional masking techniques replace branch jump instructions, ensuring that the execution paths and cycles of all modular multiplications and butterfly operations are completely consistent. This eliminates any correlation between computation time and input data, completely eliminating the risk of timing side-channel leakage. Based on this optimized CTD implementation, modular multiplication can be completed within a fixed clock cycle, effectively resisting timing side-channel attacks while reducing the consumption of computational resources for automotive security chips.

[0057] In one optional implementation, the lightweight quantum key generation algorithm of this invention employs sparse polynomial technology to optimize the dimensionality of standard lattice cryptography algorithms. Specifically, in the key generation process of standard lattice cryptography algorithms, the public key matrix typically has a dimension of 256×256, with each element being a polynomial. The storage and computation of this high-dimensional matrix places significant pressure on the memory and computing power of the vehicle security chip. This embodiment of the invention reduces the dimension of matrix operations from 256×256 to 128×128, meaning the number of rows and columns of the public key matrix are both reduced to half the original dimension. Through dimensionality reduction, the amount of polynomial multiplication and addition operations in the key generation process decreases quadratically, significantly reducing the computational complexity and memory usage of the algorithm. This dimensionality reduction operation reduces the equivalent security strength from 256 bits to 160 bits, but the 160-bit equivalent security strength is still far higher than current commercial cryptographic standards (e.g., the equivalent security strength of AES-128 is 128 bits), sufficient to resist attacks from future quantum computers. This optimization enables the post-quantum cryptography algorithm to run in real time with the limited computing resources of the vehicle security chip, while maintaining sufficient security redundancy.

[0058] Step S1043: Use the asymmetric key pair as the key negotiation parameter.

[0059] In this embodiment of the invention, the asymmetric key pair generated in the above steps is used as key negotiation parameters for subsequent key negotiation with the communication peer. The public key is disclosed to the communication peer to encrypt the session key, while the private key is securely stored by the vehicle and used to decrypt the ciphertext returned by the communication peer. The validity period of this asymmetric key pair is tied to the current communication session; it expires after the session ends. In the next communication, a new local session seed will be derived and a new key pair will be generated through step S1041, thus ensuring that the key negotiation parameters used in each communication are independent and effectively preventing the security risks caused by long-term key reuse.

[0060] In this embodiment of the invention, the one-time nature of the local session seed and the session-level validity period of the asymmetric key pair together constitute the forward security of the key negotiation parameters. Even if the key negotiation parameters of a certain communication are leaked, it will not affect the security of other communication sessions, effectively ensuring the long-term security of vehicle communication.

[0061] In one optional implementation, after obtaining the local session seed, the present invention further includes a key update mechanism. Specifically, when a preset triggering condition is met, the system automatically triggers a local session seed update operation to replace the currently used local session seed and regenerates the key negotiation parameters based on the new local session seed.

[0062] Triggering conditions include the following three types: 1. Time-triggered: The system sets the basic update cycle to a preset duration (e.g., 5 minutes). Whenever the cycle timer reaches the preset threshold, the key update is automatically triggered.

[0063] 2. Event Trigger: When the vehicle's mileage increases by a preset distance (e.g., 10 kilometers), the mileage information is read through the on-board diagnostic interface and a key update is triggered; or when the vehicle's ignition switch is switched from OFF to ON, a key update is triggered.

[0064] 3. Security Trigger: When the vehicle intrusion detection system detects network attack behavior or abnormal access patterns, it immediately triggers a key update; when it detects a change in the network environment (such as switching from dedicated short-range communication to public WiFi), it triggers a key update.

[0065] When the triggering condition is met, the system generates a new local session seed using a lattice-based key derivation function, taking the current local session seed, the current timestamp, and the counter value as input. The mathematical expression is: SK_new = SHA-3(KDF(SK_old||T||C)), where SK_new is the new local session seed, SK_old is the current local session seed (i.e., the old local session seed), T is the current timestamp, C is the counter value (i.e., the number of times the session seed has been updated), || represents string concatenation, KDF represents the key derivation function, and SHA-3 represents the third-generation secure hash algorithm. This design ensures forward security; even if a session seed is leaked, an attacker cannot deduce historical or future session seeds.

[0066] In addition, if a response timeout or integrity verification failure occurs during the key update process, the system determines that the key update has failed, immediately enters a security protection state, terminates the current communication session, and attempts to re-initiate the key negotiation process.

[0067] In one optional implementation, after processing the local session seed using a lightweight quantum key generation algorithm to obtain an asymmetric key pair containing a public and private key, this embodiment of the invention employs bit-packing technology to compress the public key. Bit-packing technology rearranges and encodes the polynomial coefficients of the public key according to a preset bit width, tightly arranging the effective binary bits of each coefficient and removing padding and redundant bits, thus significantly compressing the storage space and transmission size of the public key. After bit-packing, the public key size can be compressed from 800 bytes to 400 bytes, significantly reducing the transmission burden in narrowband networks such as CAN FD or automotive Ethernet, and lowering communication overhead and transmission latency during key negotiation.

[0068] In an optional implementation, step S104 above, which involves obtaining a shared key by negotiating with the communication peer using key negotiation parameters, specifically includes the following steps: Step S1044: Send the public key to the communication peer.

[0069] Specifically, in this embodiment of the invention, the public key of the asymmetric key pair generated in step S1042 is sent to the communication peer via the vehicle-mounted communication interface. This public key is a public parameter calculated by a lightweight quantum key generation algorithm based on a local session seed, and its mathematical structure is constructed based on the loop learning error problem in lattice cryptography. Before sending the public key, this embodiment of the invention can optionally use a security chip to digitally sign the public key, forming a digital certificate conforming to the V2X communication standard. The public key and the digital certificate are then sent together to the communication peer for certificate chain verification, ensuring the authenticity and integrity of the public key's origin. The transmission of the public key does not involve the disclosure of any private information; even if intercepted by a third party, it is impossible to deduce the corresponding private key or any valid session key material.

[0070] Step S1045: Receive the ciphertext returned by the communication peer; the ciphertext is the result obtained by the communication peer after encapsulating the shared key based on the public key.

[0071] After completing public key verification, the communicating peer receives the ciphertext returned by the peer through the vehicle communication interface. This ciphertext is generated by the peer according to a key encapsulation mechanism. Specifically, the peer obtains its own true random number and executes an encapsulation algorithm based on the received public key and its own true random number. In a single algorithm call, a shared key and ciphertext are generated simultaneously. The shared key serves as the session working key for this communication, and the ciphertext is the encapsulated form of the shared key. The peer sends the ciphertext back to the vehicle in this embodiment of the invention, while the shared key is stored locally on the peer. Because the encapsulation algorithm uses a lattice-based cryptographic mathematical construction, even if the ciphertext is intercepted by a third party during transmission, an attacker cannot extract any information about the shared key from the ciphertext.

[0072] In one alternative implementation, the ciphertext is generated through the following process: Step S201: Obtain the true random number output by the vehicle-mounted quantum random number generator.

[0073] Specifically, before initiating the encapsulation operation, the communication peer (i.e., the party receiving the public key) first obtains a truly random number output in real time by its own onboard quantum random number generator. This truly random number is generated based on quantum physical processes and has inherent unpredictability and high entropy characteristics, consistent with the source of the truly random number mentioned in the aforementioned steps of this embodiment of the invention.

[0074] Step S202: Convert the true random number into a noise vector that conforms to a discrete Gaussian distribution by using the rejection sampling technique.

[0075] Specifically, in lattice-based cryptographic algorithms, noise vectors are essential randomization elements in constructing ciphertext. Their role is to hide the structural features of the encrypted information, making it impossible for attackers to deduce any useful information about the plaintext or key from the ciphertext.

[0076] Rejection sampling is a widely used random number sampling technique. Its basic principle is to generate candidate samples from a known, easily sampled fundamental distribution, and then decide whether to accept or reject the candidate sample based on the probability density function of the target distribution. Accepted samples conform to the target distribution. In lattice cryptography applications, rejection sampling is widely used to generate noise samples that conform to a discrete Gaussian distribution. This invention utilizes this technique to convert uniformly distributed true random numbers output by a quantum random number generator into noise vector coefficients that conform to a discrete Gaussian distribution. This ensures that the noise vector retains the high entropy characteristics of quantum random numbers while also satisfying the mathematical requirements of lattice cryptography algorithms for the noise distribution shape.

[0077] Through the above transformation, the embodiments of the present invention no longer rely on software pseudo-random number generators to generate noise vectors. Instead, they use quantum true random numbers as the entropy source and rejection sampling as the transformation method to generate noise vectors with dual guarantees of physical randomness and mathematical compliance, fundamentally eliminating the risk of pseudo-random numbers being predicted or reverse-derived.

[0078] Step S203: Perform a polynomial modular multiplication operation based on the public key and the noise vector to obtain the intermediate ciphertext.

[0079] The formula for calculating the intermediate ciphertext c by performing polynomial modular multiplication is: c = Compress(A s T +e T , ct), A represents the public key matrix. In the mathematical structure of lattice cryptography, the public key is represented in the form of a polynomial matrix. s represents the secret vector, which is a random polynomial vector temporarily generated by the communicating end for this encapsulation operation. e represents the noise vector. ct represents the preset compression parameters. Compress represents the compression function.

[0080] Specifically, the encapsulation algorithm performs the following core operations on the polynomial ring: First, it calculates the transpose s of the public key matrix A and the secret vector s. T Polynomial multiplication between A s T This yields the first intermediate result; then, this result is compared with the noise vector e. T Perform polynomial addition, i.e., A s T +e TPolynomial multiplication involves convolving the corresponding coefficients of two polynomials. Modular reduction involves taking the modulus of the resulting coefficients with respect to a preset modulus q, ensuring the result remains within a finite domain. After the multiplication and addition operations described above, an uncompressed intermediate vector is obtained.

[0081] Subsequently, the encapsulation algorithm performs a compression function, `Compress`, on the intermediate vector. This compresses each coefficient of the intermediate vector according to a preset compression parameter `ct`, discarding several low-order bits to obtain the compressed intermediate ciphertext `c`. The purpose of the compression operation is to reduce the size of the ciphertext, thereby reducing the transmission burden in vehicular communication networks (especially narrowband networks such as CAN FD).

[0082] To efficiently perform the aforementioned polynomial modular multiplication operation in an automotive embedded environment, this embodiment of the invention optimizes polynomial multiplication. Specifically, polynomial multiplication is converted into pointwise multiplication through number theory transformations to reduce computational complexity. On a polynomial ring, the time complexity of directly performing polynomial multiplication is O(n^2). 2 When the polynomial has a high dimension (e.g., n=256 or 512), direct multiplication consumes a significant number of processor clock cycles. By using number theory transformations, the polynomial is transformed from the coefficient domain to the transformation domain. In the transformation domain, polynomial multiplication degenerates into point-by-point multiplication, reducing the time complexity to O(n log n). Modular multiplication is then performed within the number theory transformation domain using a specific modulus (e.g., q=7681). The mathematical properties of this modulus optimize the reduction algorithm for elements within a finite field, enabling efficient execution of modular multiplication on 32-bit and even 16-bit microcontrollers. This optimized polynomial modular multiplication significantly reduces the computational latency and memory footprint of key encapsulation operations, allowing post-quantum cryptography algorithms to run in real-time on resource-constrained automotive security chips.

[0083] Step S204: Obtain a true random number mask of the same length as the intermediate ciphertext, and perform an XOR modulo operation between the true random number mask and the intermediate ciphertext to obtain the ciphertext.

[0084] Optionally, the communication peer obtains the true random number output by the vehicle-mounted quantum random number generator again, extracts a bit sequence of the same length as the intermediate ciphertext as a true random number mask, and performs an XOR modulo operation on the true random number mask and the intermediate ciphertext c to obtain the final ciphertext c′.

[0085] XOR blinding is a randomization protection technique based on the idea of ​​a one-time cipherbook. The communicating end performs an XOR operation between a true random number mask and each bit of the intermediate ciphertext. The random bits in the mask completely scramble the original bit distribution pattern of the intermediate ciphertext, making the final output ciphertext c′ statistically a uniformly distributed random sequence. The mathematical expression for this operation is c′=(c⊕QRNG_Mask) mod q, where QRNG_Mask is the true random number mask obtained by the communicating end from the onboard quantum random number generator. Because the mask originates from the quantum random number generator and possesses true physical randomness, even if an attacker intercepts the ciphertext c′, they cannot obtain any valid information about the intermediate ciphertext c or the shared key from the statistical characteristics of the ciphertext.

[0086] The ciphertext c′ obtained after the XOR modulo operation is the encapsulated ciphertext that the communication peer finally returns to the vehicle where this embodiment of the invention is located. This ciphertext simultaneously carries the mathematical security of the lattice cryptography encapsulation algorithm and the statistical security of the quantum random number blinding. Even if quantum computers can crack the underlying mathematical structure of the lattice cryptography in the future, the quantum randomness introduced by the blinding operation can still provide an additional layer of security protection for the ciphertext.

[0087] Step S1046: Use the private key to perform a decapsulation operation on the ciphertext to obtain the shared key.

[0088] Upon receiving the ciphertext returned by the communication peer, the private key from the asymmetric key pair generated in step S1042 is used to decapsulate the ciphertext. This private key and the public key sent to the communication peer in step S1044 mathematically form a key pair, with a one-to-one correspondence. The decapsulation algorithm uses the mathematical structure of the private key to perform reverse operations on the ciphertext, restoring the shared key. This shared key is completely identical to the shared key generated by the communication peer during the encapsulation process. Thus, the two communicating parties complete secure key negotiation without needing to share any secret information beforehand. Throughout the negotiation process, the private key is always stored in the security chip of the vehicle in this embodiment of the invention and is never transmitted through any communication interface, ensuring the absolute security of the private key. Even if the public key and ciphertext are intercepted by a third party during transmission, the third party cannot restore the shared key due to the lack of the private key.

[0089] Through steps S1044 to S1046 above, this embodiment of the invention completes secure key negotiation based on post-quantum cryptography between the vehicle and the communication peer. This negotiation process does not rely on cloud-based key distribution services. Even when transmitting the public key and ciphertext over a public channel, no additional encryption protection is required because the key encapsulation mechanism itself provides security against quantum computing attacks. The negotiated shared key can be used as the working key for subsequent symmetric encryption to encrypt actual in-vehicle communication data, effectively ensuring the confidentiality and security of vehicle communication.

[0090] In one optional implementation, when performing decapsulation on ciphertext using the private key, this embodiment of the invention employs a lookup table method to replace some complex modular operations, thereby accelerating the decapsulation process. Specifically, the decapsulation algorithm involves numerous modular multiplication and modular reduction operations, some of which exhibit repetitive and regular patterns, such as modular multiplication by a fixed constant or modular reduction of coefficients within a specific range. This embodiment of the invention pre-calculates and stores the results of these repetitive operations as a lookup table, directly retrieving the results from the table during the decapsulation process, replacing real-time computation. In a specific implementation, frequently used modular multiplication constants and their corresponding calculation results are pre-stored in the lookup table. When the algorithm requires a modular multiplication operation, the result is directly retrieved from the table based on the input coefficients, eliminating the need to execute actual multipliers and modular reduction hardware operations. Experimental test data shows that this optimization measure can reduce multiplier usage by approximately 60%, significantly accelerate the decryption process, effectively reduce the computational resource consumption and computational latency of the vehicle security chip during the decapsulation operation, enabling the post-quantum cryptography algorithm to run in real-time in resource-constrained vehicle embedded environments.

[0091] In one optional implementation, this invention employs a hierarchical storage architecture to manage data access during the execution of the lightweight quantum key generation algorithm. Specifically, the hierarchical storage architecture divides the on-chip storage resources of the vehicle security chip into multiple levels: frequently accessed lookup tables (such as the rotation factor table used in number-theoretical transformations, the constant table used in modular multiplication, etc.) are placed in the L1 cache to ensure the highest access speed; intermediate calculation results generated during algorithm execution (such as intermediate polynomial coefficients at each stage of number-theoretical transformations, etc.) are dynamically allocated to the L2 cache, utilizing the larger capacity of the L2 cache to store temporary data. Through the above hierarchical storage strategy, when the processor performs modular multiplication and number-theoretical transformation operations, it can directly obtain frequently used constant data in the fastest storage level, avoiding the latency overhead of repeatedly reading the same data from the slower main memory. Experimental data shows that this hierarchical storage architecture reduces memory access latency by 45%, and simultaneously reduces overall power consumption by 30% due to reduced power consumption from frequent main memory accesses, further improving the operating efficiency of this invention in resource-constrained vehicle environments.

[0092] In an optional implementation, step S106 above, which encrypts vehicle communication data using a shared key, specifically includes the following steps: Step S1061: Obtain the service type identifier of the vehicle communication data to be sent.

[0093] Specifically, when a vehicle needs to send vehicle communication data to a communication peer, this embodiment of the invention first obtains the service type identifier corresponding to the data to be sent. In the vehicle communication protocol stack, different types of communication data carry different service functions, such as braking control commands, steering control commands, in-vehicle infotainment data, and traffic status information. Each service type carries a field in the data frame header that uniquely identifies its service type. This embodiment of the invention extracts the service type identifier from the header field of the data frame to be sent, as the basis for subsequent security policy matching. This service type identifier reflects the attributes of the data in terms of vehicle functional safety level and real-time requirements. For example, braking control commands belong to high-safety-level data with extremely high real-time requirements, while in-vehicle infotainment data belongs to ordinary-safety-level data with relatively low real-time requirements.

[0094] Step S1062: Query the preset security policy based on the service type identifier to obtain the security level corresponding to the vehicle communication data.

[0095] In this embodiment of the invention, the service type identifier extracted in step S1061 is used as a query index to perform a matching query in a preset security policy table to determine the security level corresponding to the vehicle communication data. The preset security policy table is pre-stored in the secure storage area of ​​the vehicle security chip, and this policy table defines the mapping relationship between each service type identifier and the security level. For example, braking control commands (e.g., service identifier 0x1102) are mapped to a high security level, steering control commands (e.g., service identifier 0x1103) are mapped to a high security level, and in-vehicle infotainment data (e.g., service identifier 0x1201) are mapped to a normal security level. Through this classified and graded security policy configuration, this embodiment of the invention achieves differentiated security protection for different types of communication data, ensuring the confidentiality and integrity of critical security data while avoiding unnecessary processing delays introduced by excessive encryption for control commands with high real-time requirements.

[0096] Step S1063: Select the corresponding encryption method according to the security level to encrypt the vehicle communication data.

[0097] Specifically, when the security level of vehicle communication data is high, it indicates that this type of data usually involves control commands related to driving safety. It is necessary to ensure not only the confidentiality of the data but also its integrity and authenticity of origin. Furthermore, the communication content should not be cracked even if intercepted by a third party. In this case, this embodiment of the invention uses a shared key combined with a symmetric encryption algorithm to encrypt the vehicle communication data and attaches an integrity check code. In the specific implementation, the shared key obtained during the key negotiation phase is first used as the working key. The data frame is encrypted using a symmetric encryption algorithm (e.g., AES-GCM mode). Simultaneously, the shared key is used to calculate the HMAC (Hash-based Message Authentication Code), which is then appended to the encrypted data as an integrity check code. The AES-GCM mode can complete encryption and integrity verification simultaneously in one operation, balancing security and computational efficiency. Regarding the data frame format, the encrypted data frame contains two parts: a ciphertext payload and an HMAC check code. Upon receiving the data, the communicating end first verifies the HMAC check code to confirm that the data has not been tampered with, and then decrypts the ciphertext payload to restore the original data.

[0098] When the security level of vehicle communication data is at the ordinary security level, it indicates that this type of data is typically non-critical security data such as in-vehicle infotainment, which has high real-time requirements but relatively low sensitivity to encryption strength. In this case, this embodiment of the invention uses a system-generated temporary key to perform symmetric encryption on the vehicle communication data, eliminating the need for additional post-quantum key negotiation operations, thereby reducing single-frame encryption latency. This temporary key can be generated by the system's true random number generator or pseudo random number generator and is destroyed after a single encryption operation.

[0099] As can be seen from the above description, the embodiments of the present invention achieve hierarchical encryption protection for vehicle communication data. Different types of data are given encryption strengths that match their security requirements. This not only ensures the resistance to quantum computing attacks for high-security data such as braking control, but also avoids the real-time performance degradation caused by uniformly applying high-strength encryption to all data, effectively improving the overall performance and security of the system.

[0100] In one optional implementation, this invention employs zero-copy data packet processing technology during the encryption of vehicle communication data. Specifically, when the vehicle communication controller receives a data packet to be sent, the DMA (Direct Memory Access) engine directly transmits the data packet received by the network controller to the input buffer of the encryption engine (used to execute the lightweight quantum key generation algorithm). This transmission process skips the protocol stack processing of the operating system kernel and does not involve any memory copying operations. The encryption engine directly reads the data packet from the input buffer and performs encryption operations. After encryption, the encrypted data packet is directly output to the transmission buffer of the vehicle communication controller through the direct memory access engine. Throughout the entire data packet processing path, the data always flows within the same physical memory area, eliminating the need for data copying between different memory areas. This eliminates the latency overhead caused by multiple memory copies in traditional protocol stack processing, making it particularly suitable for communication scenarios with high real-time requirements, such as vehicle Ethernet and CAN FD.

[0101] In an optional implementation, when the vehicle starts for the first time or when no valid local key material is available, this embodiment of the invention also supports obtaining key material through a vehicle-to-cloud backup mode as a supplement to the vehicle-to-vehicle direct connection mode. Specifically, the vehicle connects to a quantum key management server in the cloud via a 5G-V2X communication interface. This server provides backup key coordination services based on a quantum key distribution network. In the vehicle-to-cloud backup mode, the vehicle initiates a key request to the quantum key management server. The server generates unconditionally secure quantum key material through the quantum key distribution network and securely distributes it to the vehicle through a post-quantum cryptographic channel. This mode is suitable for the initial state where the vehicle has no valid local key, or for emergency replenishment scenarios after local key material has been discarded due to a security event. After obtaining the backup key material, the vehicle switches back to the vehicle-to-vehicle direct connection mode to continue key negotiation with the communication peer, and subsequent communication no longer relies on cloud services. Through the coordinated operation of the above-mentioned vehicle-to-cloud backup mode and vehicle-to-vehicle direct connection mode, this embodiment of the invention achieves local key negotiation independent of cloud dependence under normal circumstances, while retaining the ability to supplement key material through the cloud quantum key distribution network in extreme cases, thus balancing the autonomy and reliability of the system.

[0102] Example 2 This invention also provides a vehicle safety communication system, which is mainly used to execute the vehicle safety communication method provided in Embodiment 1 above. The following is a detailed description of the vehicle safety communication system provided in this invention.

[0103] Figure 3 A functional block diagram of a vehicle safety communication system provided in an embodiment of the present invention is shown below. Figure 3As shown, the system mainly includes: an acquisition module 10, a generation module 20, a key negotiation module 30, and an encryption module 40, wherein: The acquisition module 10 is used to acquire true random numbers output by the vehicle-mounted quantum random number generator.

[0104] Generation module 20 is used to generate key negotiation parameters based on true random numbers.

[0105] The key negotiation module 30 is used to negotiate a shared key with the communication peer using key negotiation parameters.

[0106] The encryption module 40 is used to encrypt the vehicle communication data to be sent using a shared key for secure vehicle communication.

[0107] This invention, through obtaining truly random numbers output by an onboard quantum random number generator, ensures high security and unpredictability of the key generation source, fundamentally avoiding instruction forgery attacks caused by pre-charged key leakage. By generating key negotiation parameters based on these truly random numbers and directly using these parameters to negotiate a shared key with the communication peer, a key distribution mechanism completely independent of the cloud is achieved, effectively overcoming the problem of cloud key synchronization failure during network switching. Finally, the shared key is used to encrypt vehicle communication data for secure vehicle communication, comprehensively ensuring the real-time performance, reliability, and data security of vehicle communication.

[0108] Optionally, module 10 is specifically used for: Coherent optical signals are generated by a laser.

[0109] The quantum phase noise of the coherent optical signal is converted into a photocurrent signal using an interferometer.

[0110] The photocurrent signal is amplified by a transimpedance amplifier to obtain the target analog electrical signal.

[0111] The target analog electrical signal is converted into a digital bit stream using an analog-to-digital converter.

[0112] The minimum entropy value of the digital bitstream is calculated by the entropy evaluation module, and if the minimum entropy value is higher than a preset threshold, the digital bitstream is output as a true random number.

[0113] Optionally, the system also includes a derivation module for deriving a local key before generating key negotiation parameters based on true random numbers, specifically including the following steps: Obtain the vehicle's root key; the root key is a truly random number generated by the onboard quantum random number generator when the vehicle is first powered on.

[0114] Each time the vehicle is powered on and started, the root key is processed through the second preset key derivation function to obtain the vehicle's current master key.

[0115] Optionally, the generation module 20 is specifically used for: The local session seed is obtained by processing the master key and the true random number through the first preset key derivation function.

[0116] The local session seed is processed using a lightweight quantum key generation algorithm to obtain an asymmetric key pair containing a public key and a private key; the lightweight quantum key generation algorithm uses constant-time number theory transformation to perform modular multiplication.

[0117] Use asymmetric key pairs as key negotiation parameters.

[0118] Optionally, the key negotiation module 30 is specifically used for: Send the public key to the communication peer.

[0119] Receive the ciphertext returned by the communication peer; the ciphertext is the result obtained by the communication peer after encapsulating the shared key based on the public key.

[0120] The shared key is obtained by decrypting the ciphertext using the private key.

[0121] Optionally, the encryption module 40 is specifically used for: Obtain the service type identifier of the vehicle communication data to be sent.

[0122] The system queries the preset security policy based on the service type identifier to obtain the security level corresponding to the vehicle communication data.

[0123] Select the appropriate encryption method based on the security level to encrypt the vehicle communication data.

[0124] Optionally, the ciphertext is generated through the following process: Obtain truly random numbers output by the vehicle-mounted quantum random number generator.

[0125] The rejection sampling technique is used to convert true random numbers into noise vectors that conform to a discrete Gaussian distribution.

[0126] The intermediate ciphertext is obtained by performing a polynomial modular multiplication operation based on the public key and the noise vector.

[0127] Obtain a true random number mask of the same length as the intermediate ciphertext, and perform an XOR modulo operation between the true random number mask and the intermediate ciphertext to obtain the ciphertext.

[0128] Example 3 See Figure 4This invention provides an electronic device, which includes a processor 60, a memory 61, a bus 62, and a communication interface 63. The processor 60, the communication interface 63, and the memory 61 are connected via the bus 62. The processor 60 is used to execute executable modules, such as computer programs, stored in the memory 61.

[0129] The memory 61 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 63 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0130] Bus 62 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0131] The memory 61 is used to store programs. After receiving an execution instruction, the processor 60 executes the program. The method executed by the apparatus defined by the process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0132] Processor 60 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 60 or by instructions in software form. Processor 60 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 61. Processor 60 reads the information in memory 61 and, in conjunction with its hardware, completes the steps of the above method.

[0133] Example 4 This invention also provides a vehicle equipped with the vehicle safety communication system described in Embodiment 2 above.

[0134] The vehicle safety communication method, system, electronic device, and vehicle computer program product provided in this embodiment of the invention include a computer-readable storage medium storing processor-executable non-volatile program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0135] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0136] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0138] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0139] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0140] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A vehicle safety communication method, characterized in that, include: Based on the true random numbers output by the vehicle-mounted quantum random number generator, key negotiation parameters are generated, and the shared key is obtained by negotiating with the communication peer using the key negotiation parameters. The shared key is used to encrypt the vehicle communication data to be sent for secure vehicle communication.

2. The vehicle safety communication method according to claim 1, characterized in that, Also includes: Coherent optical signals are generated by lasers; The quantum phase noise of the coherent optical signal is converted into a photocurrent signal using an interferometer; The photocurrent signal is amplified by a transimpedance amplifier to obtain the target analog electrical signal. The target analog electrical signal is converted into a digital bit stream using an analog-to-digital converter; The minimum entropy value of the digital bitstream is calculated by the entropy evaluation module, and if the minimum entropy value is determined to be higher than a preset threshold, the digital bitstream is output as a true random number.

3. The vehicle safety communication method according to claim 1, characterized in that, Based on the truly random numbers output by the vehicle-mounted quantum random number generator, key negotiation parameters are generated, including: The local session seed is obtained by processing the vehicle's current master key and the true random number through the first preset key derivation function; The local session seed is processed using a lightweight quantum key generation algorithm to obtain an asymmetric key pair containing a public key and a private key; the lightweight quantum key generation algorithm performs modular multiplication using constant-time number theory transformation; The asymmetric key pair is used as the key negotiation parameter.

4. The vehicle safety communication method according to claim 1, characterized in that, Also includes: Obtain the vehicle's root key; The root key is a truly random number generated by the on-board quantum random number generator when the vehicle is first powered on. Each time the vehicle is powered on and started, the root key is processed through the second preset key derivation function to obtain the vehicle's current master key.

5. The vehicle safety communication method according to claim 3, characterized in that, Using the key negotiation parameters, a shared key is obtained by negotiating with the communication peer, including: Send the public key to the communication peer; Receive ciphertext returned by the communication peer; the ciphertext is the result obtained by the communication peer after encapsulating the shared key based on the public key; The shared key is obtained by decapsulating the ciphertext using the private key.

6. The vehicle safety communication method according to claim 1, characterized in that, The encryption of vehicle communication data using the shared key includes: Obtain the service type identifier of the vehicle communication data to be sent; The security level corresponding to the vehicle communication data is obtained by querying the preset security policy based on the service type identifier. The vehicle communication data is encrypted using the corresponding encryption method selected based on the security level.

7. The vehicle safety communication method according to claim 5, characterized in that, The ciphertext is generated through the following process: Obtain truly random numbers output by the vehicle-mounted quantum random number generator; The true random numbers are converted into noise vectors that conform to a discrete Gaussian distribution by using a rejection sampling technique; Perform a multinomial modular multiplication operation based on the public key and the noise vector to obtain the intermediate ciphertext; Obtain a true random number mask of the same length as the intermediate ciphertext, and perform an XOR modulo operation between the true random number mask and the intermediate ciphertext to obtain the ciphertext.

8. A vehicle safety communication system, characterized in that, include: The acquisition module is used to acquire true random numbers output by the vehicle-mounted quantum random number generator; The generation module is used to generate key negotiation parameters based on the true random number; The key negotiation module is used to negotiate a shared key with the communication peer using the key negotiation parameters. An encryption module is used to encrypt vehicle communication data to be sent using the shared key for secure vehicle communication.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the vehicle safety communication method according to any one of claims 1 to 7.

10. A vehicle, characterized in that, The vehicle is equipped with the vehicle safety communication system as described in claim 8.