Key verification method, processor and vehicle
By acquiring and generating verification information to verify the networking keys of roadside components and vehicles, the problem of low verification efficiency caused by limited vehicle computing resources is solved, and real-time communication key verification is realized.
Patent Information
- Application Number
- PCT/CN2025/146181
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-08-19
- Filing Date
- 2025-12-26
- Publication Date
- 2026-11-12
AI Technical Summary
Limited computing resources in vehicles result in low verification efficiency of complex encryption algorithms in vehicular ad hoc network communication, making it difficult to meet real-time communication requirements.
By obtaining the identification and verification information from the broadcast messages generated by the roadside components, a second target verification message is generated to verify the networking key of the roadside components and the vehicle, determine their relationship, and improve verification efficiency.
It meets the requirements for real-time communication in vehicle-mounted ad hoc networks and improves the verification efficiency of networking keys.
Smart Images

Figure CN2025146181_12112026_PF_FP_ABST
Abstract
Description
Key verification methods, processors, and vehicles
[0001] Cross-reference
[0002] This disclosure claims priority to Chinese Patent Application No. 202511163430.X, filed on August 19, 2025, entitled "Method for Validating a Key, Processor and Vehicle", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of vehicles, and more specifically, to a key verification method, a processor, and a vehicle. Background Technology
[0004] Currently, complex encryption algorithms are used in the communication of vehicular ad hoc networks, such as asymmetric encryption algorithms based on large number factorization or discrete logarithm problems.
[0005] However, while these algorithms offer high security, they also involve high computational complexity. Due to the limited computing resources of vehicles, running these complex algorithms consumes significant amounts of computation time and resources, making it difficult to meet the real-time communication requirements of vehicular ad hoc networks. This results in the technical problem of inefficient verification of network keys.
[0006] There is currently no effective solution to the technical problem of low efficiency in verifying network keys. Summary of the Invention
[0007] This disclosure provides a key verification method, processor, and vehicle to at least address the technical problem of low efficiency in verifying network keys.
[0008] According to one aspect of the present disclosure, a key verification method is provided, applied to a vehicle, wherein the vehicle and a roadside component are in the same network, comprising: acquiring a broadcast message generated by the roadside component for the vehicle, wherein the broadcast message includes first identification information of the vehicle and first target verification information, the first identification information being used to identify the vehicle, and the first target verification information being used to represent a verification message generated by the roadside component for the vehicle; extracting the first identification information and the first target verification information from the broadcast message, and generating second target verification information based on the first identification information, wherein the second target verification information is used to represent a verification message generated by the vehicle for the roadside component; verifying a first network key of the roadside component and a second network key of the vehicle based on the first target verification information and the second target verification information to obtain a first verification result, wherein the first network key is used to represent a key generated by the roadside component for the network, the second network key is used to represent a key generated by the vehicle for the network, and the first verification result is used to represent the relationship between the first network key and the second network key.
[0009] According to one aspect of the present disclosure, a key verification method is provided, which is applied to a roadside component, wherein the roadside component and a vehicle are in the same network, comprising: generating a broadcast message for the vehicle, wherein the broadcast message includes: first identification information of the vehicle and first target verification information, the first identification information being used to identify the vehicle, the first target verification information being used to represent a verification message generated by the roadside component for the vehicle, the first identification information and the first target verification information being extracted from the broadcast message; sending the broadcast message to the vehicle, wherein the broadcast message is used to enable the vehicle to verify a first network key of the roadside component and a second network key of the vehicle based on the first target verification information and the second target verification information, to obtain a first verification result, the second target verification information being used to represent a verification message generated by the vehicle for the roadside component, the second target verification information being generated based on the first identification information, the first network key being used to represent a key generated by the roadside component for the network, the second network key being used to represent a key generated by the vehicle for the network, and the first verification result being used to represent the relationship between the first network key and the second network key.
[0010] According to another aspect of the embodiments of this disclosure, a key verification device is also provided. The device includes: a first acquisition component, configured to acquire a broadcast message generated by a roadside component for a vehicle, wherein the broadcast message includes first identification information of the vehicle and first target verification information, the first identification information being used to identify the vehicle, and the first target verification information being used to represent a verification message generated by the roadside component for the vehicle; a processing component, configured to extract the first identification information and the first target verification information from the broadcast message, and to generate second target verification information based on the first identification information, wherein the second target verification information is used to represent a verification message generated by the vehicle for the roadside component; and a verification component, configured to verify a first network key of the roadside component and a second network key of the vehicle based on the first target verification information and the second target verification information, to obtain a first verification result, wherein the first network key is used to represent a key generated by the roadside component for the network, the second network key is used to represent a key generated by the vehicle for the network, and the first verification result is used to represent the relationship between the first network key and the second network key.
[0011] According to another aspect of the embodiments of this disclosure, a key verification device is also provided. The device includes: a generation component for generating a broadcast message for a vehicle, wherein the broadcast message includes: first identification information of the vehicle and first target verification information, the first identification information being used to identify the vehicle, and the first target verification information being used to represent a verification message generated by a roadside component for the vehicle, the first identification information and the first target verification information being extracted from the broadcast message; and a sending component for sending the broadcast message to the vehicle, wherein the broadcast message is used to enable the vehicle to verify a first network key of the roadside component and a second network key of the vehicle based on the first target verification information and the second target verification information, to obtain a first verification result, the second target verification information being used to represent a verification message generated by the vehicle for the roadside component, the second target verification information being generated based on the first identification information, the first network key being used to represent a key generated by the roadside component for the network, the second network key being used to represent a key generated by the vehicle for the network, and the first verification result being used to represent the relationship between the first network key and the second network key.
[0012] According to another aspect of embodiments of the present disclosure, a processor is also provided. The processor is configured to run a program, wherein the program is executed by the processor to perform the methods of various embodiments of the present disclosure.
[0013] According to another aspect of the present disclosure, a vehicle is also provided, including: a memory storing an executable program; and a processor configured to run the program, wherein the program executes the methods of various embodiments of the present disclosure when it runs.
[0014] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the methods of the various embodiments of the present disclosure.
[0015] According to another aspect of the embodiments of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this disclosure.
[0016] According to another aspect of the embodiments of this disclosure, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods of various embodiments of this disclosure.
[0017] According to another aspect of the embodiments of this disclosure, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this disclosure.
[0018] In this embodiment, when verifying the network key of a vehicle, a broadcast message generated by the roadside component for the vehicle is obtained. First identification information and first target verification information are extracted from the obtained broadcast message. Second target verification information is generated based on the extracted first identification information. Based on the extracted first target verification information and the generated second target verification information, the first network key of the roadside component and the second network key of the vehicle are verified to obtain a first verification result. Since this embodiment, based on extracting the first identification information and first target verification information from the obtained broadcast message, verifies the first network key of the roadside component and the second network key of the vehicle according to the extracted first target verification information and the second target verification information generated based on the extracted first identification information, and obtains a first verification result, that is, it determines the relationship between the first network key and the second network key. This achieves the goal of meeting the requirements for real-time communication of vehicular ad hoc networks, thereby solving the technical problem of low efficiency in verifying network keys, and thus achieving the technical effect of improving the efficiency of verifying network keys. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0020] Figure 1(a) is a schematic diagram of an application scenario of a key verification method according to an embodiment of the present disclosure;
[0021] Figure 1(b) is a flowchart of a key verification method according to an embodiment of the present disclosure;
[0022] Figure 2 is a flowchart of another key verification method according to an embodiment of the present disclosure;
[0023] Figure 3 is a schematic diagram of a group key distribution method based on a vehicle-mounted ad hoc network according to an embodiment of the present disclosure;
[0024] Figure 4 is a structural block diagram of a key verification device according to an embodiment of the present disclosure;
[0025] Figure 5 is a structural block diagram of another key verification device according to an embodiment of the present disclosure. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data are interchangeable where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or components is not necessarily limited to those steps or components explicitly listed, but may include other steps or components not explicitly listed or inherent to such processes, methods, products, or devices.
[0028] According to an embodiment of the present disclosure, an embodiment of a key verification method is provided. It should be noted that the steps shown in the flowcharts in the accompanying drawings are executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described are executed in a different order than that shown here.
[0029] As an optional implementation, the above-described key verification method is not limited to the application scenario shown in Figure 1(a). Figure 1(a) is a schematic diagram of an application scenario of a key verification method according to an embodiment of this disclosure. As shown in Figure 1(a), in the application scenario, the terminal device 10 communicates with the server 13 via the network 11, but is not limited to this. The server 13 performs operations on the database, such as writing or reading data. The terminal device 10 includes, but is not limited to, a human-computer interaction screen, a processor, and a memory. The human-computer interaction screen is not limited to displaying a virtual machine on the mobile terminal 10. The vehicle 12 is not limited to responding to the above-described human-computer interaction operation, performing corresponding operations, or generating corresponding instructions and sending the generated instructions to the server 13.
[0030] It should be noted that the steps shown in the flowcharts of the accompanying drawings are executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described are executed in a different order than that shown here. The key verification method in this disclosure includes: step S102, obtaining a broadcast message generated by the roadside component for the vehicle; step S104, extracting first identification information and first target verification information from the broadcast message, and generating second target verification information based on the first identification information, wherein the second target verification information represents a verification message generated by the vehicle for the roadside component; and step S106, verifying the first network key of the roadside component and the second network key of the vehicle based on the first target verification information and the second target verification information, to obtain a first verification result.
[0031] It should be noted that the relevant information (including but not limited to broadcast messages, first identification information, first target verification information, and second target verification information) and data (including but not limited to the first network key and the second network key) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0032] Figure 1(b) is a flowchart of a key verification method according to an embodiment of the present disclosure. As shown in Figure 1(b), the method is applied to a vehicle, which is in the same network as the roadside components, and includes the following steps.
[0033] Step S112: Obtain the broadcast message generated by the roadside component for the vehicle.
[0034] In the technical solution provided by step S112 of this disclosure, the broadcast message includes the vehicle's first identification information and the first target verification information. The first identification information is used to identify the vehicle, and the first target verification information is used to represent the verification message generated by the roadside component for the vehicle.
[0035] The aforementioned vehicles, roadside units (RSUs), and key distribution centers (KDCs) are located in the same network. For example, the aforementioned network can be of different types, including: ad-hoc networks, mesh networks, cluster-based networks, and hybrid networks, etc. These are merely examples and not specific limitations.
[0036] In this embodiment, the broadcast message includes first identification information and first target verification information for the vehicle. The first identification information identifies the vehicle, and the first target verification information represents a verification message generated by the roadside component for the vehicle. For example, the vehicle may include multiple vehicles, each of which is represented by a V... i This is to indicate that the aforementioned first identification information includes the identification code (ID) of each vehicle; the aforementioned first target verification information includes the V issued by the RSU to each vehicle. i The generated verification message Ai.
[0037] In this embodiment, broadcast messages generated by the roadside components for vehicles are obtained. Optionally, this embodiment utilizes the fact that each vehicle and the roadside components are in the same network to receive broadcast messages sent by the roadside components to each vehicle, thereby obtaining the broadcast messages generated by the roadside components for vehicles.
[0038] Step S114: Extract the first identification information and the first target verification information from the broadcast message, and generate the second target verification information based on the first identification information, wherein the second target verification information is used to represent the verification message generated by the vehicle for the roadside component.
[0039] In the technical solution provided in step S114 of this disclosure, the second target verification information is used to represent the verification message generated by the vehicle for the roadside component. For example, the second target verification information includes the verification message generated by the RSU for each vehicle V i The generated verification message Ai'.
[0040] In this embodiment, after acquiring the broadcast message generated by the roadside component for the vehicle, first identification information and first target verification information are extracted from the broadcast message, and second target verification information is generated based on the first identification information. Optionally, based on the acquired broadcast message, this embodiment extracts the first identification information from the broadcast message according to different information types, and then generates the second target verification information based on the first identification information.
[0041] Optionally, second target verification information is generated based on the extracted first identification information, the first private key of the roadside component, and the second public key of the vehicle. For example, first initial verification information is generated based on the first identification information, the first private key, and the second public key; second target verification information is generated based on the generated first initial verification information and the second networking key of the vehicle, thereby achieving the purpose of obtaining the verification message generated by the vehicle for the roadside component.
[0042] Optionally, the first identification information, the first private key, and the second public key are hashed to obtain the first initial verification information; the generated first initial verification information and the vehicle's second networking key are hashed to obtain the second target verification information.
[0043] Step S116: Based on the first target verification information and the second target verification information, verify the first networking key of the roadside component and the second networking key of the vehicle to obtain the first verification result.
[0044] In the technical solution provided in step S116 of this disclosure, the first networking key is used to represent the key generated by the roadside component for networking, the second networking key is used to represent the key generated by the vehicle for networking, and the first verification result is used to represent the relationship between the first networking key and the second networking key.
[0045] In this embodiment, the first verification result is used to indicate the relationship between the first network key and the second network key. For example, the first verification result may be that the first network key and the second network key are the same, or it may be that the first network key and the second network key are different. This is just an example and is not a specific limitation.
[0046] In this embodiment, after extracting the first identification information and the first target verification information from the broadcast message, and generating the second target verification information based on the first identification information, the first network key of the roadside component and the second network key of the vehicle are verified based on the first and second target verification information to obtain a first verification result. Optionally, this embodiment, based on extracting the first target verification information and generating the second target verification information, determines the association between the first and second target verification information; according to the determined association, the first network key of the roadside component and the second network key of the vehicle are verified to obtain the first verification result, thereby achieving the purpose of determining the relationship between the first and second network keys.
[0047] Optionally, based on the determined association, the first network key of the roadside component and the second network key of the vehicle are verified to obtain a first verification result. For example, if the determined association indicates that the first target verification information and the second target verification information are the same, then based on the identity of the roadside component, the first network key of the roadside component and the second network key of the vehicle are verified to obtain a first verification result.
[0048] The method described above for verifying the first network key of the roadside component and the second network key of the vehicle to obtain the first verification result is illustrative and not specifically limited here. Any process or method that can verify the first network key of the roadside component and the second network key of the vehicle based on the first and second target verification information after extracting the first target verification information and generating the second target verification information, to obtain the first verification result, is within the protection scope of this disclosure embodiment, and will not be exemplified here.
[0049] In steps S112 to S116 of this disclosure, when verifying the network key of a vehicle, a broadcast message generated by the roadside component for the vehicle is obtained. First identification information and first target verification information are extracted from the obtained broadcast message. Second target verification information is generated based on the extracted first identification information. Based on the extracted first target verification information and the generated second target verification information, the first network key of the roadside component and the second network key of the vehicle are verified to obtain a first verification result. Since this embodiment of the disclosure, based on the first identification information and first target verification information extracted from the obtained broadcast message, verifies the first network key of the roadside component and the second network key of the vehicle according to the extracted first target verification information and the second target verification information generated based on the extracted first identification information, and obtains a first verification result, that is, it determines the relationship between the first network key and the second network key. This achieves the goal of meeting the requirements for real-time communication of vehicular ad hoc networks, thereby solving the technical problem of low efficiency in verifying network keys, and thus achieving the technical effect of improving the efficiency of verifying network keys.
[0050] As an optional embodiment, the method further includes: obtaining a first public key of the roadside component and a second public key of the vehicle, wherein the first public key and the first private key of the roadside component are a key pair for the roadside component, and the second public key and the second private key of the vehicle are a key pair for the vehicle; step S114, generating second target verification information based on the first identification information, including: combining the first identification information, the first public key and the second private key to obtain first initial verification information, wherein the first initial verification information corresponds to the second initial verification information, and the second initial verification information is obtained by combining the first identification information, the second public key and the first private key; combining the first initial verification information with the second networking key to obtain the second target verification information.
[0051] In this embodiment, the first public key and the first private key of the roadside component constitute a key pair for the roadside component. For example, the first public key is represented by a PK. RSU Let SK represent the first private key mentioned above. RSU To express.
[0052] In this embodiment, the second public key and the vehicle's second private key form a key pair for the vehicle. For example, the second public key uses a PK... i To represent, the second private key mentioned above is represented by SK. i To express.
[0053] In this embodiment, the first public key of the roadside component and the second public key of the vehicle are obtained. Optionally, in this embodiment, each vehicle accesses the roadside component using the same network as the roadside component to obtain the first public key of the roadside component; and each vehicle directly retrieves its own public key to obtain the second public key of the vehicle, thereby achieving the purpose of obtaining the first and second public keys.
[0054] In this embodiment, the first initial verification information corresponds to the second initial verification information. The second initial verification information is obtained by combining the first identifier information, the second public key, and the first private key. For example, the first initial verification information is represented by Π′. i To represent, the aforementioned second initial verification information is represented by Π i To express.
[0055] In this embodiment, after obtaining the broadcast message generated by the roadside component for the vehicle, the first identification information, the first public key, and the second private key extracted from the broadcast message are combined to obtain the first initial verification information; the first initial verification information is then combined with the second network key to obtain the second target verification information. Next, the obtained first initial verification information is combined with the second network key to obtain the second target verification information, thereby achieving the goal of obtaining the verification message generated by the vehicle for the roadside component, and thus achieving the technical effect of improving the security of the verification message.
[0056] Optionally, the first identification information, the first private key, and the second public key are input into a hash processing model for hash processing to obtain first initial verification information; the generated first initial verification information and the vehicle's second network key are input into the hash processing model for hash processing to obtain second target verification information. The hash processing model is an information processing model built based on a hash function, which may be denoted as, but is not limited to, h0.
[0057] The method described below for verifying the first network key of the roadside component and the second network key of the vehicle based on the first target verification information and the second target verification information to obtain the first verification result will be further explained.
[0058] As an optional embodiment, step S116, based on the first target verification information and the second target verification information, verifies the first network key of the roadside component and the second network key of the vehicle to obtain a first verification result, including: in response to the first target verification information and the second target verification information being the same, verifying the identity of the roadside component to obtain a second verification result; in response to the second verification result indicating that the identity of the roadside component is the same as the target identity, verifying the first network key and the second network key, and determining that the first verification result is that the first network key and the second network key are the same.
[0059] In this embodiment, the second verification result is used to represent the relationship between the identity of the roadside component and the target identity. For example, the second verification result may indicate that the identity of the roadside component is the same as the target identity, or it may indicate that the identity of the roadside component is different from the target identity. The target identity includes valid identity and compliant identity, etc., which are given as examples here and are not specifically limited.
[0060] In this embodiment, after extracting the first identification information and the first target verification information from the broadcast message, and generating the second target verification information based on the first identification information, the identity of the roadside component is verified in response to the first target verification information and the second target verification information being the same, resulting in a second verification result. Optionally, this embodiment, based on the extracted first target verification information and the generated second target verification information, determines the association between the first target verification information and the second target verification information. If the determined association indicates that the first target verification information and the second target verification information are the same, the identity of the roadside component is verified, and the second verification result is that the identity of the roadside component is the same as the target identity. Optionally, if the determined association indicates that the first target verification information and the second target verification information are different, the identity of the roadside component is verified, and the second verification result is that the identity of the roadside component is different from the target identity. Through the above method, the purpose of determining the relationship between the identity of the roadside component and the target identity is achieved.
[0061] In this embodiment, after verifying the identity of the roadside component and obtaining a second verification result in response to the first target verification information and the second target verification information being the same, and in response to the second verification result indicating that the identity of the roadside component is the same as the target identity, the first network key and the second network key are verified, resulting in a first verification result that the first network key and the second network key are the same. Optionally, based on obtaining the second verification result, if the second verification result indicates that the identity of the roadside component is the same as the target identity, then the first network key and the second network key are verified, and the first verification result is determined to be that the first network key and the second network key are the same. This achieves the purpose of determining the relationship between the first network key and the second network key, thereby achieving the technical effect of improving key security.
[0062] The method for extracting the first identification information and the first target verification information from the broadcast message described in this embodiment will be further explained below.
[0063] As an optional embodiment, the broadcast message includes: a first timestamp, which is used to indicate the time when the broadcast message is generated. Step S114, extracting first identification information and first target verification information from the broadcast message, includes: extracting the first timestamp from the broadcast message and obtaining a second timestamp of the broadcast message, where the second timestamp is used to indicate the time when the broadcast message is received; determining a first time difference between the first timestamp and the second timestamp; and, in response to the first time difference being within a preset time difference range, extracting the first identification information and the first target verification information from the broadcast message.
[0064] In this embodiment, the broadcast message includes a first timestamp. The first timestamp represents the time when the broadcast message was generated, and is represented by T. i To express.
[0065] In this embodiment, the second timestamp is used to represent the time when the broadcast message is received, and the second timestamp is represented by T. n To express.
[0066] In this embodiment, after acquiring the broadcast message generated by the roadside component for the vehicle, a first timestamp and a second timestamp of the broadcast message are extracted from the broadcast message. Optionally, based on the acquired broadcast message, this embodiment extracts the first timestamp from the broadcast message according to different information types, and records the time of receiving the broadcast message as the second timestamp.
[0067] In this embodiment, after extracting the first timestamp and obtaining the second timestamp from the broadcast message, a first time difference between the first and second timestamps is determined. In response to the first time difference being within a preset time difference range, first identification information and first target verification information are extracted from the broadcast message. Optionally, this embodiment, based on extracting the first timestamp and obtaining the second timestamp, performs a difference operation on the first and second timestamps to obtain the first time difference between them. The relationship between the obtained first time difference and the preset time difference range is then judged. If it is determined that the first time difference is within the preset time difference range, then according to the different types of information, the first identification information and the first target verification information are extracted from the broadcast message, thereby achieving the purpose of obtaining the first identification information and the first target verification information.
[0068] In this embodiment, when verifying the network key of a vehicle, a broadcast message generated by the roadside component for the vehicle is obtained. First identification information and first target verification information are extracted from the obtained broadcast message. Second target verification information is generated based on the extracted first identification information. Based on the extracted first target verification information and the generated second target verification information, the first network key of the roadside component and the second network key of the vehicle are verified to obtain a first verification result. Since this embodiment, based on the first identification information and first target verification information extracted from the obtained broadcast message, verifies the first network key of the roadside component and the second network key of the vehicle according to the extracted first target verification information and the second target verification information generated based on the extracted first identification information, and obtains a first verification result, that is, it determines the relationship between the first network key and the second network key, thereby achieving the goal of meeting the requirements of real-time communication in vehicular ad hoc networks, thus solving the technical problem of low efficiency in verifying network keys, and thereby achieving the technical effect of improving the efficiency of verifying network keys.
[0069] Figure 2 is a flowchart of another vehicle data communication method according to an embodiment of the present disclosure. As shown in Figure 2, the vehicle data communication method is applied to a roadside component, which is in the same network as the vehicle, and includes the following steps.
[0070] Step S202: Generate a broadcast message for the vehicle.
[0071] In the technical solution provided by step S202 of this disclosure, the broadcast message includes: first identification information of the vehicle and first target verification information. The first identification information is used to identify the vehicle, and the first target verification information is used to represent the verification message generated by the roadside component for the vehicle. The first identification information and the first target verification information are extracted from the broadcast message.
[0072] The broadcast message includes: first identification information of the vehicle and first target verification information. The first identification information is used to identify the vehicle, and the first target verification information represents a verification message generated by the roadside component for the vehicle.
[0073] In this embodiment, the first identification information and the first target verification information are extracted by the vehicle from the broadcast message.
[0074] In this embodiment, a broadcast message for the vehicle is generated. Optionally, this embodiment generates first target distribution information based on the distribution message received from the distribution component; and generates broadcast messages for each vehicle based on the first target distribution information and the second target distribution information.
[0075] Step S204: Send a broadcast message to the vehicle, wherein the broadcast message is used to enable the vehicle's first target verification information and second target verification information to verify the first network key of the roadside component and the second network key of the vehicle, and obtain the first verification result.
[0076] In the technical solution provided by step S204 of this disclosure, the second target verification information is used to represent the verification message generated by the vehicle for the roadside component. The second target verification information is generated based on the first identification information. The first networking key is used to represent the key generated by the roadside component for networking. The second networking key is used to represent the key generated by the vehicle for networking. The first verification result is used to represent the relationship between the first networking key and the second networking key.
[0077] The aforementioned second target verification information is used to represent the verification message generated by the vehicle for the roadside component, and the aforementioned second target verification information is generated based on the first identification information.
[0078] In this embodiment, the first networking key is used to represent the key generated by the roadside component for networking, and the second networking key is used to represent the key generated by the vehicle for networking.
[0079] In this embodiment, the first verification result is used to indicate the relationship between the first network key and the second network key. For example, the first verification result may be that the first network key and the second network key are the same, or it may be that the first network key and the second network key are different. This is just an example and is not a specific limitation.
[0080] In this embodiment, after generating a broadcast message for a vehicle, the broadcast message is sent to the vehicle so that the vehicle verifies the first network key of the roadside component and the second network key of the vehicle based on the first target verification information and the second target verification information, thereby obtaining a first verification result. Optionally, in this embodiment, based on the broadcast message generated by the roadside component, broadcast messages corresponding to each vehicle are sent to each vehicle using the same network in which each vehicle and the roadside component are located, so that each vehicle verifies the first network key of the roadside component and the second network key of the vehicle based on the first target verification information and the second target verification information, thereby obtaining a first verification result.
[0081] In steps S202 to S204 of this disclosure, when verifying the network key of a vehicle, based on the broadcast message generated by the roadside component, broadcast messages corresponding to each vehicle are sent to each vehicle using the same network in which each vehicle and the roadside component are located. This enables each vehicle to verify the first network key of the roadside component and the second network key of the vehicle based on the first target verification information and the second target verification information, thereby obtaining the first verification result. This achieves the goal of meeting the requirements of real-time communication of the vehicle-mounted ad hoc network, thus solving the technical problem of low efficiency in verifying the network key, and thereby achieving the technical effect of improving the efficiency of verifying the network key.
[0082] The method for sending broadcast messages to vehicles described in this embodiment will be further explained below.
[0083] As an optional embodiment, the method further includes: receiving a distribution message generated by a distribution component for a roadside component, and a third timestamp of the distribution message, wherein the distribution message includes a fourth timestamp, the fourth timestamp indicating the time when the distribution message was generated, and the third timestamp indicating the time when the distribution message was received; extracting the third timestamp from the distribution message; determining a second time difference between the third timestamp and the fourth timestamp; in response to the second time difference being within a preset time difference range, extracting distribution content from the distribution message, wherein the distribution content includes second identification information of the roadside component, the second identification information indicating the roadside component; and generating first target distribution information based on the distribution content, wherein the first target distribution information indicates that the roadside component was generated by the distribution component. The roadside component generates distribution information for networking; broadcasts a message to vehicles, including: in response to the first target distribution information being the same as the second target distribution information, generating third target verification information for the roadside component based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information, wherein the second target distribution information is used to represent the distribution information generated by the distribution component for networking, the first private key and the first public key of the roadside component are key pairs of the roadside component, and the third target verification information includes the first networking key; in response to the third target verification information being the same as the fourth target verification information of the distribution component, broadcasting a message to vehicles, wherein the fourth target verification information includes the third networking key, the third networking key being used to represent the key generated by the distribution component for networking.
[0084] In this embodiment, the third timestamp is used to represent the time when the distribution message is received. For example, the third timestamp is represented by T. l To express.
[0085] In this embodiment, the fourth timestamp is used to represent the time when the distribution message is generated. For example, the fourth timestamp is represented by T. r To express.
[0086] In this embodiment, the distributed content includes: second identification information of the roadside component. The second identification information is used to identify the roadside component. For example, the second identification information uses an ID. RSU To express.
[0087] In this embodiment, the aforementioned first target distribution information is used to represent distribution information generated by the roadside component for networking. For example, the aforementioned first target distribution information is represented by Δ. r 'to indicate.
[0088] In this embodiment, a distribution message generated by the distribution component for the roadside component and a third timestamp of the distribution message are received; the third timestamp is extracted from the distribution message; a second time difference between the third timestamp and a fourth timestamp is determined; in response to the second time difference being within a preset time difference range, distribution content is extracted from the distribution message; and first target distribution information is generated based on the distribution content. Optionally, this embodiment utilizes a network to receive a distribution message generated by the distribution component for the roadside component. Furthermore, the time of receiving the distribution message is recorded as a third timestamp; the difference between the third timestamp and the fourth timestamp is calculated to obtain a second time difference between them; the relationship between the obtained second time difference and a preset time difference range is determined; if the second time difference is within the preset time difference range, the distribution content is extracted from the distribution message, and the distribution content is hashed to obtain the first target distribution information, thereby achieving the purpose of obtaining distribution information generated by the roadside component for the network.
[0089] In this embodiment, the second target distribution information is used to represent the distribution information generated by the distribution component for the network. For example, the second target distribution information is represented by Δ. r To express.
[0090] In this embodiment, the aforementioned third public key is represented by a PK. KDC To express.
[0091] In this embodiment, the first private key and the first public key of the roadside component are a key pair for the roadside component.
[0092] In this embodiment, the third target verification information includes the first network key. For example, the third target verification information is represented by A'.
[0093] In this embodiment, the fourth target verification information includes the third network key. For example, the fourth target verification information is represented by A.
[0094] In this embodiment, the third networking key is used to represent the key generated by the distribution component for networking. For example, the third networking key is represented by GSK.
[0095] In this embodiment, after generating first target distribution information based on the distribution content, in response to the first target distribution information being the same as the second target distribution information, third target verification information of the roadside component is generated based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information; in response to the third target verification information being the same as the fourth target verification information of the distribution component, a broadcast message is sent to the vehicle. Optionally, this embodiment determines the association relationship between the first target distribution information and the second target distribution information based on the generated first target distribution information; if it is determined that the above association relationship indicates that the first target distribution information is the same as the second target distribution information, then the third target verification information of the roadside component is generated based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information; and in response to the third target verification information being the same as the fourth target verification information of the distribution component, a broadcast message is sent to the vehicle.
[0096] The method for generating third target verification information of the roadside component based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information of the above embodiment will be further described below.
[0097] As an optional embodiment, the third target verification information of the roadside component is generated based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information. This includes: combining the first private key, the third public key, and the second identification information to obtain the third initial verification information of the roadside component; and combining the third initial verification information with the first networking key to obtain the third target verification information.
[0098] In this embodiment, the aforementioned third initial verification information is represented by H′. RSU To express.
[0099] In this embodiment, after generating first target distribution information based on the distribution content, the first private key, the third public key, and the second identification information are combined to obtain third initial verification information for the roadside component; the third initial verification information is then combined with the first network key to obtain third target verification information. Optionally, in this embodiment, based on the generation of the first target distribution information, the first private key, the third public key, and the second identification information are combined to obtain third initial verification information for the roadside component; then, the aforementioned third initial verification information is combined with the first network key to obtain third target verification information.
[0100] Optionally, the first private key, the third public key, and the second identification information are input into the hash processing model for hash processing to obtain the third initial verification information; the aforementioned third initial verification information and the first network key are input into the hash processing model for hash processing to obtain the third target verification information.
[0101] The method for determining the first network key described in this embodiment will be further explained below.
[0102] As an optional embodiment, the third public key and the third private key of the distribution component are a key pair of the distribution component. The method further includes: determining a first network key based on the fifth target verification information of the distribution component, the random number of the roadside component, and the third initial verification information, wherein the fifth target verification information is obtained by combining the third network key, the random number, and the fifth initial verification information of the distribution component, the fifth initial verification information is obtained by combining the third private key, the first public key, and the second identification information, and the third network key is used to represent the key generated by the distribution component for the network.
[0103] In this embodiment, the fifth target verification information is obtained by combining the third network key, the random number, and the fifth initial verification information of the distribution component. Specifically, the fifth initial verification information is obtained by combining the third private key, the first public key, and the second identification information. For example, the fifth initial verification information is represented by H. RSU To represent, the verification information for the fifth objective mentioned above is represented by D. RSU To express.
[0104] In this embodiment, the first network key is determined based on the fifth target verification information of the distribution component, the random number of the roadside component, and the third initial verification information. Optionally, this embodiment, based on the extracted random number of the roadside component, performs a difference operation on the fifth target verification information, the random number of the roadside component, and the third initial verification information to obtain the first network key, thereby achieving the purpose of generating a key generated by the roadside component for the network.
[0105] The technical solutions of the present disclosure embodiments are illustrated below with reference to preferred embodiments.
[0106] Currently, complex encryption algorithms are used in the communication of vehicular ad hoc networks, such as asymmetric encryption algorithms based on large number factorization or discrete logarithm problems.
[0107] However, while these algorithms offer high security, they also involve high computational complexity. Due to the limited computing resources of vehicles, running these complex algorithms consumes significant amounts of computation time and resources, making it difficult to meet the real-time communication requirements of vehicular ad hoc networks. This results in the technical problem of inefficient verification of network keys.
[0108] However, this disclosure proposes a key verification method. Based on the extraction of first identification information and first target verification information from the acquired broadcast message, the method verifies the first networking key of the roadside component and the second networking key of the vehicle according to the extracted first target verification information and the second target verification information generated based on the extracted first identification information, thereby obtaining a first verification result. That is, the relationship between the first networking key and the second networking key is determined, thereby achieving the goal of meeting the requirements of real-time communication of the vehicle ad hoc network, solving the technical problem of low efficiency in verifying networking keys, and thus achieving the technical effect of improving the efficiency of verifying networking keys.
[0109] It should be noted that Table 1 is a data table and a key table. The key verification method in this disclosure uses the data and key shown in Table 1 below.
[0110] Table 1 Data Table and Key Table
[0111] The aforementioned KDC is used to generate different random numbers R for each vehicle. i And record the data pairs consisting of the corresponding identity identifier and random number. The aforementioned KDC is used to generate random numbers R for RSU. RSU The aforementioned KDC is used to select a corresponding private key for each vehicle. And select the corresponding private key for RSU. The aforementioned vehicles utilize the generated private key SK i Calculate the public key PK corresponding to the vehicle. i The aforementioned RSU utilizes the generated private key SK RSUi Calculate the corresponding public key PK RSU .
[0112] For example, the group key distribution method described above is shown in Figure 3. For instance, Figure 3 is a schematic diagram of a group key distribution method based on a vehicle-mounted ad hoc network according to an embodiment of this disclosure.
[0113] The key distribution center 301 is used to send distribution messages to the roadside component 302.
[0114] Roadside component 302 is used to send broadcast messages to corresponding vehicles 3031, 3032 to 303n, wherein each vehicle receives its own broadcast message {ID}. i Ai,V i ,Δ i ,T i}
[0115] The initialization of the aforementioned key distribution center is achieved by performing the following steps.
[0116] Select elliptic curve E:y 2 =x 3 +ax+b mod q, where x and y are the x and y coordinates of the elliptic curve, respectively, a,b∈Fq, and q is the security coefficient; generate the private key SK of the key distribution center. KDC PK with public key KDC Select hash function h0; and publish relevant parameters {P,q,PK}. KDC ,h0}.
[0117] After the key distribution center is initialized, a random number is generated by the key distribution center, a fixed length is truncated as the group key GSK, and the following formulas (1) to (3) are used to calculate: H RSU =h0(SK KDC *PK RSU ID RSU (1) D RSU =GSK+R RSU +H RSU (3)
[0118] Among them, H RSU Ω is used to represent the fourth initial verification information generated by KDC. RSU D is used to represent intermediate information generated by KDC. RSU Used to represent the fifth target verification information generated by KDC.
[0119] The key distribution center calculates the fourth target verification information A = h0(GSK, H). RSU Generate the fourth timestamp T. r And calculate the second target distribution information Δ r =h0(ID) RSU ,A,Ω RSU D RSU ,Tr); then, the key distribution center distributes the message {ID} RSU ,A,Ω RSU D RSU Δ r ,Tr} is sent to the roadside component.
[0120] Upon receiving the distribution message {ID} by the roadside component RSU ,A,Ω RSU D RSU Δ r After ,Tr}, generate the third timestamp T. l Using the third timestamp T l Subtract the fourth timestamp Tr The difference between the timestamps is obtained. The timeliness of the message is verified by checking if the difference is within a preset time difference range. For example, if the difference is within the preset time difference range, the timeliness of the message is successfully verified, and the message is then distributed according to its distribution content (ID). RSU ,A,Ω RSU D RSU Δ r ,Tr), calculate Δ r '=h0(ID RSU ,A,Ω RSU D RSU Is Tr related to Δ? r Equal to each other, thus verifying the integrity of the message; for example, if Δ r '=Δ r If the integrity of the message is verified, then the integrity verification is successful.
[0121] If both the timeliness and integrity of the message are successfully verified, then the third initial verification information is calculated using the following formula (4); and the random number R is extracted. RSU Using the following formula (5), the first network key is calculated, and A' = h0(GSK', H') is calculated. RSU Verify the relationship between A' and A. If A' is the same as A, it indicates that the key distribution center's identity is valid, thus confirming that the first network key is the correct network key, and that the first network key is the same as the third network key. Then, calculate... H′ RSU =h0(SK RSU *PK KDC ID RSU (4) GSK'=D RSU -R RSU -H' RSU (5)
[0122] For each vehicle, the roadside component performs a cyclic calculation according to the following formulas (6) to (7) to generate the first target verification message Ai = h. o (GSK',Π i ), and generate the first timestamp T i Calculate the message integrity parameter Δ i =h0{ID i ,Ai,,V i ,Ti}. Package the message integrity parameters into a broadcast message corresponding to each vehicle, and send each broadcast message to the corresponding vehicle. Π i =h o (SKRSU *PK i ,IDi) (6) V i =GSK'+Π i +Ri (7)
[0123] After each vehicle receives the corresponding broadcast message, each vehicle verifies the corresponding first timestamp T. i With the corresponding first timestamp T n The timeliness of the broadcast message is verified by checking whether the difference between the two values is within a preset time difference range. Additionally, each vehicle calculates its corresponding first initial verification message Π′. i =h o {SK i *PK RSU ID i}, extract random number R i Then, using the following formula (8), the second network key is calculated. GSK' = D RSU -R RSU -H RSU (8)
[0124] Then, each vehicle calculates its own second target verification information Ai' = h0(GSK), Π' i The process verifies the relationship between the second target verification information Ai' and the first target verification information Ai. If Ai' is the same as Ai, it indicates that the RSU's identity is valid. This determines whether the first network key and the second network key are the same, that is, it determines that the network key obtained by the vehicle is the correct network key.
[0125] In this embodiment, when verifying the network key of a vehicle, a broadcast message generated by the roadside component for the vehicle is obtained. First identification information and first target verification information are extracted from the obtained broadcast message. Second target verification information is generated based on the extracted first identification information. Based on the extracted first target verification information and the generated second target verification information, the first network key of the roadside component and the second network key of the vehicle are verified to obtain a first verification result. Since this embodiment extracts the first identification information and first target verification information from the obtained broadcast message, and then verifies the first network key of the roadside component and the second network key of the vehicle based on the extracted first target verification information and the second target verification information generated based on the extracted first identification information to obtain a first verification result, that is, it determines the relationship between the first network key and the second network key. This achieves the goal of meeting the requirements for real-time communication in vehicular ad hoc networks, thereby solving the technical problem of low efficiency in verifying network keys and thus achieving the technical effect of improving the efficiency of verifying network keys.
[0126] According to another aspect of the present disclosure, corresponding to the embodiments of the key verification method described above, the present disclosure also provides a key verification device. FIG4 is a structural block diagram of a key verification device according to an embodiment of the present disclosure. As shown in FIG4, the key verification device 400 includes: a first acquisition component 402, a processing component 404, and a verification component 406.
[0127] The first acquisition component 402 is configured to acquire a broadcast message generated by the roadside component for the vehicle. The broadcast message includes first identification information and first target verification information of the vehicle. The first identification information is used to identify the vehicle, and the first target verification information is used to represent the verification message generated by the roadside component for the vehicle.
[0128] Processing component 404 is configured to extract first identification information and first target verification information from broadcast messages, and generate second target verification information based on the first identification information, wherein the second target verification information is used to represent the verification message generated by the vehicle for the roadside component.
[0129] Verification component 406 is configured to verify the first networking key of the roadside component and the second networking key of the vehicle based on the first target verification information and the second target verification information, and obtain a first verification result. The first networking key is used to represent the key generated by the roadside component for networking, the second networking key is used to represent the key generated by the vehicle for networking, and the first verification result is used to represent the relationship between the first networking key and the second networking key.
[0130] Optionally, the key verification device 400 includes: a second acquisition component configured to acquire a first public key of the roadside component and a second public key of the vehicle, wherein the first public key and the first private key of the roadside component are a key pair of the roadside component, and the second public key and the second private key of the vehicle are a key pair of the vehicle.
[0131] Optionally, the processing component 404 includes: a first combining component configured to combine the first identification information, the first public key, and the second private key to obtain first initial verification information, wherein the first initial verification information corresponds to second initial verification information, and the second initial verification information is obtained by combining the first identification information, the second public key, and the first private key; and a second combining component configured to combine the first initial verification information with a second networking key to obtain second target verification information.
[0132] Optionally, the verification component 406 includes: a first verification component configured to verify the identity of the roadside component and obtain a second verification result in response to the first target verification information and the second target verification information being the same, wherein the second verification result is used to represent the relationship between the identity of the roadside component and the target identity; and a second verification component configured to verify the first network key and the second network key in response to the second verification result indicating that the identity of the roadside component is the same as the target identity, and determine that the first verification result is that the first network key and the second network key are the same.
[0133] Optionally, the broadcast message includes: a first timestamp, which indicates the time when the broadcast message was generated; wherein the processing component 404 includes: an extraction and acquisition component, configured to extract the first timestamp from the broadcast message and acquire a second timestamp of the broadcast message, wherein the second timestamp indicates the time when the broadcast message was received; a determination component, configured to determine a first time difference between the first timestamp and the second timestamp; and an extraction component, configured to extract first identification information and first target verification information from the broadcast message in response to the first time difference being within a preset time difference range.
[0134] In this embodiment, the key verification device includes a first acquisition component, configured to acquire a broadcast message generated by the roadside component for the vehicle, wherein the broadcast message includes first identification information of the vehicle and first target verification information, the first identification information being used to identify the vehicle, and the first target verification information being used to represent the verification message generated by the roadside component for the vehicle; a processing component, configured to extract the first identification information and the first target verification information from the broadcast message, and generate second target verification information based on the first identification information, wherein the second target verification information is used to represent the verification message generated by the vehicle for the roadside component; and a verification component, configured to verify the first networking key of the roadside component and the second networking key of the vehicle based on the first target verification information and the second target verification information, to obtain a first verification result, wherein the first networking key is used to represent the key generated by the roadside component for networking, the second networking key is used to represent the key generated by the vehicle for networking, and the first verification result is used to represent the relationship between the first networking key and the second networking key, thereby achieving the goal of meeting the requirements of real-time communication of vehicular ad hoc networks, thus solving the technical problem of low efficiency in verifying networking keys, and thereby achieving the technical effect of improving the efficiency of verifying networking keys.
[0135] According to another aspect of the embodiments of this disclosure, corresponding to the embodiments of the key verification method described above, the embodiments of this disclosure also provide another key verification device. FIG5 is a structural block diagram of another key verification device according to the embodiments of this disclosure. As shown in FIG5, the key verification device 500 includes: a generation component 502 and a sending component 504.
[0136] The generation component 502 is configured to generate a broadcast message for a vehicle, wherein the broadcast message includes: first identification information of the vehicle and first target verification information, the first identification information is used to identify the vehicle, and the first target verification information is used to represent the verification message generated by the roadside component for the vehicle, and the first identification information and the first target verification information are extracted from the broadcast message.
[0137] The sending component 504 is configured to send a broadcast message to the vehicle to verify the first networking key of the roadside component and the second networking key of the vehicle based on the first target verification information and the second target verification information, and to obtain a first verification result. The second target verification information is used to represent the verification message generated by the vehicle for the roadside component. The second target verification information is generated based on the first identification information. The first networking key is used to represent the key generated by the roadside component for the network. The second networking key is used to represent the key generated by the vehicle for the network. The first verification result is used to represent the relationship between the first networking key and the second networking key.
[0138] Optionally, the key verification device 500 includes: a receiving component configured to receive a distribution message generated by the distribution component for the roadside component, and a third timestamp of the distribution message, wherein the distribution message includes: a fourth timestamp, the fourth timestamp being used to indicate the time when the distribution message was generated, and the third timestamp being used to indicate the time when the distribution message was received; a first extraction component configured to extract the third timestamp from the distribution message; a first determining component configured to determine a second time difference between the third timestamp and the fourth timestamp; a second extraction component configured to extract distribution content from the distribution message in response to the second time difference being within a preset time difference range, wherein the distribution content includes: second identification information of the roadside component, the second identification information being used to identify the roadside component; and a generating component configured to generate first target distribution information based on the distribution content, wherein the first target distribution information is used to represent the distribution information generated by the roadside component for the network.
[0139] Optionally, the key verification device 500 includes: a sending component 504 including: a generating component configured to generate third target verification information for the roadside component based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information in response to the first target distribution information being the same as the second target distribution information, wherein the second target distribution information is used to represent the distribution information generated by the distribution component for networking, the first private key and the first public key of the roadside component are key pairs of the roadside component, and the third target verification information includes the first networking key.
[0140] Optionally, the sending component 504 includes: a sending component configured to send a broadcast message to the vehicle in response to the third target verification information and the fourth target verification information of the distribution component being the same, wherein the fourth target verification information includes a third networking key, the third networking key being used to represent a key generated by the distribution component for networking.
[0141] Optionally, the generation component includes: a first combination sub-component, configured to combine a first private key, a third public key, and second identification information to obtain third initial verification information of the roadside component; and a second combination sub-component, configured to combine the third initial verification information with a first networking key to obtain third target verification information.
[0142] Optionally, the third public key and the third private key of the distribution component are a key pair of the distribution component. The key verification device 500 includes: a second determining component, configured to determine a first network key based on the fifth target verification information of the distribution component, the random number of the roadside component, and the third initial verification information, wherein the fifth target verification information is obtained by summing the third network key, the random number, and the fifth initial verification information of the distribution component, and the fifth initial verification information is obtained by combining the third private key, the first public key, and the second identification information.
[0143] According to another aspect of embodiments of the present disclosure, a processor is also provided. The processor is configured to run a program, wherein the program is executed by the processor to perform the methods of various embodiments of the present disclosure.
[0144] Embodiments of this disclosure also provide a vehicle, including: a memory storing an executable program; and a processor configured to run the program, wherein the program executes the methods of various embodiments of this disclosure when it runs.
[0145] Embodiments of this disclosure also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium resides to perform the methods of the various embodiments of this disclosure.
[0146] Embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this disclosure.
[0147] Embodiments of this disclosure also provide a computer program product including a non-volatile computer-readable storage medium configured to store a computer program that, when executed by a processor, implements the methods described in various embodiments of this disclosure.
[0148] Embodiments of this disclosure also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this disclosure.
[0149] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0150] In the several embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The apparatus embodiments described above are illustrative; for example, the division of components is a logical functional division, and in actual implementation, there may be other division methods, such as multiple components being combined or integrated into another system, or some features being ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed between components is through some interface, or the indirect coupling or communication connection between components is electrical or other forms.
[0151] The components described as separate parts may or may not be physically separate. The parts shown as components may or may not be physical components; that is, they may be located in one place or distributed across multiple components. Some or all of the components are selected according to actual needs to achieve the purpose of this embodiment.
[0152] Furthermore, in the various embodiments of this disclosure, the functional components are integrated into a single processing component, or each component exists physically separately, or two or more components are integrated into one component. The integrated components are implemented either in hardware or as software functional components.
[0153] If the integrated components are implemented as software functional components and sold or used as independent products, they are stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, is 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 disclosure. The aforementioned storage medium includes various media for storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0154] The above description represents the preferred embodiments of this disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure. Industrial applicability
[0155] This disclosure provides a key verification method. When verifying a vehicle's network key, the method acquires a broadcast message generated by a roadside component for the vehicle. From the acquired broadcast message, it extracts first identification information and first target verification information. Based on the extracted first identification information, it generates second target verification information. Based on the extracted first target verification information and the generated second target verification information, it verifies the roadside component's first network key and the vehicle's second network key to obtain a first verification result. Because this disclosure, based on the first identification information and first target verification information extracted from the acquired broadcast message, verifies the roadside component's first network key and the vehicle's second network key according to the extracted first target verification information and the second target verification information generated based on the extracted first identification information, and obtains a first verification result, that is, it determines the relationship between the first network key and the second network key. This achieves the goal of meeting the requirements for real-time communication in vehicular ad hoc networks, thereby solving the technical problem of low efficiency in verifying network keys and thus improving the technical effect of improving the efficiency of network key verification.
Claims
1. A key verification method applied to a vehicle, wherein the vehicle and roadside components are in the same network, the method comprising: Obtain a broadcast message generated by the roadside component for the vehicle, wherein the broadcast message includes first identification information and first target verification information of the vehicle, the first identification information is used to identify the vehicle, and the first target verification information is used to represent a verification message generated by the roadside component for the vehicle; The first identification information and the first target verification information are extracted from the broadcast message, and the second target verification information is generated based on the first identification information, wherein the second target verification information is used to represent the verification message generated by the vehicle for the roadside component; Based on the first target verification information and the second target verification information, the first networking key of the roadside component and the second networking key of the vehicle are verified to obtain a first verification result. The first networking key is used to represent the key generated by the roadside component for the network, the second networking key is used to represent the key generated by the vehicle for the network, and the first verification result is used to represent the relationship between the first networking key and the second networking key.
2. The method according to claim 1, wherein, The method further includes: Obtain the first public key of the roadside component and the second public key of the vehicle, wherein the first public key and the first private key of the roadside component are a key pair of the roadside component, and the second public key and the second private key of the vehicle are a key pair of the vehicle.
3. The method according to claim 2, wherein, Based on the first identification information, second target verification information is generated, including: The first identification information, the first public key, and the second private key are combined to obtain the first initial verification information, wherein the first initial verification information corresponds to the second initial verification information, and the second initial verification information is obtained by combining the first identification information, the second public key, and the first private key; The first initial verification information is combined with the second network key to obtain the second target verification information.
4. The method according to claim 1, wherein, Based on the first target verification information and the second target verification information, the first networking key of the roadside component and the second networking key of the vehicle are verified to obtain the first verification result, including: In response to the first target verification information and the second target verification information being the same, the identity of the roadside component is verified to obtain a second verification result; In response to the second verification result indicating that the identity of the roadside component is the same as the target identity, the first network key and the second network key are verified, and the first verification result is determined to be that the first network key and the second network key are the same.
5. The method according to claim 1, wherein, Extracting the first identification information and the first target verification information from the broadcast message includes: In response to the first time difference between the first timestamp and the second timestamp being within a preset time difference range, the first identification information and the first target verification information are extracted from the broadcast message, wherein the first timestamp is used to indicate the time when the broadcast message is generated, and the second timestamp is used to indicate the time when the broadcast message is received.
6. The method according to claim 5, wherein, The broadcast message includes: the first timestamp, and the method further includes: Extract the first timestamp from the broadcast message, and obtain the second timestamp of the broadcast message.
7. A key verification method applied to a roadside component, wherein the roadside component and the vehicle are in the same network, the method comprising: Generate a broadcast message for the vehicle, wherein the broadcast message includes: first identification information and first target verification information of the vehicle, the first identification information is used to identify the vehicle, the first target verification information is used to indicate a verification message generated by the roadside component for the vehicle, and the first identification information and the first target verification information are extracted from the broadcast message; The broadcast message is sent to the vehicle, wherein the broadcast message is used to enable the vehicle to verify the first networking key of the roadside component and the second networking key of the vehicle based on the first target verification information and the second target verification information, and to obtain a first verification result. The second target verification information is used to represent the verification message generated by the vehicle for the roadside component. The second target verification information is generated based on the first identification information. The first networking key is used to represent the key generated by the roadside component for the network. The second networking key is used to represent the key generated by the vehicle for the network. The first verification result is used to represent the relationship between the first networking key and the second networking key.
8. The method according to claim 7, wherein, The method further includes: The system receives a distribution message generated by the distribution component for the roadside component, and a third timestamp of the distribution message, wherein the distribution message includes a fourth timestamp, the fourth timestamp being used to indicate the time when the distribution message was generated, and the third timestamp being used to indicate the time when the distribution message was received. Extract the third timestamp from the distribution message; Determine the second time difference between the third timestamp and the fourth timestamp; In response to the second time difference being within a preset time difference range, distribution content is extracted from the distribution message, wherein the distribution content includes: second identification information of the roadside component, the second identification information being used to identify the roadside component; Based on the distribution content, a first target distribution information is generated, wherein the first target distribution information is used to represent the distribution information generated by the roadside component for the network.
9. The method according to claim 8, wherein, The method further includes: In response to the first target distribution information being the same as the second target distribution information, a third target verification information for the roadside component is generated based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information. The second target distribution information is used to represent the distribution information generated by the distribution component for the network. The first private key and the first public key of the roadside component are the key pair of the roadside component. The third target verification information includes the first network key.
10. The method according to claim 9, wherein, Sending the broadcast message to the vehicle includes: In response to the fact that the third target verification information and the fourth target verification information of the distribution component are the same, the broadcast message is sent to the vehicle, wherein the fourth target verification information includes a third networking key, which is used to represent the key generated by the distribution component for the network.
11. The method according to claim 9, wherein, Based on the first private key of the roadside component, the third public key of the distribution component, and the second identification information, the third target verification information of the roadside component is generated, including: The first private key, the third public key, and the second identification information are combined to obtain the third initial verification information of the roadside component; The third initial verification information is combined with the first network key to obtain the third target verification information.
12. The method according to claim 11, wherein, The third public key and the third private key of the distribution component constitute a key pair for the distribution component, and the method further includes: Based on the fifth target verification information of the distribution component, the random number of the roadside component, and the third initial verification information, the first network key is determined, wherein the fifth target verification information is obtained by combining the third network key, the random number, and the fifth initial verification information of the distribution component, and the fifth initial verification information is obtained by combining the third private key, the first public key, and the second identification information, and the third network key is used to represent the key generated by the distribution component for the network.
13. The method according to claim 8, wherein, Based on the distribution content, the first target distribution information is generated, including: The distributed content is hashed to obtain the first target distribution information.
14. A processor configured to run a program, wherein, The program is executed by the processor to perform the key verification method according to any one of claims 1 to 13.
15. A vehicle comprising: Memory, which stores executable programs; A processor configured to run the program, wherein the program, when running, executes the verification method for the key according to any one of claims 1 to 13.
