Method for secure communication and control between bluetooth device, mobile phone and server

Through the combination of asymmetric keys and symmetric keys, the problem of identity authentication difficulties and information security risks between mobile phones, Bluetooth devices and servers is solved, and secure communication and control of key replacement for each login are achieved, enhancing the three security in between.

WO2024221809A1PCT designated stage expired Publication Date: 2024-10-31HANGZHOU SYNOCHIP DATA SECURITY TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/128529
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-25
Filing Date
2023-10-31
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Identity authentication between mobile phones and Bluetooth devices and servers is difficult. Communication and control information are easily intercepted and tampered with by malicious actors, which poses a major security risk. Furthermore, Bluetooth devices cannot transmit status information to the back-end server due to cost and performance limitations.

Method used

Using a combination of asymmetric keys and symmetric keys, the identity of the server is authenticated through the mobile phone. After registration and login, the mobile phone establishes a connection with the Bluetooth device and uses the key generated by the server for verification, encryption and decryption, ensuring that every Change keys during login to enhance communication security.

Benefits of technology

It solves the identity authentication problem between mobile phones, Bluetooth devices and servers, prevents malicious impersonation, and enhances the security of communication between the three. The key is changed every time you log in to ensure the integrity and security of information transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023128529_31102024_PF_FP_ABST
    Figure CN2023128529_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A method for secure communication and control between a Bluetooth device, a mobile phone and a server. The method comprises the following specific steps: S1, a mobile phone performing identity authentication on a server, and entering step S2 after identity authentication is successful; S2, the mobile phone registering to the server, and storing a server public key after registration is successful; S3, the mobile phone logging in to the server, the server verifying the mobile phone by means of a server private key to confirm whether the mobile phone is a legitimate operator, and if so, entering step S4; S4, the mobile phone establishing a connection with a Bluetooth device, the Bluetooth device performing authentication to the server by means of the mobile phone, and after authentication is successful, entering step S5; S5, the mobile phone issuing a control command to the Bluetooth device, the Bluetooth device verifying the control command of the mobile phone, and after verification is successful, executing the control command; and S6, after the Bluetooth device has executed the command, the server verifying the legitimacy of the Bluetooth device. The present invention solves the problem of identity authentication between a mobile phone, a Bluetooth device and a server, thereby preventing malicious impersonation by other devices.
Need to check novelty before this filing date? Find Prior Art

Description

A method for secure communication and control between a Bluetooth device, a mobile phone and a server Technical Field

[0001] The present invention belongs to the technical field of security encryption and data communication, and relates to a method for secure communication and control between a Bluetooth device, a mobile phone and a server. Background Art

[0002] Using mobile phones to control smart homes and IoT devices via Bluetooth is becoming a growing trend, but this approach presents security issues and drawbacks. Directly controlling Bluetooth devices via mobile phones presents difficulties with mutual authentication, making communication and control information vulnerable to malicious interception and tampering, posing significant security risks. Furthermore, some Bluetooth devices, due to cost and performance considerations, do not integrate Wife or 5G modules, preventing them from transmitting certain status information to backend servers.

[0003] Currently, face recognition unlocking, fingerprint recognition unlocking, finger vein recognition and iris recognition unlocking all have some shortcomings and limitations.

[0004] 1. The fingerprint recognition module requires direct human contact. Exposing the device to the outside world is not only a health concern, but also a risk of malicious film application.

[0005] 2. Face recognition modules require the removal of a mask on most devices. Algorithms that don't require mask removal have low pass rates and false positive rates. Furthermore, face recognition has higher false positive and false negative rates than fingerprint recognition.

[0006] 3. Finger vein recognition and iris recognition technologies are not yet mature enough and cannot be used on a large scale, especially in places with large traffic volumes;

[0007] Therefore, controlling smart locks through a mobile phone is a good supplementary method. An existing method for mobile phone Bluetooth control is as follows: 1. The mobile phone establishes a connection with the Bluetooth device, preparing to control the Bluetooth device. 2. The mobile phone sends control commands and information in plain text to the Bluetooth device. 3. The Bluetooth device responds to the control commands. 4. The control results, device information, and its own status are sent back to the mobile phone in plain text. 5. The mobile phone uploads the device status to the backend server. In step 1, the mobile phone and the Bluetooth device do not authenticate each other, allowing anyone within Bluetooth communication range to control the Bluetooth device. In step 2, the control commands and communication information between the mobile phone and the Bluetooth device are vulnerable to malicious interception and tampering. In steps 4 and 5, the process of the Bluetooth device uploading its status information to the server is also vulnerable to malicious interception and tampering. Directly controlling a Bluetooth device through a mobile phone presents difficulties in mutual authentication, and communication and control between the two devices pose significant security risks. Furthermore, due to cost and performance considerations, some Bluetooth devices do not integrate modules such as Wife or 5G, making it impossible for the Bluetooth device to transmit certain status information to the backend server.

[0008] Summary of the Invention

[0009] The present invention provides a method for secure communication and control between a mobile phone, a Bluetooth device and a server, which solves the problem of identity authentication among a mobile phone, a Bluetooth device and a server and prevents malicious impersonation by other devices; a key is replaced during each login, thereby enhancing the security of communication among the three.

[0010] The technical solution adopted in the present invention is:

[0011] A method for secure communication and control between a Bluetooth device, a mobile phone, and a server, the specific steps of which are as follows:

[0012] S1, the mobile phone authenticates the server and proceeds to step S2 after successful authentication;

[0013] S2, the mobile phone registers with the server and saves the server public key after successful registration;

[0014] S3, the mobile phone logs in to the server, and the server verifies the mobile phone using the server private key to confirm whether the mobile phone is a legitimate operator. If it is legitimate, it proceeds to step S4;

[0015] S4, the mobile phone establishes a connection with the Bluetooth device, and the Bluetooth device authenticates the server through the mobile phone. After successful authentication, the process proceeds to step S5;

[0016] S5: The mobile phone sends a control command to the Bluetooth device, and the Bluetooth device verifies the control command from the mobile phone and executes the control command after successful verification.

[0017] S6: After the Bluetooth device executes the command, the server verifies the legitimacy of the Bluetooth device.

[0018] Furthermore, before step S1, step S0 is also included, the server generates an asymmetric key (K b+ ,K b- ), and use your own public key K b+ Register your own digital certificate with CA; the Bluetooth device stores the Bluetooth device identifier S and the Bluetooth device private key K c- And the server public key K b+ ; The server stores the Bluetooth device identifier S and the Bluetooth device public key K C+ , and the server private key K b- ; The mobile terminal obtains the Bluetooth device identifier S.

[0019] Furthermore, in step S1, the specific steps of the mobile phone end performing identity authentication on the server are as follows:

[0020] S11, the mobile phone obtains the server's digital certificate from the CA and obtains the server's public key K from the certificate b+ ;

[0021] S12, the mobile phone obtains the server public key K b+ Then generate a random number N A , and send it to the server;

[0022] S13, the server generates random authentication information M B , and send the data to the mobile phone, and then M B and N A Spliced ​​into data M B ||N A , for data M B ||N A Perform digital abstract to obtain H(M B ||N A );

[0023] S14, server private key K b- Sign and get f(K b- ,H(M B ||N A )) and send it to the mobile phone;

[0024] S15, the mobile phone uses the server public key K b+ Decryption yields H(M B ||N A ), then for data M B ||N A Take the digital summary and compare it with H(M B ||N A) for comparison. If the comparison is consistent, the mobile phone successfully authenticates the server.

[0025] Furthermore, the specific steps for the mobile phone to register with the server in step S2 are as follows:

[0026] S21, the mobile phone sends a registration request to the server. After receiving the response, the mobile phone generates a login password R, then splices the Bluetooth device identifier S, the login password R and the mobile phone identifier D into data S||R||D, and uses the server public key K to register the data S||R||D. b+ Perform encryption operation to obtain f(K b+ , S||R||D), and encrypt the digital summary H(S||R||D) of the data S||R||D to obtain f(K b+ ,H(S||R||D)), then f(K b+ ,S||R||D) and f(K b+ ,H(S||R||D)) is sent to the server together;

[0027] S22, after receiving the data, the server uses the server private key K b- Decrypt to obtain data S||R||D and H(S||R||D), then perform a digital digest operation on data S||R||D and compare it with the received digital digest H(S||R||D). If the data are consistent, verify the legitimacy of S. If S is legitimate, the server stores data R and D and associates them with data S, agreeing to register the mobile phone as a legitimate operator of the Bluetooth device.

[0028] S23, after receiving the response from the server, the mobile phone knows that the registration is successful.

[0029] Furthermore, the specific steps for the mobile phone to log in to the server in step S3 are as follows:

[0030] S31, the mobile phone sends the login request and the mobile phone number to the server, and the server sends a text message verification code T after receiving it;

[0031] S32, after receiving the verification code T, the mobile phone generates the symmetric key Ka used for communication this time, and then splices the verification code T, login password R, mobile phone ID D, and symmetric key Ka into data T||R||D||Ka, and then uses the server public key K b+ Encrypt to get f(K b+ ,T||R||D||Ka), and encrypt the digital summary H(T||R||D||Ka) of the data T||R||D||Ka to obtain f(K b+ ,H(T||R||D||Ka)), then f(K b+,T||R||D||Ka)、f(K b+ ,H(T||R||D||Ka)) is sent to the server together;

[0032] S33, the server uses the server private key K b- After decryption, the data T||R||D||K and H(T||R||D||Ka) are obtained. Then, the digital summary operation is performed on the data T||R||D||Ka and compared with the received digital summary H(T||R||D||Ka). If the data are consistent, the server will verify the legitimacy of the data T, R, D. If the verification is successful, the server confirms that the mobile phone is the legal operator of the Bluetooth device.

[0033] Furthermore, after the server verifies that the mobile phone is a legitimate operator, it uses the symmetric key Ka to encrypt and decrypt communications with the mobile phone during the same login connection.

[0034] Furthermore, in step S4, the specific steps of the Bluetooth device authenticating to the server via the mobile phone are as follows:

[0035] S41, the mobile phone sends an authentication request. After receiving the request, the Bluetooth device first identifies the Bluetooth device S and uses the server public key K b+ Encrypt to get data f(K b+ ,S) and sends it to the mobile phone. After receiving the data, the mobile phone encrypts it with the symmetric key Ka to obtain f(Ka,f(K b+ ,S)), and then sent to the backend server together with the device authentication request;

[0036] S42, the server uses the symmetric key Ka to decrypt the data f(K b+ ,S), and then use the server private key K b- Decrypt the data S, and finally the server verifies the legitimacy of the data S. If the verification is successful, the server generates a symmetric key Kt for communication between the server and the Bluetooth device during this login, as well as a symmetric key Ky for verification, and splices them together to form data Kt||Ky. Then, the Bluetooth device public key K c+ Encrypt the data Kt||Ky to get the data f(K c+ ,Kt||Ky), and use the server private key K b- Perform encryption and signature on the data Kt||Ky to obtain f(K b- ,Kt||Ky), then the data f(K b- ,Kt||Ky),f(K c+ ,Kt||Ky) is encrypted with the symmetric key Ka to obtain f(Ka,f(K b- ,Kt||Ky)),f(Ka,f(Kc+ ,Kt||Ky)), and send it to the mobile phone;

[0037] S43, the mobile phone uses the symmetric key Ka to decrypt the data f(K b -,Kt||Ky) and f(K c+ ,Kt||Ky), and send the data to the Bluetooth device;

[0038] S44, the Bluetooth device uses the Bluetooth device private key K c- For data f(K c+ ,Kt||Ky) is decrypted to get Kt||Ky, using the server public key K b+ For data f(K b -,Kt||Ky) decryption to obtain Kt||Ky, and compare the two decrypted data. If the comparison is consistent, the authentication is successful.

[0039] Furthermore, after the Bluetooth device and the server are successfully authenticated, the Bluetooth device saves the symmetric key Kt used for communication and the symmetric key Ky used for verification as symmetric keys for communication and verification between the Bluetooth device and the server during the same login period.

[0040] Furthermore, the specific steps of step S5 are as follows:

[0041] S51: The mobile phone sends a control command to the Bluetooth device. After receiving the control command, the Bluetooth device generates a random number T, encrypts T using the symmetric key Kt, and then sends the encrypted data f(Kt, T) to the mobile phone. After receiving the data, the mobile phone encrypts it using the symmetric key Ka to obtain f(Ka, f(Kt, T)), and then sends it to the server along with the control command.

[0042] S52: After receiving the data, the server first uses the symmetric key Ka to decrypt it to obtain data f(Kt, T), and then uses the symmetric key Kt to decrypt the data to obtain data T. After obtaining the random number T, the server first uses the symmetric key Ky to encrypt the data T to obtain data f(Ky, T); then the digital summary of the data f(Ky, T) is obtained to obtain H(f(Ky, T)), and finally the digital summary is encrypted with the symmetric key Ka to obtain f(Ka, H(f(Ky, T))) and sent to the mobile phone;

[0043] S53, the mobile phone uses the symmetric key Ka to decrypt the data H(f(Ky,T)) and sends it to the Bluetooth device. The Bluetooth device also encrypts the data T using the symmetric key Ky and obtains the digital summary H(f(Ky,T)) of the data. The generated data H(f(Ky,T)) is compared with the digital summary received from the mobile phone. If the comparison is consistent, the Bluetooth device executes the control command issued by the mobile phone.

[0044] Furthermore, in step S6, the server performs the following steps to verify the legitimacy of the Bluetooth device:

[0045] S61, the Bluetooth device encrypts its own state L and the digital summary H(L) of L using the symmetric key Kt to obtain f(Kt,L) and f(Kt,H(L)), and sends the data to the mobile phone;

[0046] S62: After receiving the data, the mobile phone uses the symmetric key Ka to encrypt it to obtain f(Ka,f(Kt,L)) and f(Ka,f(Kt,H(L))), and then sends f(Ka,f(Kt,L)) and f(Ka,f(Kt,H(L))) to the server. The server uses decryption to obtain the Bluetooth device status L and verify the legitimacy of L.

[0047] The beneficial effects of the present invention are: solving the problem of identity authentication among a mobile phone, a Bluetooth device and a server, preventing malicious impersonation by other devices; the key is replaced during each login, thereby enhancing the security of communication among the three. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG1 is a schematic diagram of the device status of the present invention.

[0049] FIG2 is a flow chart of the mobile phone end verifying the server identity of the present invention.

[0050] FIG3 is a flow chart of the mobile phone terminal registering with the server according to the present invention.

[0051] FIG4 is a flow chart of a mobile phone terminal logging into a server according to the present invention.

[0052] FIG5 is a flow chart of authentication between a Bluetooth device and a server according to the present invention.

[0053] FIG6 is a flow chart of the control operation of the mobile phone on the Bluetooth device according to the present invention. DETAILED DESCRIPTION

[0054] The present invention will be further described below with reference to specific embodiments, but the present invention is not limited to these specific embodiments. Those skilled in the art should recognize that the present invention covers all possible alternatives, improvements and equivalents within the scope of the claims.

[0055] Explanation of terms

[0056] Symmetric encryption: An encryption method that uses a single-key cryptosystem, in which the same key can be used for both encryption and decryption. This encryption method is called symmetric encryption.

[0057] Asymmetric encryption: Unlike symmetric encryption algorithms, asymmetric encryption algorithms require two keys: a public key and a private key. The public key and the private key form a pair. If the public key is used to encrypt data, only the corresponding private key can decrypt it; if the private key is used to encrypt data, only the corresponding public key can decrypt it.

[0058] Digital summary: Digital summary technology uses a one-way hash function to map plaintext input of any length into ciphertext output of a fixed length (such as 128 bits), ensuring the integrity of information and preventing it from being tampered with or partially deleted during network transmission.

[0059] Digital Signature: A digital signature (also known as a public key digital signature) is a string of numbers that can only be generated by the sender and cannot be forged by others. This string of numbers also effectively proves the authenticity of the information sent by the sender. It is similar to a physical signature written on paper, but is implemented using public key cryptography technology to authenticate digital information. A digital signature typically defines two complementary operations: one for signing and the other for verification. Digital signatures are the application of asymmetric key cryptography and digital digest technology.

[0060] CA digital certificates: A CA is a nationally recognized, authoritative, trustworthy, and impartial third-party organization responsible for issuing and managing the digital certificates required by all entities involved in online business. Digital certificates are the online identity cards of the internet. They enable secure and reliable trust relationships between users who may not have met each other. This trust is established through the PKI / CA certification center, making the establishment of a secure PKI / CA certification center crucial. A CA possesses a certificate (containing a public key) and a private key. Public online users trust the CA by verifying its signature. Anyone can obtain a CA certificate (containing its public key) and use it to verify the certificates it issues.

[0061] Bluetooth: Bluetooth technology is an open global standard for wireless data and voice communications. It is a special short-range wireless technology connection based on low-cost short-range wireless connection to establish a communication environment for fixed and mobile devices.

[0062] Function symbol: f(U,V) is to encrypt data V using key U; H(W) is to extract the digital summary operation of data W; X||Y is to concatenate data X and data Y into a new data.

[0063] 1-6 , this embodiment provides a method for secure communication and control between a Bluetooth device, a mobile phone, and a server. The specific steps are as follows:

[0064] S0, the server generates an asymmetric key (K b+ ,K b- ), and use your own public key K b+ Register your own digital certificate with CA; the Bluetooth device stores the Bluetooth device identifier S and the Bluetooth device private key K c- And the server public key K b+ ; The server stores the Bluetooth device identifier S and the Bluetooth device public key K C+ , and the server private key K b- ; The mobile terminal obtains the Bluetooth device identifier S.

[0065] Bluetooth devices and servers are typically provided by the same manufacturer, so the corresponding identifiers and keys are stored in both devices and servers at the factory. As the owner of a Bluetooth device, the mobile phone has obtained the Bluetooth device identifier S from the manufacturer. This unique identifier is unique.

[0066] S1, the mobile phone authenticates the server and proceeds to step S2 after successful authentication;

[0067] The specific steps for the mobile phone to authenticate the server are as follows:

[0068] S11, the mobile phone obtains the server's digital certificate from the CA and obtains the server's public key K from the certificate b+ ;

[0069] S12, the mobile phone obtains the server public key K b+ Then generate a random number N A , and send it to the server;

[0070] S13, the server generates random authentication information M B , and send the data to the mobile phone, and then M B and N A Spliced ​​into data M B ||N A , for data M B ||N A Perform digital abstract to obtain H(M B ||N A );

[0071] S14, server private key K b- Sign and get f(K b- ,H(M B ||N A )) and send it to the mobile phone;

[0072] S15, the mobile phone uses the server public key K b+ Decryption yields H(M B||N A ), then for data M B ||N A Take the digital summary and compare it with H(M B ||N A ) for comparison. If the comparison is consistent, the mobile phone successfully authenticates the server.

[0073] S2, the mobile phone registers with the server and saves the server public key K after successful registration b+ ;

[0074] The specific steps for the mobile phone to register with the server are as follows:

[0075] S21, the mobile phone sends a registration request to the server. After receiving the response, the mobile phone generates a login password R, then splices the Bluetooth device identifier S, the login password R and the mobile phone identifier D into data S||R||D, and uses the server public key K to register the data S||R||D. b+ Perform encryption operation to obtain f(K b+ , S||R||D), and encrypt the digital summary H(S||R||D) of the data S||R||D to obtain f(K b+ ,H(S||R||D)), then f(K b+ ,S||R||D) and f(K b+ ,H(S||R||D)) is sent to the server together;

[0076] S22, after receiving the data, the server uses the server private key K b- Decrypt to obtain data S||R||D and H(S||R||D), then perform a digital summary operation on data S||R||D and compare it with the received digital summary H(S||R||D) (to prevent data tampering). If the data are consistent, verify the legitimacy of S. If S is legitimate, the server stores data R and D and associates them with data S, agreeing to register the mobile phone as a legitimate operator of the Bluetooth device.

[0077] S23, after receiving the response from the server, the mobile phone knows that the registration is successful.

[0078] S3, the mobile phone logs in to the server, and the server passes the server private key K b- Verify the mobile phone to confirm whether it is a legitimate operator. If it is legitimate, proceed to step S4;

[0079] The specific steps for logging into the server on a mobile phone are as follows:

[0080] S31, the mobile phone sends the login request and the mobile phone number to the server, and the server sends a text message verification code T after receiving it;

[0081] S32, after receiving the verification code T, the mobile phone generates the symmetric key Ka used for communication this time, and then splices the verification code T, login password R, mobile phone ID D, and symmetric key Ka into data T||R||D||Ka, and then uses the server public key K b+ Encrypt to get f(K b+ ,T||R||D||Ka), and encrypt the digital summary H(T||R||D||Ka) of the data T||R||D||Ka to obtain f(K b+ ,H(T||R||D||Ka)), then f(K b+ ,T||R||D||Ka)、f(K b+ ,H(T||R||D||Ka)) is sent to the server together; the mobile phone identifier D is unique.

[0082] S33, the server uses the server private key K b- After decryption, the data T||R||D||K and H(T||R||D||Ka) are obtained. Then, the digital summary operation is performed on the data T||R||D||Ka and compared with the received digital summary H(T||R||D||Ka) (to prevent data tampering). If the data are consistent, the server will verify the legitimacy of the data T, R, D. If the verification is successful, the server confirms that the mobile phone is the legal operator of the Bluetooth device.

[0083] After the server verifies that the mobile phone is a legitimate operator, it uses the symmetric key Ka to encrypt and decrypt communications with the mobile phone during the same login connection.

[0084] S4, the mobile phone establishes a connection with the Bluetooth device, and the Bluetooth device authenticates the server through the mobile phone. After successful authentication, the process proceeds to step S5;

[0085] The specific steps for the Bluetooth device to authenticate to the server through the mobile phone are as follows:

[0086] S41, the mobile phone sends an authentication request. After receiving the request, the Bluetooth device first identifies the Bluetooth device S and uses the server public key K b+ Encrypt to get data f(K b+ ,S) and sends it to the mobile phone. After receiving the data, the mobile phone encrypts it with the symmetric key Ka to obtain f(Ka,f(K b+ ,S)), and then sent to the backend server together with the device authentication request;

[0087] S42, the server uses the symmetric key Ka to decrypt the data f(K b+ ,S), and then use the server private key K b-Decrypt the data S, and finally the server verifies the legitimacy of the data S. If the verification is successful, the server generates a symmetric key Kt for communication between the server and the Bluetooth device during this login, as well as a symmetric key Ky for verification, and splices them together to form data Kt||Ky. Then, the Bluetooth device public key K c+ Encrypt the data Kt||Ky to get the data f(K c+ ,Kt||Ky), and use the server private key K b- Perform encryption and signature on the data Kt||Ky to obtain f(K b- ,Kt||Ky), then the data f(K b- ,Kt||Ky),f(K c+ ,Kt||Ky) is encrypted with the symmetric key Ka to obtain f(Ka,f(K b- ,Kt||Ky)),f(Ka,f(K c+ ,Kt||Ky)), and send it to the mobile phone;

[0088] S43, the mobile phone uses the symmetric key Ka to decrypt the data f(K b -,Kt||Ky) and f(K c+ ,Kt||Ky), and send the data to the Bluetooth device;

[0089] S44, the Bluetooth device uses the Bluetooth device private key K c- For data f(K c+ ,Kt||Ky) is decrypted to get Kt||Ky, using the server public key K b+ For data f(K b -,Kt||Ky) decryption to obtain Kt||Ky, and compare the two decrypted data. If the comparison is consistent, the authentication is successful.

[0090] After the Bluetooth device and the server are successfully authenticated, the Bluetooth device saves the symmetric key Kt used for communication and the symmetric key Ky used for verification as symmetric keys for communication and verification between the Bluetooth device and the server during the same login period.

[0091] S5: The mobile phone sends a control command to the Bluetooth device, and the Bluetooth device verifies the control command from the mobile phone and executes the control command after successful verification.

[0092] The specific steps are as follows:

[0093] S51: The mobile phone sends a control command to the Bluetooth device. After receiving the control command, the Bluetooth device generates a random number T, encrypts T using the symmetric key Kt, and then sends the encrypted data f(Kt, T) to the mobile phone. After receiving the data, the mobile phone encrypts it using the symmetric key Ka to obtain f(Ka, f(Kt, T)), and then sends it to the server along with the control command.

[0094] S52: After receiving the data, the server first uses the symmetric key Ka to decrypt it to obtain data f(Kt, T), and then uses the symmetric key Kt to decrypt the data to obtain data T. After obtaining the random number T, the server first uses the symmetric key Ky to encrypt the data T to obtain data f(Ky, T); then the digital summary of the data f(Ky, T) is obtained to obtain H(f(Ky, T)), and finally the digital summary is encrypted with the symmetric key Ka to obtain f(Ka, H(f(Ky, T))) and sent to the mobile phone;

[0095] S53, the mobile phone uses the symmetric key Ka to decrypt the data H(f(Ky,T)) and sends it to the Bluetooth device. The Bluetooth device also encrypts the data T using the symmetric key Ky and obtains the digital summary H(f(Ky,T)) of the data. The generated data H(f(Ky,T)) is compared with the digital summary received from the mobile phone. If the comparison is consistent, the Bluetooth device executes the control command issued by the mobile phone.

[0096] S6: After the Bluetooth device executes the command, the server verifies the legitimacy of the Bluetooth device.

[0097] The specific steps for the server to verify the legitimacy of the Bluetooth device are as follows:

[0098] S61, the Bluetooth device encrypts its own state L and the digital summary H(L) of L using the symmetric key Kt to obtain f(Kt,L) and f(Kt,H(L)), and sends the data to the mobile phone;

[0099] S62: After receiving the data, the mobile phone uses the symmetric key Ka to encrypt it to obtain f(Ka,f(Kt,L)) and f(Ka,f(Kt,H(L))), and then sends f(Ka,f(Kt,L)) and f(Ka,f(Kt,H(L))) to the server. The server uses decryption to obtain the Bluetooth device status L and verify the legitimacy of L (whether it has been tampered with).

[0100] The present invention solves the problem of identity authentication among a mobile phone, a Bluetooth device and a server, thereby preventing other devices from maliciously impersonating each other; the key is replaced during each login, thereby enhancing the security of communication among the three.

Claims

1. A method for secure communication and control between a Bluetooth device, a mobile phone and a server, wherein the specific steps are as follows: S1, the mobile phone authenticates the server, and after successful authentication, it proceeds to step S2; S2, the mobile phone registers with the server and saves the server public key after successful registration; S3, the mobile phone logs in to the server, and the server verifies the mobile phone through the server private key to confirm whether the mobile phone is a legitimate operator. If it is legitimate, it proceeds to step S4; S4, the mobile phone establishes a connection with the Bluetooth device, and the Bluetooth device authenticates the server through the mobile phone. After the authentication is successful, it proceeds to step S5; S5, the mobile phone sends a control command to the Bluetooth device, and the Bluetooth device verifies the control command of the mobile phone, and executes the control command after successful verification; S6, after the Bluetooth device executes the command, the server verifies the legitimacy of the Bluetooth device.

2. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 1, characterized in that: Step S1 also includes step S0, where the server generates an asymmetric key (K b+ ,K b- ), and use your own public key K b+ Register your own digital certificate with CA; the Bluetooth device stores the Bluetooth device identifier S and the Bluetooth device private key K c- And the server public key K b+ ; The server stores the Bluetooth device identifier S and the Bluetooth device public key K C+ , and the server private key K b- ; The mobile terminal obtains the Bluetooth device identifier S.

3. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 2, characterized in that: Step S1: The specific steps for the mobile phone to authenticate the server are as follows: S11, the mobile terminal obtains the server's digital certificate from the CA and obtains the server's public key K from the certificate b+ ; S12, the mobile phone obtains the server public key K b+ Then generate a random number N A , and send it to the server; S13, the server generates random authentication information M B , and send the data to the mobile phone, and then M B and N A Splice into data M B ||N A , for data M B ||N A Perform digital summary to obtain H(M B ||N A ); S14, server private key K b- Sign and get f(K b- ,H(M B ||N A )) and send it to the mobile phone; S15, the mobile phone uses the server public key K b+ Decryption gives H(M B ||N A ), and then for data M B ||N A Take the digital summary and compare it with H(M B ||N A ) for comparison. If the comparison is consistent, the mobile phone successfully authenticates the server.

4. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 3, characterized in that: The specific steps of registering the mobile phone with the server in step S2 are as follows: S21, the mobile phone sends a registration request to the server. After receiving the response, the mobile phone generates a login password R, then concatenates the Bluetooth device identifier S, the login password R and the mobile phone identifier D into data S||R||D, and uses the server public key K to register the data S||R||D. b+ Perform encryption operation to obtain f(K b+ ,S||R||D), and encrypt the digital summary H(S||R||D) of the data S||R||D to obtain f(K b+ ,H(S||R||D)), then f(K b+ ,S||R||D) and f(K b+ ,H(S||R||D)) is sent to the server together; S22, after receiving the data, the server uses the server private key K b- Decrypt to obtain data S||R||D and H(S||R||D), then extract the digital summary of data S||R||D and compare it with the received digital summary H(S||R||D). If the data are consistent, verify the legitimacy of S. If S is legitimate, the server stores data R and D and associates them with data S, agreeing that the mobile phone is registered as a legitimate operator of the Bluetooth device. S23, after receiving the response from the server, the mobile phone knows that the registration is successful.

5. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 4, characterized in that: The specific steps of the mobile phone logging into the server in step S3 are as follows: S31, the mobile phone sends the login request and the mobile phone number of the mobile phone to the server, and the server sends a text message verification code T after receiving it; S32, after receiving the verification code T, the mobile phone generates the symmetric key Ka used for communication this time, and then splices the verification code T, login password R, mobile phone identification D, and symmetric key Ka into data T||R||D||Ka, and then uses the server public key K b+ Encrypt to get f(K b+ ,T||R||D||Ka), and encrypt the digital summary H(T||R||D||Ka) of the data T||R||D||Ka to obtain f(K b+ ,H(T||R||D||Ka)), then f(K b+ ,T||R||D||Ka)、f(K b+ ,H(T||R||D||Ka)) is sent to the server together; S33, the server uses the server private key K b- After decryption, the data T||R||D||K and H(T||R||D||Ka) are obtained, and then the digital summary operation is performed on the data T||R||D||Ka, and compared with the received digital summary H(T||R||D||Ka). If the data are consistent, the server will verify the legitimacy of the data T, R, D. If the verification is successful, the server confirms that the mobile phone is the legitimate operator of the Bluetooth device.

6. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 5, characterized in that: After the server verifies that the mobile phone is a legitimate operator, it uses the symmetric key Ka to encrypt and decrypt communications with the mobile phone during the same login connection.

7. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 6, characterized in that: The specific steps of the Bluetooth device authenticating to the server via the mobile phone in step S4 are as follows: S41, the mobile phone sends an authentication request. After receiving the request, the Bluetooth device first identifies the Bluetooth device S and uses the server public key K b+ Encrypted data f(K b+ ,S) and sends it to the mobile phone. After receiving the data, the mobile phone uses the symmetric key Ka to encrypt it to obtain f(Ka,f(K b+ ,S)), and then sent it to the backend server together with the device authentication request; S42, the server uses the symmetric key Ka to decrypt and obtain the data f(K b+ ,S), and then use the server private key K b- Decrypt the data S, and finally the server verifies the legitimacy of the data S. If the verification is successful, the server generates a symmetric key Kt for communication between the server and the Bluetooth device during this login, as well as a symmetric key Ky for verification, and concatenates them to form data Kt||Ky. Then, the Bluetooth device public key K c+ Encrypt the data Kt||Ky to obtain the data f(K c+ ,Kt||Ky), and use the server private key K b- Encrypt and sign the data Kt||Ky to get f(K b- ,Kt||Ky), and then the data f(K b- ,Kt||Ky), f(K c+ ,Kt||Ky) is encrypted with the symmetric key Ka to obtain f(Ka,f(K b- ,Kt||Ky)),f(Ka,f(K c+ ,Kt||Ky)), and send it to the mobile phone; S43, the mobile phone uses the symmetric key Ka to decrypt and obtain the data f(K b -,Kt||Ky) and f(K c+ ,Kt||Ky), and send the data to the Bluetooth device; S44, the Bluetooth device uses the Bluetooth device private key K c- For data f(K c+ ,Kt||Ky) to decrypt and get Kt||Ky, using the server public key K b+ For data f(K b -,Kt||Ky) is decrypted to obtain Kt||Ky, and the two decrypted data are compared. If the comparison is consistent, the authentication is successful.

8. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 7, characterized in that: After the Bluetooth device and the server are successfully authenticated, the Bluetooth device saves the symmetric key Kt used for communication and the symmetric key Ky used for verification as the symmetric keys for communication and verification between the Bluetooth device and the server during the same login period.

9. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 8, characterized in that: The specific steps of step S5 are as follows: S51, the mobile phone sends a control command to the Bluetooth device. After receiving the control command, the Bluetooth device generates a random number T, and then encrypts T using the symmetric key Kt. Then, the encrypted data f(Kt, T) is sent to the mobile phone. After receiving the data, the mobile phone encrypts it using the symmetric key Ka to obtain f(Ka, f(Kt, T)), and then sends it together with the control command to the server; S52, after receiving the data, the server first uses the symmetric key Ka to decrypt it to obtain the data f(Kt, T), and then uses the symmetric key Kt to decrypt the data to obtain the data T. After obtaining the random number T, the server first uses the symmetric key Ky to encrypt the data T to obtain the data f(Ky, T); then the data f(Ky, T) is extracted by digital summary to obtain H(f(Ky, T)), and finally the digital summary is encrypted by the symmetric key Ka to obtain f(Ka, H(f(Ky, T))) and sent to the mobile phone; S53, the mobile phone uses the symmetric key Ka to decrypt the data H(f(Ky,T)) and sends it to the Bluetooth device. The Bluetooth device also encrypts the data T using the symmetric key Ky and extracts the digital summary H(f(Ky,T)) from it, and compares the generated data H(f(Ky,T)) with the digital summary received from the mobile phone. If the comparison is consistent, the Bluetooth device will execute the control command sent by the mobile phone.

10. A method for secure communication and control between a Bluetooth device, a mobile phone and a server according to claim 9, characterized in that: The specific steps of the server verifying the legitimacy of the Bluetooth device in step S6 are as follows: S61, the Bluetooth device encrypts its own state L and the digital summary H(L) of L using the symmetric key Kt to obtain f(Kt,L) and f(Kt,H(L)), and sends the data to the mobile phone; S62, after receiving the data, the mobile phone uses the symmetric key Ka to encrypt it to obtain f(Ka,f(Kt,L)) and f(Ka,f(Kt,H(L))), and then sends f(Ka,f(Kt,L)) and f(Ka,f(Kt,H(L))) to the server. The server uses decryption to obtain the Bluetooth device status L and verify the legitimacy of L.

Citation Information

Patent Citations

  • Lamp remotely-controlled by mobile phone Bluetooth and control method thereof

    CN102186285A

  • Internet-of-things identity authentication method based on Bluetooth communication access

    CN104796265A

  • Method for secure communication and control among Bluetooth equipment, mobile phone and server

    CN116828430A

  • Method and device for registering based on authenticating device

    US20180145979A1