Vehicle-to-vehicle communication encryption method and device, computer equipment and storage medium
By combining elliptic curve key pairs, ring signature algorithms, symmetric and asymmetric encryption algorithms, and zero-knowledge proofs, the challenges of security, real-time performance, and dynamic adaptability in vehicle-to-vehicle communication are addressed, enabling efficient and secure vehicle information transmission and supporting vehicle identity updates in dynamic network environments.
Patent Information
- Application Number
- CN202511752097.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-01-13
AI Technical Summary
Existing vehicle-to-vehicle communication solutions have failed to effectively balance security, real-time performance, and dynamic adaptability in blockchain technology. In particular, under the requirements of high frequency and real-time performance, the rapid addition and removal of vehicle nodes poses challenges to the adaptability of blockchain consensus mechanisms and privacy protection.
This method employs a combination of elliptic curve key pairs, ring signature algorithms, symmetric and asymmetric encryption algorithms, and zero-knowledge proofs. Ring signatures ensure the trustworthiness of the message source, symmetric encryption protects the message content, asymmetric encryption protects the key transmission, and zero-knowledge proofs verify the randomness of the encryption process. The receiving vehicle performs multi-level verification to ensure the integrity and timeliness of the message.
It improves the security, real-time performance, and dynamic adaptability of vehicle-to-vehicle communication, reduces computational latency, meets the requirements of high-frequency real-time communication, and supports flexible updates of vehicle identity in dynamic network environments.
Smart Images

Figure CN121333795A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of communication encryption, and particularly relates to a vehicle-to-vehicle communication encryption method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the rapid development of Internet of Vehicles technology, vehicle-to-vehicle (V2V) communication, as a core component of intelligent transportation systems, realizes real-time information exchange between vehicles, providing key support for improving traffic efficiency and ensuring driving safety. However, in the V2V communication process, vehicles continuously exchange a large amount of sensitive information, including geographic location, driving speed, driving habits, and even personal information of the vehicle owner. Once these information are maliciously stolen, tampered with, or illegally misused, not only the user's privacy will be seriously infringed, but also security threats such as vehicle tracking and hijacking may be caused, greatly reducing the user's trust in the Internet of Vehicles system and hindering the further popularization of intelligent transportation.
[0003] Blockchain technology, with its characteristics of decentralization, tamper resistance, transparency, traceability, and encryption algorithm, provides a new technical path to solve the privacy protection problem of Internet of Vehicles. It can record vehicle interaction information through a distributed ledger, ensure data integrity and identity anonymity through cryptographic means, effectively avoid security risks of centralized architecture, and existing research has proposed various blockchain-based Internet of Vehicles privacy protection schemes. However, these researches do not fully consider the high frequency and real-time requirements of V2V communication, and the throughput and delay problems of blockchain may constrain communication efficiency. Meanwhile, under dynamic network topology, the rapid joining and exiting of vehicle nodes poses higher challenges to the adaptability of blockchain consensus mechanism and the persistence of privacy protection, and there is still no perfect solution that balances security, real-time performance, and dynamic adaptability. SUMMARY
[0004] To solve the above problems, the application provides a vehicle-to-vehicle communication encryption method, device, computer equipment and storage medium.
[0005] To achieve the above purpose, the application provides the following technical solutions: A vehicle-to-vehicle communication encryption method applied to an Internet of Vehicles communication system; the Internet of Vehicles communication system includes a sending vehicle and a receiving vehicle, and in a communication state, the sending vehicle and the receiving vehicle respectively generate an elliptic curve key pair; the elliptic curve key pair includes a public key and a private key; the method comprises: The sending vehicle concatenates the original message to be sent with the current timestamp to form an initial message to be signed; based on the sending vehicle's private key, the receiving vehicle's public key, a predefined public key ring, and a hash function, it performs a ring signature algorithm on the initial message to generate a ring signature; it encrypts the initial message using a symmetric encryption algorithm to generate symmetric ciphertext, and encrypts the key and initial vector of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate key ciphertext, and generates a zero-knowledge proof for verifying the encrypted random number; it combines the ring signature, symmetric ciphertext, key ciphertext, and zero-knowledge proof into the final ciphertext and sends it to the receiving vehicle; Upon receiving the final ciphertext, the receiving vehicle uses its private key to decrypt the key ciphertext, obtains the symmetric encryption key and initialization vector, and then decrypts the symmetric ciphertext to obtain the decrypted message. The decrypted message is then verified using zero-knowledge proof, ring signature, and timestamp freshness. If all verifications pass, the original message is output.
[0006] Optionally, the step of performing a ring signature algorithm on the initial message based on the sending vehicle private key, the receiving vehicle public key, a predefined public key ring, and a hash function to generate a ring signature includes: Determine the index position of the vehicle public key in the public key ring and generate a temporary key pair; Initialize and generate a challenge array and a response array. Based on the hash function and using the random number in the response array, the public key in the public key ring, and the initial message, recursively calculate the circular challenge chain. Based on the private key in the temporary key pair, the private key of the sending vehicle, and the corresponding challenge value in the circular challenge chain, the response value of the sending vehicle in the response array is calculated. The response array is filled based on the response value, and the filled response array is combined with the initial challenge value selected from the challenge array to output a ring signature.
[0007] Optionally, the formula for recursively calculating the cyclic challenge chain is: ; in, Represents the hash function, Represents the initial message, Position in the response array described in the table random numbers, Represents the position in the public key ring. public key, represents the base point of the elliptic curve in the elliptic curve key pair. and These are two adjacent challenge values in a circular challenge chain.
[0008] Optionally, the symmetric encryption employs AES algorithm and runs in CBC mode, and both the key and the initial vector used are 128-bit random numbers generated by a cryptographically secure pseudo-random number generator; the asymmetric encryption employs elliptic curve encryption algorithm, and the key and the initial vector are encoded into points on an elliptic curve before encryption; The formula for encrypting the key and the initial vector of the symmetric encryption algorithm using the asymmetric encryption algorithm is: ; ; wherein, and are the encoded AES key point and initial vector point respectively, is an encryption random number, is a receiving vehicle public key, and are the key ciphertext components obtained after encryption.
[0009] Optionally, the generation of the zero-knowledge proof for verifying the encryption random number comprises: generating a random number and calculating an elliptic curve point corresponding to the random number as a commitment; combining the ciphertext components of the elliptic curve point with the commitment to form a message to be proved; performing a hash calculation on the message to be proved to obtain a challenge value of the zero-knowledge proof; calculating a response value of the zero-knowledge proof according to the encryption random number, the generated random number and the challenge value; combining the commitment with the response value to output as the zero-knowledge proof.
[0010] Optionally, the formula for decrypting the key ciphertext using the receiving vehicle private key is: ; ; wherein, , is a receiving vehicle private key, and are the recovered AES key point and initial vector point after decryption.
[0011] Optionally, the zero-knowledge proof verification, ring signature verification and timestamp freshness verification on the decrypted message comprise: extracting the commitment and the response value from the final ciphertext to reconstruct the challenge value of the zero-knowledge proof and obtain a reconstructed point; calculating a verification point according to the response value; and performing zero-knowledge proof verification based on the reconstructed point and the verification point; extracting an initial challenge value and a response array from the ring signature; based on the decrypted message, the public key ring and the response array, re-recursively calculating a ring challenge chain to obtain a re-calculated initial challenge value; and based on the re-calculated initial challenge value and the initial challenge value extracted from the ring signature, performing ring signature verification. parsing a timestamp from the decrypted message and obtaining a current time; and calculating an absolute value of a time difference between the two times to perform timestamp freshness verification.
[0012] A vehicle-to-vehicle communication encryption device applied to the vehicle-to-vehicle communication encryption method of claim 1, comprising: A signature module for splicing an original message to be sent and a current timestamp to form an initial message to be signed; and performing ring signature algorithm on the initial message based on a sending vehicle private key, a receiving vehicle public key, a predefined public key ring and a hash function to generate a ring signature. An encryption module for encrypting the initial message using a symmetric encryption algorithm to generate symmetric ciphertext, encrypting a key of the symmetric encryption algorithm and an initial vector using an asymmetric encryption algorithm to generate key ciphertext, and generating zero-knowledge proof for verifying an encryption random number; and combining the ring signature, the symmetric ciphertext, the key ciphertext and the zero-knowledge proof into final ciphertext and sending the final ciphertext to a receiving vehicle. A decryption module for decrypting the key ciphertext using a receiving vehicle private key to obtain a symmetric encryption key and an initial vector, and then decrypting the symmetric ciphertext to obtain decrypted message, when the receiving vehicle receives the final ciphertext. A verification module for performing zero-knowledge proof verification, ring signature verification and timestamp freshness verification on the decrypted message; and outputting the original message if all the verifications are passed.
[0013] A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method of any one of claims 1-7.
[0014] A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1-7 when executing the program.
[0015] The vehicle-to-vehicle communication encryption method provided by the application has the following beneficial effects: The application effectively improves the security, real-time performance and dynamic adaptability of V2V communication by the combined application of elliptic curve key pair, ring signature algorithm, symmetric and asymmetric encryption algorithm and zero-knowledge proof. The sending vehicle ensures the trusted and untraceable message source through timestamp splicing and ring signature technology, and protects the message content by symmetric encryption, protects the key transmission by asymmetric encryption, and verifies the randomness of the encryption process by zero-knowledge proof to avoid the risk of key leakage. The receiving vehicle ensures the message integrity, authenticity and timeliness through a multi-level verification mechanism including decryption key ciphertext, zero-knowledge proof verification, ring signature verification and timestamp freshness check. The whole process reduces the calculation delay by lightweight encryption and efficient verification design while ensuring communication security, meets the high-frequency real-time communication demand. In addition, the dynamic public key ring mechanism supports flexible update of vehicle identity, enhances the adaptability of the system to dynamic network environment, and finally forms a complete solution considering security, real-time performance and dynamic adaptability. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application and the design scheme thereof, the following will briefly introduce the drawings required by the present embodiment. The drawings in the following description are only part of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0017] Figure 1 A flowchart of a vehicle-to-vehicle communication encryption method according to an exemplary embodiment of the present application.
[0018] Figure 2 A flowchart of vehicle signature in a vehicle-to-vehicle communication process according to an exemplary embodiment of the present application.
[0019] Figure 3 A flowchart of vehicle information encryption in a vehicle-to-vehicle communication process according to an exemplary embodiment of the present application.
[0020] Figure 4 A block diagram of a vehicle-to-vehicle communication encryption device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make those skilled in the art better understand the technical solutions of the present application and can be implemented, the present application will be described in detail below in conjunction with the drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and cannot limit the protection scope of the present application.
[0022] This invention proposes a combined symmetric and asymmetric encryption method based on ring signature authentication. First, it employs ring signature authentication technology, which generates a signature from a set containing the signer's own public keys and those of several other vehicles. During the signing process, the signer's identity is hidden within this public key ring; the verifier can only confirm that the signature originates from a member of the ring, but cannot determine which member. After successful authentication, symmetric encryption is used to encrypt the information, followed by encryption using an asymmetric encryption key. This addresses both the security flaws arising from the reliance on trusted institutions for symmetric encryption key distribution and the limitations of asymmetric encryption's insufficient computing power to encrypt large amounts of information. Ultimately, this ensures the security and reliability of vehicle-to-vehicle (V2V) communication within the blockchain.
[0023] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0024] First, this invention provides a vehicle-to-vehicle communication encryption method, specifically as follows: Figure 1 As shown, it includes the following steps: The sending vehicle concatenates the original message to be sent with the current timestamp to form an initial message to be signed; based on the sending vehicle's private key, the receiving vehicle's public key, a predefined public key ring, and a hash function, it performs a ring signature algorithm on the initial message to generate a ring signature; it encrypts the initial message using a symmetric encryption algorithm to generate symmetric ciphertext, and encrypts the key and initial vector of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate key ciphertext, and generates a zero-knowledge proof for verifying the encrypted random number; it combines the ring signature, symmetric ciphertext, key ciphertext, and zero-knowledge proof into the final ciphertext and sends it to the receiving vehicle.
[0025] Upon receiving the final ciphertext, the receiving vehicle uses its private key to decrypt the key ciphertext, obtains the symmetric encryption key and initialization vector, and then decrypts the symmetric ciphertext to obtain the decrypted message. The decrypted message is then verified using zero-knowledge proof, ring signature, and timestamp freshness. If all verifications pass, the original message is output.
[0026] This invention conceives of four modules in each vehicle: a signature module, an encryption module, a decryption module, and a verification module. The signature and encryption modules are used in the sending vehicle, while the decryption and verification modules are used in the receiving vehicle. Now, suppose sending vehicle A wants to send highly sensitive information to receiving vehicle B, but does not want to reveal its identity. First, they must each generate their own key pair. This invention uses ECC for key pair generation, employing the NIST-recommended elliptic curve secp256r1, with a base point G and order n. The key calculation method is as follows:
[0027] .
[0028] The public-private key pair of the sending vehicle A is , and the public-private key pair of the receiving vehicle B is . The original message is The time stamp at this time is spliced , that is,
[0029] .
[0030] The total input of the sending vehicle A should be a five-tuple , where m is the original message to be sent spliced with the time stamp, is the private key of the sending vehicle A, is the public key of the receiving vehicle B, is the public key ring, which contains the public key of the sending vehicle A , and H is a hash function, which uses SHA-256 in the present application.
[0031] The random numbers required for all key cryptographic operations (such as the generation of ring signature temporary key k, encryption random number r, zero-knowledge proof random number t, and AES key and IV) of the present application are generated by a cryptographically secure pseudo-random number generator (CSPRNG). The CSPRNG is seeded and managed with a high-quality entropy source provided by the operating system, ensuring that the generated random numbers are unpredictable and strongly random, meeting the security standard requirements of FIPS 140-2 and the like.
[0032] In an embodiment, the functions of the above four modules are sequentially described.
[0033] Signature module: used to implement the vehicle signature process, as shown in Figure 2 , Vehicle A is the sending vehicle, and Vehicle B is the receiving vehicle, , and the final result is a two-tuple , and the following is the implementation process of the algorithm : First, the signature preparation is performed. The position of the public key of the receiving vehicle B (i.e., Vehicle B in the figure) in R is determined by (algorithm ), and is denoted as s, that is, the public key ring at this time is:
[0034] .
[0035] Then, a random number k is generated, and a temporary key pair is generated through ECC, where . A challenge array (this time is empty, and the length is the length of the public key string) and a response array where s is a random number, and the signer's response at position s is empty at this time.
[0036] Secondly, the initial challenge is performed. The challenge chain calculation formula is:
[0037] .
[0038] Let be constant, and because , the initial challenge .
[0039] Then the challenge chain is constructed. With the first challenge , the subsequent challenges can be calculated recursively through the formula:
[0040] ; ; ; Finally, the signer's challenge can be obtained: .
[0041] Finally, the ring signature is generated. Since is constant, , then:
[0042] .
[0043] The equation is obtained by simultaneously eliminating G on both sides and moving terms: .
[0044] Insert the obtained into the response array S at the corresponding position, and select any c (the invention selects ) from the challenge array as the initial challenge. Together, they are the final ring signature .
[0045] Encryption module: used to implement the vehicle information encryption process, as shown in Figure 3 , , C=( ), the following is the implementation process of the algorithm : First, use AES to encrypt the initial message. First, randomly generate two 128-bit (16-byte) random numbers as the AES key and initial vector Then, encrypt the initial message m with AES-CBC to get the initial ciphertext , as follows:
[0046] .
[0047] Secondly, ECC encryption preparation is performed. Using Koblitz encoding, the AES key and the initial vector are encoded into elliptic curve points, respectively and .
[0048] Then, the AES key point is encrypted with ECC. A random number r is generated, and an elliptic curve point is created, and then the AES key point encrypted with ECC is calculated, as follows:
[0049] ; ; The two encrypted points are combined, which is the ciphertext key part content .
[0050] Then, a zero-knowledge proof is generated. A random number t is generated, and a zero-knowledge proof commitment is generated according to t; then, a proof message
[0051] is generated by concatenating the strings.
[0052] Then, the challenge of the zero-knowledge proof is generated, as follows: .
[0053] Next, the response value is calculated, as follows: ; where r is the random number generated by ECC encryption, and n is the order of the elliptic curve secp256r1. The commitment and response are combined, which is the ciphertext zero-knowledge proof part content .
[0054] Finally, the ciphertext is combined. After the above steps are completed, all the ciphertexts are combined to obtain the final ciphertext:
[0055] ); where , .
[0056] Decryption module: The following content is the algorithm. Implementation process: First, we need to decrypt the AES key. First, we need to decrypt the ECC-encrypted AES key point, starting by retrieving it from C. Take out .by For example, due to ,and ,Right now:
[0057] ; and ,therefore: .
[0058] And because for the receiving vehicle, at this time... , , Since all parameters are known, rearranging the terms yields: .
[0059] Similarly, we can conclude that: .
[0060] After obtaining the original AES key point, you can use Koblitz decoding to obtain the AES key used for encryption. and initial vector .
[0061] Next, the message was decrypted. The AES key was obtained. and initial vector Then, take it out from C. Then, use AES-CBC to decrypt the encrypted message, using the following formula:
[0062] .
[0063] In this way, we obtained the decryption message. .
[0064] Verification module: The following content is the algorithm. Implementation process: First, verify the zero-knowledge proof. Extract from ciphertext C... , and then from Take out ; obtained from the decryption module Extract the data, concatenate the strings, and obtain:
[0065] .
[0066] Again, the . .
[0067] Then, from , we get , and calculate , because , so: .
[0068] Next, we calculate: .
[0069] Finally, we only need to compare and to see if they are equal, which verifies the challenge of the zero-knowledge proof, and the following is the proof: From the encryption module, we know that , , so we can get: .
[0070] If the data has not been changed, then should be always true, and the proof is successful.
[0071] Secondly, verify the ring signature. Generate a new challenge array (this time empty, length of public key string length), get from the ciphertext C, and get from , as the initial challenge value, placed in the first challenge array C[0]. Get the response array from , get from the decryption module, and the public key ring is , so use the following formula to recursively calculate:
[0072] ; ; .
[0073] Finally, due to the properties of the ring, we will recalculate a new , if at this time, the ring signature is closed, and the signature verification is successful.
[0074] Then verify the timestamp. A tolerance value tolerance (in this invention, 250ms) is specified, and the decrypted message Obtaining timestamps And remove the redundant parts to obtain the original message. :
[0075] .
[0076] Get the current timestamp Calculate the timestamp difference d: ).
[0077] Compare the value of d with the value of tolerance. If If the timestamp verification fails, the verification timeout will occur; if If the timestamp verification is successful, the timestamp is valid.
[0078] Finally, perform the final verification. Generate a boolean variable f as the verification label, initially setting it to false. After steps 1, 2, and 3 are completed, let:
[0079] .
[0080] If the zero-knowledge proof, ring signature, and timestamp are all successfully verified, then the value of f should be true, indicating that the decryption module has solved the problem. It is indeed the initial message m, which has not been tampered with or lost, and is within the valid time frame; if any step fails, the value of f is false, indicating that the decryption module has deciphered the message. The non-initial message m or the sending vehicle A (i.e., the sending vehicle) is not a certified vehicle in the public key ring, or it has exceeded the valid time range. The original message is ultimately obtained. .
[0081] Based on the above steps, it can be seen that in this invention, for vehicle A, the input is a quintuple, and the algorithm is as follows: ,in The output is a pair of tuples. ,C), where , ).
[0082] For receiving vehicle B, the input is a tuple, and the algorithm is as follows: ,in The output is a pair of tuples. ,in For the initial message The decrypted original message has a verification tag f. If f is true, the decryption and verification process is successful; if f is false, the decryption and verification process fails.
[0083] In addition, all parameters in the above embodiments of the present invention are shown in Table 1 below.
[0084] By employing the above methods, and combining elliptic curve key pairs, ring signature algorithms, symmetric and asymmetric encryption algorithms, and zero-knowledge proofs, the security, real-time performance, and dynamic adaptability of V2V communication are effectively improved. The sending vehicle uses timestamp concatenation and ring signature technology to ensure the message source is trustworthy and untraceable. Symmetric encryption protects the message content, asymmetric encryption protects key transmission, and zero-knowledge proofs verify the randomness of the encryption process, avoiding the risk of key leakage. The receiving vehicle uses a multi-layered verification mechanism, including decrypting the ciphertext of the decrypted key, zero-knowledge proof verification, ring signature verification, and timestamp freshness checks, to ensure message integrity, authenticity, and timeliness. The entire process, while ensuring communication security, reduces computational latency through lightweight encryption and efficient verification design, meeting the demands of high-frequency real-time communication. Furthermore, the dynamic public key ring mechanism supports flexible vehicle identity updates, enhancing the system's adaptability to dynamic network environments, ultimately forming a complete solution that balances security, real-time performance, and dynamic adaptability.
[0085] Secondly, the present invention also provides a vehicle-to-vehicle communication encryption device, such as... Figure 4 As shown, it includes: The signature module 201 concatenates the original message to be sent with the current timestamp to form an initial message to be signed; based on the sending vehicle's private key, the receiving vehicle's public key, a predefined public key ring, and a hash function, it performs a ring signature algorithm on the initial message to generate a ring signature.
[0086] The encryption module 202 encrypts the initial message using a symmetric encryption algorithm to generate symmetric ciphertext, encrypts the key and initial vector of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate key ciphertext, and generates a zero-knowledge proof for verifying the encrypted random number; it combines the ring signature, symmetric ciphertext, key ciphertext, and zero-knowledge proof into the final ciphertext and sends it to the receiving vehicle.
[0087] The decryption module 203, when the receiving vehicle receives the final ciphertext, uses the receiving vehicle's private key to decrypt the key ciphertext, obtains the symmetric encryption key and initial vector, and then decrypts the symmetric ciphertext to obtain the decryption message.
[0088] The verification module 204 performs zero-knowledge proof verification, ring signature verification, and timestamp freshness verification on the decrypted message; if all verifications pass, the original message is output.
[0089] By employing the aforementioned device and combining elliptic curve key pairs, ring signature algorithms, symmetric and asymmetric encryption algorithms, and zero-knowledge proofs, the security, real-time performance, and dynamic adaptability of V2V communication are effectively enhanced. The sending vehicle ensures the message source is trustworthy and untraceable through timestamp concatenation and ring signature technology. Symmetric encryption protects the message content, asymmetric encryption protects key transmission, and zero-knowledge proofs verify the randomness of the encryption process, preventing key leakage risks. The receiving vehicle ensures message integrity, authenticity, and timeliness through a multi-layered verification mechanism, including decrypting the ciphertext of the decrypted key, zero-knowledge proof verification, ring signature verification, and timestamp freshness checks. The entire process, while ensuring communication security, reduces computational latency through lightweight encryption and efficient verification design, meeting the demands of high-frequency real-time communication. Furthermore, the dynamic public key ring mechanism supports flexible vehicle identity updates, enhancing the system's adaptability to dynamic network environments, ultimately forming a complete solution that balances security, real-time performance, and dynamic adaptability.
[0090] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The steps of the provided vehicle-to-vehicle communication encryption method.
[0091] This invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for various operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above-mentioned functions. Figure 1 The steps of the provided vehicle-to-vehicle communication encryption method.
[0092] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0093] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0094] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0095] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes The steps of the function specified in one or more boxes.
[0096] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the patent of the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A vehicle-to-vehicle communication encryption method, characterized in that, It is applied to a vehicle-to-everything (V2X) communication system; the V2X communication system includes a transmitting vehicle and a receiving vehicle, and in the communication state, the transmitting vehicle and the receiving vehicle respectively generate elliptic curve key pairs; The elliptic curve key pair includes a public key and a private key; the method includes: The sending vehicle concatenates the original message to be sent with the current timestamp to form an initial message to be signed; based on the sending vehicle's private key, the receiving vehicle's public key, a predefined public key ring, and a hash function, it performs a ring signature algorithm on the initial message to generate a ring signature; it encrypts the initial message using a symmetric encryption algorithm to generate symmetric ciphertext, and encrypts the key and initial vector of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate key ciphertext, and generates a zero-knowledge proof for verifying the encrypted random number; it combines the ring signature, symmetric ciphertext, key ciphertext, and zero-knowledge proof into the final ciphertext and sends it to the receiving vehicle; Upon receiving the final ciphertext, the receiving vehicle uses its private key to decrypt the key ciphertext, obtains the symmetric encryption key and initialization vector, and then decrypts the symmetric ciphertext to obtain the decrypted message. The decrypted message is then verified using zero-knowledge proof, ring signature, and timestamp freshness. If all verifications pass, the original message is output.
2. The method according to claim 1, characterized in that, The step of performing a ring signature algorithm on the initial message based on the sent vehicle private key, the received vehicle public key, a predefined public key ring, and a hash function to generate a ring signature includes: Determine the index position of the vehicle public key in the public key ring and generate a temporary key pair; Initialize and generate a challenge array and a response array. Based on the hash function and using the random number in the response array, the public key in the public key ring, and the initial message, recursively calculate the circular challenge chain. Based on the private key in the temporary key pair, the private key of the sending vehicle, and the corresponding challenge value in the circular challenge chain, the response value of the sending vehicle in the response array is calculated. The response array is filled based on the response value, and the filled response array is combined with the initial challenge value selected from the challenge array to output a ring signature.
3. The method according to claim 2, characterized in that, The formula for recursively calculating the cyclic challenge chain is as follows: ; in, Represents the hash function, Represents the initial message, Position in the response array described in the table random numbers, Represents the position in the public key ring. public key, represents the base point of the elliptic curve in the elliptic curve key pair. and These are two adjacent challenge values in a circular challenge chain.
4. The method according to claim 3, characterized in that, The symmetric encryption uses the AES algorithm and runs in CBC mode. The key and initial vector used are 128-bit random numbers generated by a cryptographically secure pseudo-random number generator. The asymmetric encryption uses an elliptic curve cryptography algorithm. The key and initial vector are encoded as points on an elliptic curve before encryption. The formula for encrypting the key and initial vector of the symmetric encryption algorithm using the asymmetric encryption algorithm is as follows: ; ; in, and These are the encoded AES key point and initial vector point, respectively. To encrypt random numbers, To receive the vehicle's public key, and This is a component of the encrypted key ciphertext.
5. The method according to claim 4, characterized in that, The generation of zero-knowledge proofs for verifying encrypted random numbers includes: Generate a random number and calculate the elliptic curve point corresponding to the random number as a commitment; The ciphertext components of the elliptic curve points are combined with the commitment to form the message to be proved; The message to be proved is hashed to obtain the challenge value of the zero-knowledge proof; Calculate the response value of the zero-knowledge proof based on the encrypted random number, the generated random number, and the challenge value; The commitment and the response value are combined to output the zero-knowledge proof.
6. The method according to claim 5, characterized in that, The formula for decrypting the key ciphertext using the received vehicle's private key is as follows: ; ; in, , To receive the vehicle's private key, and To decrypt and recover the AES key points and initial vector points.
7. The method according to claim 6, characterized in that, The zero-knowledge proof verification, ring signature verification, and timestamp freshness verification of the decrypted message include: The commitment and response values are extracted from the final ciphertext, and the challenge value of the zero-knowledge proof is reconstructed to obtain the reconstruction point; the verification point is calculated based on the response value; and the zero-knowledge proof is verified based on the reconstruction point and the verification point. Extract the initial challenge value and response array from the ring signature; recalculate the ring challenge chain recursively based on the decryption message, public key ring, and response array to obtain the recalculated initial challenge value; verify the ring signature based on the recalculated initial challenge value and the initial challenge value extracted from the ring signature; The timestamp is parsed from the decrypted message, and the current time is obtained; the absolute value of the time difference between the two is calculated to verify the freshness of the timestamp.
8. A vehicle-to-vehicle communication encryption device, characterized in that, The vehicle-to-vehicle communication encryption method according to claim 1 includes: The signature module concatenates the original message to be sent with the current timestamp to form an initial message to be signed; based on the sending vehicle's private key, the receiving vehicle's public key, a predefined public key ring, and a hash function, it performs a ring signature algorithm on the initial message to generate a ring signature; The encryption module encrypts the initial message using a symmetric encryption algorithm to generate symmetric ciphertext, encrypts the key and initial vector of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate key ciphertext, and generates a zero-knowledge proof for verifying the encrypted random number; the ring signature, symmetric ciphertext, key ciphertext, and zero-knowledge proof are combined into the final ciphertext and sent to the receiving vehicle. The decryption module, when the receiving vehicle receives the final ciphertext, uses the receiving vehicle's private key to decrypt the key ciphertext, obtains the symmetric encryption key and initial vector, and then decrypts the symmetric ciphertext to obtain the decryption message; The verification module performs zero-knowledge proof verification, ring signature verification, and timestamp freshness verification on the decrypted message; if all verifications pass, the original message is output.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 7.
10. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 7.