Equipment interaction method and device, electronic equipment and storage medium
By receiving identity authentication information on the first device and sending an identity authentication request to the second device, the problem of inconvenience in interaction when the accessed device is in a locked state in cross-device communication is solved, and convenient cross-device identity authentication and communication interaction are realized.
Patent Information
- Application Number
- CN202310945479.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
In cross-device communication interaction, it is necessary to authenticate and authorize the accessed devices in multiple devices, especially when the accessed devices are in a locked state, there is a problem of inconvenience in interaction.
By receiving the identity authentication information input by the user on the first device and sending an identity authentication request to the second device in the locked state, the identity authentication information is carried for the second device to perform identity authentication.
It is realized that when the second device is in a locked state, the first device can complete the identity authentication of the second device by sending an identity authentication request, thereby simplifying the cross-device communication interaction process and improving convenience.
Smart Images

Figure CN119449329A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of identity authentication, and in particular to a device interaction method and apparatus, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of communication technology, cross-device communication and interaction have brought more and more convenience to life. When operating multiple devices at the same time, it is necessary to authenticate and authorize the accessed device among the multiple devices before using cross-device communication and interaction. If the accessed device is in a locked state, it is necessary to unlock the accessed device before continuing cross-device communication and interaction, which leads to the problem of inconvenience in cross-device communication and interaction. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a device interaction method and apparatus, an electronic device, and a storage medium, which can make cross-device communication more convenient.
[0004] According to a first aspect of an embodiment of the present disclosure, a device interaction method is provided, which is applied to a first device and at least includes:
[0005] When a cross-device identity authentication function of the first device is enabled, receiving identity authentication information input by a user;
[0006] An identity authentication request is sent to a second device that establishes communication with the first device, wherein the identity authentication request carries the identity authentication information, and the identity authentication request is used to request the second device in a locked state to perform identity authentication based on the identity authentication information.
[0007] In some embodiments, the method further comprises:
[0008] receiving first verification information;
[0009] When the first verification information passes, a cross-device identity authentication function of the first device is enabled.
[0010] In some embodiments, the method further comprises:
[0011] Acquire first shared information;
[0012] Before sending the identity authentication request to the second device that establishes communication with the first device, the method further includes:
[0013] The identity authentication request is generated based on the first shared information and the identity authentication information.
[0014] In some embodiments, generating the identity authentication request based on the first shared information and the identity authentication information includes:
[0015] Based on the first shared information, encrypt the identity authentication information to obtain ciphertext information;
[0016] The identity authentication request is generated based on the ciphertext information.
[0017] In some embodiments, encrypting the identity authentication information based on the first shared information to obtain ciphertext information includes:
[0018] Obtaining a first key and a second key based on the first shared information;
[0019] Encrypt the identity authentication information input by the user based on the first key to obtain encryption information of the first device;
[0020] Performing a signature process on the encrypted information of the first device based on the second key to obtain signature information of the first device;
[0021] The signature information of the first device and the encryption information of the first device are concatenated to obtain the ciphertext information.
[0022] In some embodiments, encrypting the identity authentication information input by the user based on the first key to obtain the encrypted information of the first device includes:
[0023] Convert the identity authentication information input by the user into a byte array.
[0024] The first key is used to encrypt the identity authentication information of the byte array type to obtain encrypted information of the first device.
[0025] According to a second aspect of an embodiment of the present disclosure, a device interaction method is provided and applied to a second device, comprising at least:
[0026] Receiving an identity authentication request sent by a first device that establishes communication with the second device; wherein a cross-device identity authentication function of the second device is turned on and the second device is in a locked state;
[0027] In response to the identity authentication request, identity authentication is performed.
[0028] In some embodiments, the method further comprises:
[0029] receiving second verification information;
[0030] If the second verification information passes, the cross-device identity authentication function of the second device is enabled.
[0031] In some embodiments, the method further comprises:
[0032] Acquire second shared information;
[0033] The step of performing identity authentication in response to the identity authentication request includes:
[0034] In response to the identity authentication request, identity authentication is performed based on the second shared information and the identity authentication request.
[0035] In some embodiments, the performing identity authentication based on the second shared information and the identity authentication request includes:
[0036] Based on the second shared information, decrypting the identity authentication request to obtain decrypted information;
[0037] The identity of the second device is authenticated based on the decrypted information.
[0038] In some embodiments, decrypting the identity authentication request based on the second shared information to obtain decrypted information includes:
[0039] Obtain key information of the second device based on the second shared information;
[0040] The identity authentication request is processed based on the key information of the second device to obtain decryption information.
[0041] In some embodiments, the identity authentication request is generated based on ciphertext information; the key information of the second device includes a third key and a fourth key; and the identity authentication request is processed based on the key information of the second device to obtain decrypted information, including:
[0042] Splitting the ciphertext information to obtain split encrypted information and split signature information;
[0043] Determining whether the ciphertext signature verification is successful based on the third key and the split signature information;
[0044] When the ciphertext signature verification is successful, the fourth key is used to decrypt the split encrypted information to obtain the decrypted information.
[0045] In some embodiments, the determining whether the ciphertext signature verification is successful based on the third key and the split signature information includes:
[0046] Using the third key to sign the split signature information to obtain signature verification information;
[0047] When the signature verification information and the split signature information are the same, it is determined that the ciphertext signature verification is successful.
[0048] In some embodiments, the method further comprises:
[0049] In the event that the ciphertext signature verification fails, decryption of the split encrypted information is stopped.
[0050] In some embodiments, the method further comprises:
[0051] After the cross-device identity authentication function of the second device is enabled, detecting input information of the second device;
[0052] When the input information of the second device is used to represent the shutdown function and the identity authentication of the input user of the second device is passed, the entrance to the cross-device identity authentication function of the second device is closed and the key information of the second device is deleted.
[0053] According to a third aspect of an embodiment of the present disclosure, a device interaction apparatus is provided, which is applied to a first device and at least includes:
[0054] A first receiving module, configured to receive identity authentication information input by a user when a cross-device identity authentication function of the first device is enabled;
[0055] The sending module is configured to send an identity authentication request to a second device that establishes communication with the first device, wherein the identity authentication request carries the identity authentication information, and the identity authentication request is used to request the second device in a locked state to perform identity authentication based on the identity authentication information.
[0056] According to a fourth aspect of an embodiment of the present disclosure, a device interaction apparatus is provided, which is applied to a second device and at least includes:
[0057] A second receiving module is configured to receive an identity authentication request sent by a first device that establishes communication with the second device, wherein a cross-device identity authentication function of the second device is turned on and the second device is in a locked state;
[0058] The authentication module is configured to perform identity authentication in response to the identity authentication request.
[0059] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising at least:
[0060] processor;
[0061] a memory for storing processor-executable instructions;
[0062] Wherein, the processor is configured to execute the device interaction method as described in the first aspect or the second aspect above.
[0063] According to a sixth aspect of an embodiment of the present disclosure, there is provided a storage medium, including:
[0064] When the instructions in the storage medium are executed by the processor of the first device, the first device is enabled to execute the device interaction method as described in the first aspect above; or, when the instructions in the storage medium are executed by the processor of the second device, the second device is enabled to execute the device interaction method as described in the second aspect above.
[0065] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0066] In the embodiment of the present disclosure, when the second device is in a locked state, the first device can send an identity authentication request to the second device so that the second device completes the identity authentication, thereby establishing a cross-device communication interaction between the first device and the second device.
[0067] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0069] Figure 1 The diagram is a schematic diagram showing a cross-device communication interaction failure according to an exemplary embodiment.
[0070] Figure 2 The following is a flow diagram of a device interaction method according to an exemplary embodiment. Figure 1 .
[0071] Figure 3 The diagram is a schematic diagram showing two devices performing identity authentication to enable a function according to an exemplary embodiment.
[0072] Figure 4 The diagram is a schematic diagram showing an offline method for acquiring shared information according to an exemplary embodiment.
[0073] Figure 5 The figure is a schematic diagram showing an online method for acquiring shared information according to an exemplary embodiment.
[0074] Fig. 6A The figure is a schematic block diagram showing the process from key generation to storage according to an exemplary embodiment.
[0075] Figure 6BThe diagram is a schematic diagram of generating key information of a first device according to an exemplary embodiment.
[0076] Figure 7 The diagram is a schematic diagram showing a first device executing a device interaction method according to an exemplary embodiment.
[0077] Figure 8 The following is a flow diagram of a device interaction method according to an exemplary embodiment. Figure 2 .
[0078] Fig. 9 The diagram is a schematic diagram showing a second device executing a device interaction method according to an exemplary embodiment.
[0079] Fig.10 The diagram is a schematic diagram showing a second device being forcibly authenticated according to an exemplary embodiment.
[0080] Fig.11 The figure is a schematic diagram showing a second device shut down function according to an exemplary embodiment.
[0081] Fig.12 The figure is a schematic diagram showing identity authentication before closing a function according to an exemplary embodiment.
[0082] Fig.13 A device interaction apparatus according to an exemplary embodiment is shown in FIG. Figure 1 .
[0083] Fig.14 A device interaction apparatus according to an exemplary embodiment is shown in FIG. Figure 2 .
[0084] Fig.15 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0085] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0086] Cross-device communication and interaction is a new experience for users. It can break through the flat limitations of a single device and allow users to interact with information on the first device with the second device. Figure 1 FIG. 1 is a schematic diagram showing a cross-device communication interaction failure according to an exemplary embodiment. Figure 1As shown, when the lock screen password of the second device 12 is in a locked state, it indicates that the second device 12 is in a locked state without identity authentication, so the data of the second device 12 is in an encrypted state, and the user of the first device 11 cannot directly operate the second device or authenticate the second device. If it is inconvenient or impossible for the user to directly authenticate the second device to unlock the lock state, the cross-device communication interaction between the first device and the second device will not be possible.
[0087] Based on this, an embodiment of the present disclosure proposes a device interaction method, which enables identity authentication of a second device when the second device is in a locked state, thereby improving the convenience of cross-device communication interaction.
[0088] Figure 2 The following is a flow diagram of a device interaction method according to an exemplary embodiment. Figure 1 .like Figure 2 As shown, the device interaction method is applied to a first device, and the first device executes the device interaction method including the following steps:
[0089] S101, receiving identity authentication information input by a user when a cross-device identity authentication function of the first device is enabled;
[0090] S102: Send an identity authentication request to a second device that establishes communication with the first device, wherein the identity authentication request carries the identity authentication information, and the identity authentication request is used to request the second device in a locked state to perform identity authentication based on the identity authentication information.
[0091] In the embodiments of the present disclosure, the device interaction method is applicable to cross-device communication interaction scenarios. For example, in a cross-device communication scenario, when a first device needs to access a second device but the second device is in a locked state, the first device can execute the device interaction method to complete the identity authentication of the second device through the first device when it is inconvenient or impossible for the user to directly authenticate the second device.
[0092] It should be noted that the first device sends an authentication request to the second device, the second device receives the authentication request, and performs authentication based on the authentication request. That is, in cross-device communication interaction, the first device can be understood as a requesting device, and the second device can be understood as an accessed device.
[0093] Exemplarily, the first device and the second device may be devices of the same type or devices of different types. The first device and the second device may both include mobile terminal devices or wearable devices. The mobile terminal device may include: a smart phone, a notebook or a tablet computer; the wearable device may include a smart bracelet or a smart watch, which is not limited in the embodiments of the present disclosure.
[0094] In step S101, the second device is in a locked state, which may include that the second device is in a locked screen state and the first device cannot process the data of the second device, and may also include that even if the second device is in a screen unlocked state, the first device cannot process the data of the second device. That is to say, when the second device is in a locked state, identity authentication is required to process the data of the second device. If the identity authentication is not passed, the data of the second device is equivalent to being in an encrypted state, and the first device cannot process the data of the second device.
[0095] For example, if the lock screen password entered on the second device is incorrect, the second device is still in the lock screen state, and the user cannot access the images stored in the album of the second device through the first device. For another example, when the screen of the second device is unlocked, since the data stored in the second device is highly private data, such as stored confidential files, the first device cannot directly access the confidential files in the second device without identity authentication.
[0096] The above-mentioned identity authentication information input by the user may include identity authentication information directly input by the user on the first device, and may also include identity authentication information indirectly input by the user through a third device. Here, the identity authentication information indirectly input by the user through the third device may include: the first device receives the identity authentication information input by the user sent by the third device.
[0097] It should be noted that the input form of the identity authentication information directly input by the user on the first device may include: voice input, gesture input or touch input, etc., which is not limited in this embodiment of the present disclosure.
[0098] In the embodiment of the present disclosure, the identity authentication information input by the user may be authentication information registered on the second device, and the identity authentication of the second device may be achieved through the identity authentication information input by the user.
[0099] Exemplarily, the identity authentication information input by the user may include: lock screen password information, face information, gesture information or fingerprint information, etc., which is not limited in this embodiment of the present disclosure.
[0100] The cross-device authentication function of the first device and the cross-device authentication function of the second device mentioned above both serve to verify whether the user who turns on the function is a legitimate user, to prevent illegal users from abusing the function and indirectly obtaining access rights or malicious verification failures that prevent legitimate users from using the cross-device authentication function.
[0101] In some embodiments, the method further includes: receiving first verification information; and enabling a cross-device identity authentication function of the first device if the first verification information passes.
[0102] Similarly, the interaction method is executed for the second device, and the method also includes: receiving second verification information; and when the second verification information passes, enabling a cross-device identity authentication function of the second device.
[0103] In this way, based on the authentication of the first device and the authentication of the second device, the usage rights of the users of the two devices and the key information generated by the two devices can be made more secure to prevent illegal use.
[0104] The first verification information and the second verification information may be the same information or different information. For example, the first verification information and the second verification information may both be fingerprint information or face information of the co-owner of the first device and the second device; for another example, the first verification information is the face information of the co-owner, and the second verification information is the fingerprint information of the co-owner.
[0105] It should be noted that, in the process of enabling the cross-device identity authentication function of the first device and the second device, the interfaces of the first device and the second device may display an identity authentication request button, and when the user triggers the identity authentication request button (for example, by clicking the button or sliding the button), the first device and the second device will receive the request to enable the cross-device identity authentication function, and respond to the request to instruct the user to enter the first verification information and the second verification information. After the user enters the first verification information and the second verification information, the identity authentication of the first device and the identity authentication of the second device are performed respectively, and finally, when the identity authentication of the first device and the identity authentication of the second device are both passed, the cross-device identity authentication function of the first device and the cross-device identity authentication function of the second device are enabled.
[0106] In the embodiment of the present disclosure, when the identity authentication of the first device fails and the identity authentication of the second device fails, both the first device and the second device reject the request to enable the cross-device identity authentication function, and the cross-device identity authentication functions on the first device and the second device are both turned off.
[0107] For example, Figure 3As shown, the user can input the first verification information id_info1 on the first device, and determine whether the identity authentication of the first device is passed based on the first verification information id_info1. If the first verification information id_info1 successfully matches the identity registration information stored in the first device, it is determined that the identity authentication of the first device is passed, that is, the function enabler of the first device is a legitimate user, and the cross-device identity authentication function of the first device is enabled at this time; if the first verification information id_info1 fails to match the identity registration information stored in the first device, it is determined that the identity authentication of the first device fails, that is, the function enabler of the first device is an illegal user, and the enablement request is rejected at this time.
[0108] Likewise, if Figure 3 As shown, the user enters the second verification information id_info2 on the second device, and based on the second verification information id_info2, determines whether the identity authentication of the second device is passed. If the second verification information id_info2 successfully matches the identity registration information stored in the second device, it is determined that the identity authentication of the second device is passed, that is, the function enabler of the second device is a legitimate user, and the cross-device identity authentication function of the second device is enabled at this time; if the second verification information id_info2 fails to match the identity registration information stored in the second device, it is determined that the identity authentication of the second device fails, that is, the function enabler of the second device is an illegal user, and the activation request is rejected at this time.
[0109] In the embodiment of the present disclosure, for the first device, the method further includes:
[0110] Authenticate the first verification information through an identity verification module of the first device;
[0111] or,
[0112] The first verification information is authenticated by a first verification submodule set by a cross-device identity authentication module of the first device.
[0113] For the second device, the method further includes:
[0114] authenticating the second authentication information through an authentication module of the second device;
[0115] or,
[0116] The second verification information is authenticated by a second verification submodule set by the cross-device identity authentication module of the second device.
[0117] It should be noted that the identity authentication module of the first device, the identity authentication module of the second device, the first verification submodule and the second verification submodule are all used to provide an identity authentication function for the user, through which the legitimacy of the user's identity can be verified. Here, the identity authentication method may include password authentication, gesture authentication or fingerprint authentication, etc., which is not limited in the embodiments of the present disclosure.
[0118] The cross-device identity authentication module of the first device and the cross-device identity authentication module of the second device are both used to provide a cross-device identity authentication function for the user. Through this cross-device identity authentication function, the first device can send an authentication request to the second device, and the second device can perform identity authentication based on the authentication request.
[0119] In the disclosed embodiment, the trusted execution environment is a secure software environment that can protect the safe operation of the identity authentication module and reduce the possibility of malicious operation or tampering. Therefore, in a scenario with a trusted execution environment, the first device and the second device can both directly authenticate themselves through their own identity authentication modules; in a scenario with a non-trusted execution environment, the first device and the second device authenticate themselves based on the first authentication submodule and the second authentication submodule, respectively. In this way, in a scenario with a non-trusted execution environment, the disclosed embodiment uses a newly set authentication module for identity authentication, which can improve the security of identity authentication.
[0120] In step S102, the authentication request carries the authentication information input by the user, so that after the second device receives the authentication information input by the user, the second device can be authenticated based on the authentication information input by the user. In this way, cross-device communication interaction between the first device and the second device can be established without manually unlocking the second device.
[0121] Of course, the identity authentication request may carry the identity authentication information input by the user directly, or may carry ciphertext information obtained by encrypting the identity authentication information, and the embodiments of the present disclosure do not limit this.
[0122] In an embodiment of the present disclosure, when the second device is in a locked state, the first device of the present disclosure can enable the second device to complete identity authentication based on the identity authentication request sent by the first device, thereby establishing cross-device communication interaction between the first device and the second device.
[0123] In some embodiments, the method further comprises:
[0124] Acquire first shared information;
[0125] Before sending the identity authentication request to the second device that establishes communication with the first device, the method further includes:
[0126] The identity authentication request is generated based on the first shared information and the identity authentication information.
[0127] In the embodiment of the present disclosure, the first shared information is information known to the user and can be used as root information for deriving a key. The first device can obtain an identity authentication request based on the first shared information and the identity authentication information. In the embodiment of the present disclosure, the same information input by the first device and the second device can be used as the first shared information.
[0128] In the embodiment of the present disclosure, obtaining the first shared information may include: using information input on the first device as the first shared information; or using information obtained by scanning a QR code by the first device as the first shared information; or using information sent by the server to the first device as the first shared information.
[0129] For the second device, the second device will obtain the second shared information to decrypt the identity authentication request. The second shared information matches the first shared information, and the corresponding first shared information and second shared information can be the same information, or the first shared information can be obtained by matching the second shared information. The matching process includes but is not limited to format conversion.
[0130] In the embodiment of the present disclosure, in order to simplify the processing flow, the first shared information and the second shared information can be set to be the same. In the embodiment of the present disclosure, the same information input on the second device and the first device can be used as the first shared information and the second shared information, and the same information includes but is not limited to the same identification code.
[0131] It should be noted that the same identification code may be composed of a string of numbers, letters and / or punctuation marks, and may be used to authenticate the identity of a device user. Exemplarily, the identification code includes a personal identification number (PIN), which is not limited in the present disclosure.
[0132] In the embodiment of the present disclosure, the information obtained by the first device scanning the QR code is used as the first shared information. Here, the information obtained by the first device scanning the QR code of the second device can be used as the first shared information. For the second device, the information contained in the QR code of the second device is the second shared information. In this way, the first device and the second device can have the same information.
[0133] It should be noted that both the first device and the second device have a camera function. The camera function of the first device can scan the QR code of the second device to obtain the first shared information, and the camera function of the second device can also scan the QR code of the first device to obtain the second shared information.
[0134] In the disclosed embodiment, the same information sent by the server to the first device and the second device can be used as the first shared information and the second shared information. That is, the first device and the second device can respectively request the same server to send information, and then the same information sent by the server to the first device and the second device can be used as the first shared information of the first device and the second shared information of the second device respectively. In order to prevent the leakage and tampering of the shared information, the server can sign and encrypt the sent information, thereby ensuring the security of the sent information.
[0135] For example, Figure 4 FIG. 1 is a schematic diagram showing an offline method for obtaining shared information according to an exemplary embodiment. Figure 4 As shown, using the same identification code input on the first device and the second device as the first shared information and the second shared information, or using the information obtained by scanning the QR code of the first device as the second shared information and using the information contained in the QR code of the first device as the first shared information, all belong to obtaining shared information in an offline manner.
[0136] Also illustratively, Figure 5 FIG. 1 is a schematic diagram showing an online method for obtaining shared information according to an exemplary embodiment. Figure 5 As shown, the same information sent by the server is used as the first shared information and the second shared information. This method requires establishing a communication connection between the server and the first device and the second device respectively to be implemented, which belongs to obtaining the first shared information and the second shared information in an online manner.
[0137] In the embodiment of the present disclosure, generating an identity authentication request based on the first shared information and the identity authentication information may include: encrypting the identity authentication information based on the first shared information to obtain the identity authentication request.
[0138] In some embodiments, generating the identity authentication request based on the first shared information and the identity authentication information includes:
[0139] Based on the first shared information, encrypt the identity authentication information to obtain ciphertext information;
[0140] The identity authentication request is generated based on the ciphertext information.
[0141] The above ciphertext information is the information obtained by encrypting the identity authentication information input by the user. In this way, the identity authentication can be made more secure through encryption.
[0142] In the disclosed embodiment, before encrypting the identity authentication information input by the user, the key information of the first device may be obtained based on the first shared information, so as to encrypt the identity authentication information input by the user by the key information of the first device to obtain ciphertext information.
[0143] It should be noted that encrypting the identity authentication information input by the user using the key information of the first device to obtain ciphertext information may include: encrypting the identity authentication information input by the user using a functional key stored in the first device to obtain ciphertext information, and may also include: encrypting the identity authentication information input by the user using two keys with different functions stored in the first device to obtain ciphertext information.
[0144] In some embodiments, encrypting the identity authentication information based on the first shared information to obtain ciphertext information includes:
[0145] Obtaining a first key and a second key based on the first shared information;
[0146] Encrypt the identity authentication information input by the user based on the first key to obtain encryption information of the first device;
[0147] Performing a signature process on the encrypted information of the first device based on the second key to obtain signature information of the first device;
[0148] The signature information of the first device and the encryption information of the first device are concatenated to obtain the ciphertext information.
[0149] In the disclosed embodiment, the key information of the first device is generated after the cross-device identity authentication function of the first device is enabled, and the key information of the first device includes a first key and a second key, wherein the first key is a key for encryption, and the second key is a key for signing.
[0150] It should be noted that after obtaining the first shared information, the first key can be obtained based on the first shared information and the preset encryption string; the second key can be obtained based on the first shared information and the preset signature string. It should be noted that the preset encryption string and the preset signature string are different character strings. In some embodiments, the preset encryption string and the preset signature string have different character digits; or the preset encryption string and the preset signature string have different character objects.
[0151] Here, obtaining the first key based on the first shared information and the preset encryption string may include: inputting the first shared information and the preset encryption string into a first encryption model to obtain the first key.
[0152] Obtaining the second key based on the first shared information and the preset signature string may include: inputting the first shared information and the preset signature string into a second encryption model to obtain the second key.
[0153] It should be noted that the first encryption model and the second encryption model may be the same encryption model or different encryption models. The first encryption model and the second encryption model may both include a Hash model or a Key derivation function (KDF) model, which is not limited in the embodiments of the present disclosure.
[0154] For the second device, key information of the second device is also generated based on the second shared information, and the second key information is used to decrypt the identity authentication request to implement identity authentication.
[0155] In the disclosed embodiment, after the key information of the first device is generated, the key information of the first device can be stored in a secure area of the first device. In this way, the security of the key information storage of the first device can be improved, and the security risks caused by the leakage of the key information of the first device can be prevented. Similarly, the key information of the second device is also stored in the secure storage area of the second device. In this way, the security of the key information storage of the second device can be improved, and the security risks caused by the leakage of the key information of the second device can be prevented.
[0156] Here, the security area of the first device and the security area of the second device may both be areas corresponding to the Trusted Execution Environment (TEE) in the first device and the second device. It should be noted that, when the first device and the second device do not have a trusted execution environment, the key information of the first device and the key information of the second device may be encrypted and stored.
[0157] For example, Fig. 6A FIG. 1 is a schematic block diagram showing key information from generation to storage according to an exemplary embodiment. Fig. 6A As shown, after the cross-device authentication function of the first device is enabled through the identity authentication of the first device, and the cross-device authentication function of the second device is enabled through the identity authentication of the second device, the first device and the second device generate key information based on the shared information and store the key information.
[0158] Figure 6B FIG. 1 is a schematic diagram showing key information generation of a first device according to an exemplary embodiment. Figure 6BAs shown, shared_info is the first shared information; encrypts_key is the preset encryption string; sig_key is the preset signature string; encrypt_key is the first key; hmac_key is the second key; inputting shared_info and encrypts_key into the Hash model or KDF model can obtain encrypt_key; inputting shared_info and sig_key into the Hash model or KDF model can obtain hmac_key.
[0159] It should be noted that through Figure 3 , Figure 4 and Fig. 6A and Figure 6B It can be seen that the identity authentication of the first device and the second device and the key information generation of the first device and the second device in the device interaction method can be achieved offline, without the support of the server, which can expand the applicable scenarios of the device interaction method and make the device interaction method universal.
[0160] In the embodiment of the present disclosure, in the process of obtaining the encrypted information of the first device, the first key and the identity authentication information input by the user can be input into the third encryption model to obtain the encrypted information of the first device. The third encryption model includes but is not limited to a hash model, a symmetric encryption model or an elliptic curve algorithm encryption model.
[0161] In the process of obtaining the signature information of the first device, the second key and the encrypted information of the first device can be input into the first signature model to obtain the signature information of the first device. The first signature model includes but is not limited to a Hash-based Message Authentication Code (HMAC) model.
[0162] In an embodiment of the present disclosure, after obtaining the encryption information of the first device and the signature information of the first device, the signature information of the first device and the encryption information of the first device are concatenated to obtain ciphertext information. In some embodiments, the concatenating the signature information of the first device and the encryption information of the first device to obtain ciphertext information may include: concatenating the signature information of the first device before the encryption information of the first device to obtain ciphertext information; or concatenating the signature information of the first device after the encryption information of the first device to obtain ciphertext information.
[0163] Here, the ciphertext information is obtained by concatenating the signature information of the first device and the encryption information of the second device. After the identity authentication request generated based on the ciphertext information is sent to the second device, the second device can decrypt the ciphertext information based on the key information of the second device to achieve identity authentication of the second device. In this way, the identity authentication information input by the user is encrypted and signed by the first key and the second key, which can reduce the situation where the identity authentication information input by the user is obtained and tampered with, and improve the security of identity authentication. In addition, the encryption of the ciphertext information by the first device and the decryption of the decrypted information by the second device can be achieved in the trusted execution environment of the two devices, which can further improve the security of identity authentication.
[0164] In some embodiments, encrypting the identity authentication information input by the user based on the first key to obtain the encrypted information of the first device includes:
[0165] Convert the identity authentication information input by the user into a byte array.
[0166] The first key is used to encrypt the identity authentication information of the byte array type to obtain encrypted information of the first device.
[0167] In the embodiment of the present disclosure, in the process of encrypting the identity authentication information input by the user to obtain the encrypted information of the first device, it is necessary to convert the data type of the identity authentication information input by the user into a byte array type.
[0168] It should be noted that after obtaining the identity authentication information of the byte array type, the identity authentication information of the byte array type can be passed to the encryption module of the TEE in the first device, and the first key is used in the encryption module to encrypt the identity authentication information of the byte array type to obtain encrypted information.
[0169] In the disclosed embodiment, the electronic device first converts the data type of the identity authentication information input by the user, and then encrypts the identity authentication information converted into a byte array type. In this way, the data type of the encrypted object can be unified, making the encryption universal.
[0170] In order to better understand the method for a first device to perform device interaction, an example of the embodiment of the present disclosure is as follows:
[0171] Figure 7 FIG. 1 is a schematic diagram showing a first device executing a device interaction method according to an exemplary embodiment. Figure 7As shown, the user inputs the identity authentication information id_info (for example, password data, fingerprint data and face data), the first device first converts the identity authentication information id_info input by the user into a byte array type and passes it to the encryption module of the TEE in the first device, and then uses the first key encrypt_key to encrypt the byte array type identity authentication information to obtain the encrypted information cipher_id_info of the first device; and inputs the second key hmac_key and the encrypted information cipher_id_info of the first device into the HMAC model to obtain the signature information mac_id_info of the first device; finally, the encrypted information cipher_id_info of the first device and the signature information mac_id_info of the first device are spliced to obtain the ciphertext information, and the identity authentication request generated based on the ciphertext information is sent to the second device.
[0172] The disclosed embodiment also provides a device interaction method. Figure 8 A schematic diagram of a device interaction process according to an exemplary embodiment Figure 2 .like Figure 8 As shown, the device interaction method is applied to a second device, and the second device executes the device interaction method including the following steps:
[0173] S201, receiving an identity authentication request sent by a first device that establishes communication with the second device, wherein a cross-device identity authentication function of the second device is turned on and the second device is in a locked state;
[0174] S202: Perform identity authentication in response to the identity authentication request.
[0175] In the embodiment of the present disclosure, a communication connection is established between the first device and the second device. The communication connection may include Bluetooth or a local area network, etc., which is not limited in the embodiment of the present disclosure.
[0176] It should be noted that the first device and the second device can realize the first device sending an authentication request to the second device and the second device receiving the authentication request through the communication connection, but because the second device is in a locked state, the first device cannot access the data in the second device. Therefore, the first device needs to send an authentication request to the second device so that the second device can perform an authentication based on the authentication request, and the first device can access the data in the second device only after the authentication is passed.
[0177] In the embodiment of the present disclosure, when the first device sends an authentication request to the second device, the cross-device authentication function of the first device and the cross-device authentication function of the second device are both enabled. That is, when the second device receives the authentication request, the cross-device authentication function of the second device is enabled.
[0178] In some embodiments, the method further comprises:
[0179] Acquire second shared information;
[0180] The step of performing identity authentication in response to the identity authentication request includes:
[0181] In response to the identity authentication request, identity authentication is performed based on the second shared information and the identity authentication request.
[0182] The above-mentioned acquisition of the second shared information may include: using the information input on the second device as the second shared information; or, using the information obtained by the second device scanning the QR code as the second shared information; or, using the information sent by the server to the second device as the second shared information.
[0183] In the disclosed embodiment, after obtaining the second shared information, identity authentication can be performed based on the second shared information and the identity authentication request. Since the second shared information matches the first shared information, and the identity authentication request is generated based on the first shared information and the identity authentication information, the identity authentication request can be decrypted based on the second shared information to perform identity authentication.
[0184] In some embodiments, the performing identity authentication based on the second shared information and the identity authentication request includes:
[0185] Based on the second shared information, decrypting the identity authentication request to obtain decrypted information;
[0186] The identity of the second device is authenticated based on the decrypted information.
[0187] In the embodiment of the present disclosure, the key information of the second device used to decrypt the identity authentication request can be obtained based on the second shared information, and then the identity authentication request is decrypted based on the key information of the second device to obtain the decrypted information.
[0188] Here, after obtaining the decrypted information, the second device may be authenticated based on the decrypted information. In some embodiments, authenticating the second device based on the decrypted information may include: determining whether the decrypted information matches the identity registration information stored in the second device; if the decrypted information matches the identity registration information stored in the second device, determining that the identity authentication of the second device is passed. If the decrypted information does not match the identity registration information stored in the second device, determining that the identity authentication of the second device has failed.
[0189] It should be noted that, when the identity authentication of the second device is passed, authentication pass information can be sent to the first device, so that the first device can directly access the second device when receiving the authentication pass information.
[0190] Here, when the identity authentication of the second device is passed, if the second device is in a locked state, the electronic device can switch the second device from the locked state to the unlocked state, or may not perform the switching operation, which is not limited in the embodiments of the present disclosure. In addition, when receiving the identity authentication request sent by the first device, the second device can be in an unlocked state or a locked state, which is not limited in the embodiments of the present disclosure.
[0191] In the disclosed embodiment, the second device performs identity authentication on the second device in response to the identity authentication request sent by the first device, which enables the second device to automatically complete its own identity authentication without the need for the user to manually unlock it, making cross-device communication more convenient. In addition, the disclosed embodiment performs identity authentication on the second device based on the decrypted information, which shows that the disclosed embodiment completes the identity authentication by decrypting the decrypted information obtained, which can improve the security of the identity authentication.
[0192] In some embodiments, decrypting the identity authentication request based on the second shared information to obtain decrypted information includes:
[0193] Obtain key information of the second device based on the second shared information;
[0194] The identity authentication request is processed based on the key information of the second device to obtain decryption information.
[0195] In the embodiment of the present disclosure, obtaining the key information of the second device based on the second shared information may include: obtaining a fourth key based on the second shared information and a preset encryption string; and obtaining a third key based on the second shared information and a preset signature string. The third key is used for signature verification, and the fourth key is used for decryption.
[0196] Here, when the first shared information and the second shared information are the same, the first key and the fourth key are the same, and the second key and the third key are the same. Here, the specific process of obtaining the fourth key and the third key can refer to the process of obtaining the first key and the second key through model processing, which will not be described in the present embodiment.
[0197] It should be noted that after the key information of the second device is generated, the key information of the second device can be stored in a secure area of the second device to improve storage security. Here, since the key information of the second device is generated after the cross-device identity authentication function of the second device is turned on, the time of generating the key information of the second device may be earlier than the time of using the key information of the second device for decryption. Therefore, the generated key information of the second device can be stored in the secure area of the second device, and the key information of the second device in the decryption process can be obtained from the secure area of the second device.
[0198] In some embodiments, the identity authentication request is generated based on ciphertext information; and the processing of the identity authentication request based on the third key and the fourth key to obtain decrypted information includes:
[0199] Splitting the ciphertext information to obtain split encrypted information and split signature information;
[0200] Determining whether the ciphertext signature verification is successful based on the third key and the split signature information;
[0201] When the ciphertext signature verification is successful, the fourth key is used to decrypt the split encrypted information to obtain the decrypted information.
[0202] In the disclosed embodiment, the ciphertext information needs to be split first during the decryption process, and the splitting process corresponds to the splicing process of obtaining the ciphertext information. For example, the splicing process is to splice the signature information of the first device after the encryption information of the first device, and the splitting process is to split the ciphertext information based on the length of the encryption information of the first device and the splicing position.
[0203] It should be noted that after the splitting, the ciphertext needs to be verified first, and if the ciphertext signature verification is successful, the split encrypted information can be decrypted to obtain the decrypted information.
[0204] In some embodiments, the determining whether the ciphertext signature verification is successful based on the third key and the split signature information includes:
[0205] The split signature information is signed using the third key to obtain signature verification information; when the signature verification information is the same as the split signature information, it is determined that the ciphertext signature verification is successful.
[0206] In the embodiment of the present disclosure, in the process of obtaining the signature verification information, the third key and the split signature information can be input into the second signature model to obtain the signature verification information. The second signature model includes but is not limited to the HMAC model.
[0207] It should be noted that the signature verification information is the same as the split signature information. Correspondingly, the content included in the signature verification information is the same as the content included in the split signature information.
[0208] In the embodiment of the present disclosure, when the signature verification information and the split signature information are not the same, it is determined that the ciphertext signature verification fails. Here, the ciphertext signature failure indicates that the ciphertext information may be tampered with or disguised. In some embodiments, the method further includes: when the ciphertext signature fails, stopping the decryption of the split encrypted information.
[0209] It should be noted that after the second device stops decrypting the split encrypted information, the second device can generate authentication failure information and send the authentication failure information to the first device to inform the first device that the identity authentication of the second device failed during the identity authentication process.
[0210] In the disclosed embodiment, when the ciphertext signature verification is successful, the fourth key can be used to decrypt the split encrypted information to obtain the decrypted information. It should be noted that the first key and the fourth key are the same, so the split encrypted information can be decrypted based on the fourth key.
[0211] For example, Fig. 9 FIG. 1 is a schematic diagram showing an exemplary embodiment of a second device executing a device interaction method. Fig. 9As shown, the second device first splits the acquired ciphertext information to obtain the split encryption information cipher_id_info and the split signature information mac_id_info; then inputs the third key hmac_key and the split signature information mac_id_info into the HMAC model to obtain the verification information mac_id_info_temp; and compares the split signature information mac_id_info and the verification information mac_id_info_temp. When the split signature information mac_id_info and the verification information mac_id_info_temp are the same, it is determined that the ciphertext verification is successful; when the split signature information mac_id_info and the verification information mac_id_info_temp are different, it is determined that the ciphertext verification fails; finally, when the ciphertext verification is successful, the fourth key encrypt_key is used to decrypt the split encryption information cipher_id_info to obtain the decrypted information id_info, and the decrypted information id_info is passed into the identity authentication module of the second device for identity authentication.
[0212] In some embodiments, the method further comprises:
[0213] After the cross-device identity authentication function of the second device is enabled, detecting input information of the second device;
[0214] When the input information of the second device is used to represent the shutdown function and the identity authentication of the input user of the second device is passed, the entrance to the cross-device identity authentication function of the second device is closed and the key information of the second device is deleted.
[0215] In the embodiments of the present disclosure, the user may input information on the second device when the second device is in an unsafe state. For example, when the second device is far away from the user, information may be input on the second device to disable a function in order to prevent the second device from being illegally used. The input information includes key input information, voice input information, gesture input information, or touch input information, which is not limited in the embodiments of the present disclosure.
[0216] It should be noted that the input information is used to characterize the shutdown function, indicating that the second device has received a shutdown request input by the user to shut down the cross-device identity authentication function of the second device. The identity authentication of the input user of the second device is passed, indicating that the input user of the second device is a legitimate user. Here, before executing the shutdown request, the second device needs to confirm the legitimacy of the input user of the second device to reduce the situation of performing illegal operations on the second device.
[0217] For example, Fig.10As shown, after the cross-device authentication function of the second device is turned off, when the second device with the cross-device authentication function turned off is forcibly authenticated by the first device with the cross-device authentication function not turned off, since the entrance of the cross-device authentication function of the second device has been closed, the ciphertext information provided by the first device cannot be decrypted normally through the entrance, that is, the second device refuses access. In addition, the key information of the second device is also deleted, even if the entrance of the second device is illegally accessed, it will cause the decryption and signature verification to fail, so that the second device cannot be authenticated.
[0218] In the embodiment of the present disclosure, the key information of the second device is generated when the cross-device identity authentication function of the second device is turned on, and is deleted when the cross-device identity authentication function of the second device is turned off. This can reduce the possibility that the first device can be used by an illegal user to forcibly access the second device whose cross-device identity authentication function has been turned off when the second device is in an unsafe state, thereby improving the security of identity authentication.
[0219] For example, Fig.11 FIG. 1 is a schematic diagram showing a second device shutdown function according to an exemplary embodiment. Fig.11 As shown, the shutdown function includes identity authentication before entry of the shutdown function, execution of the shutdown function entry, and deletion of key information of the second device in the TEE.
[0220] Fig.12 FIG. 1 is a schematic diagram showing an identity authentication before closing a function according to an exemplary embodiment. Fig.12 As shown, if the identity authentication of the input user of the second device is passed, the function entrance is closed; if the identity authentication of the input user of the second device fails, the closing request is rejected. In the case where the first device is the accessed device, if the identity authentication of the input user of the first device is passed, the function entrance is closed; if the identity authentication of the input user of the first device fails, the closing request is rejected.
[0221] The disclosed embodiment also provides a device interaction apparatus, which is applied in a first device. Fig.13 A device interaction apparatus according to an exemplary embodiment is shown in FIG. Figure 1 .like Fig.13 As shown, the device interaction apparatus 1000 includes:
[0222] The first receiving module 1001 is configured to receive identity authentication information input by a user when the cross-device identity authentication function of the first device is enabled;
[0223] The sending module 1002 is configured to send an identity authentication request to a second device that establishes communication with the first device, wherein the identity authentication request carries the identity authentication information, and the identity authentication request is used to request the second device in a locked state to perform identity authentication based on the identity authentication information.
[0224] In some embodiments, the apparatus further comprises:
[0225] A first verification receiving module, configured to receive first verification information;
[0226] The first enabling module is configured to enable a cross-device identity authentication function of the first device when the first verification information passes.
[0227] In some embodiments, the apparatus further comprises:
[0228] A first acquisition module, configured to acquire first shared information;
[0229] The request generation module is configured to generate the identity authentication request based on the first shared information and the identity authentication information before sending the identity authentication request to the second device that establishes communication with the first device.
[0230] In some embodiments, the request generation module is further configured to encrypt the identity authentication information based on the first shared information to obtain ciphertext information; and generate the identity authentication request based on the ciphertext information.
[0231] In some embodiments, the request generation module is also configured to obtain a first key and a second key based on the first shared information; encrypt the identity authentication information input by the user based on the first key to obtain the encrypted information of the first device; sign the encrypted information of the first device based on the second key to obtain the signature information of the first device; and concatenate the signature information of the first device and the encrypted information of the first device to obtain the ciphertext information.
[0232] In some embodiments, the request generation module is further configured to perform data type conversion on the identity authentication information input by the user to obtain identity authentication information of a byte array type; and use the first key to encrypt the identity authentication information of the byte array type to obtain encryption information of the first device.
[0233] The disclosed embodiment also provides a device interaction apparatus, which is applied in a second device. Fig.14 A device interaction apparatus according to an exemplary embodiment is shown in FIG. Figure 2 .like Fig.14 As shown, the device interaction apparatus 2000 includes:
[0234] The second receiving module 2001 is configured to receive an identity authentication request sent by a first device that establishes communication with the second device, wherein a cross-device identity authentication function of the second device is turned on and the second device is in a locked state;
[0235] The authentication module 2002 is configured to perform identity authentication in response to the identity authentication request.
[0236] In some embodiments, the apparatus further comprises:
[0237] A second verification receiving module, configured to receive second verification information;
[0238] The second enabling module is configured to enable a cross-device identity authentication function of the second device when the second verification information passes.
[0239] In some embodiments, the apparatus further comprises:
[0240] A second acquisition module, configured to acquire second shared information;
[0241] The authentication module 2002 is further configured to respond to the identity authentication request and perform identity authentication based on the second shared information and the identity authentication request.
[0242] In some embodiments, the authentication module 2002 is further configured to decrypt the identity authentication request based on the second shared information to obtain decrypted information; and perform identity authentication on the second device based on the decrypted information.
[0243] In some embodiments, the authentication module 2002 is further configured to obtain key information of the second device based on the second shared information; based on the key information of the second device, process the identity authentication request to obtain decryption information.
[0244] In some embodiments, the identity authentication request is generated based on ciphertext information; the key information of the second device includes a third key and a fourth key; the authentication module 2002 is also configured to split the ciphertext information to obtain the split encrypted information and the split signature information; based on the third key and the split signature information, determine whether the ciphertext verification is successful; if the ciphertext verification is successful, use the fourth key to decrypt the split encrypted information to obtain the decrypted information.
[0245] In some embodiments, the authentication module 2002 is further configured to use the third key to sign the split signature information to obtain signature verification information; when the signature verification information and the split signature information are the same, it is determined that the ciphertext signature verification is successful.
[0246] In some embodiments, the apparatus further comprises:
[0247] The decryption stopping module is configured to stop decrypting the split encrypted information when the ciphertext signature verification fails.
[0248] In some embodiments, the apparatus further comprises:
[0249] a detection module, configured to detect input information of the second device after a cross-device identity authentication function of the second device is enabled;
[0250] The function closing module is configured to close the entrance of the cross-device identity authentication function of the second device and delete the key information of the second device when the input information of the second device is used to represent the closing function and the identity authentication of the input user of the second device is passed.
[0251] The specific manner in which each module in the device of the above embodiment performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0252] Fig.15 8 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0253] Reference Fig.15 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0254] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0255] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0256] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0257] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0258] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0259] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0260] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0261] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 3G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0262] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0263] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0264] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a first device, enables the first device to execute the device interaction method described in one or more of the above-mentioned embodiments; or, when the instructions in the storage medium are executed by a processor of a second device, enables the second device to execute the device interaction method described in one or more of the above-mentioned embodiments.
[0265] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0266] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A device interaction method, characterized in that: Applied in a first device, the method includes: When a cross-device identity authentication function of the first device is enabled, receiving identity authentication information input by a user; An identity authentication request is sent to a second device that establishes communication with the first device, wherein the identity authentication request carries the identity authentication information, and the identity authentication request is used to request the second device in a locked state to perform identity authentication based on the identity authentication information.
2. The method according to claim 1, characterized in that The method further comprises: receiving first verification information; When the first verification information passes, a cross-device identity authentication function of the first device is enabled.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: Acquire first shared information; Before sending the identity authentication request to the second device that establishes communication with the first device, the method further includes: The identity authentication request is generated based on the first shared information and the identity authentication information.
4. The method according to claim 3, characterized in that The generating the identity authentication request based on the first shared information and the identity authentication information includes: Based on the first shared information, encrypt the identity authentication information to obtain ciphertext information; The identity authentication request is generated based on the ciphertext information.
5. The method according to claim 4, characterized in that The step of encrypting the identity authentication information based on the first shared information to obtain ciphertext information includes: Obtaining a first key and a second key based on the first shared information; Encrypt the identity authentication information input by the user based on the first key to obtain encryption information of the first device; Performing a signature process on the encrypted information of the first device based on the second key to obtain signature information of the first device; The signature information of the first device and the encryption information of the first device are concatenated to obtain the ciphertext information.
6. The method according to claim 5, characterized in that The encrypting the identity authentication information input by the user based on the first key to obtain the encrypted information of the first device includes: Convert the identity authentication information input by the user into a byte array. The first key is used to encrypt the identity authentication information of the byte array type to obtain encrypted information of the first device.
7. A device interaction method, characterized in that: Applied in the second device, comprising: Receiving an identity authentication request sent by a first device that establishes communication with the second device, wherein a cross-device identity authentication function of the second device is turned on and the second device is in a locked state; In response to the identity authentication request, identity authentication is performed.
8. The method according to claim 7, characterized in that The method further comprises: receiving second verification information; If the second verification information passes, the cross-device identity authentication function of the second device is enabled.
9. The method according to claim 7 or 8, characterized in that: The method further comprises: Acquire second shared information; The step of performing identity authentication in response to the identity authentication request includes: In response to the identity authentication request, identity authentication is performed based on the second shared information and the identity authentication request.
10. The method according to claim 9, characterized in that The performing identity authentication based on the second shared information and the identity authentication request includes: Based on the second shared information, decrypting the identity authentication request to obtain decrypted information; The identity of the second device is authenticated based on the decrypted information.
11. The method according to claim 10, characterized in that The decrypting the identity authentication request based on the second shared information to obtain decrypted information includes: Obtaining key information of the second device based on the second shared information; The identity authentication request is processed based on the key information of the second device to obtain decryption information.
12. The method according to claim 11, characterized in that The identity authentication request is generated based on ciphertext information; the key information of the second device includes a third key and a fourth key; the identity authentication request is processed based on the key information of the second device to obtain decrypted information, including: Splitting the ciphertext information to obtain split encrypted information and split signature information; Determining whether the ciphertext signature verification is successful based on the third key and the split signature information; When the ciphertext signature verification is successful, the fourth key is used to decrypt the split encrypted information to obtain the decrypted information.
13. The method according to claim 12, characterized in that The determining whether the ciphertext signature verification is successful based on the third key and the split signature information includes: Using the third key to sign the split signature information to obtain signature verification information; When the signature verification information and the split signature information are the same, it is determined that the ciphertext signature verification is successful.
14. The method according to claim 12, characterized in that The method further comprises: In the event that the ciphertext signature verification fails, decryption of the split encrypted information is stopped.
15. The method according to claim 7 or 8, characterized in that The method further comprises: After the cross-device identity authentication function of the second device is enabled, detecting input information of the second device; When the input information of the second device is used to represent the shutdown function and the identity authentication of the input user of the second device is passed, the entrance to the cross-device identity authentication function of the second device is closed and the key information of the second device is deleted.
16. A device interaction apparatus, characterized in that: Applied in a first device, comprising: A first receiving module, configured to receive identity authentication information input by a user when a cross-device identity authentication function of the first device is enabled; The sending module is configured to send an identity authentication request to a second device that establishes communication with the first device, wherein the identity authentication request carries the identity authentication information, and the identity authentication request is used to request the second device in a locked state to perform identity authentication based on the identity authentication information.
17. A device interaction apparatus, characterized in that: Applied in the second device, comprising: A second receiving module is configured to receive an identity authentication request sent by a first device that establishes communication with the second device, wherein a cross-device identity authentication function of the second device is turned on and the second device is in a locked state; The authentication module is configured to perform identity authentication in response to the identity authentication request.
18. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the device interaction method as described in any one of claims 1 to 6; or, is configured to execute the device interaction method as described in any one of claims 7 to 15.
19. A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a first device, enables the first device to execute the device interaction method as described in any one of claims 1 to 6; or, when the instructions in the storage medium are executed by a processor of a second device, enables the second device to execute the device interaction method as described in any one of claims 7 to 15.