Clock self-synchronizing communication method based on double dynamic factors

By using a clock self-synchronization communication method based on dual dynamic factors, a primary factor and a secondary factor are generated using timestamps and device IDs, and a synchronization code is generated by combining encryption algorithms. This solves the security and synchronization problems in wireless communication between vehicle keys and vehicle terminals, and achieves efficient communication security and clock synchronization.

CN121604100APending Publication Date: 2026-03-03HANGZHOU DIANZI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610020300.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

The wireless communication between vehicle keys and vehicle terminals and IoT devices suffers from insufficient communication security, poor authentication robustness, and insufficient clock synchronization accuracy, making them vulnerable to replay attacks, data theft, authentication failures, and communication interruptions.

Method used

A clock self-synchronization communication method based on dual dynamic factors is adopted. The main factor and auxiliary factor are generated by XOR operation of timestamp and device ID. Synchronization code is generated by combining symmetric and asymmetric encryption algorithms. Format verification, source verification and data correction are performed to achieve adaptive clock calibration and synchronization.

Benefits of technology

It improves the ability to resist replay attacks, enhances authentication robustness, optimizes clock synchronization accuracy, and ensures communication stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121604100A_ABST
    Figure CN121604100A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wireless communication security and clock synchronization, and discloses a clock self-synchronization communication method based on double dynamic factors, which comprises the following steps that: an initiating end firstly generates a main factor Q and a cofactor P bound with a timestamp and a device ID (Identity), generates dynamic encryption strings S1 and S2 by using symmetric encryption and asymmetric encryption respectively, and combines the dynamic encryption strings S1 and S2 into a synchronous code C1; after analysis, the receiving end verifies the homology of the S1 and the S2 through bidirectional decryption, and equipment authentication and anti-replay are realized; if verification fails, starting data correction, dynamically fitting the ID by using a Hamming distance algorithm and comparing a timestamp; according to the method, the clock skew is calculated based on the valid timestamp passing verification, closed-loop calibration is triggered when the clock skew exceeds the standard, clock synchronization is embedded in security authentication, the replay attack resistance, authentication robustness and clock synchronization precision are remarkably enhanced, and deep integration of security and synchronization is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless communication security and clock synchronization technology, specifically to a clock self-synchronization communication method based on dual dynamic factors. Background Technology

[0002] In existing technologies, wireless communication between vehicle keys and vehicle terminals / IoT devices generally suffers from three core problems: First, insufficient communication security. Traditional communication methods often use fixed keys or simple dynamic cryptographic mechanisms, lacking dynamic unique identifiers, making them vulnerable to replay attacks and leading to security risks such as unauthorized device control and data theft. Second, poor robustness of authentication mechanisms. Affected by factors such as communication environment interference and differences in device hardware precision, transmitted data is prone to slight deviations. Existing authentication algorithms often use strict matching modes, and such slight deviations can directly lead to authentication failure, affecting communication stability. Third, insufficient clock synchronization accuracy. The clocks of both the vehicle terminal and the key terminal are easily affected by factors such as temperature changes, power fluctuations, and crystal oscillator drift, resulting in deviations. Furthermore, there is a lack of effective automatic calibration mechanisms. When the deviation exceeds a threshold, it can cause dynamic keys to become invalid and communication timing to become disordered, further leading to authentication failure or communication interruption. Summary of the Invention

[0003] To address the technical problems of existing technologies, such as weak resistance to replay attacks, poor authentication robustness, and insufficient clock synchronization accuracy, this invention provides a clock self-synchronization communication method based on dual dynamic factors, the technical solution of which is as follows:

[0004] Step 1: When initiating communication, the initiating end performs preliminary clock calibration. After calibration, the main factor Q is obtained by XORing the timestamp T1 second-level field with the device ID. Then, the main factor Q is XORed and hashed with the timestamp T1 millisecond-level field to obtain the auxiliary factor P.

[0005] Step 2: Using timestamp T1 + command M + primary factor Q as the first plaintext group, use a symmetric encryption algorithm to generate a dynamic encrypted string S1. Using device ID + timestamp T1 + secondary factor P as the second plaintext group, use an asymmetric encryption algorithm to generate an encrypted string S2.

[0006] Step 3: The initiating end concatenates the dynamic encryption string S1 with the encryption string S2 to form the synchronization code C1, and sends the synchronization code C1 to the receiving end.

[0007] Step 4: After receiving the synchronization code C1, the receiving end parses out the start character, separator, and end character through boundary identification, completes the synchronization code format legality verification, extracts the encryption identifier segment from the dynamic encryption string S1, decrypts the dynamic encryption string S1 using the symmetric encryption algorithm to obtain the first plaintext group, separates out the main factor Q, and then decrypts the encryption string S2 using the asymmetric encryption algorithm to obtain the second plaintext group, and separates out the auxiliary factor P.

[0008] Step 5: Compare the auxiliary factor P obtained from decrypting the encrypted string S2 with the main factor Q obtained from decrypting the dynamic encrypted string S1 and the millisecond-level field of the timestamp T1 after performing an XOR operation and a hash operation. If they match, it is determined that the dynamic encrypted string S1 and the encrypted string S2 have passed the same source verification. If they do not match, data correction is performed to obtain a valid device ID and timestamp T1.

[0009] Step 6: After successful source verification or data correction, calculate the final time deviation based on the valid timestamp T1 and the receiver's local timestamp T2: ΔT = |local timestamp T2 - timestamp T1|, and compare it with the preset maximum allowable deviation: ΔT_max.

[0010] If ΔT≤ΔT_max, then a secure communication link is established directly;

[0011] If ΔT > ΔT_max, then clock calibration is performed;

[0012] Step 7: The receiving end executes the command M and sends a closing confirmation frame after completion. After receiving the closing confirmation frame, both parties synchronously close the secure communication link, release resources, and record the communication log.

[0013] Furthermore, the initial clock calibration in step 1 is defined as follows: calibration is successful when the error is ≤50ms.

[0014] Furthermore, in step 1, the auxiliary factor P satisfies the following condition: it can only be generated by forward derivation of the main factor Q, and cannot be reversed by the auxiliary factor P to crack the main factor Q.

[0015] Furthermore, the format of the synchronization code C1 in step 3 is: start character + dynamic encryption string S1 + separator + encryption string S2 + end character.

[0016] Furthermore, the data correction in step 5 specifically involves:

[0017] 1) Extract the timestamp T1 and device ID from the first plaintext group obtained by decrypting the dynamic encrypted string S1, and denot them as T1_S1 and ID_S1. Extract the timestamp T1 and device ID from the second plaintext group obtained by decrypting the encrypted string S2, and denot them as T1_S2 and ID_S2.

[0018] 2) Fit and match ID_S1 and ID_S2 with the authorized ID library stored locally at the receiving end, and use the Hamming distance algorithm to calculate the bit difference between ID_S1 and ID_S2 and each authorized ID;

[0019] 3) Fit T1_S1 and T1_S2 to the local timestamp T2 when the receiver receives the synchronization code C1, and calculate the time deviation: ΔT1=|T2-T1_S1|, ΔT2=|T2-T1_S2|;

[0020] 4) If the bit difference between a certain authorized ID and ID_S2 does not exceed the dynamic threshold Δ of the current communication environment, and at least one of ΔT1 and ΔT2 does not exceed the preset time fitting threshold ΔT_fit, then the data correction is considered successful, the matching authorized ID is used as the valid device ID, and the timestamp with the smaller deviation is used as the valid timestamp T1.

[0021] 5) If no matching authorized ID is found, or if ΔT1 and ΔT2 are both greater than ΔT_fit, the data correction is deemed to have failed, communication is terminated immediately, and a data anomaly is reported to the initiating end.

[0022] Furthermore, before performing the fitting and matching, the following verification is performed: verify the length and frame structure of ID_S1, ID_S2 and the local storage authorization ID. If the verification fails, step 5 is terminated.

[0023] Furthermore, the dynamic threshold Δ is adjusted according to different usage scenarios: if the device detects strong interference in the current communication environment, the dynamic threshold Δ is adjusted to 3 bits; when the synchronization code C1 deviation is detected to be 2 bits for 3 consecutive times and the clock deviation is ≤100ms, the dynamic threshold Δ is maintained at 2 bits; when the authorized device is paired for the first time, the dynamic threshold Δ is temporarily adjusted to 1 bit.

[0024] Furthermore, the clock calibration in step 6 specifically involves:

[0025] 1) The receiving end repeatedly sends the calibration command. The calibration command includes the receiving end's local timestamp T2, the final time deviation ΔT and the receiving end ID, and is encrypted using the AES-256 algorithm.

[0026] 2) Send the encrypted calibration command back to the initiating end;

[0027] 3) After receiving the calibration command, the initiating end decrypts and extracts the local timestamp T2 and the final time deviation ΔT. It then adjusts its own clock module according to the final time deviation ΔT to synchronize the initiating end clock to the local timestamp T2, thus completing the automatic clock synchronization.

[0028] 4) After the clock is automatically synchronized, the initiating end regenerates the timestamp T1', repeats the synchronization code C1 generation and matching process, and establishes communication.

[0029] Beneficial effects:

[0030] This invention employs a dual dynamic factor design, simultaneously involving the timestamp T1 in two encryption paths, preventing attackers from reusing old timestamps and enhancing its resistance to replay attacks. It also utilizes a multi-level authentication method, including format verification, encryption verification, source identity verification, and data correction. Furthermore, it automatically adjusts the dynamic threshold Δ (1-3 bits) based on the environment to achieve adaptive fault tolerance and improve authentication robustness. Finally, it employs a self-synchronization mechanism, eliminating the need for a third-party authorization server. It calculates deviations in real-time and performs tiered processing, communicating directly for minor deviations and actively calibrating for significant deviations, thus optimizing clock synchronization accuracy. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the clock self-synchronization communication method based on dual dynamic factors;

[0032] Figure 2 This is a schematic diagram of the clock calibration process in an embodiment of the present invention;

[0033] Figure 3 This is a schematic diagram of the data correction process in an embodiment of the present invention. Detailed Implementation

[0034] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0035] like Figure 1 As shown, a clock self-synchronization communication method based on dual dynamic factors according to the present invention includes the following steps:

[0036] (1) When the user presses the unlock button on the key end to initiate a communication request, a preliminary clock calibration is first performed with the vehicle end (error ≤ 50ms, calibration passed), and the current timestamp: T1 = "20240520143025123" and the unique device ID: ID_U1 = "0x2B4D6F8A0C2E4G6H8J0L2N4P6R8T0V".

[0037] (2) Calculate the principal factor at the key end: Q = T1 second-level field (20240520143025) ⊕ ID_U1, and get Q = "0x3D793B1F3A4C2E0H6J8L0N2P4R6T8V0X"; then calculate the auxiliary factor: P = SHA-256 (Q ⊕ T1 millisecond-level field 123), and get P = "0x5A7C9E1G3F5D7B9A1C3E5G7I9K1M3O5Q", which satisfies the irreversible constraint.

[0038] (3) Construct the first plaintext group at the key end: “T1+M (unlock command 0x01)+Q”, and generate a dynamic encrypted string through AES-256 symmetric encryption: S1 = “0x4F8B3E5G7I9K1M3O5Q7S9U1W3Y5A7C9E1G”; construct the second plaintext group: “ID_U1+T1+P”, and generate an encrypted string through ECC asymmetric encryption: S2 = “0x6H0J2L4N6P8R0T2V4X6Z8A0C2E4G6I8K0M2O4Q6S”.

[0039] (4) Key end splicing synchronization code: C1 = “start character 0xAA+S1+separator 0xBB+S2+end character 0xCC”, which is sent to the vehicle end through the radio frequency module.

[0040] (5) After receiving C1, the vehicle terminal parses the start character, separator, and end character through the boundary recognition algorithm to complete the format legality verification; decrypt S1 to obtain the first plaintext group and separate Q = "0x3D793B1F3A4C2E0H6J8L0N2P4R6T8V0X"; decrypt S2 using the asymmetric algorithm to obtain the second plaintext group and separate ID_U1, T1, and P = "0x5A7C9E1G3F5D7B9A1C3E5G7I9K1M3O5Q".

[0041] (6) Verify the sameness at the vehicle end: Perform SHA-256 operation after XORing Q with the millisecond-level field 123 of T1. If the result is inconsistent with P, start the data correction process.

[0042] (7) Data correction: Extract the following from S1:

[0043] ID_S1=0x2B4D6F8A0C2E4G6H8J0L2N4P6R8T0V, T1_S1=“20240520143025123”;

[0044] Extract from S2:

[0045] ID_S2=0x2B4D6F8A0C2E4G6H8J0L2N4P6R8T0V, T1_S2=20240520143025123;

[0046] Calculate the Hamming distance between ID_S1, ID_S2 and the authorized ID database: d=0≤ΔD_max=2;

[0047] Collect the local timestamp of the vehicle terminal: T2=20240520143025456;

[0048] Calculate ΔT1=|20240520143025456-20240520143025123|=333ms, ΔT2=333ms, ΔT1≤ΔT_fit=400ms, the correction is successful, take ID_S1 as the valid ID, and T1_S1 as the valid T1.

[0049] (8) Calculate the final clock offset:

[0050] ΔT=|20240520143025456-20240520143025123|=333ms>ΔT_max=300ms, the vehicle terminal generates a calibration command (including T2, ΔT=333ms, vehicle terminal ID), which is encrypted with AES-256 and fed back to the key terminal.

[0051] (9) Decrypt the calibration command on the key end, adjust its own clock to T2, and after recalibration is successful, collect the new timestamp T1' = "20240520143025456", repeat steps (2)-(4) to generate a new synchronization code C1' and send it (first retransmission).

[0052] (10) After receiving C1', the vehicle terminal repeats the parsing and decryption process. The same source verification is passed. ΔT'=|20240520143025456-20240520143025456|=0≤ΔT_max=300ms. No recalibration is required. A secure communication link is established.

[0053] (11) The vehicle terminal executes the unlock command, drives the door to unlock, and the turn signal flashes twice as a reminder; after the execution is completed, a closing frame is sent, the key terminal receives the closing confirmation frame, both parties simultaneously close the communication link, release resources, and record the communication log (including timestamp, ID, and command execution result).

[0054] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 therein. Such 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 clock self-synchronization communication method based on dual dynamic factors, characterized in that, Includes the following steps: Step 1: When initiating communication, the initiating end performs preliminary clock calibration. After calibration, the main factor Q is obtained by XORing the timestamp T1 second-level field with the device ID. Then, the main factor Q is XORed and hashed with the timestamp T1 millisecond-level field to obtain the auxiliary factor P. Step 2: Using timestamp T1 + command M + primary factor Q as the first plaintext group, use a symmetric encryption algorithm to generate a dynamic encrypted string S1. Using device ID + timestamp T1 + secondary factor P as the second plaintext group, use an asymmetric encryption algorithm to generate an encrypted string S2. Step 3: The initiating end concatenates the dynamic encryption string S1 with the encryption string S2 to form the synchronization code C1, and sends the synchronization code C1 to the receiving end. Step 4: After receiving the synchronization code C1, the receiving end parses out the start character, separator, and end character through boundary identification, completes the synchronization code format legality verification, extracts the encryption identifier segment from the dynamic encryption string S1, decrypts the dynamic encryption string S1 using the symmetric encryption algorithm to obtain the first plaintext group, separates out the main factor Q, and then decrypts the encryption string S2 using the asymmetric encryption algorithm to obtain the second plaintext group, and separates out the auxiliary factor P. Step 5: Compare the auxiliary factor P obtained from decrypting the encrypted string S2 with the main factor Q obtained from decrypting the dynamic encrypted string S1 and the millisecond-level field of the timestamp T1 after performing an XOR operation and a hash operation. If they match, it is determined that the dynamic encrypted string S1 and the encrypted string S2 have passed the same source verification. If they do not match, data correction is performed to obtain a valid device ID and timestamp T1. Step 6: After successful source verification or data correction, calculate the final time deviation based on the valid timestamp T1 and the receiver's local timestamp T2: ΔT = |local timestamp T2 - timestamp T1|, and compare it with the preset maximum allowable deviation: ΔT_max. If ΔT≤ΔT_max, then a secure communication link is established directly; If ΔT > ΔT_max, then clock calibration is performed; Step 7: The receiving end executes the command M and sends a closing confirmation frame after completion. After receiving the closing confirmation frame, both parties synchronously close the secure communication link, release resources, and record the communication log.

2. The clock self-synchronization communication method based on dual dynamic factors as described in claim 1, characterized in that: In step 1, the initial clock calibration is performed when the error is ≤50ms.

3. The clock self-synchronization communication method based on dual dynamic factors as described in claim 1, characterized in that: In step 1, the auxiliary factor P satisfies the following condition: it can only be generated by forward derivation of the main factor Q, and cannot be reversed by the auxiliary factor P to crack the main factor Q.

4. The clock self-synchronization communication method based on dual dynamic factors as described in claim 1, characterized in that: The format of synchronization code C1 in step 3 is: start character + dynamic encryption string S1 + separator + encryption string S2 + end character.

5. The clock self-synchronization communication method based on dual dynamic factors as described in claim 1, characterized in that: The data correction in step 5 specifically involves: 1) Extract the timestamp T1 and device ID from the first plaintext group obtained by decrypting the dynamic encrypted string S1, and denot them as T1_S1 and ID_S1. Extract the timestamp T1 and device ID from the second plaintext group obtained by decrypting the encrypted string S2, and denot them as T1_S2 and ID_S2. 2) Fit and match ID_S1 and ID_S2 with the authorized ID library stored locally at the receiving end, and use the Hamming distance algorithm to calculate the bit difference between ID_S1 and ID_S2 and each authorized ID; 3) Fit T1_S1 and T1_S2 to the local timestamp T2 when the receiver receives the synchronization code C1, and calculate the time deviation: ΔT1=|T2-T1_S1|, ΔT2=|T2-T1_S2|; 4) If the bit difference between a certain authorized ID and ID_S2 does not exceed the dynamic threshold Δ of the current communication environment, and at least one of ΔT1 and ΔT2 does not exceed the preset time fitting threshold ΔT_fit, then the data correction is considered successful, the matching authorized ID is used as the valid device ID, and the timestamp with the smaller deviation is used as the valid timestamp T1. 5) If no matching authorized ID is found, or if ΔT1 and ΔT2 are both greater than ΔT_fit, the data correction is deemed to have failed, communication is terminated immediately, and a data anomaly is reported to the initiating end.

6. The clock self-synchronization communication method based on dual dynamic factors as described in claim 5, characterized in that: Before performing the fitting and matching, the following verification is performed: verify the length and frame structure of ID_S1, ID_S2 and the local storage authorization ID. If the verification fails, step 5 is terminated.

7. The clock self-synchronization communication method based on dual dynamic factors as described in claim 5, characterized in that: The dynamic threshold Δ is adjusted according to different usage scenarios: if the device detects strong interference in the current communication environment, the dynamic threshold Δ is adjusted to 3 bits; when the synchronization code C1 deviation is 2 bits for 3 consecutive times and the clock deviation is ≤100ms, the dynamic threshold Δ is maintained at 2 bits; when the authorized device is paired for the first time, the dynamic threshold Δ is temporarily adjusted to 1 bit.

8. The clock self-synchronization communication method based on dual dynamic factors as described in claim 1, characterized in that: The clock calibration in step 6 specifically involves: 1) The receiving end repeatedly sends the calibration command. The calibration command includes the receiving end's local timestamp T2, the final time deviation ΔT and the receiving end ID, and is encrypted using the AES-256 algorithm. 2) Send the encrypted calibration command back to the initiating end; 3) After receiving the calibration command, the initiating end decrypts and extracts the local timestamp T2 and the final time deviation ΔT. It then adjusts its own clock module according to the final time deviation ΔT to synchronize the initiating end clock to the local timestamp T2, thus completing the automatic clock synchronization. 4) After the clock is automatically synchronized, the initiating end regenerates the timestamp T1', repeats the synchronization code C1 generation and matching process, and establishes communication.