C-V2X-based vehicle terminal secure communication method, device and medium

By using the pure software initialization certificate container on the vehicle terminal and combining the SM2 algorithm for signature and signing, the problem of the C-V2X system relying on hardware encryption chips, realizing low-cost, flexible security communication, suitable for extensive C-C- V2X application scenario.

CN116193435BActive Publication Date: 2025-01-24HUNAN XIANGJIANG ZHIXIN YUNTU TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211640539.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-01-24
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

The existing C-V2X systems rely on special hardware encryption chips on the device side, resulting in high costs and limited applicable scenarios, making it impossible to achieve simple, low-cost and flexible secure communications.

Method used

The pure software is used to initialize the certificate container on the vehicle terminal. The V2X user data is signed and verified by the SM2 algorithm to achieve security communication without relying on special hardware security chips.

Benefits of technology

A implementation of C-V2X-based vehicle terminal security communication, reducing costs, improving flexibility and applicability, supporting simple and fast software upgrades to support V2X security communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116193435B_ABST
    Figure CN116193435B_ABST
Patent Text Reader

Abstract

The present invention discloses a C‑V2X-based vehicle terminal secure communication method, device and medium, the method steps include: S01. Initialize the device environment and load the certificate into the certificate container; S02. Obtain a valid certificate in idle state from the certificate container, generate a V2X security message after signing the V2X user data based on the SM2 algorithm, and encode the V2X security message; S03. When receiving the V2X security message, decode the received V2X security message, check the certificate attribute of the V2X security message, authenticate the certificate information in the V2X security message, and verify the signature of the V2X security message based on the SM2 algorithm. The present invention can realize C‑V2X-based vehicle terminal secure communication, and has the advantages of simple implementation method, low cost, high communication security and strong flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle-mounted terminal communication technology, and in particular to a vehicle-mounted terminal security communication method, device and medium based on C-V2X (Cellular-Vehicle to Everything) communication. Background Art

[0002] C-V2X wireless communication is a vehicle network based on cellular technology, which realizes information exchange between vehicles and the outside world, mainly including connectivity between V2N (vehicle and network / cloud), V2V (vehicle and vehicle), V2I (vehicle and road infrastructure) and V2P (vehicle and pedestrians). It has the advantages of low latency, wide coverage, strong stability, and it does not rely on cellular network assistance or coverage. The current application environment usually has strict reliability and security requirements for the C-V2X system, that is, the communication security requirements for the C-V2X system are very high.

[0003] In order to achieve secure communication based on C-V2X, the C-V2X system in the prior art is usually implemented on the device side by a hardware encryption chip, that is, by setting a special hardware encryption chip in the devices of both communicating parties to encrypt and decrypt the communication data to achieve data security communication. However, the above-mentioned method of setting a special hardware encryption chip on the device side is not only costly, but also must rely on a special hardware encryption chip, and the applicable scenarios are limited. For devices that are not equipped with a special hardware encryption chip, secure communication cannot be carried out. In fact, in many occasions, a special hardware encryption chip will not be set in the vehicle terminal.

[0004] Chinese patent application CN112804659A discloses a "vehicle network security communication method". This solution is to establish a group session key for secure communication between the V2X communication parties through an identity-based public key cryptography system. During the group session key negotiation process, the cloud generates the system parameters required for negotiation through the 5G network, and provides the required relevant data to each participant, assisting all parties to solve the problem of identity authentication during the group session key negotiation process. The vehicle side, roadside side and pedestrian side achieve short-distance communication through a secure smart chip. However, this type of solution needs to rely on the cloud to assist in group session key negotiation, and the device side still uses hardware encryption chips to achieve data encryption and decryption, which still has the problems of complex implementation, high cost and limited use. Summary of the invention

[0005] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a vehicle-mounted terminal security communication method, device and medium based on C-V2X communication, which has a simple implementation method, low cost, high communication security and strong flexibility.

[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:

[0007] A C-V2X-based vehicle terminal secure communication method, comprising the following steps:

[0008] S01. Initialization configuration: pre-open independent certificate data cache and certificate container cache in RAM to cache certificate data and certificate container respectively, initialize the device environment and load the certificate into the certificate container;

[0009] S02.V2X user data signature: obtain a valid certificate in idle state from the certificate container, sign the V2X user data based on the SM2 algorithm to generate a V2X safety message, and encode the V2X safety message;

[0010] S03. V2X safety message verification: upon receiving a V2X safety message, decode the received V2X safety message, check the certificate attribute of the V2X safety message, authenticate the certificate information in the V2X safety message, and verify the signature of the V2X safety message based on the SM2 algorithm.

[0011] Furthermore, the initialization of the device environment in step S01 includes: configuring the system file path, initializing the log system, the application environment and the SSF library.

[0012] Furthermore, the step S01 of loading the certificate includes:

[0013] Read the certificate management information file to verify the sender's identity;

[0014] Load PC (Pseudonym Certificate) and CA (Certificate Authority) certificate information: register the device with the CA server, obtain the EC (Enrollment Certificate) certificate and PC certificate group number from the CA certificate server, obtain the PC certificate data according to the group number, and load the obtained certificate data into the certificate container;

[0015] After performing a digest operation on the certificate data buf, the certificate information is loaded into the certificate container, where the certificate information includes a hash value, validity period, certificate content, registration certificate AID (Application Identity) and application identifier ID (Identity);

[0016] According to the AI ​​D information, a certificate trust chain search is performed in an index table that is pre-established using the AI ​​D value of the V2X message as a container index value, and the searched certificate trust chain is loaded.

[0017] Furthermore, the steps of step S02 include:

[0018] S201. Initialize the software environment;

[0019] S202. Obtain a valid certificate in an idle state from the certificate container, and proceed to step S203;

[0020] S203. Check whether the timestamp of the certificate obtained in step S202 is within the validity period. If yes, proceed to step S204, otherwise return to step S202;

[0021] S204. Sign the current V2X user data based on the SM2 algorithm and generate a V2X security message;

[0022] S205. Encode the generated V2X safety message to complete the signature of the V2X user data.

[0023] Furthermore, the step S03 includes:

[0024] S301. Initialize the software environment;

[0025] S302. When the V2X safety message is received, decoding the received V2X safety message;

[0026] S303. Check the attributes of the decoded V2X safety message and obtain the signature certificate data of the V2X safety message;

[0027] S304. Authenticate the acquired signature certificate data of the V2X safety message;

[0028] S305. Verify the signature certificate data of the V2X security message based on the SM2 algorithm.

[0029] Further, the step S304 includes: obtaining a certificate hash value in the signature certificate data of the V2X safety message, searching for certificate data locally according to the obtained certificate hash value, and obtaining a certificate information structure from the signature certificate data of the V2X safety message, checking certificate attributes and verifying the certificate according to the obtained certificate information structure to verify the certificate signature data.

[0030] Furthermore, in step S02, the step of signing the V2X user data based on the SM2 algorithm includes:

[0031] S211. Place Where M is the V2X user data to be signed, is the cryptographic hash function, Z A is the hash value of user A’s public key;

[0032] S222. Calculation And convert the data type of e to an integer, where H υ is a cryptographic hash function, and ν is the number of bits of the message digest length;

[0033] S223. Generate a random number k∈[1,n-1] using a random number generator, where k is a random number and n is the order of the base point G;

[0034] S224. Calculate the elliptic curve point (x 1 ,y 1 )=[k]G, and x 1 The data type is converted to an integer, where G is a base point of the elliptic curve;

[0035] S225. Calculate r = (e + x 1 )modn, and if r=0 or r+k=n, then the process returns to step S213, otherwise, the process proceeds to step S226;

[0036] S226. Calculate s=((1+d A ) -1 ·(kr·d A ))modn, if s=0, return to step S213, otherwise go to step S227;

[0037] S227. Convert the data types of the currently obtained r and s into byte strings, and obtain the signature of M as (r, s).

[0038] Furthermore, in step S03, the specific steps of verifying the signature of the V2X safety message (r', S') based on the SM2 algorithm are as follows:

[0039] S321. Verify whether r′∈[1,n-1] holds, where r′ is the digital signature of the V2X safety message to be verified, and n is the order of the base point G. If not, the verification fails;

[0040] S322. Check whether S′∈[1,n-1] holds. If not, the verification fails.

[0041] S323. Place M' is the received V2X security message to be verified. is a cryptographic hash function;

[0042] S324. Calculation Among them, H υ is a cryptographic hash function whose message digest length is ν bits, and converts the data type of e′ to an integer;

[0043] S325. Convert the data types of r' and s' to integers, and calculate t = (r' + s') mod n. If t = 0, the verification fails.

[0044] S326. Calculate the elliptic curve point (x′ 1 ,y′ 1 )=[s′]G+[t]P A , where G is a base point of the elliptic curve, P A is the public key of signing user A;

[0045] S327. x′ 1 The data type is converted to an integer, and R = (e'+x' 1 )modn, check whether R=r′ holds. If so, the verification passes, otherwise the verification fails.

[0046] A C-V2X-based vehicle terminal safety communication device, comprising:

[0047] An initialization configuration module is used to pre-open an independent certificate data cache and a certificate container cache in the RAM to cache the certificate data and the certificate container respectively, initialize the device environment and load the certificate into the certificate container;

[0048] A V2X user data signature module, used to obtain a valid certificate in an idle state from a certificate container, generate a V2X safety message after signing the V2X user data based on the SM2 algorithm, and encode the V2X safety message;

[0049] The V2X safety message verification module is used to decode the received V2X safety message upon receiving it, verify the certificate information in the V2X safety message after checking the certificate attribute of the V2X safety message, and verify the signature of the V2X safety message based on the SM2 algorithm.

[0050] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed.

[0051] Compared with the prior art, the advantages of the present invention are: the present invention adopts a pure software method to load the certificate into the certificate container during the pre-initialization process of the vehicle terminal. For the V2X user data of the vehicle terminal, a valid certificate is obtained from the certificate container and signed in combination with the SM2 algorithm to generate a V2X security message. When the V2X security message is received, the certificate information is authenticated and verified after decoding and attribute checking to support the digital signature and verification of the V2X message. The vehicle terminal security communication based on C-V2X can be efficiently realized without relying on a dedicated hardware security chip. It is not only simpler to implement and lower cost, but also simpler to upgrade and expand. The device can support V2X security communication through a simple and fast software upgrade, which makes it more applicable and flexible. The security communication solution can be flexibly configured according to needs and support protocol expansion. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the implementation process of the C-V2X-based vehicle terminal safety communication method in this embodiment.

[0053] Figure 2 It is a detailed implementation flow chart of the initialization step in this embodiment.

[0054] Figure 3 It is a detailed implementation flow chart of the V2X user data signing step in this embodiment.

[0055] Figure 4 It is a detailed implementation flow chart of the V2X safety message verification step in this embodiment. DETAILED DESCRIPTION

[0056] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0057] like Figure 1 As shown, the steps of the C-V2X-based vehicle terminal security communication method in this embodiment include:

[0058] S01. Initialization configuration: pre-open independent certificate data cache and certificate container cache in RAM to cache certificate data and certificate container respectively, initialize the device environment and load the certificate into the certificate container;

[0059] S02.V2X user data signature: Obtain a valid certificate in idle state from the certificate container, sign the V2X user data based on the SM2 algorithm, generate a V2X safety message, and encode the V2X safety message;

[0060] S03. V2X safety message verification: When a V2X safety message is received, the received V2X safety message is decoded, and after checking the certificate attribute of the V2X safety message, the certificate information in the V2X safety message is authenticated, and the V2X safety message is signed based on the SM2 algorithm.

[0061] Through the above steps, this embodiment can realize C-V2X-based vehicle terminal security communication in a pure software manner. First, independent certificate data cache and certificate container cache are respectively opened in RAM in advance, and the certificate is loaded into the certificate container during the pre-initialization process of the vehicle terminal. For the V2X user data of the vehicle terminal, a valid certificate is obtained from the certificate container and signed in combination with the SM2 algorithm to generate a V2X security message. When the V2X security message is received, the certificate information is authenticated and verified after decoding and attribute checking, so that the digital signature and verification of the V2X message can be supported, thereby efficiently realizing C-V2X-based vehicle terminal security communication without relying on a dedicated hardware security chip. Not only is it simpler to implement and less costly, but it is also simpler to upgrade and expand. The device can support V2X security communication through a simple and fast software upgrade, making it more applicable and flexible. The security communication solution can be flexibly configured according to needs, and protocol expansion can also be supported.

[0062] like Figure 2 As shown, initializing the device environment in step S01 of this embodiment includes: configuring the system file path, initializing the log system, application environment and SSF library, and also initializing the configuration of parameters such as CA server address, connection timeout, certificate update method, device type, device gpio interface, URL, DCM mode, etc., as well as checking the device system time and time zone, etc., and opening up independent certificate data cache and certificate container cache in RAM for caching certificate data cache and certificate container, etc., so as to accelerate the signature verification operation retrieval and data processing process.

[0063] In step S01 of this embodiment, loading a certificate includes:

[0064] Read the certificate management information file, which stores data such as the public key, and verify the sender's identity through the certificate management information file;

[0065] Load PC and CA certificate information: Register the device with the CA server, obtain the EC certificate and PC certificate group number from the CA certificate server, obtain the PC certificate data (specifically in ASN1 encoding format) according to the group number, and load the obtained certificate data into the certificate container;

[0066] After performing a digest operation on the certificate data buf, the certificate information (including hash value, validity period, certificate content, registration certificate AID, and application identifier ID, etc.) is loaded into the certificate container;

[0067] According to the AI ​​D information, a certificate trust chain search is performed in an index table that is pre-established using the AI ​​D value of the V2X message as a container index value, and the searched certificate trust chain is loaded.

[0068] Since the certificate trust chain is a linked list structure of a container, in order to further speed up the search speed of the certificate trust chain, this embodiment further adds an index to the certificate trust chain, and uses the characteristics of the V2X AID value corresponding to different types of purpose messages, and uses the AID value of the V2X message as the container index value to establish an index table. When searching, the index table is searched according to the AID information. Through the above method, the search speed can be significantly improved, especially when the V2X message data volume is large.

[0069] like Figure 3 As shown, the steps of step S02 in this embodiment include:

[0070] S201. Initialize the software environment;

[0071] S202. Obtain a valid certificate in an idle state from the certificate container, and proceed to step S203;

[0072] S203. Check whether the timestamp of the certificate obtained in step S202 is within the validity period. If yes, proceed to step S204, otherwise return to step S202;

[0073] S204. Sign the current V2X user data based on the SM2 algorithm and generate a V2X security message;

[0074] S205. Encode the generated V2X safety message (specifically ASN1 encoding) to complete the signature of the V2X user data.

[0075] Through the above steps, the signing and encoding of V2X user data can be achieved in a pure software manner. Combined with the subsequent signature verification of V2X security messages, the security of data communication can be effectively ensured.

[0076] like Figure 4 As shown, in this embodiment, step S03 specifically includes:

[0077] S301. Initialize the software environment;

[0078] S302. When a V2X safety message is received, decoding the received V2X safety message;

[0079] S303. Check the attributes of the decoded V2X safety message and obtain the signature certificate data of the V2X safety message;

[0080] S304. Authenticate the acquired signature certificate data of the V2X safety message;

[0081] S305. Verify the signature certificate data of the V2X security message based on the SM2 algorithm.

[0082] Through the above steps, the received V2X safety message is verified by caching the signature message, decoding the safety message, checking the safety message attribute and verifying the signature in turn, so as to quickly realize the verification of the V2X safety message and ensure the communication security.

[0083] In the above step S303, the security message attributes specifically include validity period, HashID, data identifier, etc.

[0084] The above step S304 specifically includes: obtaining the certificate hash value in the signature certificate data of the V2X safety message, searching the certificate data locally according to the obtained certificate hash value, and obtaining the certificate information structure from the signature certificate data of the V2X safety message, checking the certificate attributes and verifying the certificate (such as PC or AC certificate verification) according to the obtained certificate information structure, so as to quickly verify the certificate signature data.

[0085] The digital signature algorithm is a process where a signer generates a digital signature on data, and a verifier verifies the authenticity of the signature. Each signer has a public key and a private key, where the private key is used to generate the signature, and the verifier verifies the signature with the signer's public key. Before the signature is generated, a cryptographic hash function is used to generate the signature. (including Z A . and the message to be signed M) are compressed. Before the verification process, a cryptographic hash function is used to compress M′ (including Z A The present embodiment specifically adopts the SM2 algorithm to digitally sign V2X user data and verify V2X security messages. The SM2 algorithm is based on elliptic curve discrete logarithm. The unit bit strength of elliptic curve cryptography is higher than other public key systems, and the calculation parameters are smaller, the key is shorter, the operation speed is faster, and the signature is shorter. The ECC-based SM2 certificate adopts a 256-bit key length, and the encryption strength can reach the same as a 3072-bit RSA certificate. Therefore, by combining the SM2 algorithm to sign and verify V2X user data, it can be well applied to C-V2X-based vehicle terminal communications with limited processing power, storage space, bandwidth and power consumption, so as to simply and efficiently meet the stringent communication security requirements in C-V2X-based vehicle terminal communications.

[0086] In step S02 of this embodiment, the specific steps of signing the V2X user data based on the SM2 algorithm include:

[0087] S211. Place Where M is the V2X user data to be signed, is the cryptographic hash function, Z A The hash value of the public key of the signature user A is used, and the V2X user data is integrated with the SPDUheaderInfo, that is, the information including the generation time, expiration time and location coordinates of the V2X user data is integrated into the headerInfo of the SPDU. Through the above operation, the V2X user data is integrated into the security data structure for the subsequent signature calculation process;

[0088] S222. Calculation And convert the data type of e to an integer, where H υ is a cryptographic hash function, and its message digest length is ν bits;

[0089] S223. Generate a random number k∈[1,n-1] using a random number generator, where k is a random number and n is the order of the base point G;

[0090] S224. Calculate the elliptic curve point (x 1 ,y 1 )=[k]G, and x 1 The data type is converted to an integer, where G is a base point of the elliptic curve;

[0091] S225. Calculate r = (e + x 1 )modn, and if r=0 or r+k=n, then the process returns to step S213, otherwise, the process proceeds to step S226;

[0092] S226. Calculate s=((1+d A ) -1 ·(kr·d A ))modn, if s=0, return to step S213, otherwise go to step S227;

[0093] S227. Convert the data types of the currently obtained r and s into byte strings, and obtain the signature of M as (r, s).

[0094] Through the above steps, the message M to be signed can be digitally signed to obtain a digital signature (r, s).

[0095] In step S03 of this embodiment, the specific steps of verifying the signature of the V2X safety message (r', S') based on the SM2 algorithm are as follows:

[0096] S321. Verify whether r′∈[1,n-1] holds, where r′ is the digital signature of the V2X safety message to be verified. If not, the verification fails.

[0097] S322. Check whether S′∈[1,n-1] holds. If not, the verification fails.

[0098] S323. Place M' is the received V2X security message to be verified. is a cryptographic hash function;

[0099] S324. Calculation And convert the data type of e′ to an integer;

[0100] S325. Convert the data types of r' and s' to integers, and calculate t = (r' + s') mod n. If t = 0, the verification fails.

[0101] S326. Calculate the elliptic curve point (x′ 1 ,y′ 1 )=[s′]G+[t]P A , where P A is the public key of signing user A;

[0102] S327. x′ 1 The data type is converted to an integer, and R = (e'+x' 1 )modn, check whether R=r′ holds. If so, the verification passes, otherwise the verification fails.

[0103] Through the above steps, the received message M′ can be verified and its digital signature (r′, s′) can be obtained to realize the verification of the message M′.

[0104] The C-V2X-based vehicle terminal safety communication device of this embodiment specifically includes:

[0105] An initialization configuration module is used to pre-open an independent certificate data cache and a certificate container cache in the RAM to cache the certificate data and the certificate container respectively, initialize the device environment and load the certificate into the certificate container;

[0106] A V2X user data signature module, used to obtain a valid certificate in an idle state from a certificate container, sign the V2X user data based on the SM2 algorithm to generate a V2X safety message, and decode the V2X safety message;

[0107] The V2X safety message verification module is used to decode the received V2X safety message when receiving the V2X safety message, check the certificate attribute of the V2X safety message, authenticate the certificate information in the V2X safety message, and verify the signature of the V2X safety message based on the SM2 algorithm.

[0108] The C-V2X-based vehicle terminal safety communication device in this embodiment corresponds one to one with the above-mentioned C-V2X-based vehicle terminal safety communication method, and will not be described one by one here.

[0109] This embodiment also provides a computer-readable storage medium storing a computer program, and the computer program implements the above method when executed.

[0110] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. A C-V2X-based vehicle terminal security communication method, characterized in that the steps include: S01. Initialization configuration: pre-open independent certificate data cache and certificate container cache in RAM to cache certificate data and certificate container respectively, initialize the device environment and load the certificate into the certificate container; S02.V2X user data signature: obtain a valid certificate in idle state from the certificate container, sign the V2X user data based on the SM2 algorithm to generate a V2X safety message, and encode the V2X safety message; S03. V2X safety message verification: upon receiving a V2X safety message, decoding the received V2X safety message, checking the certificate attribute of the V2X safety message, authenticating the certificate information in the V2X safety message, and verifying the signature of the V2X safety message based on the SM2 algorithm; The step S01 of loading the certificate includes: Read the certificate management information file to verify the sender's identity; Loading PC and CA certificate information: registering the device with the CA server, obtaining the EC certificate and PC certificate group number from the CA certificate server, obtaining the PC certificate data according to the group number, and loading the obtained certificate data into the certificate container; After performing a digest operation on the certificate data buf, the certificate information is loaded into the certificate container, where the certificate information includes a hash value, validity period, certificate content, AID, and ID; Perform a certificate trust chain search in an index table that is pre-established using the AID value of the V2X message as a container index value according to the AID information, and load the searched certificate trust chain; The steps of step S02 include: S201. Initialize the software environment; S202. Obtain a valid certificate in an idle state from the certificate container, and proceed to step S203; S203. Check whether the timestamp of the certificate obtained in step S202 is within the validity period. If yes, proceed to step S204, otherwise return to step S202; S204. Sign the current V2X user data based on the SM2 algorithm and generate a V2X security message; S205. Encode the generated V2X safety message to complete the signature of the V2X user data.

2. The C-V2X-based vehicle-mounted terminal secure communication method according to claim 1, characterized in that: Initializing the device environment in step S01 includes: configuring the system file path, initializing the log system, application environment and SSF library.

3. The C-V2X-based vehicle-mounted terminal secure communication method according to claim 1, characterized in that: The step S03 comprises: S301. Initialize the software environment; S302. When the V2X safety message is received, decoding the received V2X safety message; S303. Check the attributes of the decoded V2X safety message and obtain the signature certificate data of the V2X safety message; S304. Authenticate the acquired signature certificate data of the V2X safety message; S305. Verify the signature certificate data of the V2X security message based on the SM2 algorithm.

4. The C-V2X-based vehicle-mounted terminal secure communication method according to claim 3, characterized in that: The step S304 includes: obtaining a certificate hash value in the signature certificate data of the V2X safety message, searching for certificate data locally according to the obtained certificate hash value, and obtaining a certificate information structure from the signature certificate data of the V2X safety message, and checking certificate attributes and verifying the certificate according to the obtained certificate information structure to verify the certificate signature data.

5. The C-V2X-based vehicle-mounted terminal secure communication method according to any one of claims 1 to 4, characterized in that: In step S02, the step of signing the V2X user data based on the SM2 algorithm includes: S211. Place ,in, M is the V2X user data to be signed, is the cryptographic hash function, The hash value of the public key of signing user A is used to integrate the V2X user data with SPDUheaderInfo, that is, the information including the generation time, expiration time and location coordinates of the V2X user data is integrated into the headerInfo of SPDU; S222. Calculation , and e The data type is converted to an integer, where is the code hash function, and ν is the number of bits of the message digest length; S223. Generate random numbers using a random number generator ,in k is a random number, n is the order of the base point G; S224. Calculate elliptic curve points , and The data type is converted to an integer, where G is a base point of the elliptic curve; S225. Calculation , and if r =0 or r + k = n Then return to step S213, otherwise go to step S226; S226. Calculation ,like s =0, then return to step S213, otherwise proceed to step S227; S227. The currently obtained r , s The data type is converted to a byte string, and we get M The signature is ( r , s ).

6. The C-V2X-based vehicle-mounted terminal secure communication method according to any one of claims 1 to 5, characterized in that: In step S03, the V2X safety message ( r’,s’) Specific steps for signature verification: S321. Inspection Is it established? r’ The digital signature of the V2X safety message to be verified. n is the order of the base point G. If it does not hold, the verification fails. S322. Inspection Is it true? If not, the verification fails. S323. Place , M ' is the received V2X safety message to be verified, is a cryptographic hash function; S324. Calculation ,in is a cryptographic hash function, and ν is the number of bits of the message digest length, and The data type is converted to an integer; S325. , Convert the data type to an integer and calculate ,like t = 0, the verification fails; S326. Calculate elliptic curve points ,in G is a base point of the elliptic curve, P A is the public key of signing user A; S327. Convert the data type to an integer and calculate ,test Is it true? If so, the verification passes; otherwise, the verification fails.

7. A device for implementing the C-V2X-based vehicle terminal security communication method as described in any one of claims 1 to 6, characterized in that: include: An initialization configuration module is used to pre-open an independent certificate data cache and a certificate container cache in the RAM to cache the certificate data and the certificate container respectively, initialize the device environment and load the certificate into the certificate container; A V2X user data signature module, used to obtain a valid certificate in an idle state from a certificate container, generate a V2X safety message after signing the V2X user data based on the SM2 algorithm, and encode the V2X safety message; The V2X safety message verification module is used to decode the received V2X safety message when receiving the V2X safety message, verify the certificate information in the V2X safety message after checking the certificate attribute of the V2X safety message, and verify the signature of the V2X safety message based on the SM2 algorithm.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Secure communication method of Internet of Vehicles

    CN112804659A

  • Identity authentication method, server and authentication terminal

    CN105515783A

  • Security device based on asymmetric encryption

    CN106921638A

  • V2X system and security authentication method

    CN114339680A