Disclosure of Invention
The invention provides a safe communication method of a Bluetooth digital key, aiming at improving the problems.
The invention is realized in this way, a safe communication method based on bluetooth digital key, the safe communication method is applied to the communication system, the communication system includes TSP platform, mobile terminal and bluetooth module, TSP platform, mobile terminal and bluetooth module three communication connection, the safe communication method is as follows:
s11, the mobile terminal is automatically connected with the Bluetooth module within a set distance, the hash factor DF and the virtual key 1 issued by the TSP are sent to the Bluetooth module, so that the Bluetooth module calculates the virtual key 2 based on the received hash factor DF and the master key, and if the virtual key 1 is the same as the virtual key 2, the communication connection between the T-box and the corresponding mobile terminal is established.
Further, after step S11, the method includes:
s12, the mobile terminal randomly generates 1 secret key factor 2, simultaneously receives the secret key factor 1 sent by the Bluetooth module, and respectively generates a session key 1 and a session key 2 based on the secret key factor 1 and the secret key factor 2;
s13, the mobile terminal encrypts the information sent to the Bluetooth module based on the session key 2 and decrypts the encrypted information sent by the Bluetooth module based on the session key 1.
Further, after the step S11 and before the step S12, the method further includes:
s14, the mobile terminal encrypts the mobile phone characteristic value based on the virtual key 1 and sends the encrypted mobile phone characteristic value to the Bluetooth module, and meanwhile, the mobile terminal sends the mobile phone characteristic value to the Bluetooth module, so that the Bluetooth module decrypts the encrypted mobile phone characteristic value sent by the mobile terminal based on the virtual key 2 and then verifies the decrypted mobile phone characteristic value based on the received mobile phone characteristic value;
s15, the mobile terminal receives the vehicle characteristic value and the encrypted vehicle characteristic value sent by the Bluetooth module, decrypts the encrypted vehicle characteristic value based on the virtual key 1, and verifies the decrypted vehicle characteristic value based on the received vehicle characteristic value;
after both sides are authenticated, step S12 is executed.
On the other hand, the invention also provides a safe communication method based on the Bluetooth digital key, which is applied to a communication system, wherein the communication system comprises a TSP platform, a mobile terminal and a Bluetooth module, the TSP platform, the mobile terminal and the Bluetooth module are in communication connection, and the safe communication method comprises the following steps:
s21, receiving the hash factor DF and the virtual key 1 sent by the mobile terminal, and calculating the virtual key 2 based on the received hash factor DF and the stored master key;
and S22, if the virtual key 1 is the same as the generated virtual key 2, establishing the communication connection between the T-box and the corresponding mobile terminal.
Further, after step S22, the method further includes:
s23, the Bluetooth module randomly generates 1 key factor 1 and receives a key factor 2 sent by the mobile terminal;
s24, the bluetooth module generates a session key 1 and a session key 2 based on the key factor 1 and the key factor 2, respectively, encrypts the information sent to the mobile terminal based on the session key 1, and decrypts the encrypted information sent by the mobile terminal based on the session key 2.
Further, after the step S22 and before the step S23, the method further includes:
s25, the Bluetooth module encrypts the vehicle characteristic value based on the virtual key 2 and sends the vehicle characteristic value to the mobile terminal, and meanwhile, the Bluetooth module sends the vehicle characteristic value to the mobile terminal, so that the mobile terminal decrypts the encrypted vehicle characteristic value sent by the Bluetooth module based on the virtual key 1 and then verifies the decrypted vehicle characteristic value based on the received vehicle characteristic value;
s26, the Bluetooth module receives the mobile phone characteristic value and the encrypted mobile phone characteristic value sent by the mobile terminal, decrypts the encrypted mobile phone characteristic value based on the virtual key 2, and verifies the decrypted mobile phone characteristic value based on the received mobile phone characteristic value;
after both sides are authenticated, step S23 is executed.
On the other hand, the invention also provides a safe communication method based on the Bluetooth digital key, which is applied to a communication system, wherein the communication system comprises a TSP platform, a mobile terminal and a Bluetooth module, the TSP platform, the mobile terminal and the Bluetooth module are in communication connection, and the safe communication method comprises the following steps:
and S31, the TSP platform generates a virtual key 1 based on the master key and the hash factor DF, and issues the virtual key 1 and the hash factor DF to the mobile terminal.
In another aspect, the present invention further provides a communication system, which includes a TSP platform, a mobile terminal and a bluetooth module, wherein the mobile terminal is configured to perform the secure communication method based on a bluetooth digital key as recited in any one of claims 1 to 3, the bluetooth module is configured to perform the secure communication method based on a bluetooth digital key as recited in any one of claims 4 to 6, and the TSP platform is configured to perform the secure communication method based on a bluetooth digital key as recited in claim 7.
The safe communication method of the Bluetooth digital key provided by the invention has the following beneficial technical effects:
1) in addition to the authentication of the two parties by the virtual key generated based on the hash factor DF, the authentication is further performed in a mode of virtual key + characteristic value, so that the safety of the two communication parties is greatly improved, and in addition, the two communication parties encrypt the sent data based on the session keys generated by the two communication parties respectively so as to improve the safety of data transmission;
2) the system adopts a JUST WORK mode for connection, does not need to input pairing codes, is not connected by a user in a sensing way, supports offline use (an underground garage can be unlocked or locked without a network), and has better mobile phone compatibility.
Detailed Description
The following description of preferred embodiments of the invention will be made in further detail with reference to the accompanying drawings.
The safe communication method based on the Bluetooth digital key provided by the embodiment of the invention comprises the following steps:
s1, the TSP platform generates a virtual key 1 based on the master key and the hash factor DF, and issues the virtual key 1 and the hash factor DF to the mobile terminal;
the master key can be generated by a TSP platform or a Bluetooth module, if the TSP platform is generated, the master key is issued to the Bluetooth module after being generated, if the Bluetooth module is generated, the master key is uploaded to the TSP platform after being generated, and the hash factor is a group of character sequences randomly generated by the TSP platform. The mobile terminal comprises mobile communication terminal equipment such as a mobile phone, a tablet, an IPAD and the like.
S2, automatically connecting the mobile terminal with a Bluetooth module within a set distance, sending the hash factor DF and the virtual key 1 to the Bluetooth module by the mobile terminal, and calculating the virtual key 2 by the Bluetooth module based on the received hash factor DF and the master key;
and S3, if the virtual key 1 is the same as the virtual key 2 generated by the Bluetooth module, establishing the communication connection between the T-box and the corresponding mobile terminal.
In order to ensure the security of the data communication between the mobile terminal and the T-box, the invention encrypts the sent data based on the session keys generated by the mobile terminal and the T-box, so as to improve the security of data transmission, and therefore, the secure communication method based on the bluetooth digital key provided by the second embodiment of the invention specifically includes the following steps:
s1, the TSP platform generates a virtual key 1 based on the master key and the randomly generated hash factor, and issues the virtual key 1 and the hash factor DF to the mobile terminal;
the master key can be generated by a TSP platform or a Bluetooth module, if the TSP platform is generated, the master key is issued to the Bluetooth module after being generated, if the Bluetooth module is generated, the master key is uploaded to the TSP platform after being generated, and the hash factor is a group of character sequences randomly generated by the TSP platform. The mobile terminal comprises mobile communication terminal equipment such as a mobile phone, a tablet, an IPAD and the like.
S2, automatically establishing connection between the mobile terminal and the Bluetooth module within a set distance, simultaneously sending the hash factor DF and the virtual key 1 to the Bluetooth module by the mobile terminal, and calculating the virtual key 2 by the Bluetooth module based on the received hash factor DF and the master key;
and S3, if the virtual key 1 is the same as the virtual key 2, the Bluetooth module and the mobile terminal randomly generate 1 key factor and send the generated key factor to the other party, the two parties respectively generate a session key 1 and a session key 2 based on the received key factor 1 and the key factor 2 generated by the two parties, information sent to the other party is encrypted based on the session key 1, and the received encrypted data is decrypted based on the session key 2.
In order to ensure that both communication parties are legal parties, the secure communication method based on the bluetooth digital key provided by the third embodiment of the present invention performs authentication based on the virtual key generated by the hash factor DF, and further performs authentication based on a mode of the virtual key plus a characteristic value, thereby greatly improving the security of both communication parties
S1, the TSP platform generates a virtual key 1 based on the master key and the randomly generated hash factor, and issues the virtual key 1 and the hash factor DF to the mobile terminal;
the master key can be generated by a TSP platform or a Bluetooth module, if the TSP platform is generated, the master key is issued to the Bluetooth module after being generated, if the Bluetooth module is generated, the master key is uploaded to the TSP platform after being generated, and the hash factor is a group of character sequences randomly generated by the TSP platform. The mobile terminal is integrated in a communication mobile terminal and comprises mobile communication terminal equipment such as a mobile phone, a tablet, an IPAD and the like.
S2, automatically establishing connection between the mobile terminal and the Bluetooth module within a set distance, sending the hash factor DF and the virtual key 1 to the Bluetooth module by the mobile terminal, and calculating the virtual key 2 by the Bluetooth module based on the received hash factor DF and the master key;
the mobile terminal is connected with the Bluetooth module, and then the mobile terminal sends the mobile phone characteristic value to the Bluetooth module, and the Bluetooth module sends the vehicle characteristic value to the mobile terminal to complete the characteristic value exchange of the two parties.
S3, if the virtual key 1 stored in the mobile terminal is the same as the virtual key 2 generated by the Bluetooth module, the two parties exchange characteristic values, the mobile terminal encrypts the mobile phone characteristic value based on the virtual key 1 and sends the encrypted mobile phone characteristic value to the Bluetooth module, and the Bluetooth module decrypts the encrypted mobile phone characteristic value sent by the mobile terminal based on the virtual key 2 and verifies the decrypted mobile phone characteristic value;
and only when the Bluetooth module is matched with the mobile terminal, the Bluetooth module can decrypt the encrypted mobile phone characteristic value sent by the mobile terminal, and the decrypted mobile phone characteristic value is the same as the mobile phone characteristic value stored by the Bluetooth module, so that the verification of the mobile phone characteristic value is completed, wherein the verification process of the vehicle characteristic value is the same as the verification process of the mobile phone characteristic value.
S4, the Bluetooth module encrypts the vehicle characteristic value based on the virtual key 2 and sends the vehicle characteristic value to the mobile terminal, and the mobile terminal decrypts the encrypted vehicle characteristic value sent by the Bluetooth module based on the virtual key 1 and verifies the decrypted vehicle characteristic value;
and S5, after the two parties pass the verification, establishing the communication connection between the T-box and the corresponding mobile terminal.
In order to ensure that both communication parties are legal parties, the present invention performs authentication based on a virtual key generated by a hash factor DF, and further performs authentication based on a virtual key + eigenvalue, so as to greatly improve the security of both communication parties, and in order to ensure the security of data communication between a mobile terminal and a T-box, the present invention encrypts transmitted data based on respective generated session keys, so as to improve the security of data transmission, therefore, fig. 1 is a flowchart of a secure communication method based on a bluetooth digital key according to a fourth embodiment of the present invention, which specifically includes the following steps:
s1, the TSP platform generates a virtual key 1 based on the master key and the randomly generated hash factor, and issues the virtual key 1 and the hash factor DF to the mobile terminal;
the master key can be generated by a TSP platform or a Bluetooth module, if the TSP platform is generated, the master key is issued to the Bluetooth module after being generated, if the Bluetooth module is generated, the master key is uploaded to the TSP platform after being generated, and the hash factor is a group of character sequences randomly generated by the TSP platform. The mobile terminal is integrated in a communication mobile terminal and comprises mobile communication terminal equipment such as a mobile phone, a tablet, an IPAD and the like.
S2, automatically establishing connection between the mobile terminal and the Bluetooth module within a set distance, sending the hash factor DF and the virtual key 1 to the Bluetooth module by the mobile terminal, and calculating the virtual key 2 by the Bluetooth module based on the received hash factor DF and the master key;
the mobile terminal is connected with the Bluetooth module, and then the mobile terminal sends the mobile phone characteristic value to the Bluetooth module, and the Bluetooth module sends the vehicle characteristic value to the mobile terminal to complete the characteristic value exchange of the two parties.
S3, if the virtual key 1 stored in the mobile terminal is the same as the virtual key 2 generated by the Bluetooth module, the two parties exchange characteristic values, the mobile terminal encrypts the mobile phone characteristic value based on the virtual key 1 and sends the encrypted mobile phone characteristic value to the Bluetooth module, and the Bluetooth module decrypts the encrypted mobile phone characteristic value sent by the mobile terminal based on the virtual key 2 and verifies the decrypted mobile phone characteristic value;
and only when the Bluetooth module is matched with the mobile terminal, the Bluetooth module can decrypt the encrypted mobile phone characteristic value sent by the mobile terminal, and the decrypted mobile phone characteristic value is the same as the mobile phone characteristic value stored by the Bluetooth module, so that the verification of the mobile phone characteristic value is completed, wherein the verification process of the vehicle characteristic value is the same as the verification process of the mobile phone characteristic value.
S4, the Bluetooth module encrypts the vehicle characteristic value based on the virtual key 2 and sends the vehicle characteristic value to the mobile terminal, and the mobile terminal decrypts the encrypted characteristic value sent by the Bluetooth module based on the virtual key 1 and verifies the decrypted vehicle characteristic value;
and S5, after the two parties pass the verification, the Bluetooth module and the mobile terminal randomly generate 1 secret key factor and send the generated secret key factor to the other party, the two parties respectively generate a session key 1 and a session key 2 based on the received secret key factor 1 and the self generated secret key factor 2, information sent to the other party is encrypted based on the session key 1, and the received encrypted data is decrypted based on the session key 2.
The secure communication method based on the bluetooth digital key provided by the fifth embodiment of the present invention further includes, on the basis of the first embodiment, the second embodiment, the third embodiment, and the fourth embodiment:
when the vehicle leaves a factory, when the station finishes vehicle detection, the TSP platform issues a Bluetooth information query instruction and a master key query instruction, and the Bluetooth module returns Bluetooth information and a master key through the Tbox; the TSP platform generates a virtual key 1 based on the master key and a randomly generated hash factor DF.
In the embodiment of the invention, when the mobile terminal sends the registration information to the TSP platform, the registration information carries the vehicle characteristic value, the TSP platform issues the corresponding virtual key 1 to the mobile terminal, and the mobile terminal stores the received virtual key 1.
Accordingly, the present invention provides a computer readable storage medium having stored therein at least one instruction, at least one program, code set or instruction set which, when loaded and executed by a processor, implements the aforementioned steps of the bluetooth digital key based secure communication method.
Correspondingly, the invention also discloses an electronic device based on the safe communication method of the Bluetooth digital key, which comprises the following steps:
a memory for storing a computer program;
a processor for implementing the steps of a secure communication method based on bluetooth digital keys as disclosed in the foregoing when executing the computer program.
In another aspect, an embodiment of the present invention provides a communication system, where the system further includes:
TSP platform, mobile terminal and bluetooth module, TSP platform and mobile terminal remote communication are connected, and TSP platform passes through T-box and bluetooth module remote communication is connected, and TSP platform, mobile terminal and bluetooth module carry out the above-mentioned method based on bluetooth digital key respectively.
The embodiments in the present description are described in a progressive manner, and similar parts may participate in each other, and each embodiment focuses on differences from other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and relevant points may be referred to as part of the description of the method embodiment.
The embodiments of the present description are not limited to what must be in compliance with industry communication standards, standard computer data processing and data storage rules, or as described in one or more embodiments of the present description. The same, equivalent or similar, or other predictable implementations of the embodiments described above may be achieved by certain industry standards or by slightly modified implementations based on implementations described using custom approaches or embodiments. The embodiments using the modified or modified data acquisition, storage, judgment, processing method and the like can still fall within the scope of the alternative embodiments of the embodiments in the present specification. In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.