Far field communication authentication method, electronic equipment and readable storage medium
By storing the encrypted and decrypted information used in far-field communication and using it directly within the validity period, the time-consuming authentication of account and encrypted and decrypted information in far-field communication is solved, and the message synchronization speed and user experience are improved.
Patent Information
- Application Number
- CN202310860702.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
AI Technical Summary
In the far-field communication scenario, the account authentication and encryption and decryption information authentication processes of two electronic devices are time-consuming, resulting in delayed message synchronization.
By storing the encrypted information and decryption information used in the authentication process of account authentication and encrypted and decrypted information, and the next time a far-field communication is established, if the stored encrypted and decrypted information is directly used for authentication during the validity period, avoiding the re-execution of the trust ring authentication process .
It reduces the time-consuming of far-field communication authentication, improves message synchronization speed, and improves user experience.
Smart Images

Figure CN119316833A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to an authentication method, electronic device and readable storage medium for far-field communications. Background Art
[0002] When message synchronization between two electronic devices cannot be performed through near-field (short-range) communication, far-field communication technology can be used to communicate and synchronize messages. For example, a mobile phone and a smart watch can communicate and synchronize messages using Bluetooth (near-field communication technology). When Bluetooth is disconnected, the mobile phone and the smart watch can communicate and synchronize messages using far-field communication technology. To synchronize messages under far-field communication, the two electronic devices need to perform account authentication by sending handshake messages to ensure that the two electronic devices are logged in to the same account, and authenticate the encryption and decryption information required for data transmission between the two electronic devices, such as authenticating the key, to ensure the security and reliability of message synchronization.
[0003] However, the account authentication and encryption and decryption information authentication process of the two electronic devices is relatively time-consuming. If the same authentication process is performed in each far-field communication scenario, it will cause a delay in the message synchronization of the two electronic devices. Summary of the invention
[0004] In view of this, the present application provides a far-field communication authentication method, an electronic device, and a readable storage medium.
[0005] In a first aspect, the present application provides a far-field communication authentication method, wherein a first electronic device receives an instruction to establish far-field communication with a second electronic device; the first electronic device obtains stored first encrypted information and determines that the first encrypted information is within a first validity period, wherein the first encrypted information is encrypted information stored after the first electronic device and the second electronic device have established far-field communication and is required to establish far-field communication with the second electronic device; the first electronic device encrypts the first information using the first encrypted information and sends the encrypted first information to the second electronic device; the first electronic device receives authentication success information from the second electronic device, and the first electronic device establishes far-field communication with the second electronic device, wherein the authentication success information is sent when the second electronic device is able to decrypt the encrypted first information using the first decryption information and determines that the decrypted first information is the same as the second information of the second electronic device.
[0006] In some embodiments, the first encryption information and the first decryption information may be the encryption information used in the encryption and decryption information authentication process stored by the first electronic device and the second electronic device after the first electronic device and the second electronic device establish a far-field communication connection through account authentication and encryption and decryption information authentication, for example, a public key used to encrypt synchronization data and a private key used to decrypt synchronization data. Then, when the far-field communication connection is established next time, if the stored first encryption information and the first decryption information are still valid, and the encrypted data is the same as the decrypted data, authentication can be performed directly through the stored encryption and decryption information.
[0007] Based on the above solution, the time consumed in authenticating multiple electronic devices in a far-field communication scenario can be reduced, thereby increasing the speed of message synchronization between multiple electronic devices, and ultimately improving the user's smart watch experience.
[0008] In a possible implementation of the first aspect above, the first electronic device obtains the stored first encrypted information, including: the first electronic device receives handshake information sent by the second electronic device, the handshake information includes a first authentication type and signature verification data, and the signature verification data is the first encrypted information; the first electronic device verifies the authentication type of the first electronic device; in response to the first electronic device determining that the first authentication type is consistent with the second authentication type of the first electronic device, the first electronic device obtains the stored first encrypted information.
[0009] In some embodiments, if the first encrypted information is within the validity period, the first electronic device can directly verify the signature based on the first encrypted information, thereby effectively saving the time-consuming authentication problem caused by obtaining encryption and decryption information.
[0010] In a possible implementation of the first aspect above, corresponding to the first electronic device not storing the first encrypted information, or the stored first encrypted information is not within the first validity period, the first electronic device and the second electronic device perform device authentication and key negotiation to obtain second encrypted information and second decrypted information; the first electronic device and the second electronic device both store the second encrypted information and the second decrypted information.
[0011] In some embodiments, when the first encrypted information has exceeded its validity period, the first electronic device needs to re-initiate trust circle authentication, and the process may include: the first electronic device sends device information of the first electronic device to the second electronic device; the first electronic device receives the authentication result of the second electronic device based on the device information of the first electronic device and the device information of the second electronic device sent by the second electronic device; the first electronic device authenticates the device information of the second electronic device and sends the authentication result and key negotiation information to the second electronic device; and then the first electronic device can receive the key negotiation result of the second electronic device.
[0012] Based on the above method, the first electronic device and the second electronic device can obtain and store the second encryption and decryption information, and preset the storage validity time, so that when establishing far-field communication next time, the first electronic device and the second electronic device can quickly verify the signature based on the valid second encryption and decryption information, and then establish a far-field connection without having to perform the trust ring authentication process again, thereby improving the efficiency of establishing far-field communication.
[0013] In a possible implementation of the first aspect above, a first electronic device and a second electronic device perform device authentication and key negotiation to obtain second encryption information and second decryption information, including: the first electronic device sends device information of the first electronic device to the second electronic device; the first electronic device receives an authentication result after the second electronic device performs authentication based on the device information of the first electronic device and the device information of the second electronic device; the first electronic device sends an authentication result based on the device information of the second electronic device and key negotiation information to the second electronic device, where the key negotiation information is used to negotiate the second encryption information and the second decryption information; the first electronic device receives the key negotiation result sent by the second electronic device.
[0014] In some embodiments, when the first encrypted information has exceeded its validity period, the first electronic device needs to re-initiate the trust circle authentication, and the process may include: the first electronic device needs to send the device information of the first electronic device to the second electronic device, so that the second electronic device can perform authentication based on the device information of the first electronic device; the first electronic device receives the authentication result of the second electronic device after the second electronic device performs authentication based on the device information of the first electronic device and the device information of the second electronic device, so that the first electronic device performs authentication based on the device information of the second electronic device; the first electronic device sends the authentication result based on the device information of the second electronic device and the key negotiation information to the second electronic device, and the key negotiation information is used to negotiate the first encryption information and the first decryption information; the first electronic device receives the key negotiation result sent by the second electronic device.
[0015] Based on the above method, the first electronic device and the second electronic device can obtain and store the second encryption and decryption information, and preset the storage validity time so that the next time the far-field communication is established, the first electronic device and the second electronic device can quickly verify the signature based on the valid second encryption and decryption information, and then establish a far-field connection.
[0016] In a possible implementation of the first aspect above, the first information is an identity identification code corresponding to the account information of the first electronic device; and the second information is an identity identification code corresponding to the account information of the second electronic device.
[0017] In a second aspect, the present application provides a far-field communication authentication method, including: a second electronic device receives an instruction from a first electronic device to establish an end-to-end handshake authentication; the second electronic device obtains stored first decryption information, and determines that the first decryption information is within a first validity period, wherein the first decryption information is decryption information stored after the second electronic device has established far-field communication with the first electronic device and is required to establish far-field communication with the first electronic device; the second electronic device uses the first decryption information to decrypt the encrypted first information, and sends the decrypted first information to the first electronic device; the second electronic device sends authentication pass information to the first electronic device, and the second electronic device establishes far-field communication with the first electronic device, wherein the authentication pass information is sent when the second electronic device is able to use the first decryption information to decrypt the encrypted first information and determines that the decrypted first information is the same as the first information.
[0018] In some embodiments, the first encryption information and the first decryption information may be the encryption information used in the encryption and decryption information authentication process stored by the first electronic device and the second electronic device after the first electronic device and the second electronic device establish a far-field communication connection through account authentication and encryption and decryption information authentication, for example, a public key used to encrypt synchronization data and a private key used to decrypt synchronization data. Then, when the far-field communication connection is established next time, if the stored first encryption information and the first decryption information are still valid, and the encrypted data is the same as the decrypted data, authentication can be performed directly through the stored encryption and decryption information.
[0019] Based on the above solution, the time consumed in authenticating multiple electronic devices in a far-field communication scenario can be reduced, thereby also improving the speed of message synchronization between multiple electronic devices.
[0020] In a possible implementation of the second aspect above, the second electronic device obtains the stored first decryption information, including: the second electronic device receives handshake information sent by the first electronic device, the handshake information includes a first authentication type and signature verification data, and the signature verification data is the first information; the second electronic device verifies the second authentication type of the second electronic device based on the handshake information sent by the first electronic device; when the second electronic device determines that the second authentication type is consistent with the first authentication type of the first electronic device, the second electronic device obtains the stored first decryption information.
[0021] Based on the above method, when the first decrypted information is within the validity period, the second electronic device can directly verify the signature based on the first decrypted information. Based on this, the problem of long authentication time caused by obtaining encryption and decryption information can be effectively saved.
[0022] In a possible implementation of the second aspect above, corresponding to the second electronic device not storing the first decryption information, or the stored first decryption information is not within the first validity period, the first electronic device and the second electronic device perform device authentication and key negotiation to obtain the second encryption information and the second decryption information; the first electronic device and the second electronic device both store the second encryption information and the second decryption information.
[0023] In some embodiments, if the first decryption information has exceeded its validity period, the first electronic device needs to re-initiate the trust ring authentication to obtain the second decryption information, i.e., new decryption information, so that the second electronic device can successfully verify the signature based on the second decryption information, and then when the first electronic device also successfully verifies the signature, the first electronic device and the second electronic device can successfully establish a far-field communication connection.
[0024] In a possible implementation of the second aspect above, a first electronic device and a second electronic device perform device authentication and key negotiation to obtain the second encryption information and the second decryption information; including: the second electronic device receives the device information of the first electronic device; the second electronic device receives the authentication result and key negotiation information sent by the first electronic device, in which the first electronic device performs authentication based on the device information of the second electronic device, and the key negotiation information is used to negotiate the second encryption information and the second decryption information; the second electronic device sends the key negotiation result to the first electronic device.
[0025] In some embodiments, when the first decryption information has exceeded the validity period, the second electronic device needs to re-initiate the trust circle authentication, and the process may include: the second electronic device receives the device information of the first electronic device to perform authentication based on the device information of the first electronic device; the second electronic device receives the authentication result and key negotiation information sent by the first electronic device, in which the first electronic device performs authentication based on the device information of the second electronic device, and the key negotiation information is used to negotiate the second encryption information and the second decryption information; the second electronic device sends the key negotiation result to the first electronic device.
[0026] Based on the above method, the first electronic device and the second electronic device can obtain and store the second encryption and decryption information, and preset the storage validity time, so that when establishing far-field communication next time, the first electronic device and the second electronic device can quickly verify the signature based on the valid second encryption and decryption information, and then establish a far-field connection without having to perform the trust ring authentication process again, thereby improving the efficiency of establishing far-field communication.
[0027] In a third aspect, the present application provides an electronic device, comprising: a memory for storing instructions; a processor for executing instructions to implement the above-mentioned first aspect and any one of the above-mentioned first aspect, the above-mentioned second aspect and the above-mentioned second aspect to implement the far-field communication authentication method provided.
[0028] In a fourth aspect, the present application provides a readable storage medium having instructions stored thereon, which, when executed, enables an electronic device to implement the authentication method for far-field communication that may be provided in the first aspect and any one of the first aspect, the second aspect, and the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 According to some embodiments of the present application, a schematic diagram of a scenario of near field communication between a mobile phone 10 and a smart watch 20 is shown;
[0030] Figure 2 According to some embodiments of the present application, a schematic diagram of a far-field communication system is shown;
[0031] Figure 3 According to some embodiments of the present application, a schematic diagram of a process of a device authentication method is shown;
[0032] Figure 4 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0033] The illustrative embodiments of the present application include, but are not limited to, a far-field communication authentication method, an electronic device, and a readable storage medium.
[0034] The technical solution of the present application is described below in conjunction with the accompanying drawings.
[0035] As mentioned above, when two electronic devices synchronize messages under far-field communication, they need to send handshake messages to perform account authentication to ensure that the two electronic devices log in to the same account, and authenticate the encryption and decryption information required for data transmission between the two electronic devices, for example, authenticate the key to ensure the security and reliability of message synchronization. However, the account authentication and encryption and decryption information authentication process of the two electronic devices is relatively time-consuming. If the same authentication process is performed in each far-field communication scenario, it will cause a delay in the message synchronization of the two electronic devices.
[0036] For example, Figure 1 A schematic diagram of message synchronization between a mobile phone 10 and a smart watch 20 in a far-field communication scenario is shown. The mobile phone 10 receives a missed call notification message, and the mobile phone 10 needs to synchronize the missed call notification message to the smart watch 20. However, since the account authentication and encryption and decryption information authentication process between the mobile phone 10 and the smart watch 20 is relatively time-consuming, the smart watch 20 cannot immediately obtain the missed call notification message of the mobile phone 10, resulting in a delay in the message synchronization between the mobile phone 10 and the smart watch 20.
[0037] In order to solve the above problems, an embodiment of the present application provides a far-field communication method, in which after a first electronic device and a second electronic device establish a far-field communication connection through the above-mentioned account authentication and encryption and decryption information authentication, the two electronic devices can store the encryption and decryption information used in the encryption and decryption information authentication process, for example, the first encryption information used to encrypt the first information, for example, the first encryption information can be a public key, and the first decryption information used to decrypt the encrypted first information, for example, the first decryption information can be a private key. Then, when the far-field communication connection is established next time, if the stored encryption and decryption information is within the validity period, and the encrypted first information is the same as the decrypted second information, there is no need to re-acquire the second encryption and decryption information, but authentication is performed directly through the stored encryption and decryption information, thereby reducing the delay introduced by the encryption and decryption information authentication process before the two electronic devices perform message synchronization.
[0038] For example, when the near field communication is disconnected, the establishment of the far field communication connection is triggered, that is, the first electronic device sends a handshake message to the second electronic device, and the handshake message may include account information, authentication type and signature verification data and other information for account authentication and encryption and decryption information authentication, wherein the signature verification data includes the first information obtained by encrypting the identity identification code USID corresponding to the electronic device account with the first encryption information generated by the key negotiation algorithm. The second electronic device receives the handshake message of the first electronic device, and determines whether the account information and authentication type of the first electronic device and the second electronic device are consistent based on the handshake message. If they are consistent, it determines whether the second electronic device stores the first decryption information generated by the key negotiation algorithm and determines whether the stored first decryption information is valid. If the second electronic device stores the first decryption information and the first decryption information is valid, the first decryption information is used to decrypt the received encrypted first information. If the decrypted USID is consistent with the above-mentioned encrypted USID, it means that the encryption and decryption information authentication is successful, that is, the signature verification is successful, and then the far field communication is successfully established between the two electronic devices.
[0039] Based on the above solution, the time consumed in authenticating multiple electronic devices in a far-field communication scenario can be reduced, thereby increasing the speed of message synchronization between multiple electronic devices, and ultimately improving the user's smart watch experience.
[0040] Among them, the first encryption information and the first decryption information negotiated based on the key agreement algorithm have a validity period in the storage of the electronic device. When the far-field communication is established next time, if the first encryption information and the first decryption information are within the validity period, the first electronic device and the second electronic device can directly verify the signature based on the first encryption information and the first decryption information. After the verification is passed, the far-field communication is established.
[0041] If the storage of the first encryption information and the first decryption information has exceeded the validity period, the first electronic device or the second electronic device needs to re-initiate the trust ring authentication, and the authentication includes: the first electronic device sends the device information of the first electronic device to the second electronic device; the second electronic device verifies the received device authentication information of the first electronic device, and sends the authentication result of verifying the device information of the first electronic device and the device information of the second electronic device to the first electronic device; the first electronic device receives the authentication result of the second electronic device authenticating the device information of the first electronic device and the device information of the second electronic device, and verifies the device information of the second electronic device, authenticates the device information of the second electronic device, the first electronic device negotiates to generate the second encryption information based on the key agreement algorithm and stores it, and sends the authentication result of authenticating the device information of the second electronic device and the second encryption information to the second electronic device; the second electronic device receives the second encryption information and the authentication result of the first electronic device authenticating the device information of the second electronic device, the second electronic device negotiates to generate the second decryption information based on the received second encryption information based on the key agreement algorithm and stores it, and the second electronic device sends the second decryption information to the first electronic device. The first electronic device receives the second decryption information sent by the second electronic device.
[0042] The far-field communication system mentioned in this application is introduced below. Figure 2 As shown, the system may include a mobile phone terminal, a watch terminal, a device cloud, and a business cloud. Among them:
[0043] The mobile phone may include application software (APP), such as sports health, message notification and far-field message data processing. Among them, the sports health APP may include message notification and device pairing. Message notification can receive notifications or request messages from the application software on the mobile phone; device pairing can be paired with the account information of the mobile phone 10 and the account of the smart watch 20 based on the account information of the mobile phone 10.
[0044] The message notification on the mobile phone side can be used to receive messages or requests sent by the message service module (not shown) and the far-field service module (not shown) of the mobile phone and the watch. Sports health can monitor the current Bluetooth connection status based on the message notification. The message notification can send a request to establish a far-field channel to the far-field message data processing under the condition that both the mobile phone and the watch support far-field communication, and can send a synchronization message to the watch side through the far-field channel. It can be understood that the message notification on the mobile phone side can be a message notification module, and the far-field message data processing can be a far-field message data processing module, which is not limited here.
[0045] The far-field message data processing on the mobile phone side may also refer to the far-field service module on the mobile phone side, which can be used to encrypt messages transmitted based on the far-field channel.
[0046] The watch side may include a mobile phone assistant and a far-field message data processing module. The mobile phone assistant on the watch side may include message notification, device pairing and account login, wherein the message notification may be used to receive messages or requests sent by a message service module (not shown) and a far-field service module (not shown) from the mobile phone side and the watch side when both the mobile phone and the watch support far-field communication, and the device pairing may be based on the account information of the smart watch 20 and the account of the mobile phone 10 for pairing. Account login may be used to respond to the synchronization account instruction sent by the mobile phone assistant, so that the smart watch 20 logs in to the same account as the mobile phone 10, that is, the synchronization account. It can be understood that the mobile phone assistant on the watch side may be a mobile phone assistant module, and the far-field message data processing may be a far-field message data processing module, which is not limited here.
[0047] The far-field message data processing on the watch side can be used to send the reception status of synchronization messages to the mobile assistant on the watch side, etc.
[0048] Device Cloud can be used to implement device authentication of mobile phones and watches on the cloud side. For mobile phones, the mobile phone side is registered on the cloud side and authenticated. For watches, the watch side is registered on the cloud side and authenticated.
[0049] The business cloud can establish connections with the business cloud based on the corresponding registered devices of the mobile phone and the watch on the cloud side, and the mobile phone 10 on the cloud side and the smart watch 20 on the cloud side respectively, and then the mobile phone and the watch can establish a far-field channel through the business cloud.
[0050] The device authentication method mentioned in the embodiment of the present application is introduced in detail below. Figure 3 A schematic diagram of a device authentication method is shown. Figure 3 As shown, the specific process of the message synchronization method includes:
[0051] S101: Log in to your account via mobile phone.
[0052] In some embodiments, the account is logged in the application software of the mobile phone 10. For example Figure 2 You can log in to your account in Sports Health on your mobile phone.
[0053] S102: The mobile phone sends an instruction for account synchronization to the watch.
[0054] In some embodiments, the mobile phone 10 can send an instruction to synchronize the user account to the mobile phone assistant in the smart watch 20.
[0055] S103: Log in to your account on the watch.
[0056] In some embodiments, based on the instruction for synchronizing the user account sent by the mobile phone 10, the mobile phone assistant of the smart watch 20 can control the smart watch 20 to log in to the same account based on the instruction, so that the mobile phone 10 and the smart watch 20 are electronic devices under the same user account.
[0057] S104: The watch detects a Bluetooth connection.
[0058] In some embodiments, after the smart watch 20 completes account synchronization with the mobile phone 10, it further negotiates with the mobile phone 10 whether to support far-field capabilities. After the mobile phone 10 negotiates to support far-field capabilities, the far-field service capabilities can be activated, and the mobile phone 10 can register the mobile phone 10 on the cloud side based on the far-field service module of the mobile phone 10.
[0059] In some embodiments, after the smart watch 20 negotiates to support far-field capabilities, the smart watch 20 can further monitor the Bluetooth connection status. After the smart watch 20 detects that the Bluetooth connection is disconnected, it can further determine whether the far-field conditions are met. When the far-field conditions are met, subsequent steps S105-S115 are executed to establish a far-field channel. The far-field conditions may include a first far-field condition, a second far-field condition, and a third far-field condition. Among them, the first far-field condition is that the account login status of the smart watch 20 is normal, that is, the account of the smart watch 20 and the mobile phone 10 is the same account; the second far-field condition is the far-field message switch status, that is, the switch of the smart watch 20 to receive far-field communication messages is turned on; the third far-field condition is that the Bluetooth connection is disconnected.
[0060] In some embodiments, based on the smart watch 20 satisfying the above-mentioned far-field conditions, the smart watch 20 activates the far-field service capability, and the smart watch 20 can register the smart watch 20 on the cloud side based on its far-field service module.
[0061] S105: The watch sends a device authentication request to the business cloud.
[0062] In some embodiments, based on the smart watch 20 registering the smart watch 20 on the cloud side, a request for device authentication can be sent to the business cloud. It can be understood that the content of the request for device authentication sent to the business cloud can include a request for authentication of device account information, authentication type, and encryption and decryption information.
[0063] In some embodiments, based on the smart watch 20 sending a request for device authentication to the business cloud, the business cloud can return the cloud authentication result of the smart watch 20 to the watch side. When the smart watch 20 has registered the smart watch 20 on the cloud side based on the corresponding business server address, the business cloud can return the authentication result of the successful authentication of the smart watch 20 to the smart watch 20.
[0064] S106: The business cloud returns the watch-side authentication result to the watch-side.
[0065] In some embodiments, based on the smart watch 20 sending a request for device authentication to the business cloud, the cloud authentication result of the smart watch 20 is returned to the watch side. When the smart watch 20 is registered on the cloud side based on the corresponding business server address, the business cloud can return the authentication result of the successful authentication of the smart watch 20 to the smart watch 20.
[0066] S107: The mobile phone sends a device authentication request to the service cloud.
[0067] In some embodiments, based on the mobile phone 10 registering the mobile phone 10 on the cloud side, a request for device authentication is sent to the business cloud. It can be understood that the content of the request for device authentication sent to the business cloud may include a request for authentication of device account information, authentication type, and encryption and decryption information.
[0068] S108: The business cloud returns the mobile phone authentication result to the mobile phone.
[0069] In some embodiments, based on the mobile phone 10 sending a request for device authentication to the business cloud, the cloud authentication result of the mobile phone 10 is returned to the watch end. When the mobile phone 10 has registered the mobile phone 10 on the cloud side based on the corresponding business server address, the business cloud can return the authentication result of the successful authentication of the mobile phone 10 to the mobile phone 10.
[0070] S109: The user sends a command to the mobile phone to establish a far-field channel.
[0071] In some embodiments, the far-field service module in the mobile phone 10 can notify the counterpart device, i.e., the smart watch 20, of a message that the mobile phone 10 has successfully authenticated the mobile phone 10 on the cloud side based on the business cloud; the far-field service module in the smart watch 20 can notify the counterpart device, i.e., the message service module of the mobile phone 10, of a message that the smart watch 20 has successfully authenticated the cloud side device on the cloud side based on the business cloud, i.e., the mobile phone 10 and the smart watch 20 notify each other that the other party has been remotely online.
[0072] In some embodiments, based on the successful authentication of the mobile phone 10 and the smart watch 20 in the business cloud, the user can send a request to establish a far-field channel based on the mobile phone 10. For example, the user can send a request to establish a far-field channel to the smart watch 20 based on the application software of the mobile phone 10.
[0073] S110: The mobile phone sends an end-to-end handshake request to the watch, and the trust ring authentication negotiation is carried out.
[0074] In some embodiments, based on a user sending a request to establish a far-field channel to the smart watch 20 through the application software of the mobile phone 10, the mobile phone 10 sends a handshake message to the smart watch 20, wherein the handshake message may include account information, authentication type, and encryption / decryption information, and a trust ring authentication negotiation may be performed based on the handshake message.
[0075] It can be understood that the USID corresponding to the account information of the mobile phone 10 can be encrypted based on the encryption information, and then the smart watch 20 decrypts the USID corresponding to the encrypted account information of the mobile phone 10 based on the decryption information. If the decrypted USID is consistent with the USID corresponding to the account information of the smart watch 20, it can indicate that the signature verification is successful.
[0076] S111: The watch sends a confirmation Ack to the mobile phone.
[0077] In some embodiments, based on the successful reception of the handshake message between the smart watch 20 and the mobile phone 10, the smart watch 20 sends a handshake confirmation (acknowledge character, ACK) to the mobile phone 10. It can be understood that ACK is a confirmation mechanism. For example, the smart watch 20 can add an Ack tag based on the message sent by the mobile phone 10 and then reply to the mobile phone 10 to indicate that the sent handshake message has been confirmed to be received.
[0078] S112: The watch performs signature verification based on the signature verification data in the handshake message.
[0079] In some embodiments, after the smart watch 20 receives the handshake message sent by the mobile phone 10, it first checks whether the account information in the handshake message is consistent with the account of the smart watch 20, and checks whether the authentication type in the handshake message is consistent with the object that needs to be authenticated in the smart watch 20; further, based on the consistency of the account information and the authentication type, check whether the smart watch 20 has first decryption information and whether the first decryption information is within the first validity period. If the first decryption information exists and the first decryption information is within the first validity period, the first information encrypted based on the first encryption information of the mobile phone 10 in the handshake message is decrypted (i.e., signature verification is performed) through the first decryption information of the smart watch 20. The encrypted first information is decrypted through the first decryption information of the smart watch 20, and the decrypted USID is consistent with the USID corresponding to the account of the smart watch 20, which means that the signature verification is passed, indicating that the mobile phone 10 is a trusted device relative to the smart watch 20.
[0080] In some embodiments, if the first decrypted information does not exist, the trust circle authentication process is re-executed to perform authentication.
[0081] S113: The mobile phone performs authentication type verification and data signature verification.
[0082] In some embodiments, after the mobile phone 10 receives the confirmation handshake confirmation Ack tag sent by the smart watch 20, the mobile phone 10 performs authentication type verification and data signature verification. For example, the USID of the account decrypted by the smart watch 20 can be verified to see if it is consistent with the USID of the account of the smart watch 20. If they are consistent, it means that the smart watch 20 has successfully verified the signature.
[0083] S114: The mobile phone confirms that the signature verification is successful.
[0084] In some embodiments, if the mobile phone 10 passes the signature verification based on the above authentication type verification and data verification, the mobile phone 10 determines that the signature verification is successful.
[0085] S115: The mobile phone and the watch establish an end-to-end far-field channel.
[0086] In some embodiments, based on the successful signature verification between the mobile phone 10 and the smart watch 20, the mobile phone 10 and the smart watch 20 successfully establish a far-field channel.
[0087] S116: The signature verification fails, and the mobile phone sends a request to trigger the trust ring authentication to the watch.
[0088] In some embodiments, when the signature verification between the mobile phone 10 and the smart watch 20 fails, the mobile phone 10 sends a request to the smart watch 20 to trigger the trust circle authentication.
[0089] Specifically, the trust ring authentication includes: the mobile phone 10 sends the device information of the mobile phone 10 to the smart watch 20; the smart watch 20 verifies the received device authentication information of the mobile phone 10, and sends the authentication result of the device information of the mobile phone 10 and the device information of the smart watch 20 to the mobile phone 10; the mobile phone 10 receives the authentication result of the smart watch 20 authenticating the device information of the mobile phone 10 and the device information of the smart watch 20, and verifies the device information of the smart watch 20, after authenticating the device information of the smart watch 20, the mobile phone 10 generates and stores the second encryption information based on the key negotiation algorithm, and sends the authentication result of the device information of the smart watch 20 and the second encryption information to the smart watch 20; the smart watch 20 receives the second encryption information and the authentication result of the mobile phone 10 authenticating the device information of the smart watch 20, the smart watch 20 generates and stores the second decryption information based on the received second encryption information based on the key negotiation algorithm, and the smart watch 20 sends the second decryption information to the mobile phone 10. The mobile phone 10 receives the second decryption information sent by the smart watch 20.
[0090] S117: The watch returns the trust ring authentication result to the mobile phone.
[0091] In some embodiments, the smart watch 20 sends the above-mentioned trust ring authentication result to the mobile phone 10, for example, the result of successfully establishing the trust ring authentication can be sent to the mobile phone 10.
[0092] In some embodiments, the mobile phone 10 may send the result of obtaining the second encrypted information based on the trusted ring authentication to the smart watch 20 , and the smart watch 20 may send the result of obtaining the second decrypted information based on the trusted ring authentication to the mobile phone 10 .
[0093] S118: The watch caches the key and key validity period.
[0094] In some embodiments, the smart watch 20 stores the second decryption information in the smart watch 20. For example, the smart watch 20 may store the acquired second decryption key in the smart watch 20, and may preset a valid storage period for the second decryption information.
[0095] S119: The mobile phone caches the key and key validity period.
[0096] In some embodiments, the mobile phone 10 stores the second encrypted information in the mobile phone 10. For example, the mobile phone 10 may store the acquired second encryption key in the mobile phone 10, and may preset a valid storage period for the second encrypted information.
[0097] S120: The mobile phone notifies the user of the far-field channel establishment result.
[0098] In some embodiments, based on the successful authentication of the mobile phone 10 and the smart watch 20 through the trust ring authentication, the mobile phone 10 and the smart watch 20 can successfully establish a far-field channel, and then the mobile phone 10 can notify the user of the success or failure of the establishment of the far-field channel.
[0099] S121: The user sends a command to the mobile phone again to establish a far-field channel.
[0100] It can be understood that the steps of step S121 can refer to the above-mentioned step S109, which will not be repeated here.
[0101] S122: The mobile phone sends an end-to-end handshake request to the watch to perform trust ring authentication negotiation.
[0102] It can be understood that the steps of step S122 can refer to the above-mentioned step S110, which will not be repeated here.
[0103] S123: The watch sends a confirmation handshake Ack to the mobile phone.
[0104] It can be understood that the steps of step S123 can refer to the above-mentioned step S111, which will not be repeated here.
[0105] S124: The watch detects that the key on the watch is within the validity period and the signature verification is successful.
[0106] In some embodiments, when the smart watch 20 detects that the smart watch 20 stores the second decrypted information successfully stored based on the trust ring authentication and is within the validity period, the smart watch 20 passes the signature verification.
[0107] S125: The mobile phone detects that the key of the mobile phone is within the validity period and the signature verification is successful.
[0108] In some embodiments, when the mobile phone 10 detects that the mobile phone 10 stores the second encrypted information successfully stored based on the trust ring authentication and is within the validity period, the mobile phone 10 passes the signature verification.
[0109] S126: The mobile phone and the watch establish an end-to-end far-field channel.
[0110] In some embodiments, based on the above-mentioned signature verification of both the mobile phone 10 and the smart watch 20, the mobile phone 10 and the smart watch 20 successfully establish a trusted end-to-end channel, that is, successfully establish a far-field channel, and can perform far-field communication.
[0111] S127: The mobile phone notifies the user of the far-field channel establishment result.
[0112] In some embodiments, the mobile phone 10 detects that the far-field channel is successfully established, and can notify the user of the result of the successful establishment of the far-field channel through the application software interface of the mobile phone 10.
[0113] The far-field communication authentication method provided in the embodiment of the present application can reduce the time spent on authentication of multiple electronic devices in a far-field communication scenario, thereby increasing the speed of message synchronization between multiple electronic devices, and ultimately improving the user's smart watch experience.
[0114] To facilitate understanding of the technical solutions of each implementation of the present application, the hardware structure of the electronic device 100 is introduced below.
[0115] It can be understood that the electronic device 100 can be any terminal device that can run a neural network model, including but not limited to mobile phones, wearable devices (such as smart watches, smart bracelets, etc.), tablet computers, desktops, laptops, handheld computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers, UMPC), netbooks, augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) devices, etc., and the embodiments of the present application are not limited thereto.
[0116] For example Figure 4According to some embodiments of the present application, a schematic diagram of the structure of an electronic device 100 is shown. Figure 4 The terminal 100 shown includes one or more processors 101 , system memory 102 , non-volatile memory (NVM) 103 , a communication interface 104 , input / output (I / O) devices 105 , system control logic 106 , and instructions 107 .
[0117] Among them: the processor 101 may include one or more processing units, for example, it may include a central processing unit CPU (central processing unit), an image processor GPU (graphics processing unit), a digital signal processor (digital signal processor, DSP), a microprocessor MCU (micro-programmed control Unit), an AI (Artificial Intelligence) processor or a processing module or processing circuit of a programmable logic device (field programmable gate array, FPGA) may include one or more single-core or multi-core processors.
[0118] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store the above-mentioned business server information, etc.
[0119] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc. The non-volatile memory 103 may be used to store the above-mentioned business server information, etc.
[0120] The instruction 107 may include: being executed by at least one of the processors 101 to enable the terminal device 100 to implement the far-field communication method provided by each embodiment of the present application.
[0121] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the terminal device 100, thereby communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the terminal 100, for example, the communication interface 104 may be integrated into the processor 101.
[0122] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the terminal device 100 through the input / output (I / O) device 105 .
[0123] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of terminal device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.
[0124] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).
[0125] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0126] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0127] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0128] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0129] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0130] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0131] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0132] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A far-field communication authentication method, characterized in that: include: The first electronic device receives an instruction to establish far-field communication with the second electronic device; The first electronic device obtains the stored first encrypted information and determines that the first encrypted information is within a first validity period, wherein the first encrypted information is the encrypted information required for establishing far-field communication with the second electronic device and stored after the first electronic device and the second electronic device have established far-field communication; The first electronic device encrypts the first information using the first encryption information, and sends the encrypted first information to the second electronic device; The first electronic device receives authentication success information from the second electronic device, and the first electronic device establishes far-field communication with the second electronic device, wherein the authentication success information is sent when the second electronic device is able to use the first decryption information to decrypt the encrypted first information and determine that the decrypted first information is the same as the second information of the second electronic device.
2. The method according to claim 1, characterized in that The first electronic device acquires the stored first encrypted information, including: The first electronic device receives handshake information sent by the second electronic device, where the handshake information includes a first authentication type and signature verification data, and the signature verification data is the first encrypted information; The first electronic device verifies the authentication type of the first electronic device; In response to the first electronic device determining that the first authentication type is consistent with the second authentication type of the first electronic device, the first electronic device obtains the stored first encryption information.
3. The method according to claim 1, characterized in that: Corresponding to the first electronic device not storing the first encrypted information, or the stored first encrypted information is not within the first validity period, the first electronic device and the second electronic device perform device authentication and key negotiation to obtain the second encrypted information and the second decrypted information; The first electronic device and the second electronic device both store the second encryption information and the second decryption information.
4. The method according to claim 3, characterized in that The first electronic device and the second electronic device perform device authentication and key negotiation to obtain the second encryption information and the second decryption information, including: The first electronic device sends the device information of the first electronic device to the second electronic device; The first electronic device receives an authentication result after the second electronic device performs authentication based on the device information of the first electronic device and the device information of the second electronic device; The first electronic device sends an authentication result based on the device information of the second electronic device and key negotiation information to the second electronic device, where the key negotiation information is used to negotiate the second encryption information and the second decryption information; The first electronic device receives the key negotiation result sent by the second electronic device.
5. The method according to claim 1, characterized in that The first information is an identity identification code corresponding to the account information of the first electronic device; The second information is an identity identification code corresponding to the account information of the second electronic device.
6. A far-field communication authentication method, characterized in that: include: The second electronic device receives an instruction from the first electronic device to establish an end-to-end handshake authentication; The second electronic device obtains the stored first decryption information and determines that the first decryption information is within the first validity period, wherein the first decryption information is the decryption information required for establishing far-field communication with the first electronic device and stored after the second electronic device and the first electronic device have established far-field communication; The second electronic device decrypts the encrypted first information using the first decryption information, and sends the decrypted first information to the first electronic device; The second electronic device sends authentication information to the first electronic device, and the second electronic device establishes far-field communication with the first electronic device, wherein the authentication information is sent when the second electronic device is able to use the first decryption information to decrypt the encrypted first information and determine that the decrypted first information is the same as the first information.
7. The method according to claim 6, characterized in that The second electronic device obtains the stored first decryption information, including: The second electronic device receives handshake information sent by the first electronic device, where the handshake information includes a first authentication type and signature verification data, and the signature verification data is the first information; The second electronic device verifies the second authentication type of the second electronic device based on the handshake information sent by the first electronic device; In response to the second electronic device determining that the second authentication type is consistent with the first authentication type of the first electronic device, the second electronic device obtains the stored first decryption information.
8. The method according to claim 7, characterized in that Corresponding to the second electronic device not storing the first decryption information, or the stored first decryption information is not within the first validity period, the first electronic device and the second electronic device perform device authentication and key negotiation to obtain the second encryption information and the second decryption information; The first electronic device and the second electronic device both store the second encryption information and the second decryption information.
9. The method according to claim 8, characterized in that The first electronic device and the second electronic device perform device authentication and key negotiation to obtain the second encryption information and the second decryption information; comprising: The second electronic device receives the device information of the first electronic device; The second electronic device receives, sent by the first electronic device, an authentication result of the first electronic device performing authentication based on device information of the second electronic device and key negotiation information, wherein the key negotiation information is used to negotiate the second encryption information and the second decryption information; The second electronic device sends a key negotiation result to the first electronic device.
10. An electronic device, characterized in that: include: A memory for storing instructions; A processor, configured to execute the instructions to implement the far-field communication method according to any one of claims 1 to 9.
11. A readable storage medium, characterized in that: The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the far-field communication authentication method according to any one of claims 1 to 9.