Data transmission method, storage medium and vehicle
By generating and verifying shared secret keys between the vehicle-machine end and the mobile end, the problem of low data transmission security in the prior art is solved, and end-to-end secure data transmission is achieved.
Patent Information
- Application Number
- CN202210863646.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-07-20
AI Technical Summary
In the prior art, the encrypted data transmission method between the vehicle terminal and the mobile terminal is relatively low in security and cannot guarantee end-to-end secure transmission.
The shared key is determined by generating temporary public and private keys, and ensure the security of data transmission by verifying the digest value of the shared key.
Real-time session secret key from the vehicle end to the mobile end is realized, preventing third parties from obtaining private keys through man-in-the-middle attacks, and ensuring the security of data transmission.
Smart Images

Figure CN115276972B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and specifically provides a data transmission method, a storage medium and a vehicle. Background Art
[0002] With the development of intelligent connected cars, users are paying more and more attention to related security. In the intelligent electric vehicle industry, data security is a very important field, behind which is the user's privacy, property and even life safety.
[0003] As vehicles become more intelligent and networked, smart vehicles generate more and more data, and a lot of data is related to user privacy. If this data is leaked, it will have a significant impact on user privacy, property and even life safety.
[0004] However, the encrypted data transmission method between the vehicle terminal and the mobile terminal in the prior art has low security and cannot guarantee end-to-end secure transmission between the vehicle terminal and the mobile terminal.
[0005] Accordingly, the art needs a new data transmission solution to solve the above problems. Summary of the invention
[0006] In order to overcome the above defects, the present invention is proposed to solve or at least partially solve the above technical problems. The present invention provides a data transmission method, a storage medium and a vehicle.
[0007] In a first aspect, the present invention provides a data transmission method, applied to a mobile terminal, the method comprising: generating a first temporary public key and a first temporary private key; determining a first shared key based on the first temporary public key and the first temporary private key; receiving a second shared key sent by a vehicle terminal; determining whether the first shared key and the second shared key are the same; and when the first shared key and the second shared key are the same, controlling the mobile terminal to perform data transmission with the vehicle terminal.
[0008] In one embodiment, determining a first shared key based on the first temporary public key and the first temporary private key includes: generating a first combined unique identification value based on the first temporary public key and the first preset information; signing the first combined unique identification value with the private key corresponding to the mobile digital certificate to obtain a first signature value; receiving a second signature value and a second combined unique identification value sent by the vehicle based on the first signature value; verifying the second signature value with the public key corresponding to the vehicle digital certificate, and if the verification passes, generating a first shared key based on the second temporary public key obtained from the second combined unique identification value and the first temporary private key.
[0009] In one implementation, determining whether the first shared key and the second shared key are the same includes: determining whether a digest value of the first shared key and a digest value of the second shared key are the same.
[0010] In one implementation, the vehicle digital certificate is obtained based on the following steps:
[0011] Send a request to obtain the vehicle computer digital certificate;
[0012] Receive the vehicle digital certificate sent by the Internet of Vehicles.
[0013] In one embodiment, in an offline state, the method further includes:
[0014] Obtaining an encrypted symmetric key, a digest value of the symmetric key, and encrypted transmission data;
[0015] Decrypting the encrypted symmetric key based on the private key corresponding to the mobile terminal digital certificate;
[0016] Verify whether the summary value of the decrypted symmetric key is correct. If so, use the symmetric key to decrypt the encrypted transmission data to obtain the decrypted transmission data.
[0017] In a second aspect, the present invention provides a data transmission method, which is applied to a vehicle terminal, and the method includes: obtaining a mobile terminal digital certificate and a first signature value and a first combined unique identification value sent by the mobile terminal; verifying the first signature value based on the public key corresponding to the mobile terminal digital certificate; if the verification passes, generating a second temporary public key and a second temporary private key; generating a second combined unique identification value based on the second temporary public key and second preset information; signing the second combined unique identification value based on the private key corresponding to the vehicle terminal digital certificate to obtain a second signature value; generating a second shared key based on the first temporary public key and the second temporary private key obtained from the first combined unique identification value; and sending the second signature value, the second combined unique identification value and the second shared key to the mobile terminal.
[0018] In one embodiment, in an offline state, the method further includes: obtaining a symmetric key; encrypting the transmission data using the symmetric key, and encrypting the symmetric key using the public key corresponding to the mobile digital certificate; and outputting the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data.
[0019] In a third aspect, a data transmission method is provided, the method comprising:
[0020] The mobile terminal generates a first temporary public key and a first temporary private key, generates a first combined unique identification value based on the first temporary public key and the first preset information, signs the first combined unique identification value using the private key corresponding to the mobile terminal digital certificate, and sends the first signature value and the first combined unique identification value to the vehicle terminal;
[0021] The vehicle terminal obtains the mobile terminal digital certificate, verifies the legality of the first signature value based on the public key corresponding to the mobile terminal digital certificate, generates a second temporary public key and a second temporary private key, generates a second combined unique identification value based on the second temporary public key and the second preset information, signs the second combined unique identification value based on the private key corresponding to the vehicle terminal digital certificate, and sends the second signature value and the second combined unique identification value to the mobile terminal; and the vehicle terminal generates a second shared key based on the first temporary public key and the second temporary private key obtained from the first combined unique identification value;
[0022] The mobile terminal obtains the vehicle digital certificate, verifies the legitimacy of the second signature value based on the public key corresponding to the vehicle digital certificate, and generates a first shared key based on the second temporary public key obtained from the second combined unique identification value and the first temporary private key;
[0023] Determining whether the first shared key and the second shared key are the same;
[0024] When the first shared key and the second shared key are the same, the mobile terminal and the vehicle terminal are controlled to perform data transmission.
[0025] In a fourth aspect, a vehicle is provided, comprising a vehicle body, a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, and the program codes are suitable for being loaded and run by the processor to execute any of the data transmission methods described above.
[0026] In a fifth aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored in the computer-readable storage medium, wherein the program codes are suitable for being loaded and run by a processor to execute any of the aforementioned data transmission methods.
[0027] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:
[0028] The data transmission method provided by the present invention first obtains the first temporary public key and the first temporary private key, then determines the first shared key based on the first temporary public key and the first temporary private key, then receives the second shared key sent by the vehicle terminal, and finally determines whether the first shared key and the second shared key are the same, and when the first shared key and the second shared key are the same, controls the mobile terminal and the vehicle terminal to perform data transmission. In this way, a real-time session key from the vehicle terminal to the mobile terminal is realized, and except for the vehicle terminal and the mobile terminal, any third party cannot obtain the private keys of the vehicle terminal and the mobile terminal through man-in-the-middle attacks, etc., thereby ensuring the security of data transmission between the vehicle terminal and the mobile terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In addition, similar numbers in the figures are used to represent similar components, among which:
[0030] Figure 1 It is a flowchart of main steps of a data transmission method applied to a mobile terminal according to an embodiment of the present invention;
[0031] Figure 2 This is a flow chart of main steps of a data transmission method applied to a vehicle terminal according to an embodiment of the present invention;
[0032] Figure 3 is a flowchart of main steps of a data transmission method according to an embodiment of the present invention;
[0033] Figure 4 is a complete flow chart of a data transmission method in a real-time scenario according to an embodiment of the present invention;
[0034] Figure 5 is a flow chart of a method for data transmission in an offline state according to an embodiment of the present invention;
[0035] Figure 6 It is a schematic structural diagram of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0037] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.
[0038] At present, the encrypted data transmission method between the vehicle terminal and the mobile terminal in the prior art has low security and cannot guarantee end-to-end secure transmission between the vehicle terminal and the mobile terminal.
[0039] To this end, the present application proposes a data transmission method, storage medium and vehicle, firstly obtaining a first temporary public key and a first temporary private key, then determining a first shared key based on the first temporary public key and the first temporary private key, then receiving a second shared key sent by the vehicle terminal, which may specifically be a summary value of the second shared key, and finally determining whether the first shared key and the second shared key are the same, and controlling the mobile terminal and the vehicle terminal to perform data transmission when the first shared key and the second shared key are the same. In this way, a real-time session key from the vehicle terminal to the mobile terminal is realized, and except for the vehicle terminal and the mobile terminal, no third party can obtain the private keys of the vehicle terminal and the mobile terminal through man-in-the-middle attacks, etc., thus ensuring the security of data transmission between the vehicle terminal and the mobile terminal.
[0040] See attached Figure 1 , Figure 1 It is a flowchart of main steps of a method for transmitting data on a mobile terminal according to an embodiment of the present invention.
[0041] In order to make the purpose, technical solution and advantages of the present invention more clear, the data transmission method of the present application is described in detail below with reference to the accompanying drawings and embodiments, taking a mobile phone APP as an example of a mobile terminal. It should be understood by those skilled in the art that the specific embodiments described herein are only used to explain the present invention, and are not intended to limit the data transmission method described in the present invention to use a mobile phone APP as a mobile terminal.
[0042] In addition, before executing the following steps S101 to S105, the mobile phone APP can first obtain the vehicle computer digital certificate.
[0043] In a specific implementation, the vehicle computer digital certificate is obtained based on the following steps: first, a request for obtaining the vehicle computer digital certificate is sent, and then the vehicle computer digital certificate sent by the Internet of Vehicles is received.
[0044] Specifically, first, the mobile phone APP can send an end-to-end communication check signal to the vehicle side, so that the vehicle side can check the vehicle status, vehicle lock, network and other information based on the communication check signal. After receiving the feedback signal from the vehicle side, a request for obtaining the vehicle digital certificate is sent to the Internet of Vehicles, and then the Internet of Vehicles forwards the request for obtaining the vehicle digital certificate to the CA trusted domain to obtain the vehicle digital certificate through the frame information. Among them, the frame information refers to the vehicle VIN information, which is the unique identification of the vehicle. There is a one-to-one mapping relationship between the vehicle digital certificate and the vehicle VIN information. Finally, the CA trusted domain returns the vehicle digital certificate to the Internet of Vehicles, which is sent to the mobile terminal by the Internet of Vehicles.
[0045] The CA trusted domain is an independent trusted third party that issues digital certificates to certificate holders. The digital certificates declare the identity and public key of the certificate holder. The CA trusted domain should verify the identity information of the certificate holder before issuing the certificate, and issue the certificate to the certificate holder based on the verification results.
[0046] A digital certificate is a file generated by a certificate authority. It generally contains information such as the public key, the name of the public key owner, the CA's digital signature, the validity period, the name of the authority, and the certificate serial number. The CA's digital signature is the key to verifying whether the certificate has been tampered with. It actually performs a digest algorithm on the contents of the certificate except the CA's digital signature to obtain a digest value. The CA trusted domain then encrypts the digest with its own private key to generate the CA's digital signature. The CA trusted domain will disclose its public key. When verifying the certificate, this public key is used to decrypt the CA's digital signature, and then used to verify whether the certificate has been tampered with.
[0047] The digital certificates in this application include mobile digital certificates and vehicle digital certificates. When the mobile terminal is a mobile phone, the mobile digital certificate is the digital certificate corresponding to the mobile phone.
[0048] like Figure 1 As shown, in a real-time scenario, the data transmission method in the embodiment of the present invention mainly includes the following steps S101 to S105.
[0049] Step S101: Generate a first temporary public key and a first temporary private key.
[0050] Specifically, a mobile phone or mobile terminal may be used to generate a first temporary public key and a first temporary private key.
[0051] Step S102: Determine a first shared key based on the first temporary public key and the first temporary private key.
[0052] In a specific implementation, determining the first shared key based on the first temporary public key and the first temporary private key includes the following steps S1021 to S1024.
[0053] Step S1021: Generate a first combined unique identification value based on the first temporary public key and the first preset information.
[0054] The first preset information refers to random information in the key negotiation process, such as a random string. The first combined unique identification value is obtained by combining or concatenating the first temporary public key and the random string.
[0055] Step S1022: Use the private key corresponding to the mobile digital certificate to sign the first combined unique identification value to obtain a first signature value.
[0056] The specific signature algorithm depends on the type of mobile digital certificate.
[0057] Step S1023: Receive the second signature value and the second combined unique identification value sent by the vehicle terminal based on the first signature value.
[0058] Step S1024: Use the public key corresponding to the vehicle digital certificate to verify the second signature value. If the verification passes, generate a first shared key based on the second temporary public key obtained from the second combined unique identification value and the first temporary private key.
[0059] Exemplarily, the first shared key is specifically negotiated from the second temporary public key obtained from the second combined unique identification value and the first temporary private key.
[0060] Step S103: Receive the second shared key sent by the vehicle terminal.
[0061] In a specific implementation, the mobile terminal receives a summary value of the second shared key sent by the vehicle terminal.
[0062] Step S104: Determine whether the first shared key and the second shared key are the same.
[0063] In a specific implementation, determining whether the first shared key and the second shared key are the same includes: determining whether a digest value of the first shared key and a digest value of the second shared key are the same.
[0064] The summary value is usually calculated by using a hash function on the secret key. The hash function can be common sha1, sha256, or MD5.
[0065] Step S105: When the first shared key and the second shared key are the same, control the mobile terminal to perform data transmission with the vehicle terminal.
[0066] Based on the above steps S101 to S105, first obtain the first temporary public key and the first temporary private key, then determine the first shared key based on the first temporary public key and the first temporary private key, then receive the second shared key sent by the vehicle end, and finally determine whether the first shared key and the second shared key are the same, and when the first shared key and the second shared key are the same, control the mobile end and the vehicle end to perform data transmission. In this way, the real-time session key from the vehicle end to the mobile end is realized, and except for the vehicle end and the mobile end, any third party cannot obtain the private keys of the vehicle end and the mobile end through man-in-the-middle attacks, etc., which ensures the security of data transmission between the vehicle end and the mobile end.
[0067] In a specific embodiment, in an offline state, the method also includes: first obtaining an encrypted symmetric key, a summary value of the symmetric key and encrypted transmission data, then decrypting the encrypted symmetric key based on the private key corresponding to the mobile digital certificate, and finally verifying whether the summary value of the decrypted symmetric key is correct. If so, decrypting the encrypted transmission data using the symmetric key to obtain the decrypted transmission data.
[0068] Specifically, in the offline state, when the vehicle network cannot be used, the vehicle computer stores the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data in the vehicle network in advance.
[0069] When the vehicle-mounted terminal and the mobile terminal need to transmit data, the mobile phone APP obtains the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data from the Internet of Vehicles, and then uses the private key corresponding to the mobile terminal digital certificate to decrypt the encrypted symmetric key to obtain the decrypted symmetric key.
[0070] At the same time, verify whether the summary value of the decrypted symmetric key is correct. Specifically, compare the summary value of the symmetric key obtained by the Internet of Vehicles with the summary value of the decrypted symmetric key. If the two are consistent, use the symmetric key to decrypt the encrypted transmission data to obtain the decrypted transmission data.
[0071] In an offline state, the control mobile terminal obtains the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data from the vehicle network, and decrypts the encrypted symmetric key to obtain the symmetric key, and then uses the symmetric key to decrypt the transmission data to obtain the transmission data. In this way, it is ensured that the vehicle can maintain data transmission with the mobile terminal even in an offline state, thereby improving the security and stability of data transmission.
[0072] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.
[0073] Further, if Figure 2 As shown, the present invention also provides a data transmission method, which is applied to a vehicle terminal, and the method is implemented by the following steps S201 to S207.
[0074] Step S201: Obtain a mobile terminal digital certificate and a first signature value and a first combined unique identification value sent by the mobile terminal.
[0075] Step S202: verifying the first signature value based on the public key corresponding to the mobile digital certificate.
[0076] Step S203: If the verification is successful, generate a second temporary public key and a second temporary private key.
[0077] Specifically, the second temporary public key and the second temporary private key can be generated through the corresponding database stored in the vehicle computer.
[0078] Step S204: Generate a second combined unique identification value based on the second temporary public key and the second preset information.
[0079] The second preset information refers to the random information stored on the vehicle side during the key negotiation process, which can be a random string. The random information here is different from the special information on the mobile side that constitutes the first combined unique identification value. These random strings can be combined or concatenated with the second temporary public key to obtain the second combined unique identification value.
[0080] Step S205: Sign the second combined unique identification value based on the private key corresponding to the vehicle digital certificate to obtain a second signature value.
[0081] Step S206: Generate a second shared key based on the first temporary public key obtained from the first combined unique identification value and the second temporary private key.
[0082] Specifically, the second shared key is negotiated using the first temporary public key obtained from the first combined unique identification value and the second temporary private key.
[0083] Step S207: Send the second signature value, the second combined unique identification value and the second shared key to the mobile terminal.
[0084] In addition, in the offline state, the vehicle network cannot be used. The vehicle computer stores the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data in the vehicle network in advance.
[0085] Symmetric keys mean that the sender and receiver of a message must use the same key, which must be kept secret. The sender uses the key to encrypt the message to be sent, and then transmits the message to the receiver, who then uses the same key to decrypt the received message.
[0086] Specifically, in the case of a triggering scenario, the vehicle computer first obtains the mobile phone digital certificate based on the keyID (Internet of Vehicles ID). After obtaining the mobile phone certificate, it obtains the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data based on the following steps.
[0087] In a specific implementation, in an offline state, the method further includes:
[0088] Obtain a symmetric key. Specifically, you can use algorithms such as DES and AES to generate a symmetric key.
[0089] Encrypt the transmitted data using the symmetric key, and encrypt the symmetric key using the public key corresponding to the mobile digital certificate;
[0090] The encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data are output to the Internet of Vehicles for storage.
[0091] In the offline state, the vehicle computer stores the encrypted symmetric key, the summary value of the symmetric key and the encrypted transmission data in the vehicle network in advance, thus providing basic support for the subsequent end-to-end communication between the mobile terminal and the vehicle computer.
[0092] Further, if Figure 3 As shown, the present invention also provides a data transmission method, which is implemented by the following steps S301 to S305.
[0093] Step S301: The mobile terminal generates a first temporary public key and a first temporary private key, generates a first combined unique identification value based on the first temporary public key and the first preset information, and uses the private key corresponding to the mobile terminal digital certificate to sign the first combined unique identification value, and sends the first signature value and the first combined unique identification value to the vehicle terminal.
[0094] Step S302: The vehicle terminal obtains the mobile terminal digital certificate, verifies the legality of the first signature value based on the public key corresponding to the mobile terminal digital certificate, generates a second temporary public key and a second temporary private key, generates a second combined unique identification value based on the second temporary public key and the second preset information, signs the second combined unique identification value based on the private key corresponding to the vehicle terminal digital certificate, and sends the second signature value and the second combined unique identification value to the mobile terminal; and the vehicle terminal generates a second shared key based on the first temporary public key and the second temporary private key obtained from the first combined unique identification value.
[0095] Step S303: The mobile terminal obtains the vehicle digital certificate, verifies the legitimacy of the second signature value based on the public key corresponding to the vehicle digital certificate, and then generates a first shared key based on the second temporary public key obtained from the second combined unique identification value and the first temporary private key.
[0096] Step S304: Determine whether the first shared key and the second shared key are the same.
[0097] Specifically, it is determined whether the digest value of the first shared key and the digest value of the second shared key are the same. If so, it is determined that the first shared key and the second shared key are the same.
[0098] Step S305: When the first shared key and the second shared key are the same, control the mobile terminal and the vehicle terminal to perform data transmission.
[0099] In a specific implementation, in a real-time scenario, such as Figure 4 The complete flow chart of the data transmission method is shown in the figure, which describes the data transmission method in the present application in detail.
[0100] 1. The mobile phone APP initiates an end-to-end communication request, which reaches the vehicle computer through the Internet of Vehicles. After the vehicle computer and the mobile phone confirm that the conditions for starting end-to-end encrypted communication are met, the key negotiation process begins.
[0101] 2. The mobile phone APP requests the device certificate of the vehicle computer from the Internet of Vehicles. The Internet of Vehicles forwards the request to the CA trusted domain, obtains the vehicle computer certificate through the vehicle frame information, and verifies the certificate chain.
[0102] 3. The mobile phone APP generates the first temporary public and private keys, combines the first temporary public key with some special information to obtain a combined message, and then uses the private key corresponding to the mobile phone digital certificate to sign the combined message. The signature algorithm depends on the type of mobile phone digital certificate. After signing, the first signature value and the combined message are obtained and sent to the vehicle end.
[0103] 4. The vehicle computer obtains the mobile phone digital certificate based on the keyID (Internet of Vehicles ID). No encryption is required here.
[0104] 5. The vehicle computer uses the public key corresponding to the mobile phone digital certificate to verify the first signature value sent by the mobile phone APP. If the verification is successful, the second temporary public key and the second temporary private key are generated, and the second temporary public key is combined with some special information. The private key corresponding to the vehicle computer digital certificate is used to sign the combined message to obtain the second signature value and send it to the mobile phone APP. At the same time, the vehicle computer negotiates the second shared key {share_key2} based on the first temporary public key and the second temporary private key.
[0105] 6. After the mobile phone APP receives the second signature value sent by the vehicle computer, it uses the public key corresponding to the vehicle computer digital certificate to verify the second signature value. If the verification passes, the first shared key {share_key1} is negotiated based on the first temporary private key and the second temporary public key.
[0106] 7. Verify whether the first shared key {share_key1} and the second shared key {share_key2} are the same, specifically verify whether the digest values of the two shared keys are the same, and if they are the same, control the mobile terminal and the vehicle terminal to transmit data.
[0107] In addition, if Figure 5 As shown, the data transmission method in the offline state is described in detail.
[0108] 1. Trigger offline scenario.
[0109] 2. Obtain the mobile phone digital certificate based on KeyID (the binding relationship held by the Internet of Vehicles).
[0110] 3. Generate a symmetric key, and use the symmetric key to encrypt the transmission data to obtain the encrypted transmission data.
[0111] 4. Use the public key corresponding to the mobile phone digital certificate to encrypt the symmetric key and obtain the encrypted symmetric key.
[0112] 5. Upload the encrypted symmetric key, encrypted transmission data, and the summary value of the symmetric key to the Internet of Vehicles.
[0113] 6. The mobile terminal downloads the encrypted symmetric key, encrypted transmission data, and summary value of the symmetric key from the Internet of Vehicles, and uses the private key corresponding to the mobile phone digital certificate to decrypt the encrypted key. Then the summary value of the symmetric key is verified, and if the verification passes, the encrypted transmission data is decrypted using the decrypted symmetric key to obtain the decrypted transmission data.
[0114] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0115] Furthermore, the present invention also provides a vehicle. In a vehicle embodiment according to the present invention, as Figure 6 As shown, the vehicle includes a vehicle body 11, a processor 12 and a storage device 13. The storage device may be configured to store a program for executing the data transmission method of the above method embodiment, and the processor may be configured to execute the program in the storage device, which includes but is not limited to the program for executing the data transmission method of the above method embodiment. For ease of explanation, only the part related to the embodiment of the present invention is shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention.
[0116] Furthermore, the present invention also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program for executing the data transmission method of the above method embodiment, and the program can be loaded and run by the processor to implement the above data transmission method. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-temporary computer-readable storage medium.
[0117] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A data transmission method, applied to a mobile terminal, characterized in that: The method comprises: Generate a first temporary public key and a first temporary private key; Determining a first shared key based on the first temporary public key and the first temporary private key includes: Generate a first combined unique identification value based on the first temporary public key and the first preset information; Sending the first combined unique identification value to the vehicle-side, so that the vehicle-side generates a second temporary public key and a second temporary private key, generates a second combined unique identification value based on the second temporary public key and second preset information, and obtains the first temporary public key from the first combined unique identification value and generates a second shared key based on the first temporary public key and the second temporary private key; Receiving the second combined unique identification value sent by the vehicle terminal and acquiring the second temporary public key from the second combined unique identification value; Generate a first shared key based on the second temporary public key and the first temporary private key; Receiving the second shared key sent by the vehicle terminal; Determining whether the first shared key and the second shared key are the same; When the first shared key and the second shared key are the same, the mobile terminal and the vehicle terminal are controlled to perform data transmission.
2. The data transmission method according to claim 1, characterized in that: The method further comprises: The first combined unique identification value is signed by using the private key corresponding to the mobile terminal digital certificate to obtain a first signature value; and the first signature value is sent to the vehicle terminal, so that the vehicle terminal obtains the mobile terminal digital certificate, and verifies the first signature value based on the public key corresponding to the mobile terminal digital certificate; if the verification is passed, the second temporary public key and the second temporary private key are generated, the second combined unique identification value is generated based on the second temporary public key and the second preset information, and the second combined unique identification value is signed based on the private key corresponding to the vehicle terminal digital certificate to obtain a second signature value; and the vehicle terminal obtains the first temporary public key from the first combined unique identification value, and generates the second shared key based on the first temporary public key and the second temporary private key; and the second signature value, the second combined unique identification value and the second shared key are sent to the mobile terminal; Receiving the second signature value sent by the vehicle terminal based on the first signature value; The second signature value is verified using the public key corresponding to the vehicle digital certificate, and if the verification passes, the second temporary public key is obtained from the second combined unique identification value, and the first shared key is generated based on the second temporary public key and the first temporary private key.
3. The data transmission method according to claim 1 or 2, characterized in that: Determining whether the first shared key and the second shared key are the same includes: determining whether a digest value of the first shared key and a digest value of the second shared key are the same.
4. The data transmission method according to claim 1, characterized in that: In an offline state, the method further comprises: Obtaining an encrypted symmetric key, a digest value of the symmetric key, and encrypted transmission data; Decrypting the encrypted symmetric key based on the private key corresponding to the mobile terminal digital certificate; Verify whether the summary value of the decrypted symmetric key is correct; if so, use the symmetric key to decrypt the encrypted transmission data to obtain the decrypted transmission data.
5. A data transmission method, applied to a vehicle terminal, characterized in that: The method comprises: Obtaining a mobile terminal digital certificate and a first signature value and a first combined unique identification value sent by the mobile terminal, wherein the first combined unique identification value is generated based on a first temporary public key of the mobile terminal and first preset information; Verifying the first signature value based on the public key corresponding to the mobile terminal digital certificate; If the verification is successful, a second temporary public key and a second temporary private key are generated; Generate a second combined unique identification value based on the second temporary public key and the second preset information; Signing the second combined unique identification value based on the private key corresponding to the vehicle computer digital certificate to obtain a second signature value; Acquire the first temporary public key from the first combined unique identification value, and generate a second shared key based on the first temporary public key and the second temporary private key; Sending the second signature value, the second combined unique identification value, and the second shared key to the mobile terminal, so that the mobile terminal obtains the second temporary public key from the second combined unique identification value, generates a first shared key based on the second temporary public key and the first temporary private key of the mobile terminal, and determines whether the first shared key and the second shared key are the same; In response to the first shared key and the second shared key being the same, controlling the vehicle terminal and the mobile terminal to perform data transmission.
6. The data transmission method according to claim 5, characterized in that: In an offline state, the method further comprises: Get the symmetric key; Encrypting the transmission data using the symmetric key, and encrypting the symmetric key using the public key corresponding to the mobile terminal digital certificate; The encrypted symmetric key, the digest value of the symmetric key and the encrypted transmission data are output.
7. A vehicle, comprising a vehicle body, a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute the data transmission method according to claim 5 or 6.
8. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the data transmission method according to any one of claims 1 to 4 or the data transmission method according to any one of claims 5 to 6.
Citation Information
Patent Citations
Key information synchronization method, system and equipment
CN112995990A
Mutual authentication method and authentication apparatus
US20170208062A1