Device pairing authentication method, device, sender device and receiver device
By enabling Bluetooth configuration service to establish a connection with the receiver device for device authentication and negotiation of session keys when the sending device responds to the data transmission request, the problem of insufficient security of existing wireless delivery technology is solved, and higher security and smaller attack windows are achieved.
Patent Information
- Application Number
- CN202110733145.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-06-29
AI Technical Summary
The existing wireless delivery technology is insufficient security, resulting in the possibility of the receiver's device being attacked or tracked.
Enable Bluetooth configuration service when the sending device responds to the data transmission request, broadcast configuration information, and establish a connection with the receiving device for device authentication and negotiation session keys to ensure the security of data transmission.
It effectively improves the security of the session, reduces the risk of the receiver's device being attacked, and ensures better security.
Smart Images

Figure CN115550919B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a device pairing authentication method, apparatus, sender device and receiver device. Background Art
[0002] Electronic devices can transmit pictures, videos, audio, documents and other data through wireless casting (Cast) technology.
[0003] In the prior art, after receiving a data transmission request, the sending device authenticates with nearby devices via Bluetooth, and after authentication, establishes a connection with the sending device via Wi-Fi (wireless network). Finally, after the sending device and the receiving device are authenticated, the data transmission is completed.
[0004] However, existing wireless transmission technologies are not secure enough and may result in the receiving device being attacked or tracked. Summary of the invention
[0005] The embodiments of the present application provide a device pairing authentication method, apparatus, sender device and receiver device, which can improve the problem that the security of wireless transmission technology is insufficient and the receiver device may be attacked or tracked.
[0006] In a first aspect, an embodiment of the present application provides a device pairing authentication method, which is applied to a sending device, including:
[0007] In response to the data transmission request, the first configuration service is started. The first configuration information is broadcast. In response to the first connection establishment request sent by the receiver according to the broadcasted first configuration information, the first connection is established with the receiver device, and the first configuration service is closed. The receiver device is authenticated and the session key is negotiated through the first connection.
[0008] In some implementations, the sending device may be a smart phone, tablet computer, laptop computer, vehicle-mounted device, wearable device, virtual reality / simulated reality device, or other electronic device that supports Bluetooth and wireless networks. This application does not limit the type of the sending device.
[0009] In the first aspect, when the sending device responds to the data transmission request, the first data transmission configuration service is enabled and the first data transmission configuration information is broadcast. After receiving the broadcast information, the receiving device performs data transmission configuration with the sending device and returns the first data transmission configuration confirmation information. The sending device responds to the first data transmission configuration confirmation information to establish a first connection with each receiving device and close the Bluetooth configuration service. Finally, the device authentication and session key negotiation are performed through the first connection. Since the sending device only turns on the Bluetooth configuration service when configuring Bluetooth in response to the data transmission request, the receiving device does not need to turn on the Bluetooth configuration service when responding to the Bluetooth broadcast, so that the receiving device can avoid being attacked. The time for the sending device to turn on the Bluetooth configuration service is short, and the window available for attack is small, which can also ensure good security.
[0010] In some implementations, the first connection establishment request includes a data transmission mode of the receiving device.
[0011] When the data transmission mode is the contact mode, authenticating the receiving device and negotiating a session key through the first connection includes:
[0012] A key negotiation request message is sent to the receiving device, the key negotiation request message includes the device public key of the sending device, the user identity authentication data of the sending device, and the signature of the key negotiation request message by the private key of the sending device. A key negotiation response message is received and authenticated by the receiving device according to the key negotiation request message, the key negotiation response message includes the device public key of the receiving device, the user identity authentication data of the receiving device, the device name of the receiving device, and the signature of the key negotiation response message by the private key of the receiving device, wherein the user identity authentication data and the device name are encrypted using the session key, and the session key is generated by the receiving device according to the key negotiation request message. Authentication is performed according to the key negotiation response message, and a session key is generated according to the key negotiation response message after the authentication is passed. The receiving device is authenticated according to the session key and the key negotiation response message.
[0013] In some implementations, authenticating the receiving device based on the session key and the key negotiation response message includes: decrypting the user identity authentication data and the device name in the key negotiation response message based on the session key, and authenticating the receiving device based on the decrypted user identity authentication data and / or device name.
[0014] In some implementations, the first connection establishment request includes a data transmission mode of the receiving device.
[0015] When the data transmission mode is the owner mode, authenticating the receiving device and negotiating a session key through the first connection includes:
[0016] A key negotiation request message is sent to the receiving device, the key negotiation request message includes the device public key of the sending device, the device name of the sending device, and the signature of the private key of the sending device on the key negotiation request message. A key negotiation response message is received and authenticated by the receiving device according to the key negotiation request message, the key negotiation response message includes the device public key of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the device name is encrypted using a session key, and the session key is generated by the receiving device according to the key negotiation request message. Authentication is performed according to the key negotiation response message, and a session key is generated according to the key negotiation response message after the authentication is passed. A second device verification code is generated according to the session key, and the receiving device is verified by the second device verification code.
[0017] In some implementations, verification is performed by a second device verification code recipient device, including:
[0018] The second device verification code is displayed on the sending device. A confirmation operation is received from the user according to the second device verification code, and when the confirmation operation indicates that the second device verification code is the same as the first device verification code, it is confirmed that the receiving device has passed the verification, and the first device verification code is generated by the receiving device according to the session key.
[0019] In some implementations, receiving and authenticating a key negotiation response message sent by a receiving device in response to a key negotiation request message includes:
[0020] The signature of the key negotiation response message is verified by the public key of the recipient's device against the private key of the recipient's device. If the verification succeeds, it is determined that the authentication is successful.
[0021] In some implementations, generating a session key according to the key negotiation response message includes:
[0022] The session key is negotiated based on the public key of the receiving device and the private key of the sending device.
[0023] In some implementations, after performing device authentication on the receiving device and negotiating a session key through the first connection, the method further includes:
[0024] The data corresponding to the data transmission request is sent to a receiving device through the first connection.
[0025] In some implementations, sending data corresponding to the data transmission request to a receiving device includes:
[0026] The data corresponding to the data transmission request is encrypted using the session key and then sent to the receiving device through the first connection.
[0027] In some implementations, after performing device authentication on the receiving device and negotiating a session key through the first connection, the method further includes:
[0028] A second connection is established with the receiving device and data corresponding to the data transmission request is sent to the receiving device via the second connection.
[0029] In some implementations, sending data corresponding to the data transmission request to a receiving device includes:
[0030] A file transfer connection is established with the receiving device through the second connection. The characteristic information of the data corresponding to the data transfer request is encrypted with the session key and sent to the receiving device. In response to a confirmation message from the receiving device, the data corresponding to the data transfer request is encrypted with the session key and sent to the receiving device.
[0031] In the first aspect, the sending device negotiates with the receiving device through the first connection to obtain a session key, and encrypts the data using the session key in subsequent data transmission, thereby effectively improving the security of the session.
[0032] In a second aspect, an embodiment of the present application provides a device pairing authentication method, which is applied to a receiving device, including:
[0033] Receive first configuration information from a sending device. According to the first configuration information, send a first connection establishment request to the sending device to establish a first connection with the receiving device. Perform device authentication on the sending device and negotiate a session key through the first connection.
[0034] In some implementations, the receiving device may be a smart phone, tablet computer, laptop computer, vehicle-mounted device, wearable device, virtual reality / simulated reality device, or other electronic device that supports Bluetooth and wireless networks. This application does not limit the type of receiving device.
[0035] In some implementations, sending a first connection establishment request to a sending device according to the first configuration information includes:
[0036] Acquire the data transmission mode of the receiving device. Send a first connection establishment request to the sending device according to the first configuration information and the data transmission mode of the receiving device.
[0037] In some implementations, when the data transmission mode is the contact mode, performing device authentication and negotiating a session key on the sender device through the first connection includes:
[0038] Receive and authenticate a key negotiation request message from a sending device, the key negotiation request message including the device public key of the sending device, the user identity authentication data of the sending device, and the signature of the private key of the sending device on the key negotiation request message. Authenticate the sending device according to the key negotiation request message. Generate a session key according to the key negotiation request message. Send a key negotiation response message to the sending device, the key negotiation response message including the device public key of the receiving device, the user identity authentication data of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the user identity authentication data and the device name are encrypted using the session key.
[0039] In some implementations, authenticating the sending device according to the key agreement request message includes:
[0040] The sender device is authenticated based on the user identity authentication data of the sender device.
[0041] In some implementations, when the data transmission mode is the owner mode, performing device authentication and negotiating a session key on the sender device through the first connection includes:
[0042] Receive and authenticate a key negotiation request message from a sending device, the key negotiation request message including a device public key of the sending device, user identity authentication data of the sending device, and a signature of the key negotiation request message by the private key of the sending device. Generate a session key according to the key negotiation request message. Send a key negotiation response message to the sending device, the key negotiation response message including a device public key of the receiving device, a device name of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by the private key of the receiving device, wherein the device name is encrypted using the session key. Generate a first device verification code according to the session key. Verify the sending device through the first device verification code.
[0043] In some implementations, verifying the sender device using the first device verification code includes:
[0044] The first device verification code is displayed on the receiving device. A confirmation operation is received from the user according to the first device verification code, and when the confirmation operation indicates that the first device verification code is the same as the second device verification code, it is confirmed that the sending device has passed the verification, and the second device verification code is generated by the sending device according to the session key.
[0045] In some implementations, receiving and authenticating a key negotiation request message from a sending device includes:
[0046] The signature of the key negotiation request is verified by the sender's device public key against the sender's device private key. If the verification succeeds, the authentication is confirmed to be successful.
[0047] In some implementations, generating a session key according to the key negotiation response message includes:
[0048] The session key is negotiated based on the public key of the sender's device and the private key of the receiver's device.
[0049] In some implementations, after performing device authentication on the sender device and negotiating a session key through the first connection, the method further includes:
[0050] Data is received from a sending device through a first connection, where the data is sent by the sending device according to a received data transmission request.
[0051] In some implementations, receiving data from a sender device includes:
[0052] Receive encrypted data from the sender's device. The encrypted data is obtained by encrypting the data corresponding to the data transmission request by the sender using the session key. Display the characteristic information of the data. In response to confirming the reception operation, decrypt the encrypted data according to the session key and store it.
[0053] In some implementations, after performing device authentication on the sender device and negotiating a session key through the first connection, the method further includes:
[0054] A second connection is established with the sending device. Data from the sending device is received through the second connection, where the data is sent by the sending device according to the received data transmission request.
[0055] In some implementations, receiving data from a sender device includes:
[0056] Establish a file transfer connection with the sender device through the second connection. Receive characteristic information of the encrypted data from the sender device. Decrypt the characteristic information of the encrypted data according to the session key and display the characteristic information of the encrypted data. In response to the confirmation of the reception operation, send a confirmation message to the sender device. Receive the encrypted data from the sender device. Decrypt the encrypted data according to the session key and store it.
[0057] In a third aspect, an embodiment of the present application provides a device pairing authentication apparatus, which is applied to a sending device, including:
[0058] The response module is used to respond to the data transmission request and start the first configuration service. The broadcast module is used to broadcast the first configuration information. The response module is also used to respond to the first connection establishment request sent by the receiver according to the broadcasted first configuration information, establish the first connection with the receiver device, and close the first configuration service. The negotiation module is used to authenticate the receiver device and negotiate the session key through the first connection.
[0059] In some implementations, the first connection establishment request includes a data transmission mode of the receiving device.
[0060] When the data transmission mode is the contact mode, the negotiation module is specifically used to send a key negotiation request message to the receiving device, the key negotiation request message includes the device public key of the sending device, the user identity authentication data of the sending device, and the signature of the private key of the sending device on the key negotiation request message. Receive and authenticate the key negotiation response message sent by the receiving device according to the key negotiation request message, the key negotiation response message includes the device public key of the receiving device, the user identity authentication data of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the user identity authentication data and the device name are encrypted using the session key, and the session key is generated by the receiving device according to the key negotiation request message. Authentication is performed according to the key negotiation response message, and a session key is generated according to the key negotiation response message after the authentication is passed. Authentication is performed on the receiving device according to the session key and the key negotiation response message.
[0061] In some implementations, the negotiation module is specifically configured to decrypt the user identity authentication data and the device name in the key negotiation response message according to the session key, and authenticate the receiving device according to the decrypted user identity authentication data and / or device name.
[0062] In some implementations, the first connection establishment request includes a data transmission mode of the receiving device.
[0063] When the data transmission mode is the owner mode, the negotiation module is specifically used to send a key negotiation request message to the receiving device, the key negotiation request message includes the device public key of the sending device, the device name of the sending device, and the signature of the private key of the sending device on the key negotiation request message. Receive and authenticate the key negotiation response message sent by the receiving device according to the key negotiation request message, the key negotiation response message includes the device public key of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the device name is encrypted using the session key, and the session key is generated by the receiving device according to the key negotiation request message. Perform authentication according to the key negotiation response message, and generate a session key according to the key negotiation response message after the authentication is passed. Generate a second device verification code according to the session key and verify the receiving device through the second device verification code.
[0064] In some implementations, the apparatus further includes a verification module, configured to display a second device verification code on the sending device, receive a confirmation operation sent by a user according to the second device verification code, and when the confirmation operation indicates that the second device verification code is the same as the first device verification code, confirm that the receiving device has passed the verification, and the first device verification code is generated by the receiving device according to the session key.
[0065] In some implementations, the verification module is further used to verify the signature of the key negotiation response message using the private key of the recipient device using the public key of the recipient device, and if the verification is successful, it is determined that the authentication is successful.
[0066] In some implementations, the negotiation module is further configured to obtain a session key through negotiation based on a public key of a receiving device and a private key of a sending device.
[0067] In some implementations, the apparatus further includes a sending module, configured to send data corresponding to the data transmission request to a receiving device via the first connection.
[0068] In some implementation modes, the sending module is specifically configured to encrypt the data corresponding to the data transmission request by using a session key, and then send the encrypted data to the receiving device through the first connection.
[0069] In some implementation modes, the sending module is further configured to establish a second connection with the receiving device and to send the data corresponding to the data transmission request to the receiving device via the second connection.
[0070] In some implementations, the sending module is specifically configured to establish a file transfer connection with a receiving device through a second connection, encrypt the characteristic information of the data corresponding to the data transmission request with a session key, and send the encrypted data to the receiving device. In response to a confirmation message from the receiving device, encrypt the data corresponding to the data transmission request with a session key, and send the encrypted data to the receiving device.
[0071] In a fourth aspect, an embodiment of the present application provides a device pairing authentication apparatus, which is applied to a receiving device, including:
[0072] The receiving module is used to receive the first configuration information from the sending device. The sending module is used to send a first connection establishment request to the sending device according to the first configuration information to establish a first connection with the receiving device. The negotiation module is used to authenticate the sending device and negotiate a session key through the first connection.
[0073] In some implementation modes, the sending module is specifically configured to obtain a data transmission mode of the receiving device and send a first connection establishment request to the sending device according to the first configuration information and the data transmission mode of the receiving device.
[0074] In some implementations, when the data transmission mode is the contact mode, the negotiation module is specifically used to receive and authenticate a key negotiation request message from a sender device, the key negotiation request message including a device public key of the sender device, user identity authentication data of the sender device, and a signature of the sender device's private key on the key negotiation request message. The sender device is authenticated according to the key negotiation request message. A session key is generated according to the key negotiation request message. A key negotiation response message is sent to the sender device, the key negotiation response message including a device public key of the receiver device, user identity authentication data of the receiver device, a device name of the receiver device, and a signature of the receiver device's private key on the key negotiation response message, wherein the user identity authentication data and the device name are encrypted using the session key.
[0075] In some implementations, the negotiation module is specifically configured to authenticate the sender device according to user identity authentication data of the sender device.
[0076] In some implementations, when the data transmission mode is the owner mode, the negotiation module is specifically used to receive and authenticate a key negotiation request message from a sender device, the key negotiation request message including the device public key of the sender device, the user identity authentication data of the sender device, and the signature of the sender device's private key on the key negotiation request message. A session key is generated according to the key negotiation request message. A key negotiation response message is sent to the sender device, the key negotiation response message including the device public key of the receiver device, the device name of the receiver device, the device name of the receiver device, and the signature of the receiver device's private key on the key negotiation response message, wherein the device name is encrypted using the session key. A first device verification code is generated according to the session key. The sender device is verified by the first device verification code.
[0077] In some implementations, the apparatus further includes a verification module, configured to display the first device verification code on the receiving device, receive a confirmation operation sent by the user according to the first device verification code, and when the confirmation operation indicates that the first device verification code is the same as the second device verification code, confirm that the sending device has passed the verification, and the second device verification code is generated by the sending device according to the session key.
[0078] In some implementations, the verification module is further used to verify the signature of the key negotiation request using the private key of the sender's device using the public key of the sender's device, and if the verification is successful, it is determined that the authentication is successful.
[0079] In some implementations, the negotiation module is specifically configured to obtain a session key through negotiation based on a public key of a sender device and a private key of a receiver device.
[0080] In some implementations, the receiving module is further configured to receive data from a sending device through the first connection, where the data is sent by the sender according to a received data transmission request.
[0081] In some implementations, the receiving module is specifically configured to receive encrypted data from a sender device, where the encrypted data is obtained by encrypting data corresponding to a data transmission request by the sender using a session key. Display characteristic information of the data. In response to confirming the receiving operation, decrypt the encrypted data according to the session key and store it.
[0082] In some implementations, the receiving module is further configured to establish a second connection with the sending device and receive data from the sending device through the second connection, where the data is sent by the sending device according to the received data transmission request.
[0083] In some implementations, the receiving module is specifically configured to establish a file transfer connection with a sender device through a second connection. Receive characteristic information of encrypted data from the sender device. Decrypt the characteristic information of the encrypted data according to a session key, and display the characteristic information of the encrypted data. In response to a confirmation reception operation, send a confirmation reception message to the sender device. Receive encrypted data from the sender device. Decrypt the encrypted data according to the session key and store it.
[0084] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method provided in the first aspect is implemented.
[0085] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method provided in the second aspect is implemented.
[0086] In a seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method provided in the first aspect.
[0087] In an eighth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method provided in the second aspect.
[0088] In a ninth aspect, an embodiment of the present application provides a chip system, the chip system comprising a memory and a processor, the processor executing a computer program stored in the memory to implement the method provided in the first aspect.
[0089] In the tenth aspect, an embodiment of the present application provides a chip system, the chip system includes a memory and a processor, the processor executes a computer program stored in the memory to implement the method provided in the second aspect.
[0090] In the eleventh aspect, an embodiment of the present application provides a chip system, the chip system includes a processor, the processor is coupled to the computer-readable storage medium provided in the fifth aspect, and the processor executes a computer program stored in the computer-readable storage medium to implement the method provided in the first aspect.
[0091] In the twelfth aspect, an embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to the computer-readable storage medium provided in the sixth aspect, and the processor executes a computer program stored in the computer-readable storage medium to implement the method provided in the second aspect.
[0092] It can be understood that the beneficial effects of the second to twelfth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 An application scenario of a data transmission method provided in an embodiment of the present application is shown;
[0094] Figure 2 A schematic diagram of the structure of a sending device or a receiving device in an embodiment of the present application is shown;
[0095] Figure 3 A schematic diagram of the software structure of a sending device or a receiving device in an embodiment of the present application is shown;
[0096] Figure 4 A schematic flow chart of a data transmission method provided in an embodiment of the present application is shown;
[0097] Figure 5 A schematic diagram of the process of matching authentication when the receiving device is in contact mode in an embodiment of the present application is shown;
[0098] Figure 6 A schematic diagram of a scenario in which a sending device displays receiving party information in an embodiment of the present application is shown;
[0099] Figure 7 A schematic diagram of a matching authentication process when the receiving device is in owner mode in an embodiment of the present application is shown;
[0100] Figure 8 A schematic diagram of an interface in which a receiving device displays a first device verification code in an embodiment of the present application is shown;
[0101] Fig. 9A schematic diagram of an interface in which a sending device displays a second device verification code in an embodiment of the present application is shown;
[0102] Fig.10 A schematic diagram of a scenario in which a sending device displays receiving party information in an embodiment of the present application is shown;
[0103] Fig.11 A schematic flow chart of another data transmission method provided in an embodiment of the present application is shown;
[0104] Fig.12 A schematic diagram of a scenario in which a receiving device displays a data transmission request in an embodiment of the present application is shown;
[0105] Fig.13 A schematic flow chart of another data transmission method provided in an embodiment of the present application is shown;
[0106] Fig.14 A structural block diagram of a device pairing authentication apparatus provided in an embodiment of the present application is shown;
[0107] Fig.15 A structural block diagram of another device pairing authentication device provided in an embodiment of the present application is shown;
[0108] Fig.16 A structural block diagram of another device pairing authentication device provided in an embodiment of the present application is shown;
[0109] Fig.17 A structural block diagram of another device pairing authentication device provided in an embodiment of the present application is shown;
[0110] Fig.18 A structural block diagram of another device pairing authentication device provided in an embodiment of the present application is shown;
[0111] Fig.19 A schematic diagram of the structure of a sending device provided in an embodiment of the present application is shown;
[0112] Fig. 20 A structural schematic diagram of a receiving device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0113] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0114] It should be understood that the term “and / or” used in the specification and appended claims of this application refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0115] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting" depending on the context.
[0116] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0117] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0118] Figure 1 An application scenario of a data transmission method is shown.
[0119] refer to Figure 1 , including a sender device 11 and a receiver device 12. The sender device 11 responds to a data transmission request from a user and sends the data selected by the user to the receiver device 12. The sender device 11 and the receiver device 12 can be electronic devices that support Bluetooth and wireless networks, such as smart phones, tablet computers, laptops, vehicle-mounted devices, wearable devices, virtual reality / simulated reality devices, etc. The receiver device 12 can be the same device as the sender device 11, or it can be a different device. The embodiment of the present application does not impose any restrictions on the specific types of the sender device 11 and the receiver device 12.
[0120] In the prior art, when wireless delivery is performed, the sending device receives a data transmission request from the user, and the data transmission request is used to instruct the user to select the file or data to be delivered. In response to the data transmission request, the sending device sends a Bluetooth broadcast message to notify nearby receiving devices. After receiving the Bluetooth broadcast message, each nearby receiving device authenticates the data transmission request, and after the authentication is passed, establishes a data connection with the sending device (for example, establishes a Hypertext Transfer Protocol connection via Wi-Fi). Then, the sending device and each receiving device perform further identity authentication based on the data transmission mode. After the identity authentication is passed, the sending device receives the selection operation from the user and sends data to the sending device. The receiving device receives the confirmation operation from the user and receives the data from the sending device.
[0121] However, after receiving the Bluetooth broadcast information, the receiving device will trigger the activation of the configuration service based on the Bluetooth Generic Attribute Profile (GATT). This service may cause the receiving device to be tracked and leak the device identification, version information, etc. of the receiving device. For example, in some devices, when the receiving device receives the Airdrop Bluetooth broadcast message sent by the sending device, it will trigger the start of the Airdrop Apple Wireless Direct Link (AWDL) service to authenticate the sender of the broadcast. However, the authentication method of AirdropAWDL is easily cracked by brute force, so that the service can be used by attackers to track the receiving device or steal the receiving device's device identification, version information and other privacy information.
[0122] To this end, the present application provides a device pairing authentication method. When the sending device responds to the data transmission request, the first data transmission configuration service is enabled and the first data transmission configuration information is broadcast. After the receiving device receives the broadcast information, it performs data transmission configuration with the sending device and returns the first data transmission configuration confirmation information. The sending device responds to the first data transmission configuration confirmation information to establish a first connection with each receiving device and close the Bluetooth configuration service. Finally, the device authentication and session key negotiation are performed through the first connection.
[0123] Since the sending device only turns on the Bluetooth configuration service when responding to a data transmission request to configure Bluetooth, the receiving device does not need to turn on the Bluetooth configuration service when responding to a Bluetooth broadcast, so the receiving device can avoid being attacked. The sending device turns on the Bluetooth configuration service for a short time, so the window for attack is small, which can also ensure good security.
[0124] Figure 2 A schematic diagram of the structure of a sending device or a receiving device is shown. Figure 2 In the embodiment, the sending device or the receiving device is an electronic device 200. The electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0125] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0126] For example, when the electronic device 200 is a mobile phone or a tablet computer, it may include all the components shown in the figure, or may include only some of the components shown in the figure.
[0127] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0128] The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0129] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0130] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0131] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple groups of I2C buses. The processor 210 may be coupled to the touch sensor 280K, the charger, the flash, the camera 293, etc. through different I2C bus interfaces. For example: the processor 210 may be coupled to the touch sensor 280K through the I2C interface, so that the processor 210 communicates with the touch sensor 280K through the I2C bus interface, thereby realizing the touch function of the electronic device 200.
[0132] The I2S interface can be used for audio communication. In some embodiments, the processor 210 can include multiple groups of I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to achieve communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the I2S interface.
[0133] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 can be coupled via a PCM bus interface.
[0134] In some embodiments, the audio module 270 may also transmit audio signals to the wireless communication module 260 via a PCM interface. Both the I2S interface and the PCM interface may be used for audio communication.
[0135] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between parallel communication and parallel communication.
[0136] In some embodiments, the UART interface is generally used to connect the processor 210 and the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0137] The MIPI interface can be used to connect the processor 210 with peripheral devices such as the display screen 294 and the camera 293. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 210 and the camera 293 communicate via the CSI interface to realize the shooting function of the electronic device 200. The processor 210 and the display screen 294 communicate via the DSI interface to realize the display function of the electronic device 200.
[0138] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 with the camera 293, the display screen 294, the wireless communication module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0139] The USB interface 230 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 can be used to connect a charger to charge the electronic device 200, and can also be used to transfer data between the electronic device 200 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0140] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0141] The charging management module 240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the charging management module 240 may receive wireless charging input through a wireless charging coil of the electronic device 200. While the charging management module 240 is charging the battery 242, it may also power the electronic device through the power management module 241.
[0142] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle number, and battery health status (leakage, impedance).
[0143] In some other embodiments, the power management module 241 may also be disposed in the processor 210. In some other embodiments, the power management module 241 and the charging management module 240 may also be disposed in the same device.
[0144] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0145] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0146] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
[0147] In some embodiments, at least some functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 may be disposed in the same device.
[0148] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a receiver 270B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0149] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0150] In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0151] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0152] The display screen 294 is used to display images, videos, etc. For example, the teaching video and the user action screen video in the embodiment of the present application, the display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.
[0153] The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
[0154] The ISP is used to process the data fed back by the camera 293. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 293.
[0155] Camera 293 is used to capture still images or videos. The object generates an optical image through the lens and is projected onto the photosensitive element. The focal length of the lens can be used to indicate the field of view of the camera. The smaller the focal length of the lens, the larger the field of view of the lens. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
[0156] In the present application, the electronic device 200 may include cameras 293 with two or more focal lengths.
[0157] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 200 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0158] Video codecs are used to compress or decompress digital videos. The electronic device 200 may support one or more video codecs. Thus, the electronic device 200 may play or record videos in a variety of coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0159] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0160] In an embodiment of the present application, the NPU or other processors may be used to perform operations such as analyzing and processing images in a video stored in the electronic device 200 .
[0161] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0162] The internal memory 221 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.).
[0163] In addition, the internal memory 221 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0164] The electronic device 200 can implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone interface 270D, and the application processor.
[0165] The audio module 270 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be arranged in the processor 210, or some functional modules of the audio module 270 can be arranged in the processor 210.
[0166] The speaker 270A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 200 can listen to music or listen to hands-free calls through the speaker 270A. For example, the speaker can play the comparison analysis results provided in the embodiment of the present application.
[0167] The receiver 270B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 200 receives a call or voice message, the voice can be received by placing the receiver 270B close to the human ear.
[0168] Microphone 270C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 270C to input the sound signal into the microphone 270C. The electronic device 200 can be provided with at least one microphone 270C. In other embodiments, the electronic device 200 can be provided with two microphones 270C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 200 can also be provided with three, four or more microphones 270C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0169] The earphone interface 270D is used to connect a wired earphone and can be a USB interface 230 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0170] The pressure sensor 280A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be set on the display screen 294. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 294, the electronic device 200 detects the intensity of the touch operation based on the pressure sensor 280A. The electronic device 200 can also calculate the position of the touch based on the detection signal of the pressure sensor 280A.
[0171] In some embodiments, touch operations acting on the same touch position but with different touch operation strengths may correspond to different operation instructions. For example, when a touch operation with a touch operation strength less than a first pressure threshold acts on a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation strength greater than or equal to the first pressure threshold acts on a short message application icon, an instruction to create a new short message is executed.
[0172] The gyro sensor 280B can be used to determine the motion posture of the electronic device 200. In some embodiments, the angular velocity of the electronic device 200 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 280B. The gyro sensor 280B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 280B detects the angle of the electronic device 200 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 200 through reverse movement to achieve anti-shake. The gyro sensor 280B can also be used for navigation and somatosensory game scenes.
[0173] The air pressure sensor 280C is used to measure air pressure. In some embodiments, the electronic device 200 calculates the altitude through the air pressure value measured by the air pressure sensor 280C to assist in positioning and navigation.
[0174] The magnetic sensor 280D includes a Hall sensor. The electronic device 200 can use the magnetic sensor 280D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 200 is a flip phone, the electronic device 200 can detect the opening and closing of the flip cover according to the magnetic sensor 280D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0175] The acceleration sensor 280E can detect the magnitude of the acceleration of the electronic device 200 in all directions (generally three axes). When the electronic device 200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0176] The distance sensor 280F is used to measure the distance. The electronic device 200 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 200 can use the distance sensor 280F to measure the distance to achieve fast focusing.
[0177] The proximity light sensor 280G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 200 emits infrared light outward through the light emitting diode. The electronic device 200 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 200. When insufficient reflected light is detected, the electronic device 200 can determine that there is no object near the electronic device 200. The electronic device 200 can use the proximity light sensor 280G to detect that the user holds the electronic device 200 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 280G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0178] The ambient light sensor 280L is used to sense the ambient light brightness. The electronic device 200 can adaptively adjust the brightness of the display screen 294 according to the perceived ambient light brightness. The ambient light sensor 280L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 280L can also cooperate with the proximity light sensor 280G to detect whether the electronic device 200 is in a pocket to prevent accidental touch.
[0179] The fingerprint sensor 280H is used to collect fingerprints. The electronic device 200 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0180] The temperature sensor 280J is used to detect temperature. In some embodiments, the electronic device 200 uses the temperature detected by the temperature sensor 280J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 280J exceeds a threshold, the electronic device 200 reduces the performance of the processor located near the temperature sensor 280J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 200 heats the battery 242 to avoid abnormal shutdown of the electronic device 200 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 200 performs a boost on the output voltage of the battery 242 to avoid abnormal shutdown caused by low temperature.
[0181] The touch sensor 280K is also called a "touch panel". The touch sensor 280K can be set on the display screen 294, and the touch sensor 280K and the display screen 294 form a touch screen, also called a "touch screen". The touch sensor 280K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 294. In other embodiments, the touch sensor 280K can also be set on the surface of the electronic device 200, which is different from the position of the display screen 294.
[0182] The bone conduction sensor 280M can obtain vibration signals. In some embodiments, the bone conduction sensor 280M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 280M can also contact the human body's pulse to receive blood pressure beating signals.
[0183] In some embodiments, the bone conduction sensor 280M can also be set in the earphone to form a bone conduction earphone. The audio module 270 can parse the voice signal based on the vibration signal of the vocal bone obtained by the bone conduction sensor 280M to realize the voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 280M to realize the heart rate detection function.
[0184] The key 290 includes a power key, a volume key, etc. The key 290 can be a mechanical key or a touch key. The electronic device 200 can receive key input and generate key signal input related to user settings and function control of the electronic device 200.
[0185] Motor 291 can generate vibration prompts. Motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 291 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0186] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0187] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 200 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295. The electronic device 200 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 295 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 295 can also be compatible with different types of SIM cards. The SIM card interface 295 can also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 200 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
[0188] Figure 3 : is a schematic diagram of the software structure of the sender device or the receiver device of the embodiment of the present application. The operating system in the sender device or the receiver device can be an Android system, a Microsoft Windows system (Windows), an Apple mobile operating system (iOS) or a Harmony OS, etc. Here, the operating system of the sender device or the receiver device is the Harmony OS as an example for explanation.
[0189] In some embodiments, the Hongmeng system can be divided into four layers, including the kernel layer, the system service layer, the framework layer, and the application layer, and the layers communicate with each other through software interfaces.
[0190] like Figure 3 As shown in the figure, the kernel layer includes the kernel abstract layer (KAL) and the driver subsystem. KAL includes multiple kernels, such as the Linux kernel of the Linux system and the LiteOS kernel of the lightweight IoT system. The driver subsystem can include the hardware driver framework (HDF). The hardware driver framework can provide unified peripheral access capabilities and a driver development and management framework. The kernel layer of multiple kernels can select the corresponding kernel for processing according to the needs of the system.
[0191] The system service layer is the core capability set of the Hongmeng system. The system service layer provides services to applications through the framework layer. This layer may include:
[0192] System basic capability subsystem set: provides basic capabilities for the operation, scheduling, migration and other operations of distributed applications on multiple devices of the Hongmeng system. It may include subsystems such as distributed soft bus, distributed data management, distributed task scheduling, Ark multi-language runtime, public basic library, multi-mode input, graphics, security, artificial intelligence (AI), user program framework, etc. Among them, the Ark multi-language runtime provides C or C++ or JavaScript (JS) multi-language runtime and basic system class libraries, and can also provide runtime for Java programs statically compiled using the Ark compiler (that is, the part developed in Java language in the application or framework layer).
[0193] Basic software service subsystem set: Provides public and general software services for Hongmeng system, including event notification, telephone, multimedia, Design For X (DFX), MSDP&DV and other subsystems.
[0194] Enhanced software service subsystem set: Provides differentiated capability-enhanced software services for different devices for the Hongmeng system. It may include smart screen proprietary business, wearable proprietary business, and Internet of Things (IoT) proprietary business subsystems.
[0195] Hardware service subsystem set: Provides hardware services for Hongmeng system. It may include location services, biometric recognition, wearable proprietary hardware services, IoT proprietary hardware services and other subsystems.
[0196] The framework layer provides multi-language user program frameworks and capability frameworks in Java, C, C++, JS, and other languages for Hongmeng system application development, two user interface (UI) frameworks (including the JavaUI framework for Java language and the JS UI framework for JS language), and multi-language framework application programming interfaces (APIs) open to various software and hardware services. Depending on the degree of componentization of the system, the APIs supported by Hongmeng system devices will also vary.
[0197] The application layer includes system applications and third-party non-system applications. System applications may include applications installed by default on electronic devices such as the desktop, control bar, settings, and phone. Extended applications can be non-essential applications developed and designed by the manufacturer of the electronic device, such as electronic device managers, device migration, notes, weather, and other applications. Third-party non-system applications can be developed by other manufacturers, but can run applications in the Hongmeng system, such as games, navigation, social or shopping applications.
[0198] The applications of the Hongmeng system are composed of one or more meta-programs (Feature Ability, FA) or meta-services (Particle Ability, PA). Among them, FA has a UI interface and provides the ability to interact with users. PA has no UI interface, provides the ability to run tasks in the background and a unified data access abstraction. PA mainly provides support for FA, such as providing computing power as a background service, or providing data access capabilities as a data warehouse. Applications developed based on FA or PA can implement specific business functions, support cross-device scheduling and distribution, and provide users with a consistent and efficient application experience.
[0199] Multiple electronic devices running the Hongmeng system can achieve hardware mutual assistance and resource sharing through distributed soft bus, distributed device virtualization, distributed data management and distributed task scheduling.
[0200] Figure 4 A schematic flowchart of the data transmission method provided in the present application is shown. As an example but not a limitation, the method can be applied to the above-mentioned sender device and service device.
[0201] The first configuration service may be a Bluetooth configuration service, and correspondingly, the first configuration information may be Bluetooth configuration information, and the first connection may be a Bluetooth connection.
[0202] refer to Figure 4 , the method comprising:
[0203] S301: The sending device responds to a data transmission request and starts a Bluetooth configuration service.
[0204] S302: The sending device sends Bluetooth configuration information to the receiving device.
[0205] In some implementations, the data transmission request is generated by a user of the sending device through a series of operations. For example, the sending device runs an album program, and the user selects multiple photos in the album program through a selection operation and shares the multiple photos through wireless transmission through an operation instruction. In this case, the sending device can determine that the data transmission request has been received and respond.
[0206] The Bluetooth configuration service initiated by the sending device can be a Bluetooth GATT service. Bluetooth GATT is a protocol for receiving and sending short data in Bluetooth Low Energy (BLE). The two devices connected to each other in Bluetooth GATT are called GATT client and GATT server. The GATT client is also called the master and the server is also called the slave. In Bluetooth GATT, communication events are often initiated by the master and responded by the slave.
[0207] In this application, the master device is a sending device. After the master device starts the GATT service, the sending device broadcasts Bluetooth configuration information, and the slave device (ie, the receiving device) receives the broadcasted Bluetooth configuration information.
[0208] It should be noted that the Bluetooth configuration information may include a service type, a data type, and a device characteristic message of the sender's device. Among them, the service type may include data delivery, audio transmission, etc. The data type may include a file, a Uniform Resource Locator (URL), etc. As an example, the device characteristic message may be at least one of the user account name, mobile phone number, or email address of the sender's device. When sending, the first two bytes of the hash value of the user account name, mobile phone number, and email address may be sent to the receiving device as a device characteristic message. For example, assuming that the mobile phone number of the sender's device is "12345678910", its hash value is calculated by MD5 encryption, and the hash value of the mobile phone number of the sender's device is "432f45b44c432414d2f97df0e5743818" (hexadecimal). Take its first two bytes, that is, take "432f" as the characteristic message of the mobile phone number.
[0209] S303: The receiving device responds to the Bluetooth configuration information and obtains the data transmission mode of the receiving device.
[0210] S304: The receiving device performs Bluetooth connection authentication according to the Bluetooth configuration information and the data transmission mode of the receiving device.
[0211] S305: If the Bluetooth authentication of the receiving device is passed, execute S306; if the authentication is not passed, end the process.
[0212] S306: A Bluetooth connection is established between the receiving device and the sending device.
[0213] In some implementations, the data transmission mode of the receiving device may include an everyone mode or a contact mode. In the everyone mode, there is no need to verify the device feature message of the sending device in the Bluetooth configuration information, and the Bluetooth authentication can be passed directly.
[0214] When the receiving device is in contact mode, the receiving device can obtain the characteristic information of all contacts recorded in the device, such as the contact's mobile phone number or email address, and calculate the hash value through the hash algorithm. The first two bytes of the characteristic message hash value of each contact are compared with the characteristic information of the mobile phone number and email address in the device characteristic message received from the sending device. If there is a same, it is determined that the contact is the contact corresponding to the sending device, and the Bluetooth verification is performed.
[0215] Alternatively, if the characteristic message of the user account name of the receiving device is the same as the characteristic message of the user account name in the device characteristic message received from the sending device, it can be determined that the sending device and the receiving device are different devices of the same user, which can also be verified through Bluetooth.
[0216] If the Bluetooth configuration information does not include the device characteristic information of the sender's device, or the device characteristic information fails to match any contact, it is determined that the Bluetooth verification has failed and the process ends.
[0217] After the receiving device passes the Bluetooth authentication, it sends a Bluetooth authentication confirmation message to the sending device and establishes a Bluetooth connection with the sending device. The Bluetooth connection can be used to transmit data between the receiving device and the sending device.
[0218] After a Bluetooth connection is established between the receiving device and the sending device, the sending device closes the Bluetooth configuration service.
[0219] S307: The sending device is connected via Bluetooth and performs device matching authentication with the receiving device according to the data transmission mode of the receiving device.
[0220] In some implementations, different data transmission modes of different receiving devices correspond to different matching authentication processes.
[0221] Figure 5 A schematic diagram of the process of matching authentication when the receiving device is in contact mode in an embodiment of the present application is shown.
[0222] When the receiving device is in contact mode, refer to Figure 5 , the process includes:
[0223] S401: A sending device sends a key negotiation request message to a receiving device.
[0224] In some implementations, the sender device may first determine whether a public-private key pair of the sender device for the data transmission session has been created. If not, a public-private key pair of the sender device needs to be created and stored locally. The key negotiation request message may include a device public key of the sender device, user identity authentication data of the sender device, and a signature of the private key of the sender device on the key negotiation request message.
[0225] The identity authentication data of the sender's device may include the complete device feature message of the sender's device, the server certificate private key signature, and the sender's device public key. The complete device feature message of the sender's device includes the hash value of the user account name, mobile phone number, or email address. The device public key and device private key of the sender's device are generated by the sender's device. When the sender's device logs in to the server, it first sends the generated device public key and device private key to the server. Then, the server can generate the identity authentication data of the sender's device based on the device public key, device private key, and other relevant information (such as device serial number, user account name, mobile phone number, etc.) of the sender's device.
[0226] S402: The receiving device authenticates the key negotiation request message. If the authentication is successful, S403 is executed; otherwise, the process ends.
[0227] In some implementations, when authenticating a key negotiation request message, the receiving device may first use the public key of the sending device in the key negotiation request message to verify the signature of the request message. After the verification is passed, the legitimacy of the user identity authentication data of the sending device is verified. For example, the server certificate may be used to verify the signature of the server certificate private key in the user identity authentication data. If the verification is passed, the device public key in the user identity authentication data is compared with the sender device public key in the request message. If they are the same, the authentication is passed, otherwise the authentication fails.
[0228] S403: The receiving device authenticates the sending device. If the authentication is successful, S404 is executed; otherwise, the process ends.
[0229] In this embodiment, the data transmission mode of the receiving device is the contact mode, and the receiving device can authenticate the sending device in the following ways:
[0230] The receiving device uses the mobile phone number or email address in the user identity authentication data of the sending device to match the mobile phone number or email address of the contact in the address book of the receiving device. If at least one contact is matched, the authentication is successful.
[0231] If the authentication fails, the user account name or the hash value of the user account name in the user identity authentication data of the sender's device is the same as the user account name or the hash value of the user account name of the recipient's device, then the authentication passes, otherwise the authentication fails.
[0232] It should be noted that when authenticating the sending device, you can also first authenticate the user account name or the hash value of the user account name in the user identity authentication data of the sending device. If the authentication fails, use the mobile phone number or email address in the user identity authentication data of the sending device to match the mobile phone number or email address of the contact in the address book of the receiving device. This application does not impose any restrictions on this.
[0233] S404: The receiving device generates a session key according to the key negotiation request message.
[0234] In some implementations, the receiving device may first determine whether a public-private key pair of the receiving device for the data transmission session has been created. If not, a public-private key pair of the receiving device needs to be created and stored locally.
[0235] The receiving device uses the public key of the sending device in the key negotiation request message and the private key of the receiving device to negotiate the session key. For example, the session key can be negotiated through a key negotiation algorithm such as Elliptic Curve Diffie-Hellman key Exchange (ECDH) or Diffie-Hellman key exchange (DH).
[0236] S405: The receiving device sends a key negotiation response message to the sending device.
[0237] In some implementations, the key negotiation response message may include the device public key of the recipient device, the user identity authentication data and the recipient device name of the recipient device, and the signature of the key negotiation response message by the recipient device private key, wherein the user identity authentication data and the device name are encrypted using the session key.
[0238] S406: The sending device authenticates the key negotiation response message. If the authentication is successful, S407 is executed; otherwise, the process ends.
[0239] In some implementations, the sending device may use the receiving device public key to verify the signature of the key agreement response message, and the process ends if the verification fails.
[0240] S407: The sending device generates a session key according to the key negotiation response message.
[0241] In some implementations, the sending device uses the receiving device public key and the sending device private key to negotiate a session key. The negotiation method is similar to that in S404 and will not be described in detail here.
[0242] S408: The sending device authenticates the receiving device and executes S409.
[0243] In some implementations, the session key generated in S407 may be used to decrypt the user authentication data and the recipient device name in the key negotiation response message. If the key negotiation response message carries the user authentication data of the recipient device, the user authentication data is verified. The verification process is similar to that in S402 and will not be described in detail here.
[0244] Then, the receiving device is authenticated according to the verified user identity authentication data. The authentication process is similar to that in S403 and will not be described in detail here.
[0245] S409: The sending device displays the receiving device information.
[0246] Figure 6 A schematic diagram of a scenario in which a sending device displays receiving party information in an embodiment of the present application is shown.
[0247] In some implementations, when the recipient device is authenticated in S408, the contact avatar and name of the recipient device may be used as the recipient information for display. When the recipient device is not authenticated in S408, the device name, device type, etc. of the recipient device may be used as the recipient information for display.
[0248] refer to Figure 6 In the interface diagram displayed by the sender device, the sender device runs the photo album application and selects two photos in response to the data transmission request. The interface includes a file selection area 51, a receiver information display area 52, and other transmission options display area 53. The file selection area 51 displays the files that have been selected or are to be selected, for example Figure 6 In the receiver information display area 52, the receiver device information that has completed the authentication with the sender device is displayed. The receiver device information may include the receiver device name, the receiver device contact avatar, etc. As an example, when the receiver device contact avatar is not set, or the receiver device authentication fails, the receiver device information displayed in area 521 can be referred to. The avatar uses the system default avatar, and the receiver device contact name "Xiao S" is displayed below the avatar.
[0249] When the contact avatar of the recipient device is set and the recipient device is authenticated, the recipient device information displayed in area 522 can be referred to, the avatar uses the set contact avatar, and the contact name "Xiao Y" of the recipient device is displayed below the avatar.
[0250] Alternatively, if authentication is performed using a user account name or a hash value of a user account name, the recipient device information displayed in area 522 may be referenced, the avatar uses an icon of the set type (such as a mobile phone, tablet computer, laptop computer, etc.), and the device name of the recipient device "Little Mate30" is displayed below the avatar.
[0251] Figure 7 A schematic diagram of the process of matching authentication when the receiving device is in owner mode in an embodiment of the present application is shown.
[0252] When the receiving device is in owner mode, refer to Figure 7 , the process includes:
[0253] S601: A sending device sends a key negotiation request message to a receiving device.
[0254] In some implementations, the sender device may first determine whether a public-private key pair of the sender device for establishing a Wi-Fi connection has been created. If not, a public-private key pair of the sender device needs to be created and stored locally. The key negotiation request message may include a device public key of the sender device, a sender device name, and a signature of the sender device's private key to the key negotiation request message.
[0255] S602: The receiving device authenticates the key negotiation request message. If the authentication is successful, S403 is executed; otherwise, the process ends.
[0256] In this embodiment, the authentication method in S602 is similar to that in S402 and will not be described in detail here.
[0257] S603: The receiving device generates a session key and a first device verification code according to the key agreement request message.
[0258] In this embodiment, the method of generating a session key according to the key negotiation request message in S603 is similar to that in S402, and is not described in detail here.
[0259] In some implementations, the first device verification code may be generated based on the session key. For example, a decimal number represented by the first N bytes or the last N bytes of the session key may be used as the first device verification code.
[0260] Alternatively, after performing hash calculation on the session key, the decimal number represented by the first N bytes or the last N bytes of the hash value is taken as the first device verification code.
[0261] S604: The receiving device sends a key negotiation response message to the sending device.
[0262] In some implementations, the key negotiation response message returned by the recipient device includes the recipient device public key, the recipient device name, and the recipient device private key signature on the message, wherein the device name is encrypted using the session key.
[0263] S605: The sending device authenticates the key negotiation response message. If the authentication is successful, S407 is executed; otherwise, the process ends.
[0264] In some implementations, the sending device may use the receiving device public key to verify the signature of the key agreement response message, and the process ends if the verification fails.
[0265] S606: The receiving device displays the first device verification code.
[0266] Figure 8 A schematic diagram of an interface in which a receiving device displays a first device verification code in an embodiment of the present application is shown.
[0267] refer to Figure 8 When the receiving device displays the verification code of the first device, the verification code "12345678" may be displayed in the display area 71 on the screen of the receiving device. At the same time, corresponding prompting information may also be displayed to instruct the user to negotiate with the user of the sending device and check whether the verification codes are consistent.
[0268] S607: The sending device generates a session key and a second device verification code according to the key negotiation response message.
[0269] In some implementations, the sending device uses the receiving device public key and the sending device private key to negotiate a session key. The negotiation method is similar to that in S404. The second device verification code can be generated according to the session key according to the method shown in S603, which will not be described in detail here.
[0270] S608: The sending device displays the second device verification code.
[0271] Fig. 9 A schematic diagram of an interface in which a receiving device displays a first device verification code in an embodiment of the present application is shown.
[0272] refer to Fig. 9When the sending device displays the verification code of the second device, the verification code "12345678" can be displayed in the display area 81 on the screen of the sending device. At the same time, corresponding prompt guidance information can also be displayed to instruct the user to negotiate with the user of the receiving device and check whether the verification codes are consistent.
[0273] S609: The receiving device receives the first device verification code confirmation operation.
[0274] S610: The sending device responds to the second device's verification code confirmation operation and displays the recipient's information.
[0275] In some embodiments, reference Figure 8 The confirmation operation of the first device verification code may be a click operation on the display "same" area. When the sending device receives the click operation on the display "same" area, it confirms that the confirmation operation of the first device verification code has been received.
[0276] refer to Fig. 9 The confirmation operation of the second device verification code may be a click operation on the display "same" area. When the sending device receives the click operation on the display "same" area, it confirms that the confirmation operation of the second backup verification code has been received and may display the recipient information.
[0277] Fig.10 A schematic diagram of a scenario in which a sending device displays receiving party information in an embodiment of the present application is shown.
[0278] In some implementations, when the receiving device receives the confirmation operation of the first device verification code and the sending device confirms receipt of the confirmation operation of the second backup verification code, the receiving device information may be displayed on the sending device. Fig.10 In the interface diagram displayed by the sender device, the sender device runs the photo album application and selects two photos in response to the data transmission request. The interface includes a file selection area 91, a receiver information display area 92, and other transmission options display area 93. The file selection area 91 displays the files that have been selected or are to be selected, for example Fig.10In the receiving device information display area 92, the information of the receiving device after confirming the verification code with the sending device is displayed. The information of the receiving device may include the device name of the receiving device, the device type of the receiving device, etc. Among them, the device type of the receiving device can be represented by a corresponding icon. For example, when the device type is a mobile phone, the icon of a mobile phone can be used as the avatar display; when the device type is a laptop computer, the icon of a laptop computer can be used as the avatar display. Referring to the receiving device information displayed in area 921, the avatar is a mobile phone icon, indicating that the device type of the receiving device is a mobile phone, and the device name of the receiving device "Xiao S's P40" is displayed below the avatar.
[0279] Referring to the receiving device information displayed in the reference area 922, the avatar is an icon of a laptop computer, indicating that the device type of the receiving device is a laptop computer, and the device name of the receiving device "Xiao Y's Matebook" is displayed below the avatar.
[0280] Fig.11 A schematic flow chart of another data transmission method provided by the present application is shown. Fig.11 Shown in Figure 4 After the process, the implementation process of sending data through Wi-Fi connection.
[0281] In some implementations, when the amount of data to be delivered is large, a Wi-Fi connection may be used to send the data. Fig.11 , the method further comprises:
[0282] S308: The sending device sends a data transmission request via a Wi-Fi connection.
[0283] In some implementations, the sending device first responds to the recipient selection operation and sends a Wi-Fi connection establishment request to the selected recipient. Then, the recipient device responds to the Wi-Fi connection establishment request and establishes a Wi-Fi connection with the sending device.
[0284] As an example, the recipient selection operation may be a user's click operation, voice command, or gesture, etc. Figure 6, when the sending device receives a click operation acting on area 521, it can be determined that the receiving party selects an operation instruction to send the selected data to the receiving device corresponding to area 521. That is, a Wi-Fi connection establishment request can be sent to the receiving device corresponding to area 521 to establish a Wi-Fi connection and transmit the selected data. In this embodiment, the Wi-Fi connection can be a Wi-Fi Direct connection. As an example, when making a Wi-Fi connection, the sending device can first start the Wi-Fi Direct connection service. Then, the sending device sends the access information of the Wi-Fi Direct service (such as hotspot name, password, etc.) to the receiving device based on the Bluetooth connection, and the access information is encrypted using the session key. Finally, the receiving device uses the session key to decrypt the access information of the Wi-Fi Direct service and establish a Wi-Fi Direct connection with the sending device.
[0285] In some implementations, when sending a data transfer request, the receiving device may first start a file transfer service, such as a Hypertext Transfer Protocol (HTTP) or File Transfer Protocol (FTP) service. Then, the receiving device sends the service Internet Protocol (IP) address and port of the file transfer service to the sending device based on the Bluetooth connection, and the service IP address and port are encrypted using a session key. Next, the sending device uses the session key to decrypt the service IP address and port of the file transfer service, and establishes a file transfer connection (such as an HTTP / FTP connection) with the receiving device based on the WifiDirect connection. Finally, the sending device sends a data transfer request to the receiving device, and the data transfer request includes a file thumbnail and file metadata (such as file size, file type), the sender's device name, etc. to the receiving device, and all of these data can be encrypted using a session key.
[0286] S309: The receiving device sends a data transmission request confirmation message via the Wi-Fi connection.
[0287] In some implementations, after receiving a data transmission request, the receiving device can use the session key to decrypt the file thumbnail, file metadata, sender device name and other related data in the data transmission request, and display the file thumbnail and sender device name.
[0288] Fig.12 A schematic diagram of a scenario in which a receiving device displays a data transmission request in an embodiment of the present application is shown.
[0289] refer to Fig.12When displaying the data transmission request, the receiving device may display the file thumbnail (thumbnail of picture 1), file metadata (0.92MB) and the name of the sending device (small A) in the display area 1001 on the receiving device screen. At the same time, corresponding prompt guidance information may also be displayed to instruct the user to confirm whether to receive the data. When the receiving device receives a click operation on the area displaying "Receive", the data transmission is confirmed.
[0290] S310: The sending device transmits data via a Wi-Fi connection.
[0291] In some implementations, when the sending device sends file data to the receiving device, the file data is encrypted by the session key. After receiving the encrypted file data, the receiving device can use the session key to decrypt it.
[0292] Fig.13 A schematic flowchart of another data transmission method provided in the present application is shown. As an example but not a limitation, the method can be applied to the above-mentioned sender device and service device.
[0293] In some implementations, when the amount of data to be delivered is small, a Bluetooth connection may be used to send the data. Fig.13 , wherein S1101 to S1106 are the same as S401 to S406, and are not described in detail here. In S1107, after matching and authentication, there is no need to perform Wi-Fi connection, but Bluetooth connection is directly used for subsequent data transmission.
[0294] S1108: The sending device sends a data transmission request via the Bluetooth connection.
[0295] S1109: The receiving device sends a data transmission request confirmation message via the Bluetooth connection.
[0296] S1110. The sending device transmits data via a Bluetooth connection.
[0297] In this embodiment, the implementation of S1108 to S1110 is to send data via a Bluetooth connection. The specific data content and implementation method are similar to those of S408 to S410, and will not be described in detail here.
[0298] In some other implementations, when the sender device and the receiver device are logged into the user account respectively, but are offline when performing pairing authentication, the device pairing authentication in the contact mode can be performed in the following manner.
[0299] First, when the sending device and the receiving device log in to the user account, a public-private key pair is generated for the current device, and the public key of the current device is sent to the server. The server uses the certificate private key to sign the hash value of the current device's mobile phone number and email address, and the device's public key, and saves the server's signature locally.
[0300] When the sender device and the receiver device are paired in an offline state, the sender device can use the hash value of the mobile phone number and email address, the public key of the sender device, the server's signature, and the signature of the sender device's private key. The receiver device uses the server certificate to verify the server's signature, and then uses the sender device's public key to verify the signature used by the sender device. Finally, the hash value of the sender's mobile phone number and email address is compared and paired in the receiver's device's address book. If the above authentications are passed and the corresponding contacts can be matched in the address book, the device pairing authentication is confirmed to be passed.
[0301] In some other implementations, when neither the sender device nor the receiver device has logged into a user account, device pairing authentication can be performed with reference to the method shown in S601 to S610, which will not be described in detail here.
[0302] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0303] Corresponding to the device pairing authentication method applied to the sending end device provided in the above embodiment, Fig.14 The structural block diagram of a device pairing authentication device provided by an embodiment of the present application is shown, and the device pairing authentication device is applied to a sending device. For ease of description, only the parts related to the embodiment of the present application are shown.
[0304] Reference Fig.14 , the device pairing authentication device comprises:
[0305] The response module 1201 is used to respond to the data transmission request and start the first configuration service.
[0306] The broadcast module 1202 is configured to broadcast first configuration information.
[0307] The response module 1201 is further configured to respond to a first connection establishment request sent by the receiver according to the broadcasted first configuration information, establish a first connection with the receiver device, and close the first configuration service.
[0308] The negotiation module 1203 is used to perform device authentication on the receiving device and negotiate a session key through the first connection.
[0309] In some implementations, the first connection establishment request includes a data transmission mode of the receiving device.
[0310] When the data transmission mode is the contact mode, the negotiation module 1203 is specifically used to send a key negotiation request message to the receiving device, the key negotiation request message includes the device public key of the sending device, the user identity authentication data of the sending device, and the signature of the private key of the sending device on the key negotiation request message. Receive and authenticate the key negotiation response message sent by the receiving device according to the key negotiation request message, the key negotiation response message includes the device public key of the receiving device, the user identity authentication data of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the user identity authentication data and the device name are encrypted using the session key, and the session key is generated by the receiving device according to the key negotiation request message. Authentication is performed according to the key negotiation response message, and a session key is generated according to the key negotiation response message after the authentication is passed. The receiving device is authenticated according to the session key and the key negotiation response message.
[0311] In some implementations, the negotiation module 1203 is specifically configured to decrypt the user identity authentication data and the device name in the key negotiation response message according to the session key, and authenticate the receiving device according to the decrypted user identity authentication data and / or device name.
[0312] In some implementations, the first connection establishment request includes a data transmission mode of the receiving device.
[0313] When the data transmission mode is the owner mode, the negotiation module 1203 is specifically used to send a key negotiation request message to the receiving device, the key negotiation request message includes the device public key of the sending device, the device name of the sending device, and the signature of the private key of the sending device on the key negotiation request message. Receive and authenticate the key negotiation response message sent by the receiving device according to the key negotiation request message, the key negotiation response message includes the device public key of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the device name is encrypted using the session key, and the session key is generated by the receiving device according to the key negotiation request message. Perform authentication according to the key negotiation response message, and generate a session key according to the key negotiation response message after the authentication is passed. Generate a second device verification code according to the session key and verify the receiving device through the second device verification code.
[0314] Fig.15 A structural block diagram of another device pairing authentication apparatus provided in an embodiment of the present application is shown.
[0315] In some embodiments, reference Fig.15The device further includes a verification module 1204, which is used to display the second device verification code on the sending device. A confirmation operation is received from the user according to the second device verification code. When the confirmation operation indicates that the second device verification code is the same as the first device verification code, it is confirmed that the receiving device has passed the verification, and the first device verification code is generated by the receiving device according to the session key.
[0316] In some implementations, the verification module 1204 is further configured to verify the signature of the key negotiation response message using the private key of the receiving device through the public key of the receiving device, and if the verification is successful, it is determined that the authentication is successful.
[0317] In some implementations, the negotiation module 1203 is further configured to obtain a session key through negotiation based on a public key of a receiving device and a private key of a sending device.
[0318] Fig.16 A structural block diagram of another device pairing authentication apparatus provided in an embodiment of the present application is shown.
[0319] In some implementations, the apparatus further includes a sending module 1205, configured to send data corresponding to the data transmission request to a receiving device via the first connection.
[0320] In some implementation modes, the sending module 1205 is specifically configured to encrypt the data corresponding to the data transmission request by using a session key, and then send the encrypted data to the receiving device through the first connection.
[0321] In some implementations, the sending module 1205 is further configured to establish a second connection with a receiving device and to send data corresponding to the data transmission request to the receiving device via the second connection.
[0322] In some implementations, the sending module 1205 is specifically configured to establish a file transfer connection with a receiving device through a second connection, encrypt the characteristic information of the data corresponding to the data transmission request with a session key, and send it to the receiving device, and in response to a confirmation message from the receiving device, encrypt the data corresponding to the data transmission request with a session key and send it to the receiving device.
[0323] Corresponding to the device pairing authentication method applied to the receiving device provided in the above embodiment, Fig.17 The structural block diagram of another device pairing authentication device provided by the embodiment of the present application is shown, and the device pairing authentication device is applied to the receiving device. For the convenience of description, only the part related to the embodiment of the present application is shown.
[0324] Reference Fig.17 , the device pairing authentication device comprises:
[0325] The receiving module 1301 is configured to receive first configuration information from a sending device.
[0326] The sending module 1302 is used to send a first connection establishment request to the sending device according to the first configuration information, and establish a first connection with the receiving device.
[0327] The negotiation module 1303 is used to perform device authentication on the sending device and negotiate a session key through the first connection.
[0328] In some implementations, the sending module 1302 is specifically configured to obtain a data transmission mode of the receiving device and send a first connection establishment request to the sending device according to the first configuration information and the data transmission mode of the receiving device.
[0329] In some implementation modes, when the data transmission mode is the contact mode, the negotiation module 1303 is specifically used to receive and authenticate a key negotiation request message from a sending device, the key negotiation request message including a device public key of the sending device, user identity authentication data of the sending device, and a signature of the key negotiation request message by a private key of the sending device. The sending device is authenticated according to the key negotiation request message. A session key is generated according to the key negotiation request message. A key negotiation response message is sent to the sending device, the key negotiation response message including a device public key of the receiving device, user identity authentication data of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by a private key of the receiving device, wherein the user identity authentication data and the device name are encrypted using the session key.
[0330] In some implementation modes, the negotiation module 1303 is specifically configured to authenticate the sender device according to the user identity authentication data of the sender device.
[0331] In some implementations, when the data transmission mode is the owner mode, the negotiation module 1303 is specifically used to receive and authenticate a key negotiation request message from a sending device, the key negotiation request message including the device public key of the sending device, the user identity authentication data of the sending device, and the signature of the private key of the sending device on the key negotiation request message. A session key is generated according to the key negotiation request message. A key negotiation response message is sent to the sending device, the key negotiation response message including the device public key of the receiving device, the device name of the receiving device, the device name of the receiving device, and the signature of the private key of the receiving device on the key negotiation response message, wherein the device name is encrypted using the session key. A first device verification code is generated according to the session key. The sending device is verified by the first device verification code.
[0332] Fig.18 A structural block diagram of another device pairing authentication apparatus provided in an embodiment of the present application is shown.
[0333] In some implementations, the apparatus further includes a verification module 1304, configured to display the first device verification code on the receiving device, receive a confirmation operation sent by the user according to the first device verification code, and when the confirmation operation indicates that the first device verification code is the same as the second device verification code, confirm that the sending device has passed the verification, and the second device verification code is generated by the sending device according to the session key.
[0334] In some implementations, the verification module 1304 is further configured to verify the signature of the key negotiation request using the private key of the sender's device using the public key of the sender's device, and if the verification is successful, it is determined that the authentication is successful.
[0335] In some implementations, the negotiation module 1303 is specifically configured to obtain a session key through negotiation based on a public key of a sender device and a private key of a receiver device.
[0336] In some implementations, the receiving module 1301 is further configured to receive data from a sending device through the first connection, where the data is sent by the sender according to a received data transmission request.
[0337] In some implementations, the receiving module 1301 is specifically configured to receive encrypted data from a sender device, where the encrypted data is obtained by encrypting data corresponding to a data transmission request by the sender using a session key. Display characteristic information of the data. In response to a confirmation of the receiving operation, decrypt the encrypted data according to the session key and store it.
[0338] In some implementations, the receiving module 1301 is further configured to establish a second connection with a sending device and receive data from the sending device through the second connection, where the data is sent by the sending device according to the received data transmission request.
[0339] In some implementations, the receiving module 1301 is specifically configured to establish a file transfer connection with a sender device through a second connection. Receive characteristic information of encrypted data from the sender device. Decrypt the characteristic information of the encrypted data according to the session key, and display the characteristic information of the encrypted data. In response to the confirmation of the reception operation, send a confirmation message to the sender device. Receive encrypted data from the sender device. Decrypt the encrypted data according to the session key and store it.
[0340] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0341] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0342] Fig.19 This is a schematic diagram of the structure of a sending device provided in an embodiment of the present application. Fig.19 As shown, the sending device 1400 of this embodiment includes: at least one processor 1401 ( Fig.19 Only one is shown in the figure) a processor, a memory 1402, and a computer program 1403 stored in the memory 1402 and executable on at least one processor 1401. When the processor 1401 executes the computer program 1403, the steps in the above-mentioned device pairing authentication method embodiment applied to the client are implemented.
[0343] The sender device 1400 may be a smart phone, tablet computer, laptop, vehicle-mounted device, wearable device, virtual reality / simulated reality device, or other electronic device that supports Bluetooth and wireless network. The electronic device may include, but is not limited to, a processor 1401 and a memory 1402. Those skilled in the art will appreciate that Fig.19 This is merely an example of the sender device 1400 and does not constitute a limitation on the sender device 1400 . The sender device 1400 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0344] The processor 1401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0345] In some embodiments, the memory 1402 may be an internal storage unit of the sender device 1400, such as a hard disk or memory of the sender device 1400. In other embodiments, the memory 1402 may also be an external storage device of the sender device 1400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the sender device 1400. Further, the memory 1402 may also include both an internal storage unit of the sender device 1400 and an external storage device. The memory 1402 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 1402 may also be used to temporarily store data that has been output or is to be output.
[0346] Fig. 20 This is a schematic diagram of the structure of a receiving device provided in an embodiment of the present application. Fig. 20 As shown, the receiving device 1500 of this embodiment includes: at least one processor 1501 ( Fig. 20 Only one is shown in the figure) a processor, a memory 1502, and a computer program 1503 stored in the memory 1502 and executable on at least one processor 1501. When the processor 1501 executes the computer program 1503, the steps in the above-mentioned device pairing authentication method embodiment applied to the server are implemented.
[0347] The receiving device 1500 may be a smart phone, tablet computer, laptop, vehicle-mounted device, wearable device, virtual reality / simulated reality device, or other electronic device that supports Bluetooth and wireless network. The electronic device may include, but is not limited to, a processor 1501 and a memory 1502. Those skilled in the art will appreciate that Fig. 20The receiving device 1500 is merely an example and does not constitute a limitation on the receiving device 1500 , and may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, may also include input and output devices, network access devices, etc.
[0348] The processor 1501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0349] In some embodiments, the memory 1502 may be an internal storage unit of the receiving device 1500, such as a hard disk or memory of the receiving device 1500. In other embodiments, the memory 1502 may also be an external storage device of the receiving device 1500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the receiving device 1500. Further, the memory 1502 may also include both an internal storage unit of the receiving device 1500 and an external storage device. The memory 1502 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 1502 may also be used to temporarily store data that has been output or is to be output.
[0350] The embodiment of the present application also provides a computer-readable storage medium, and the embodiment of the present application provides a computer program product. When the computer program product runs on a sender device, the sender device executes the device pairing authentication method applied to the sender device.
[0351] The embodiment of the present application also provides a computer-readable storage medium, and the embodiment of the present application provides a computer program product. When the computer program product is executed on a receiving device, the receiving device executes the device pairing authentication method applied to the receiving device.
[0352] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal implements the steps in the device pairing authentication method applied to a sender device when executing the computer program product.
[0353] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal implements the steps in the device pairing authentication method applied to a receiving device when executing the computer program product.
[0354] An embodiment of the present application provides a chip system, which includes a memory and a processor. The processor executes a computer program stored in the memory to implement the steps in the above-mentioned device pairing authentication method applied to the sending device.
[0355] An embodiment of the present application provides a chip system, which includes a memory and a processor. The processor executes a computer program stored in the memory to implement the steps in the device pairing authentication method applied to the receiving device.
[0356] An embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to a computer-readable storage medium, and the processor executes a computer program stored in the computer-readable storage medium to implement the steps in the above-mentioned device pairing authentication method applied to the sending device.
[0357] An embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to a computer-readable storage medium, and the processor executes a computer program stored in the computer-readable storage medium to implement the steps in the above-mentioned device pairing authentication method applied to the receiving device.
[0358] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0359] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0360] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0361] In the embodiments provided in the present application, it should be understood that the disclosed methods, devices, and electronic devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0362] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0363] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A device pairing authentication method, applied to a sending device, characterized in that: include: In response to the data transmission request, starting the first configuration service; Broadcasting first configuration information; In response to a first connection establishment request sent by a receiver according to the first broadcasted configuration information, a first connection is established with the receiver device, and the first configuration service is closed; Performing device authentication and negotiating a session key on the receiving device through the first connection; The first connection establishment request includes a data transmission mode of the receiving device; When the data transmission mode is the contact mode, authenticating the receiving device and negotiating a session key through the first connection includes: Sending a key negotiation request message to the receiving device, where the key negotiation request message includes a public key of the sending device, user identity authentication data of the sending device, and a signature of the private key of the sending device on the key negotiation request message; Receiving and authenticating a key negotiation response message sent by a receiving device according to the key negotiation request message, the key negotiation response message including a device public key of the receiving device, user identity authentication data of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by a private key of the receiving device, wherein the user identity authentication data and the device name are encrypted using a session key, and the session key is generated by the receiving device according to the key negotiation request message; Performing authentication according to the key negotiation response message, and generating a session key according to the key negotiation response message after the authentication is passed; The receiving device is authenticated according to the session key and the key agreement response message.
2. The method according to claim 1, characterized in that The authenticating the receiving device according to the session key and the key agreement response message includes: decrypting the user identity authentication data and the device name in the key agreement response message according to the session key; The receiving device is authenticated according to the decrypted user identity authentication data and / or device name.
3. The method according to claim 1, characterized in that When the data transmission mode is the owner mode, authenticating the receiving device and negotiating a session key through the first connection includes: Sending a key negotiation request message to the receiving device, where the key negotiation request message includes a public key of the sending device, a device name of the sending device, and a signature of the private key of the sending device on the key negotiation request message; Receiving and authenticating a key negotiation response message sent by a receiving device according to the key negotiation request message, wherein the key negotiation response message includes a device public key of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by a private key of the receiving device, wherein the device name is encrypted using a session key, and the session key is generated by the receiving device according to the key negotiation request message; Performing authentication according to the key negotiation response message, and generating a session key according to the key negotiation response message after the authentication is passed; A second device verification code is generated according to the session key, and the recipient device is verified by the second device verification code.
4. The method according to claim 3, characterized in that The verifying the receiving device by using the second device verification code includes: Displaying the second device verification code on the sender device; Receiving a confirmation operation sent by the user according to the second device verification code, and confirming that the receiving device has passed the verification when the confirmation operation indicates that the second device verification code is the same as the first device verification code, and the first device verification code is generated by the receiving device according to the session key.
5. The method according to claim 1, characterized in that The receiving and authenticating the key negotiation response message sent by the receiving device according to the key negotiation request message includes: The signature of the key agreement response message of the private key of the receiving device is verified by the public key of the receiving device, and if the verification succeeds, it is determined that the authentication is successful.
6. The method according to claim 1, characterized in that The generating a session key according to the key negotiation response message comprises: The session key is obtained through negotiation based on the public key of the receiving device and the private key of the sending device.
7. The method according to any one of claims 1 to 6, characterized in that: After performing device authentication on the receiving device and negotiating a session key through the first connection, the method further includes: The data corresponding to the data transmission request is sent to the receiving device through the first connection.
8. The method according to claim 7, characterized in that The sending the data corresponding to the data transmission request to the receiving device includes: The data corresponding to the data transmission request is encrypted by using the session key and then sent to the receiving device through the first connection.
9. The method according to any one of claims 1 to 6, characterized in that: After performing device authentication and negotiating a session key on the receiving device through the first connection, the method further includes: Establishing a second connection with the receiving device; The data corresponding to the data transmission request is sent to the receiving device through the second connection.
10. The method according to claim 9, characterized in that The sending the data corresponding to the data transmission request to the receiving device includes: Establishing a file transfer connection with the receiving device through the second connection; encrypting the characteristic information of the data corresponding to the data transmission request with the session key and sending the encrypted information to the receiving device; In response to a confirmation reception message from the receiving device, the data corresponding to the data transmission request is encrypted with the session key and sent to the receiving device.
11. A device pairing authentication method, applied to a receiving device, characterized in that: include: Receiving first configuration information from a sending device; Acquire a data transmission mode of the receiving device; Sending a first connection establishment request to the sending device according to the first configuration information and the data transmission mode of the receiving device; Performing device authentication and negotiating a session key on the sender device through the first connection; When the data transmission mode is the contact mode, the performing device authentication and negotiating a session key on the sender device through the first connection includes: Receiving and authenticating a key negotiation request message from the sender device, the key negotiation request message including a device public key of the sender device, user identity authentication data of the sender device, and a signature of the key negotiation request message by a private key of the sender device; authenticating the sending device according to the key agreement request message; generating a session key according to the key negotiation request message; A key negotiation response message is sent to the sending device, wherein the key negotiation response message includes a device public key of the receiving device, user identity authentication data of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by the receiving device private key, wherein the user identity authentication data and the device name are encrypted using a session key.
12. The method according to claim 11, characterized in that The authenticating the sending device according to the key negotiation request message includes: The sender device is authenticated according to the user identity authentication data of the sender device.
13. The method according to claim 11, characterized in that When the data transmission mode is the owner mode, performing device authentication and negotiating a session key on the sender device through the first connection includes: Receiving and authenticating a key negotiation request message from the sender device, the key negotiation request message including a device public key of the sender device, user identity authentication data of the sender device, and a signature of the key negotiation request message by a private key of the sender device; generating a session key according to the key negotiation request message; Sending a key negotiation response message to the sending device, the key negotiation response message including a device public key of the receiving device, a device name of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by a private key of the receiving device, wherein the device name is encrypted using a session key; generating a first device verification code according to the session key; The sending device is verified using the first device verification code.
14. The method according to claim 13, characterized in that The verifying the sending device by using the first device verification code includes: Displaying the first device verification code on the receiving device; A confirmation operation is received from the user according to the first device verification code, and when the confirmation operation indicates that the first device verification code is the same as the second device verification code, it is confirmed that the sending device has passed the verification, and the second device verification code is generated by the sending device according to the session key.
15. The method according to claim 11, characterized in that The receiving and authenticating the key negotiation request message from the sending device includes: The signature of the key negotiation request of the private key of the sender device is verified by the public key of the sender device, and if the verification succeeds, it is determined that the authentication is successful.
16. The method according to claim 11, characterized in that The generating a session key according to the key negotiation response message comprises: The session key is obtained through negotiation based on the public key of the sender device and the private key of the receiver device.
17. The method according to any one of claims 11 to 16, characterized in that: After performing device authentication on the sender device and negotiating a session key through the first connection, the method further includes: Data from the sending device is received through the first connection, where the data is sent by the sending device according to the received data transmission request.
18. The method according to claim 17, characterized in that The receiving data from the sending device includes: Receiving encrypted data from the sender device, where the encrypted data is obtained by the sender encrypting data corresponding to the data transmission request using the session key; Displaying characteristic information of the data; In response to confirming receipt, the encrypted data is decrypted based on the session key and stored.
19. The method according to any one of claims 11 to 16, characterized in that: After performing device authentication on the sender device and negotiating a session key through the first connection, the method further includes: Establishing a second connection with the sending device; Data from the sending device is received through the second connection, where the data is sent by the sending device according to the received data transmission request.
20. The method according to claim 19, characterized in that The receiving data from the sending device includes: Establishing a file transfer connection with the sending device through the second connection; receiving characteristic information of the encrypted data from the sending device; decrypting the characteristic information of the encrypted data according to the session key, and displaying the characteristic information of the encrypted data; In response to the confirmation reception operation, sending a confirmation reception message to the sending device; receiving encrypted data from the sender device; The encrypted data is decrypted according to the session key and stored.
21. A device pairing authentication device, applied to a sending device, characterized in that: include: A response module, used to respond to the data transmission request and start the first configuration service; A broadcast module, used for broadcasting first configuration information; The response module is further configured to respond to a first connection establishment request sent by the receiver according to the first broadcasted configuration information, establish a first connection with the receiver device, and close the first configuration service; A negotiation module, configured to perform device authentication and negotiate a session key on the receiving device through the first connection; The first connection establishment request includes a data transmission mode of the receiving device; When the data transmission mode is the contact mode, the negotiation module is specifically used for: Sending a key negotiation request message to the receiving device, where the key negotiation request message includes a public key of the sending device, user identity authentication data of the sending device, and a signature of the private key of the sending device on the key negotiation request message; Receiving and authenticating a key negotiation response message sent by a receiving device according to the key negotiation request message, the key negotiation response message including a device public key of the receiving device, user identity authentication data of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by a private key of the receiving device, wherein the user identity authentication data and the device name are encrypted using a session key, and the session key is generated by the receiving device according to the key negotiation request message; Performing authentication according to the key negotiation response message, and generating a session key according to the key negotiation response message after the authentication is passed; The receiving device is authenticated according to the session key and the key agreement response message.
22. A device pairing authentication device, applied to a receiving device, characterized in that: include: A receiving module, used to receive first configuration information from a sending device; A sending module, used to obtain the data transmission mode of the receiving device; Sending a first connection establishment request to the sending device according to the first configuration information and the data transmission mode of the receiving device; A negotiation module, configured to perform device authentication on the sender device and negotiate a session key through the first connection; When the data transmission mode is the contact mode, the negotiation module is specifically used for: Receiving and authenticating a key negotiation request message from the sender device, the key negotiation request message including a device public key of the sender device, user identity authentication data of the sender device, and a signature of the key negotiation request message by a private key of the sender device; authenticating the sending device according to the key agreement request message; generating a session key according to the key negotiation request message; A key negotiation response message is sent to the sending device, wherein the key negotiation response message includes a device public key of the receiving device, user identity authentication data of the receiving device, a device name of the receiving device, and a signature of the key negotiation response message by the receiving device private key, wherein the user identity authentication data and the device name are encrypted using a session key.
23. A sending device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.
24. A receiving device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 11 to 20 is implemented.
25. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
26. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 11 to 20 is implemented.
Citation Information
Patent Citations
Service data transmission method, apparatus and system
CN107465994A