Communication method and apparatus
Patent Information
- Application Number
- CN202510439065.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2026-10-16
AI Technical Summary
然而,智能手环的用户界面很小,用户在智能手环的用户界面上进行字符串输入的操作难度较高,所以对于智能手环而言,口令验证并不是最佳的配对方式
[0028] It is understood that the technical effects of the technical solutions provided in the second to eighth aspects of this application can be referred to the technical effects corresponding to the first aspect or any implementation of the first aspect, and will not be repeated here.
Smart Images

Figure CN122934274A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, and in particular to a communication method and apparatus. Background Technology
[0002] Currently, to ensure communication security between communication devices in a communication system (such as the Starflash wireless communication system), pairing and authentication are required after the two parties establish a connection. Through pairing and authentication, information such as the link key used to generate the session key between the two parties can be obtained.
[0003] In related technologies, the pairing method (or authentication method) between communicating parties is unique, resulting in poor pairing flexibility and potential discrepancies between the pairing method and the pairing needs of both parties. Taking a mobile phone and a smart bracelet as an example, currently the only pairing method for this is password verification (i.e., the user enters the same string that meets complexity requirements on both parties' user interfaces). However, the user interface of a smart bracelet is small, and the operation of inputting strings on the smart bracelet's user interface is difficult for the user. Therefore, password verification is not the optimal pairing method for smart bracelets. Thus, improving the pairing flexibility of communicating parties and meeting their pairing needs has become an urgent technical problem to be solved. Summary of the Invention
[0004] This application provides a communication method and apparatus that can improve the pairing flexibility of the two communicating parties and meet their pairing needs.
[0005] Firstly, this application provides a communication method that can be executed by a first node (e.g., a management node) in a communication system. The method includes: the first node sending a pairing request; the first node receiving a pairing response from a second node, the pairing response including indication information of the second node's input / output capabilities; the first node determining a first pairing method from multiple pairing methods supported by both the first and second nodes, the multiple pairing methods being derived based on the input / output capabilities of both the first and second nodes; and the first node sending a pairing confirmation to the second node, the pairing confirmation including the first pairing method.
[0006] In the technical solution provided in this application, the first node or the second node can determine multiple pairing methods supported by both communicating parties (i.e., the first node and the second node) based on their input / output capabilities. Furthermore, the first node can determine a first pairing method suitable for the current business scenario from among the multiple pairing methods supported by both communicating parties, enabling the two communicating parties to pair based on the first pairing method (i.e., authenticating the identities of both communicating parties). It can be seen that in this application, the two communicating parties can negotiate and determine the first pairing method according to the needs of the current business scenario. Therefore, this application can improve the pairing flexibility of the two communicating parties and meet their pairing needs.
[0007] In one possible implementation, the communication method provided in this application further includes: a first node sending a first verification message to a second node, the first verification message including a first verification code, the first verification code being used for authentication.
[0008] In another possible implementation, the first verification code is obtained based on a first input message, which relates to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0009] In another possible implementation, the first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0010] In another possible implementation, the communication method provided in this application further includes: a first node receiving a second verification message from a second node, the second verification message including a second verification code, the second verification code being used for authentication.
[0011] In another possible implementation, the second verification code is obtained based on a second input message, which relates to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0012] In another possible implementation, the second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0013] In another possible implementation, the first pairing method is determined from multiple pairing methods supported by both the first node and the second node, including: determining the first pairing method from multiple pairing methods based on priority information of the multiple pairing methods.
[0014] Secondly, this application also provides a communication method that can be executed by a second node in a communication system (e.g., the first node is a terminal node). The method includes: the second node receiving a pairing request from the first node; the second node sending a pairing response to the first node, the pairing response including indication information of the second node's input / output capabilities; and the second node receiving a pairing confirmation from the first node, the pairing confirmation including a first pairing method determined from multiple pairing methods supported by both the first and second nodes, the multiple pairing methods being derived based on the input / output capabilities of both the first and second nodes.
[0015] In one possible implementation, the communication method provided in this application further includes: a second node receiving a first verification message from a first node, the first verification message including a first verification code, the first verification code being used for authentication.
[0016] In another possible implementation, the first verification code is obtained based on a first input message, which relates to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0017] In another possible implementation, the first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0018] In another possible implementation, the communication method provided in this application further includes: the second node sending a second verification message to the first node, the second verification message including a second verification code, the second verification code being used for authentication.
[0019] In another possible implementation, the second verification code is obtained based on a second input message, which relates to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0020] In another possible implementation, the second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0021] In another possible implementation, the first pairing method is determined from multiple pairing methods based on priority information of multiple pairing methods.
[0022] Thirdly, this application provides a communication device comprising at least one module or at least one unit, wherein the at least one module or at least one unit is configured to perform the method provided by the first aspect or any implementation thereof, or to perform the method provided by the second aspect or any implementation thereof. The at least one module or at least one unit may be implemented in hardware, in software, or in a combination of hardware and software.
[0023] Fourthly, this application also provides a communication device, which includes a memory and at least one processor; the memory is coupled to the processor; wherein the memory stores computer program code, which includes computer instructions, and when the computer instructions are executed by the processor, the communication device performs the method provided by the first aspect or any implementation thereof, or performs the method provided by the second aspect or any implementation thereof.
[0024] Fifthly, this application provides a computer-readable storage medium including computer instructions that, when executed on a computer, cause the computer to perform the method provided by the first aspect or any implementation thereof, or to perform the method provided by the second aspect or any implementation thereof.
[0025] Sixthly, this application provides a computer program product that, when run on a computer, causes the computer to execute the method provided by the first aspect or any implementation thereof, or to execute the method provided by the second aspect or any implementation thereof.
[0026] In a seventh aspect, this application provides a chip or chip system. Exemplarily, the chip or chip system may be a communication device provided in the third aspect. The chip or chip system includes: at least one processor, configured to execute a computer program or instructions to cause the method provided in the first aspect or any implementation thereof to be executed, or to cause the method provided in the second aspect or any implementation thereof to be executed.
[0027] Eighthly, this application provides a communication system. The communication system includes a first node and a second node, the first node being used to execute the method provided by the first aspect or any implementation thereof, and the second node being used to execute the method provided by the second aspect or any implementation thereof.
[0028] It is understood that the technical effects of the technical solutions provided in the second to eighth aspects of this application can be referred to the technical effects corresponding to the first aspect or any implementation of the first aspect, and will not be repeated here.
[0029] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description
[0030] Figure 1 This application provides a partial flowchart illustrating the pairing and authentication process between G nodes and T nodes, as illustrated in an embodiment of the present application.
[0031] Figure 2 A flowchart illustrating a communication method provided in an embodiment of this application;
[0032] Figure 3 A flowchart illustrating a user authentication process provided in an embodiment of this application;
[0033] Figure 4 A flowchart illustrating another user authentication process provided in an embodiment of this application;
[0034] Figure 5 A flowchart illustrating another user authentication process provided in an embodiment of this application;
[0035] Figure 6 A flowchart illustrating another user authentication process provided in an embodiment of this application;
[0036] Figure 7 A flowchart illustrating another user authentication process provided in an embodiment of this application;
[0037] Figure 8 A flowchart illustrating another user authentication process provided in an embodiment of this application;
[0038] Figure 9 A flowchart illustrating another communication method provided in an embodiment of this application;
[0039] Figure 10 A simplified flowchart illustrating the process of determining the DH key verification code of a first node, provided for an embodiment of this application;
[0040] Figure 11 A simplified flowchart illustrating the process of determining the DH key verification code key of the first node, provided in an embodiment of this application;
[0041] Figure 12 A schematic flowchart illustrating a key verification process provided in an embodiment of this application;
[0042] Figure 13 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0043] Figure 14 This is a schematic diagram of another communication device provided in an embodiment of this application;
[0044] Figure 15 This is a schematic diagram of another communication device provided in an embodiment of this application. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described herein are some, but not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this application.
[0046] Before describing the technical solution provided in this application in detail, some terms involved in this application will be explained.
[0047] The terms "first," "second," etc., used in the embodiments and accompanying drawings of this application are for distinguishing purposes only and should not be construed as indicating or implying relative importance or order.
[0048] The terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion, such as including a series of steps or units. A method, apparatus, or product is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such methods, apparatus, or products.
[0049] The term "at least one" means one or more, and "more than one" means two or more. "And / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. A and B can be singular or plural.
[0050] The terms “exemplary,” “for example,” and “e.g.,” are used to indicate examples, illustrations, or descriptions. Any embodiment or implementation described herein as “exemplary,” “for example,” and “e.g.,” should not be construed as being more preferred or advantageous than other embodiments or implementations. Rather, the use of terms such as “exemplary” is intended to present the relevant concepts in a specific manner.
[0051] The term "instruction" or "for instruction" can include both direct and indirect instruction. When describing an instruction as being used to instruct A, it can include whether the instruction directly or indirectly instructs A, but does not necessarily mean that the instruction necessarily carries A. The instruction methods involved in the embodiments of this application can be understood to cover various methods that enable the party to be instructed to know the instruction information. The instruction information can be sent as a whole or divided into multiple sub-information messages sent separately, and the sending period and / or timing of these sub-information messages can be the same or different.
[0052] The term "protocol" can refer to a standard protocol in the field of communications. For example, it can be a 5th generation (5G) protocol, a new radio (NR) protocol, and related protocols applied to future communication systems, or it can be a related protocol for short-range wireless communication systems such as the StarScan protocol. This application does not limit the scope of the term.
[0053] Furthermore, in this application, "sending information to XX (device or equipment)" can be understood as the destination of the information being the device, and may include sending information directly or indirectly to the device. "Receiving information from XX (device or equipment)" or "receiving information from XX (device or equipment)" can be understood as the source of the information being the device, and may include receiving information directly or indirectly from the device. The information may undergo necessary processing between the source of the information transmission and the destination of the information reception, such as format conversion.
[0054] The system architecture and business scenarios of this application are illustrated below.
[0055] The technical solutions provided in this application can be applied to, but are not limited to, short-range wireless communication systems and wireless communication systems that support longer distance transmission (such as 1 to 18 kilometers (km) and more than 18 km) (such as the next-generation Sparklink / Nearlink wireless communication system).
[0056] Among them, the wireless short-range communication system can include wireless short-range communication technology (also known as StarFlash 1.0 technology), which has advantages such as ultra-low latency, ultra-high reliability, and precise synchronization. It is suitable for applications in smart cars, smart homes, smart terminals, and smart manufacturing. For example, applications in smart car scenarios include: immersive in-vehicle sound field and noise reduction, wireless interactive projection, and 360-degree panoramic surround view, which can realize an immersive interactive experience and improve vehicle safety.
[0057] Wireless communication systems supporting longer transmission distances can include next-generation StarScan wireless communication systems, such as StarScan 2.0 and StarScan 3.0. These systems are suitable not only for communication scenarios with low latency requirements, such as vehicle communication and industrial control, but also for communication scenarios with less stringent latency requirements.
[0058] In some possible implementations, the aforementioned communication system may be used in conjunction with a mobile communication system, such as, but not limited to, fourth-generation (4G) mobile communication systems (e.g., Long Term Evolution (LTE) systems), fifth-generation (5G) mobile communication systems (e.g., New Radio (NR) systems), and future mobile communication systems (e.g., sixth-generation (6G) mobile communication systems).
[0059] The following description of this application will use the application of the technical solution provided in this application to a wireless short-range communication system as an example.
[0060] The wireless short-range communication system of this application may include a grant node (G node) and a terminal node (T node). The G node can be a node in the wireless short-range communication system that has resource scheduling capabilities and sends control information such as resource management information and / or data scheduling information. The T node can be a node in the wireless short-range communication system that receives the control information such as resource management information and / or data scheduling information sent by the G node, and performs data transmission or reception based on this control information.
[0061] In the Star Flash protocol of a short-range wireless communication system (for ease of description, this application refers to the short-range protocol in a short-range wireless communication system as the Star Flash protocol), there is uplink and downlink transmission between the G node and the T node. Uplink transmission is implemented through the T link, which refers to the link between the T node and the G node, and can also be called the uplink link; downlink transmission is implemented through the G link, which refers to the link between the G node and the T node, and can also be called the downlink link.
[0062] A management node (G node) is a device or chip / chip system located on the network side of a short-range wireless communication system. It assists terminal nodes in achieving wireless access and has wireless transceiver capabilities. Examples of possible management nodes include network devices, access network devices, access network nodes, radio access network (RAN) nodes, RAN entities, base stations, evolved NodeBs (eNodeBs), access points (APs), transmission reception points (TRPs) or transmission points (TPs), next-generation NodeBs (gNBs), next-generation base stations in 6G mobile communication systems, base stations in future mobile communication systems, or APs in wireless fidelity (Wi-Fi) systems. Alternatively, the management node can also be a macro base station, micro base station, indoor station, relay node, donor node, open radio access network (ORAN), or a wireless controller in a centralized radio access network (CRAN) scenario. The management node can also be one or a group of antenna panels in a 5G base station (a group of antenna panels includes multiple antenna panels), or it can be a network node constituting a gNB, TRP (or TP), or transmission measurement function (TMF). For example, it can be a central unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), a radio unit (RU), or a roadside unit (RSU) with base station functionality. Alternatively, the management node can also be a server, wearable device, vehicle, or in-vehicle equipment. For example, the management node in vehicle-to-everything (V2X) technology can be an RSU. Alternatively, the management node can also be a control unit in autonomous driving equipment, a central controller in a smart factory / smart home, or a handheld or automatic control remote sensor for flight equipment. Alternatively, the management node can also be a central control or control panel, such as a drone controller or a control unit in industrial control.All or part of the functions of the management node in this application can also be implemented through software functions running on hardware, or through virtualization functions instantiated on a platform (such as a cloud platform). The management node in this application can also be a logical node, logical module, or software capable of implementing all or part of the management node functions.
[0063] This application does not limit the device form of the management node. The device used to implement the function of the management node can be the management node itself, or it can be a device (such as a chip system) that can support the management node to implement the function. The device can be installed in the management node or used in conjunction with the management node.
[0064] A terminal node (T-node) is a device, equipment, module, chip, or chip system with transceiver capabilities. It can also be referred to as terminal equipment, user equipment (UE), access terminal, user unit (subscriber unit), user station, mobile station (MS), mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user equipment. For example, the terminal node can be a mobile phone, cellular phone, smartphone, tablet, mouse, remote control, stylus, set-top box, router, camera, screen, smart screen, wireless data card, personal digital assistant (PDA), wireless modem, handset, laptop computer, smartwatch, smart bracelet, wireless headset, electronic whiteboard, machine type communication (MTC) terminal, computer with wireless transceiver capability, virtual reality (VR) terminal, augmented reality (AR) terminal, smart home device (e.g., refrigerator, television, air conditioner, washing machine, rice cooker, table lamp, electricity meter, etc.), smart robot, robotic arm, workshop equipment, wireless terminal in autonomous driving, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical care, wireless terminal in smart grid, transportation security, etc. Wireless terminals in various contexts, including those related to safety, smart cities, smart homes, vehicles, in-vehicle terminals, in-vehicle screens, in-vehicle audio systems, car keys, RSUs with terminal functions, and flying equipment (e.g., intelligent robots, hot air balloons, drones, airplanes). Alternatively, a terminal node can be an in-vehicle module, in-vehicle component, in-vehicle chip, or in-vehicle unit that is built into a vehicle as one or more components or units. Furthermore, a terminal node can be other devices with terminal functions; for example, it can be a device that acts as a terminal in device-to-device (D2D) communication.
[0065] The embodiments of this application do not limit the device form of the terminal node. The device used to implement the function of the terminal node can be the terminal node itself, or it can be a device (such as a chip system) that can support the terminal node in implementing the function. The device can be installed in the terminal node or used in conjunction with the terminal node. In the embodiments of this application, the chip system can be composed of chips, or it can include chips and other discrete devices.
[0066] The technical solution provided in this application can be applied to business scenarios where G nodes and T nodes communicate and interact. Specifically, it can be applied to business scenarios where G nodes and T nodes perform pairing and authentication. (See reference...) Figure 1 This is a partial flowchart illustrating the pairing and authentication process between G nodes and T nodes provided in an embodiment of this application.
[0067] It should be understood that the system architecture and business scenarios described in this application are for the purpose of more clearly illustrating the technical solutions of this application, and do not constitute a limitation on the technical solutions of this application. Those skilled in the art will recognize that, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in this application are equally applicable to technical problems similar to those in this application. For example, the technical solutions provided in this application can also be applied to other business scenarios in wireless short-range communication systems where both communicating parties need to pair and authenticate; alternatively, the technical solutions provided in this application can also be applied to other communication systems, and the corresponding names in wireless short-range communication systems can be replaced by the names of the corresponding functions in other communication systems.
[0068] Currently, after establishing a connection, G nodes and T nodes need to perform pairing and authentication. The pairing and authentication process between G nodes and T nodes includes a pairing negotiation process and an authentication process (or secure pairing process). Figure 1 The diagram shows the pairing negotiation process in pairing and authentication.
[0069] like Figure 1 As shown, the pairing negotiation process between node G and node T may include the following steps:
[0070] S110, G node sends a pairing request to T node.
[0071] S120, Node G receives the pairing response from Node T.
[0072] S130, Node G sends a pairing confirmation to Node T.
[0073] S140, Node G receives pairing initial information from Node T.
[0074] In this process, the pairing request sent by node G to node T initiates the pairing negotiation process with node T. The pairing response received by node G includes indications of node T's input / output capabilities. After receiving the pairing response, node G can look up a table based on the input / output capabilities of both nodes to determine a unique pairing method (or authentication method) between them. Then, node G can send a pairing confirmation, including this unique pairing method, to node T. Upon receiving the pairing confirmation, node T replies with initial pairing information to node G.
[0075] After the pairing negotiation process described above, nodes G and T enter the authentication process. In this process, both parties authenticate their identities according to the pairing method determined during the pairing negotiation. Upon successful authentication, they obtain information such as their link keys. Following pairing and authentication, nodes G and T enter the security control process, where the session keys are dynamically refreshed based on the link keys obtained during pairing and authentication. This ensures secure communication between nodes G and T.
[0076] However, in the aforementioned communication process, the pairing method between the G node and the T node is unique, resulting in poor pairing flexibility and potential discrepancies between the pairing method and the pairing needs of both communicating parties. Taking a mobile phone as the G node and a smart bracelet as the T node as an example, since both the phone and the smart bracelet have full character output and full keyboard input capabilities, the current pairing method for communicating parties with both capabilities is only password verification (i.e., the user inputs the same string that meets the complexity requirements on both communicating parties' user interfaces). However, the smart bracelet's user interface is small, and the operation of inputting strings on the smart bracelet's user interface is difficult for the user. Therefore, password verification is not the optimal pairing method for smart bracelets.
[0077] It is evident that the technical solutions provided by related technologies offer limited pairing flexibility between the communicating parties in the communication system, failing to meet their pairing requirements. Therefore, this application provides a communication method that improves the pairing flexibility between the communicating parties in the communication system, thereby satisfying their pairing needs.
[0078] The communication method provided in this application will now be described by way of example. (Refer to...) Figure 2This is a flowchart illustrating a communication method provided in an embodiment of this application. This method can be applied to service scenarios where a first node and a second node communicate with each other in a communication system. For example, the first node and the second node are a G node and a T node in a short-range wireless communication system, respectively. Alternatively, the first node and the second node can also be other communication devices or apparatuses with pairing and authentication requirements. In one possible implementation, this method can specifically be applied to service scenarios where the first node and the second node communicate with each other based on Sparklink Low Energy (SLE) mode.
[0079] It should be understood that communication devices or apparatuses requiring pairing and authentication may not be referred to as nodes. For ease of description, this application will refer to communication devices or apparatuses requiring pairing and authentication as nodes.
[0080] like Figure 2 As shown, the communication method includes the following steps:
[0081] S210, The first node sends a pairing request to the second node.
[0082] After the first node and the second node establish a connection (i.e., the first node and the second node establish a physical layer connection), the first node can automatically trigger the pairing negotiation process between the two communicating parties (in the following description of this application, the two communicating parties may refer to the first node and the second node). The pairing negotiation process can be started by the first node sending a pairing request to the second node.
[0083] The pairing request may include node attribute information of the first node, such as the node attribute information of the first node, which may be an indication of the first node's input and output capabilities.
[0084] In one possible implementation, the message structure for the pairing request is shown in Table 1.
[0085] Table 1
[0086]
[0087] The data type index field is used to identify the data type of the message. For example, if the data type index field value is 0x0134, it means that the message is a pairing request.
[0088] The Input / Output Capability message field indicates the input / output capabilities of the first node. For example, a value of 0x00 indicates that the first node only has display capabilities (i.e., it has full character output capabilities, displaying letters, numbers, and symbols, but lacks input capabilities and cannot support user input of any form of information). For instance, the first node could be a smart TV. A value of 0x01 indicates that the first node has display capabilities and the ability to input yes / no (i.e., it has full character output capabilities and supports simple binary input operations such as key confirmation / cancel). A value of 0x02 indicates that the first node only has input capabilities (i.e., it has full keyboard input capabilities, supporting input of numbers or characters via keyboard, numeric keypad, etc., but lacks display / output capabilities and cannot present any form of information to the user). For instance, the first node could be a keyboard with wireless communication capabilities. When the value of the Input / Output Capability message field is 0x03, it indicates that the first node has no input or output capabilities (i.e., the first node does not support any form of user input and cannot present any information to the user). For example, the first node could be a low-power sensor. When the value of the Input / Output Capability message field is 0x04, it indicates that the first node has input and output capabilities (i.e., the first node has full character output capability and full keyboard input capability). For example, the first node could be a mobile phone. It should be understood that the value of the Input / Output Capability message field can also be other reserved field values.
[0089] The "Out-of-Band Data Identifier" message field indicates whether the first node supports out-of-band (OOB) pairing. For example, a value of 0x00 indicates that the first node has no out-of-band data and does not support out-of-band pairing. A value of 0x01 indicates that the first node has out-of-band data and supports out-of-band pairing.
[0090] The authentication request message field indicates the format of the authentication request from the first node. In one possible implementation, the message structure of the authentication request is shown in Table 2. As shown in Table 2, the authentication request may include security attributes, anti-man-in-the-middle attack indicators, key prompts, and other reserved fields.
[0091] Table 2
[0092]
[0093] The security attribute message field indicates whether the first node needs to undergo binding mode pairing. For example, a value of 00 for the security attribute message field indicates that the first node does not need to undergo binding mode pairing, meaning it does not need to go through the pairing negotiation process and the security pairing process; a value of 01 for the security attribute message field indicates that the first node needs to undergo binding mode pairing, meaning it needs to go through the pairing negotiation process and the security pairing process. It should be understood that the value of the security attribute message field can also be other reserved field values.
[0094] The "Anti-Man-in-the-Middle Attack Indicator" message field indicates whether the first node needs to support the anti-man-in-the-middle attack pairing method. For example, a value of 0 indicates that the first node does not need to support the anti-man-in-the-middle attack pairing method; a value of 1 indicates that the first node needs to support the anti-man-in-the-middle attack pairing method. If the first node does not support the input-free pairing method, it can only use the anti-man-in-the-middle attack pairing method, and the value of this message field cannot be set to 0. When the value of this message field is 0 for both the first and second nodes, the first and second nodes can use the input-free pairing method.
[0095] The "Key Hints" message field indicates whether the first node provides key hints during pairing. For example, when the first and second nodes pair using a passcode input method, this field indicates whether a key notification message is needed to inform the second node of its current keyboard input status during the pairing process. For instance, a value of 0 for the "Key Hints" message field indicates that the first node provides no key hints during pairing; a value of 1 indicates that the first node provides key hints during pairing.
[0096] The "Maximum Encryption Key Length" message field indicates the maximum key length (or maximum number of bytes) that the first node can support. For example, the maximum encryption key length could be 16 bytes.
[0097] The secure information distribution information consists of three bits. Bit 0 indicates whether the first node should distribute the Identity Resolving Key (IRK) information to the peer node (e.g., the second node) after pairing; for example, a value of 0 indicates no distribution, and a value of 1 indicates distribution. Bit 1 indicates whether the first node should distribute its node identifier information (used to uniquely identify a node) to the peer node after pairing; for example, a value of 0 indicates no distribution, and a value of 1 indicates distribution. Bit 2 indicates whether the first node can parse the IRK information and node identifier information sent by the peer node; for example, a value of 0 indicates no parsing, and a value of 1 indicates parsing.
[0098] The cryptographic algorithm capability message field is used to indicate the cryptographic algorithms that the first node can support. In one possible implementation, the message structure for cryptographic algorithm capability is shown in Table 3.
[0099] Table 3
[0100]
[0101] Each algorithm capability in the cryptographic algorithm capability can be represented using bits. For example, the encryption algorithm capability includes four bits, each bit representing an encryption algorithm. When the value of a bit is 0, it means that the first node does not support the encryption algorithm corresponding to that bit. When the value of a bit is 1, it means that the first node supports the encryption algorithm corresponding to that bit.
[0102] The Pre-Shared Key (PSK) indicator message field is used to indicate whether a corresponding PSK exists in the first node. For example, a PSK indicator message field value of 0x00 indicates that a corresponding PSK does not exist in the first node; a value of 0x01 indicates that a corresponding PSK exists in the first node. It should be understood that the PSK indicator message field value can also be other reserved field values.
[0103] It should be noted that the bytes / bits in the message field of the message structure in this application are used to indicate the length of the message field. For example, the length of the input / output capability message field in the message structure of Table 1 is 1 byte.
[0104] It should be understood that the above S210 can also be replaced by: the second node receiving a pairing request from the first node.
[0105] S220, The first node receives the pairing response from the second node.
[0106] The pairing response includes indications of the second node's input / output capabilities. Alternatively, the pairing response may also include other node attribute information of the second node. In one possible implementation, the message structure of the pairing response is shown in Table 4.
[0107] Table 4
[0108]
[0109] The message structure of the pairing response is similar to that of the pairing request, except that the message fields such as input / output capabilities, out-of-band data identifier, authentication request, maximum encryption key length, security information distribution information, cryptographic algorithm capabilities, and PSK indication indicate information about the second node. For a detailed description of the specific message fields, please refer to the relevant descriptions in Table 1, which will not be repeated here.
[0110] It should be understood that the above S220 can also be replaced by: the second node sending a pairing response to the first node.
[0111] S230, The first node determines the first pairing method from among the multiple pairing methods supported by both the first node and the second node.
[0112] The various pairing methods are derived from the input and output capabilities of the first and second nodes.
[0113] The first pairing method can be a pairing method that the first node determines from a variety of pairing methods supported by both communicating parties, based on information such as the device types and pairing requirements of both parties, and is suitable for the current business scenario.
[0114] The pairing methods supported by the first node (or second node) may include one or more candidate pairing methods. For example, candidate pairing methods include number comparison pairing (or number comparison authentication), input-free pairing (or input-free authentication), passcode input pairing (or passcode input authentication), password verification pairing (or password verification authentication), out-of-band pairing (or out-of-band authentication), and PSK pairing (or PSK authentication). Specifically, number comparison pairing means that both communicating parties generate random numbers and display them, and the user manually confirms whether the displayed random numbers are consistent. Input-free pairing means that the communicating parties pair directly without authentication. Passcode input pairing means that one party displays a set of numbers, and the user manually enters the same set of numbers on the other party's screen. Password verification pairing means that the user enters the same string that meets the complexity requirements on the user interfaces of both communicating parties. In password verification pairing, the likelihood of the password being guessed can be reduced by restricting the character length and type of the input password (i.e., the input string). For example, the input password may be required to contain at least 8 characters, or it may be required to be a combination of numbers and letters. PSK pairing involves pre-configuring a 256-bit PSK between the communicating parties, which then uses this PSK for authentication. Out-of-band pairing refers to using additional technologies for authentication, such as Near Field Communication (NFC), Wi-Fi, or QR codes.
[0115] Optionally, after receiving a pairing response from the second node, the first node can first determine whether the two communicating parties support PSK pairing based on the PSK indication of the first node and the PSK indication of the second node in the pairing response. For example, if both the first and second nodes have PSKs corresponding to the peer node, it is determined that the two communicating parties support PSK pairing; otherwise, it is determined that the two communicating parties do not support PSK pairing. If both communicating parties support PSK pairing, then the first pairing method is determined to be PSK pairing. If neither communicating party supports PSK pairing, the first node can further determine whether the two communicating parties support out-of-band pairing based on the out-of-band data identifier of the first node and the out-of-band data identifier of the second node in the pairing response. If both the first and second nodes support out-of-band pairing, the first node can determine that the first pairing method is out-of-band pairing. Otherwise, the first node can further determine, based on the input / output capabilities of the first and second nodes, multiple pairing methods supported by both the first and second nodes, from numeric comparison pairing, input-free pairing, passcode input pairing, and password verification pairing.
[0116] In one possible implementation, the first node can determine, by looking up a table, the multiple pairing methods supported by both the first and second nodes based on their input / output capabilities. For example, the first node can determine the multiple pairing methods supported by both the first and second nodes according to Table 5.
[0117] Table 5
[0118]
[0119] The horizontal header in Table 5 represents the five possibilities of the input / output capabilities of the first node, and the vertical header in Table 5 represents the five possibilities of the input / output capabilities of the second node. Specifically, "Display Only" means only display capability; "Display Input Yes / No" means both display and input yes / no capabilities are present; "Input Only" means only input capability is present; "No Input, No Output" means no input and no output capability; and "Input and Display" means both input and output capabilities are present.
[0120] The main body of Table 5 indicates the multiple pairing methods supported by both the first and second nodes corresponding to the cell. For example, as shown in Table 5, when the first node is "Input Only" and the second node is "Display Input Yes / No", the corresponding cell is "Password Input (Displayed on Second Node, Input on First Node) / Password Verification". That is, when the first node only has input capability, and the second node has display and input / no capabilities, the multiple pairing methods supported by both the first and second nodes include password input pairing (specifically, displayed on the second node and input on the first node) and password verification pairing. For instance, when the second node is a router with a display screen and supports binary input (although the router does not have full keyboard input capability, it supports setting passwords through other methods, such as setting passwords on the router's management page), and the first node is a keyboard with wireless communication capabilities, the multiple pairing methods supported by both the first and second nodes include password input pairing and password verification pairing.
[0121] It should be understood that the correspondence between the input / output capabilities of the communicating parties and the various pairing methods supported by both parties provided in Table 5 is merely an example. In practical applications, Table 5 may contain other correspondences, which are not limited in this application.
[0122] Optionally, the above S230 can be replaced by: the first node determining the first pairing method from the multiple pairing methods based on the priority information of multiple pairing methods.
[0123] The priority information for multiple pairing methods can include the priority information of the first node for multiple pairing methods, or it can include the priority information of the second node for multiple pairing methods. Specifically, the priority information of the first node for multiple pairing methods can be obtained from the priority information of the first node for candidate pairing methods, and the priority information of the second node for multiple pairing methods can be obtained from the priority information of the second node for candidate pairing methods.
[0124] The priority information for candidate pairing methods for the first node can be obtained by pre-sorting the candidate pairing methods according to their device type and pairing requirements. Similarly, the priority information for candidate pairing methods for the second node can be obtained by pre-sorting the candidate pairing methods according to their device type and pairing requirements. Alternatively, the priority information for the first node can be information indirectly representing its priority based on its device type and pairing requirements; the priority information for the second node can be information indirectly representing its priority based on its device type and pairing requirements. For example, if the second node is a smart bracelet, because the smart bracelet's user interface is small, the difficulty of string input is higher than the difficulty of binary input. Therefore, for a smart bracelet, numeric comparison pairing is preferred over password verification pairing, and the priority of numeric comparison pairing can be set higher than that of password verification pairing.
[0125] In one possible implementation, after the first node determines the multiple pairing methods supported by both the first node and the second node, it can determine the pairing method with the highest priority corresponding to the first node as the first pairing method based on the priority information of the first node for the multiple pairing methods.
[0126] In another possible implementation, the message structure for paired responses is shown in Table 6.
[0127] Table 6
[0128]
[0129] The priority information 'a' message field indicates the priority of the second node for the candidate pairing methods. The other message fields in Table 6 are the same as in Table 4 and will not be repeated here. After determining the multiple pairing methods supported by both the first and second nodes, the first node can determine the priority information of the second node for these methods based on the priority information 'a' message field in the pairing response. Then, based on the second node's priority information for these methods, the pairing method with the highest priority corresponding to the second node can be determined as the first pairing method.
[0130] In another possible implementation, the message structure for paired responses is shown in Table 7.
[0131] Table 7
[0132]
[0133] Among them, the message field "Multiple Pairing Methods" is used to indicate the multiple pairing methods supported by both the first node and the second node. The priority information b is used to indicate the priority information of the second node for the multiple pairing methods. The other message fields in Table 7 are the same as those in Table 6, and will not be described again here.
[0134] For example, after receiving a pairing request from the first node, the second node can determine multiple pairing methods supported by both the first and second nodes based on their input / output capabilities, and send a pairing response to the first node including indication information for these multiple pairing methods. Upon receiving the pairing response, the first node can obtain the multiple pairing methods from the response and, based on its priority information for these methods, determine the pairing method with the highest priority corresponding to the first node as the first pairing method. Alternatively, the pairing response sent by the second node to the first node may also include a message field containing priority information 'a'. After receiving the pairing response, the first node can first obtain the multiple pairing methods from the response and acquire the priority information for these methods from the second node, and then determine the pairing method with the highest priority corresponding to the second node as the first pairing method. Or, in the pairing response sent by the second node to the first node, the message field containing priority information 'a' can be replaced with a message field containing priority information 'b'.
[0135] In another possible implementation, after receiving a pairing response (message structure as shown in Table 7), the first node can combine the priority information of the first node for multiple pairing methods with the priority information of the second node for multiple pairing methods, and determine the first pairing method from the multiple pairing methods according to a predetermined selection strategy. For example, the multiple pairing methods include pairing method 1, pairing method 2, and pairing method 3. The priority order of the first node for the multiple pairing methods from high to low is pairing method 1, pairing method 2, and pairing method 3. The priority order of the second node for the multiple pairing methods from high to low is pairing method 3, pairing method 2, and pairing method 1. Therefore, the first node can determine pairing method 2 as the first pairing method.
[0136] S240, The first node sends a pairing confirmation to the second node.
[0137] The pairing confirmation includes the first pairing method. Alternatively, the pairing confirmation may also include other pairing / authentication information.
[0138] In one possible implementation, the message structure for pairing confirmation is shown in Table 8.
[0139] Table 8
[0140]
[0141] The "Key Length" message field indicates the final key length determined by the first node. The value of this field is determined based on the maximum key length supported by both the first and second nodes. The "Pairing Method" message field indicates the first pairing method determined by the first node. The "Cryptographic Algorithm" message field indicates the final cryptographic algorithm determined by the first node. The value of this field is determined based on the cryptographic algorithm capabilities of both the first and second nodes. For example, it could be determined based on the first node's configured cryptographic algorithm selection strategy. For instance, the first node's cryptographic algorithm selection strategy includes its selection strategy for encryption algorithms, integrity protection algorithms, key derivation functions, and key negotiation algorithms.
[0142] The first node's public key X and public key Y are used to indicate the two public keys generated by the first node. For example, the first node can first generate its private key X and private key Y according to a predetermined key generation algorithm, and then generate a public key X corresponding to the private key X and a public key Y corresponding to the private key Y according to the key negotiation algorithm selected by the first node.
[0143] It should be understood that the above S240 can also be replaced by: the second node receiving a pairing confirmation from the first node.
[0144] In the communication method provided in this application embodiment, the pairing negotiation process is generally initiated by node G. In practical applications, node T can also request to initiate pairing. If node T requests to initiate pairing, node T needs to trigger node G to start the pairing negotiation process by sending a pairing initiation message to node G. Therefore, optionally, before S210, the communication method provided in this application further includes: the first node receiving a pairing initiation from the second node (or the second node sending a pairing initiation to the first node). In one possible implementation, the message structure for pairing initiation is shown in Table 9.
[0145] Table 9
[0146]
[0147] The message structure for the authentication request can be found in Table 2.
[0148] Optionally, after S240, the communication method provided in this application further includes: the first node receiving pairing initial information from the second node (or the second node sending pairing initial information to the first node). In one possible implementation, the message structure of the pairing initial information is shown in Table 10. For example, the pairing negotiation process can end when the first node receives the pairing initial information.
[0149] Table 10
[0150]
[0151] The second node's public key X and public key Y are used to indicate the two public keys generated by the second node. For example, the second node can first generate its private key X and private key Y according to a predetermined key generation algorithm, and then generate a public key X corresponding to the private key X and a public key Y corresponding to the private key Y according to the key negotiation algorithm in the pairing confirmation.
[0152] Furthermore, after generating its public key and determining the key negotiation algorithm, the first node can obtain its Diffie-Hellman key (DH key) based on the public key and the key negotiation algorithm. Similarly, after generating its public key, the second node can obtain its DH key based on the public key and the key negotiation algorithm. Then, the first and second nodes can combine the DH keys to generate the link key for communication between the two parties. The specific process of generating the DH key can be found in relevant technical descriptions and will not be repeated here. The specific process of generating the link key will be explained in the secure pairing process described later.
[0153] In the communication method provided in this application embodiment, a first node or a second node can determine multiple pairing methods supported by both communicating parties (i.e., the first node and the second node) based on their input / output capabilities. Furthermore, the first node can determine a first pairing method suitable for the current business scenario from the multiple pairing methods supported by both communicating parties, based on information such as the device type and pairing requirements of both parties, so that the two communicating parties can pair based on the first pairing method (i.e., authenticate the identities of both communicating parties). It can be seen that in this application embodiment, the two communicating parties can negotiate and determine the first pairing method according to the needs of the current business scenario, which can improve the pairing flexibility of both parties. Therefore, this application embodiment can improve the pairing flexibility of both communicating parties and meet their pairing needs.
[0154] After the first node and the second node complete the aforementioned pairing negotiation process (i.e., the process from the first node sending a pairing request to the second node to the first node receiving initial pairing information from the second node), they can enter the secure pairing process. The secure pairing process may include a user authentication process, in which the first node and the second node may authenticate the identities of both communicating parties using a first pairing method. For example, refer to... Figure 3 This is a flowchart illustrating a user authentication process provided in an embodiment of this application. The flowchart shows a user authentication process where the first pairing method is a numerical comparison pairing method. Figure 3 As shown, the process includes the following steps:
[0155] S310, Select a random number Ra for the first node.
[0156] S320, the second node selects a random number Rb.
[0157] S330. The second node calculates the confirmation code based on the first node's public key, the second node's public key, and the random number Rb.
[0158] S340, the second node sends a second node confirmation code message to the first node.
[0159] The second node confirmation message includes the second node's confirmation code and a random number Rb.
[0160] S350, the first node sends a Ra message to the second node.
[0161] The Ra message includes a random number Ra.
[0162] S360. The first node calculates its own confirmation code based on its own public key, the second node's public key, and the random number Rb. The first node then verifies the consistency between its own confirmation code and the second node's confirmation code.
[0163] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, proceed to S370.
[0164] S370. The first node generates a 6-digit number based on the first node's public key, the second node's public key, the random number Ra, and the random number Rb.
[0165] S380: The second node generates a 6-digit number based on the first node's public key, the second node's public key, the random number Ra, and the random number Rb.
[0166] S390, the first node and the second node display a 6-digit number to the user. After both users confirm that the numbers match, they can select "confirm" to continue the subsequent process.
[0167] After the first (or second) node generates a 6-digit decimal number, it can display the 6-digit number on the screen. Once the users of both communicating parties confirm that the numbers presented by the first and second nodes match, they can choose to continue from the "continue" option, thus completing the user authentication process using the number comparison and matching method.
[0168] In the digital comparison and pairing method, the process of the second node calculating the confirmation code of the second node according to the confirmation algorithm, the process of the first node calculating the confirmation code of the first node according to the confirmation algorithm, and the process of the first node and the second node generating a 6-digit number can be referred to the description in related technologies, and will not be repeated here.
[0169] It should be noted that when the first pairing method is the numeric comparison pairing method, both communicating parties need to support anti-man-in-the-middle attack (i.e., the value of the anti-man-in-the-middle attack indicator bit message field of both communicating parties is 1).
[0170] For example, refer to Figure 4 This is a flowchart illustrating another user authentication process provided in an embodiment of this application. The flowchart shows a user authentication process where the first pairing method is a no-input pairing method. Figure 4 As shown, the process includes the following steps:
[0171] S410, the first node selects a random number Ra.
[0172] S420, the second node selects a random number Rb.
[0173] S430. The second node calculates the confirmation code based on the first node's public key, the second node's public key, and the random number Rb.
[0174] S440, the second node sends a second node confirmation code message to the first node.
[0175] In the user authentication process using the input-free pairing method, the second node confirmation code message includes the second node's confirmation code, but may not include the random number Rb.
[0176] S450, the first node sends a Ra message to the second node.
[0177] The Ra message includes a random number Ra.
[0178] S460, the second node sends an Rb message to the first node.
[0179] The Rb message includes a random number Rb.
[0180] S470, The first node assumes that the confirmation code of the second node is correct.
[0181] The user authentication process for the input-free pairing method is similar to that for the number comparison pairing method. However, in the input-free pairing method, the first node does not verify the consistency of the confirmation codes of the two communicating parties, and neither the first nor the second node displays the numbers. The first node assumes that the confirmation code of the second node is correct and then continues the subsequent process.
[0182] It should be noted that when the first pairing method is input-free pairing, it does not support protection against man-in-the-middle attacks. Therefore, when using input-free pairing, some restrictions can be imposed at the application layer of both communicating parties. For example, the two communicating parties should only enter the input-free pairing state when the user presses a specific key, or only when the current node confirms that the distance between the peer node and the current node is within a certain range.
[0183] For example, refer to Figure 5 This is a flowchart illustrating another user authentication process provided in an embodiment of this application. The flowchart shows a user authentication process where the first pairing method is a passcode input pairing method. Figure 5 As shown, the process includes the following steps:
[0184] S510, the first node displays numbers.
[0185] Optionally, when the value of the key prompt message field in the first node is 1, step S510 further includes: the first node issuing a key notification message (or user key input prompt message). When the value of the key prompt message field in the second node is 1, step S510 further includes: the second node issuing a key notification message.
[0186] S520, the first node obtains the number displayed by the user.
[0187] S530, the second node obtains the number input by the user.
[0188] S540, the first node generates a random number Ra and a confused digital code.
[0189] S550, the second node generates a random number Rb and a scrambled digital code.
[0190] S560. The first node calculates the confirmation code based on the first node's public key, the second node's public key, the random number Ra, and the obfuscated digital code.
[0191] S570, the second node calculates the confirmation code based on the first node's public key, the second node's public key, the random number Rb, and the obfuscated digital code.
[0192] S580, the first node sends a first node confirmation code message to the second node.
[0193] The first node confirmation message includes the first node's confirmation code and a random number Ra.
[0194] S590, The second node verifies the consistency between the confirmation code of the first node and the confirmation code of the second node.
[0195] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, proceed to S5100.
[0196] S5100: The second node sends a second node confirmation code message to the first node.
[0197] The second node confirmation message includes the second node's confirmation code and a random number Rb.
[0198] S5110, The first node verifies the consistency between the first node's confirmation code and the second node's confirmation code.
[0199] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, the subsequent process continues.
[0200] In the passcode input pairing method, the party with display capabilities can display a number, such as a 6-digit number. The user at the other node, upon seeing this number, can input it via keyboard or other input methods. Both communicating parties, having obtained this number locally, can obfuscate it using a pre-defined obfuscation algorithm, combine it with a locally generated random number to generate a local confirmation code, and send the local confirmation code and the generated random number to the other node via a confirmation code message. Upon receiving the confirmation code message, the other node can verify the consistency of the confirmation codes from both parties. If they match, the user authentication process for the passcode input pairing method is complete.
[0201] In the passcode input pairing method, the process of generating the confused digital code by both communicating parties and the process of calculating the confirmation code by both communicating parties can be referred to the description in related technologies, and will not be repeated here.
[0202] For example, refer to Figure 6 This is a flowchart illustrating another user authentication process provided in an embodiment of this application. The flowchart shows a user authentication process where the first pairing method is password verification. Figure 6 As shown, the process includes the following steps:
[0203] S610, The first node obtains the password entered by the user.
[0204] S620, the second node obtains the password entered by the user.
[0205] S630, the first node generates a random number Ra and a confused password code.
[0206] S640, the second node generates a random number Rb and a confused password code.
[0207] S650, The first node calculates the confirmation code based on the first node's public key, the second node's public key, the random number Ra, and the obfuscated password code.
[0208] S660, the second node calculates the confirmation code based on the first node's public key, the second node's public key, the random number Rb, and the obfuscated password code.
[0209] S670, The first node sends a first node confirmation code message to the second node.
[0210] The first node confirmation message includes the first node's confirmation code and a random number Ra.
[0211] S680, the second node verifies the consistency between the confirmation code of the first node and the confirmation code of the second node.
[0212] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, proceed to S690.
[0213] S690, the second node sends a second node confirmation code message to the first node.
[0214] The second node confirmation message includes the second node's confirmation code and a random number Rb.
[0215] S6100, the first node verifies the consistency between the first node's confirmation code and the second node's confirmation code.
[0216] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, the subsequent process continues.
[0217] In the password verification pairing method, the process of generating the obfuscated password code by both communicating parties and the process of calculating the confirmation code by both communicating parties can be referred to the description in the relevant technology, and will not be repeated here.
[0218] For example, refer to Figure 7 This is a flowchart illustrating another user authentication process provided in an embodiment of this application. The flowchart shows a user authentication process where the first pairing method is an out-of-band pairing method. Figure 7 As shown, the process includes the following steps:
[0219] S710, The first node generates a random number Ra and calculates the confirmation code of the first node.
[0220] S720, the second node generates a random number Rb and calculates the confirmation code of the second node.
[0221] S730, the first node sends a first node confirmation code message to the second node.
[0222] The first node confirmation message includes the first node's confirmation code and a random number Ra.
[0223] S740, the second node sends a second node confirmation code message to the first node.
[0224] The second node confirmation message includes the second node's confirmation code and a random number Rb.
[0225] The communication between the first and second nodes is conducted via out-of-band transmission, such as through NFC, Bluetooth Low Energy (BLE), or Bluetooth (BT).
[0226] S750, the first node verifies the consistency between the first node's confirmation code and the second node's confirmation code.
[0227] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, the subsequent process continues.
[0228] S760, the second node verifies the consistency between the confirmation code of the first node and the confirmation code of the second node.
[0229] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, the subsequent process continues.
[0230] In out-of-band pairing, the process of generating random numbers and calculating acknowledgment codes by both communicating parties can be referred to the description in related technologies, and will not be repeated here.
[0231] For example, refer to Figure 8 This is a flowchart illustrating another user authentication process provided in an embodiment of this application. The flowchart shows a user authentication process where the first pairing method is PSK pairing. Figure 8 As shown, the process includes the following steps:
[0232] S810, the first node selects a random number Ra.
[0233] S820, the second node selects a random number Rb.
[0234] S830, the first node sends a Ra message to the second node.
[0235] The Ra message includes a random number Ra.
[0236] S840, the second node sends an Rb message to the first node.
[0237] The Rb message includes a random number Rb.
[0238] S850: The first node calculates the confirmation code based on the first node's public key, the second node's public key, the random number Rb, and PSK.
[0239] S860: The second node calculates the confirmation code based on the first node's public key, the second node's public key, the random number Ra, and PSK.
[0240] S870, the first node sends a first node confirmation code message to the second node.
[0241] The first node confirmation code message includes the confirmation code of the first node.
[0242] S880, the second node sends a second node confirmation code message to the first node.
[0243] The second node confirmation code message includes the confirmation code of the second node.
[0244] S890, The first node verifies the consistency between the confirmation code of the first node and the confirmation code of the second node.
[0245] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, the subsequent process continues.
[0246] S8100, the second node verifies the consistency between the confirmation code of the first node and the confirmation code of the second node.
[0247] If the confirmation code of the first node does not match the confirmation code of the second node, the pairing ends; if the confirmation code of the first node matches the confirmation code of the second node, the subsequent process continues.
[0248] In the PSK pairing method, the process of generating random numbers and calculating acknowledgment codes by both communicating parties can be referred to the description in related technologies, and will not be repeated here.
[0249] The secure pairing process may include a user authentication process and a key verification process (for example, the key verification process could be a DH key verification process). The first node and the second node, after undergoing the aforementioned user authentication process (i.e., the process by which the communicating parties authenticate each other's identities based on the first pairing method, for example...), Figures 3 to 8 After any user authentication process (as described in the previous section), the key verification process can proceed. For example, refer to... Figure 9 This is a flowchart illustrating another communication method provided in an embodiment of this application. This method can be applied to business scenarios where a first node and a second node communicate with each other in a communication system. Figure 9 The S910-S950 correspond to the pairing negotiation process. Figure 9 S960-S980 correspond to the secure pairing process (S960 corresponds to the user authentication process, and S970-S980 correspond to the key verification process).
[0250] like Figure 9 As shown, the method includes the following steps:
[0251] S910, The first node receives a pairing initiation from the second node.
[0252] S910 is an optional step that is executed when the second node requests to initiate pairing.
[0253] S920, the first node sends a pairing request to the second node.
[0254] S930, the first node receives the pairing response from the second node.
[0255] The pairing response includes indications of the second node's input / output capabilities.
[0256] S940, The first node determines the first pairing method from among the multiple pairing methods supported by both the first node and the second node.
[0257] S950, the first node sends a pairing confirmation to the second node.
[0258] Pairing confirmation includes the first pairing method.
[0259] S960, the first node and the second node authenticate the identities of the first node and the second node based on the first pairing method.
[0260] S970, the first node sends the first verification message to the second node.
[0261] The first verification message includes a first verification code, which is used for authentication. For example, the first verification code instructs the second node to verify the consistency between the first node's DH key verification code and the second node's DH key verification code.
[0262] Optionally, the first verification code is obtained based on the first input message, which is related to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of a cryptographic algorithm (which may be a cryptographic algorithm negotiated by the two communicating parties in the pairing negotiation process), an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0263] The first random number can be Ra, which is generated by the first node in the user authentication process between the two communicating parties.
[0264] The salt value (represented by S) is related to the first pairing method. For example, for the passcode input pairing method, the salt value S can be a number displayed or entered by both communicating parties (this number can be converted to hexadecimal and padded with zeros to reach 16 bytes). For the password verification pairing method, the salt value S can be the value of the user-entered password converted to Extended ASCII (a standard code for information exchange). For other pairing methods besides passcode input and password verification, the salt value S can be 0 (16 bytes in length).
[0265] For example, the input / output capability indication information of the first node, the input / output capability indication information of the second node, the indication information of multiple pairing methods, the priority information of multiple pairing methods, the indication information of cryptographic algorithms, the PSK indication information of the first node, the PSK indication information of the second node, the node identifier of the first node, and the node identifier of the second node can all be exchanged during the pairing negotiation process between the two communicating parties.
[0266] Optionally, the first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0267] For example, the first input message = random number Ra || salt value S || indication information of the input / output capabilities of the first node || indication information of the input / output capabilities of the second node || indication information of multiple pairing methods || priority information of multiple pairing methods || indication information of the cryptographic algorithm || indication information of the PSK of the first node || indication information of the PSK of the second node || node identifier of the first node || node identifier of the second node. Here, the symbol "||" indicates concatenation of the strings on both sides of ||.
[0268] In one possible implementation, the first verification code is obtained based on a first verification key and a first input message. For example, the first verification key could be the DH key verification code key of the first node, and the first verification code could be the DH key verification code of the first node. (See reference...) Figure 10 This is a simplified flowchart illustrating a method for determining the DH key verification code of a first node, provided in an embodiment of this application. Figure 10As shown, the DH key verification code of the first node, the random number Ra, the salt value S, the input / output capability indication information of the first node, the input / output capability indication information of the second node, the indication information of multiple pairing methods, the priority information of multiple pairing methods, the indication information of the cryptographic algorithm, the indication information of the PSK of the first node, the indication information of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node are input into a hash-based message authentication code (HMAC-SM3) algorithm based on SM3 (a hash algorithm), or an advanced encryption standard-based cipher-based message authentication code (AES-CMAC) algorithm, and the DH key verification code of the first node can be obtained. For example, if K represents the DH key verification code of the first node, M represents the first input message, and len represents the length of M, then the DH key verification code of the first node = HMAC-SM3 / AES-CMAC(K, M, len). The specific process of calculating M, K, and len using the HMAC-SM3 or AES-CMAC algorithm can be found in the descriptions in the relevant technologies, and will not be repeated here.
[0269] Additionally, the DH key verification code may be a 256-bit value. This application can take either the lower 128 bits or the higher 128 bits of the 256-bit DH key verification code. Figure 10 In the code, HMAC-SM3 / AES-CMAC-128 is used as the final DHkey verification code.
[0270] It should be understood that in practical applications, other algorithms can also be used to process the DH key verification code of the first node and the first input message to obtain the DH key verification code of the first node, and this application does not limit this.
[0271] In one possible implementation, the DH key verification code key of the first node can be obtained based on the DH key of the first node, a random number Ra, a random number Rb (the random number Rb is a random number generated by the second node in the user authentication process between the two communicating parties), the node identifier of the first node, and the node identifier of the second node. (Refer to...) Figure 11 This is a simplified flowchart illustrating a method for determining the DH key verification code key of the first node, provided in an embodiment of this application. Figure 11As shown, by inputting the DH key of the first node, random numbers Ra and Rb, the node identifier of the first node, and the node identifier of the second node into the HMAC-SM3 algorithm or the AES-CMAC algorithm, and taking the value of the lower 128 bits or the higher 128 bits, the DH key verification code key of the first node can be obtained. For example, the DH key verification code key of the first node = HMAC-SM3 / AES-CMAC(DH key|128bit, M2, len2). Here, DH key|128bit represents taking the value of the lower 128 bits or the higher 128 bits of the DH key of the first node, M2 = keyID2||random number Ra||random number Rb||node identifier of the first node||node identifier of the second node. keyID2 represents the value of the DH key of the first node converted into extended ASCII code. len2 represents the length of M2. The specific process of calculating DH key|128bit, M2, and len2 using the HMAC-SM3 or AES-CMAC algorithm can be found in the descriptions in related technologies, and will not be repeated here.
[0272] It should be understood that in practical applications, other algorithms can also be used to determine the DH key verification code key of the first node, and this application does not limit this.
[0273] The above S970 can also be replaced by: the second node receiving the first verification message from the first node.
[0274] S980, the first node receives the second verification message from the second node.
[0275] The second verification message includes a second verification code, which is used for authentication. For example, the second verification code instructs the first node to verify the consistency between the first node's DH key verification code and the second node's DH key verification code.
[0276] Optionally, the second verification code is obtained based on the second input message, which relates to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0277] Optionally, the second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0278] For example, the second input message = random number Rb || salt value S || indication information of the input / output capabilities of the first node || indication information of the input / output capabilities of the second node || indication information of multiple pairing methods || priority information of multiple pairing methods || indication information of cryptographic algorithm || indication information of the PSK of the first node || indication information of the PSK of the second node || node identifier of the first node || node identifier of the second node.
[0279] In one possible implementation, the second verification code is obtained based on the second verification key and the second input message. For example, the second verification key could be the DH key verification code key of the second node, and the second verification code could be the DH key verification code of the second node. The process of determining the DH key verification code of the second node is similar to the process of determining the DH key verification code of the first node, and will not be described in detail here.
[0280] In one possible implementation, the DH key verification code key for the second node can be obtained based on the DH key of the second node, random number Ra, random number Rb, the node identifier of the first node, and the node identifier of the second node. The process of determining the DH key verification code key for the second node is similar to that of determining the DH key verification code key for the first node, and will not be elaborated here.
[0281] It should be understood that the above S980 can also be replaced by: the second node sending a second verification message to the first node.
[0282] Figure 9 The implementation process of some steps in the provided communication method can be referred to the relevant descriptions above, and will not be repeated here.
[0283] After the key verification process described above, the first and second nodes can execute the security control process. Executing the security control process provides a secure and reliable physical transmission channel for the subsequent key distribution process. In one possible implementation, if the first and second nodes have already completed the binding mode pairing, they can skip the pairing negotiation process and the security pairing process and directly execute the security control process; if the first and second nodes have not completed the binding mode pairing, they first execute the pairing negotiation process and the security pairing process, and then execute the security control process.
[0284] The security control process includes a key refresh process (i.e., dynamically refreshing the session key between the communicating parties based on the link key obtained from the pairing and authentication process). The key refresh process includes starting the security process and pausing the security process. For details on the implementation of starting and pausing the security process, please refer to the descriptions in related technologies; these will not be elaborated upon here.
[0285] Optionally, during the pairing process, if the second node receives a pairing request from another node, the second node will reject the second pairing request.
[0286] Optionally, if a first node / second node fails during the pairing process and reports that the pairing process has stopped and no further communication is expected, the first node / second node may send a pairing failure message to the other node. The pairing failure message may include indications of the reason for the pairing failure from both communicating parties. After sending the pairing failure message, if the first node / second node restarts pairing, the pairing negotiation process must begin again.
[0287] For example, refer to Figure 12 This is a flowchart illustrating a key verification process provided in an embodiment of this application. Figure 12 As shown, the process includes the following steps:
[0288] S1210, The first node calculates the link cipher and the first node's DH key verification key.
[0289] S1220, the second node calculates the link cipher and the second node's DH key verification key.
[0290] The process of calculating the link cipher by the first and second nodes can be found in the descriptions in relevant technologies, and will not be repeated here.
[0291] S1230, The first node calculates the DH key verification code of the first node.
[0292] S1240, The second node calculates the DH key verification code of the second node.
[0293] S1250, The first node sends the DH key verification code message of the first node to the second node (corresponding to...). Figure 9 (The first verification message in the process).
[0294] The DH key verification code message of the first node includes the DH key verification code of the first node.
[0295] S1260, The second node verifies the consistency between the DH key verification code of the first node and the DH key verification code of the second node.
[0296] If the DH key verification codes of the first node and the second node are inconsistent, the pairing ends; if they are consistent, S1270 is executed.
[0297] S1270, The second node sends the second node's DH key verification code message to the first node (corresponding to...). Figure 9 (Second verification message in the middle).
[0298] The DH key verification code message of the second node includes the DH key verification code of the second node.
[0299] S1280. The first node verifies the consistency between the DH key verification code of the first node and the DH key verification code of the second node.
[0300] If the DH key verification codes of the first node and the second node are inconsistent, the pairing ends; if they are consistent, the subsequent process continues.
[0301] If both communicating parties verify that their local DH key verification code matches the DH key verification code of the peer node, it indicates that the link key generated by both parties is trustworthy and can be used in the subsequent key refresh process to dynamically generate the session key for both parties.
[0302] In the communication method provided in this application embodiment, the two communicating parties can verify the consistency of the verification code (e.g., DH key verification code) generated by both parties in the key verification process. During the verification process, the input information for generating the verification code may include a first random number, a second random number, a salt value, indication information of the input and output capabilities of the first node, indication information of the input and output capabilities of the second node, indication information of multiple pairing methods, priority information of multiple pairing methods, indication information of cryptographic algorithms, indication information of the PSK of the first node, indication information of the PSK of the second node, node identifier of the first node, and node identifier of the second node, etc. These input information can be protected and verified during the verification process to further ensure the communication security of the two communicating parties.
[0303] Figure 12 The implementation process of some steps in the provided communication method can be referred to the relevant descriptions above, and will not be repeated here.
[0304] It should be noted that the order of the methods provided in the embodiments of this application can be appropriately adjusted, and the process can also be added or removed as appropriate. Any variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and the embodiments of this application do not limit this.
[0305] The communication apparatus that performs the communication method provided in this application will now be described. Details of the communication apparatus performing the communication method can be found in the descriptions of the foregoing method embodiments, and will not be repeated here.
[0306] Reference Figure 13 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application, such as... Figure 13 As shown, the communication device 1300 includes a processor 1310 and a communication interface 1320, which can be interconnected via a bus 1330. The communication device 1300 can be a first node or a second node in a communication system, for example... Figures 2 to 9 ,or Figure 12 Any first or second node in the list.
[0307] Optionally, such as Figure 13 As shown, the communication device 1300 may further include a memory 1340. The memory 1340 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), cache, erasable programmable read-only memory (EPROM), synchronous dynamic random access memory (SDRAM), hard disk drive (HDD), solid-state drive (SSD), or compact disc read-only memory (CD-ROM). The memory 1340 is used to store program instructions or information accessed by application processes. The processor 1310 can implement the methods provided in this application by executing the program instructions in the memory 1340. The memory 1340 may be integrated with the processor 1310 or disposed separately.
[0308] Processor 1310 can be one or more of the following: central processing unit (CPU), application-specific integrated circuit (ASIC), digital signal processor (DSP), microprocessor unit (MPU), microcontroller unit (MCU), graphics processing unit (GPU), field-programmable gate array (FPGA), and neural-network processing unit (NPU), or a combination thereof. If processor 1310 is a CPU, it can be a single-core CPU or a multi-core CPU. Processor 1310 can be a communicator, a chip, or other integrated circuit capable of implementing the methods provided in this application, or it can be a portion of the circuitry within a processor, chip, or integrated circuit used for signal or data processing. Additionally, communication interface 1320 can be an input / output interface for inputting or outputting signals or data, or it can be an input / output circuit.
[0309] Taking the communication device as the first node as an example, the processor 1310 can be used to perform the following operations: send a pairing request; receive a pairing response from the second node; determine a first pairing method from a variety of pairing methods supported by both the first node and the second node; and send a pairing confirmation to the second node.
[0310] Taking the communication device as the second node as an example, the processor 1310 can be used to perform the following operations: receive a pairing request from the first node; send a pairing response to the first node; and receive a pairing confirmation from the first node.
[0311] It is understood that, in order to achieve the above functions (i.e., to execute the methods provided in this application), the communication device includes hardware and / or software modules corresponding to the execution of each function. See also... Figure 14 This is a schematic diagram of another communication device provided in an embodiment of this application. The communication device can be... Figures 2 to 9 ,or Figure 12 Any first node in the array. For example... Figure 14As shown, when each functional module is divided according to its corresponding function, the communication device 1400 may include a transmitting module 1410, a receiving module 1420, and a processing module 1430.
[0312] The sending module 1410 is used to send a pairing request; the receiving module 1420 is used to receive a pairing response from the second node, the pairing response including indication information of the input / output capabilities of the second node; the processing module 1430 is used to determine a first pairing method from multiple pairing methods supported by both the first node and the second node, the multiple pairing methods being obtained based on the input / output capabilities of the first node and the second node; the sending module 1410 is also used to send a pairing confirmation to the second node, the pairing confirmation including the first pairing method.
[0313] In one possible implementation, the sending module 1410 is further configured to send a first verification message to the second node, the first verification message including a first verification code, the first verification code being used for authentication.
[0314] In another possible implementation, the first verification code is obtained based on a first input message, which relates to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0315] In another possible implementation, the first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0316] In another possible implementation, the receiving module 1420 is also configured to receive a second verification message from the second node, the second verification message including a second verification code, the second verification code being used for authentication.
[0317] In another possible implementation, the second verification code is obtained based on a second input message, which relates to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0318] In another possible implementation, the second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0319] In another possible implementation, the processing module 1430 is specifically used to: determine a first pairing method from multiple pairing methods based on priority information of multiple pairing methods.
[0320] The communication device 1400 provided in this application embodiment can perform some steps of the aforementioned communication method. Figure 2 Taking the communication method shown as an example, the sending module 1410 can be used to perform... Figure 2 S210 and S240, and the receiving module 1420 can be used to perform Figure 2 The S220 and processing module 1430 in the middle can be used to execute Figure 2 S230 in the above. The specific implementation process of the communication device 1400 and its corresponding beneficial effects can be referred to the relevant description of the foregoing method embodiments, and will not be repeated here.
[0321] For example, the functions implemented by processing module 1430 can be achieved through... Figure 13 The processor 1310 in the middle executes Figure 13 The program instructions in memory 1340 are implemented.
[0322] Reference Figure 15 This is a schematic diagram of another communication device provided in an embodiment of this application. The communication device can be... Figures 2 to 9 ,or Figure 12 Any second node in the array. For example... Figure 15 As shown, when each functional module is divided according to its corresponding function, the communication device 1500 may include a receiving module 1510 and a transmitting module 1520.
[0323] The receiving module 1510 is used to receive a pairing request from the first node; the sending module 1520 is used to send a pairing response to the first node, the pairing response including indication information of the input / output capabilities of the second node; the receiving module 1510 is also used to receive a pairing confirmation from the first node, the pairing confirmation including a first pairing method, the first pairing method being determined from multiple pairing methods supported by both the first node and the second node, the multiple pairing methods being obtained based on the input / output capabilities of the first node and the second node.
[0324] In one possible implementation, the receiving module 1510 is further configured to receive a first verification message from the first node, the first verification message including a first verification code, the first verification code being used for authentication.
[0325] In another possible implementation, the first verification code is obtained based on a first input message, which relates to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0326] In another possible implementation, the first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0327] In another possible implementation, the sending module 1520 is also used to send a second verification message to the first node, the second verification message including a second verification code, the second verification code being used for authentication.
[0328] In another possible implementation, the second verification code is obtained based on a second input message, which relates to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node; wherein the salt value is related to the first pairing method.
[0329] In another possible implementation, the second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of multiple pairing methods, priority information of multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
[0330] In another possible implementation, the first pairing method is determined from multiple pairing methods based on priority information of multiple pairing methods.
[0331] The specific implementation process of the communication device 1500 and its corresponding beneficial effects can be found in the relevant descriptions of the foregoing method embodiments, and will not be repeated here.
[0332] It should be noted that, Figure 14 / Figure 15 The module division described herein is exemplary and represents only one logical functional division; in actual implementation, other division methods may be used. For example, two or more functions can be integrated into one module. The integrated module described above can be implemented either in hardware or as a software functional module.
[0333] This application also provides a computer-readable storage medium including computer instructions that, when executed on a computer, cause the computer to perform the communication method provided in this application.
[0334] This application also provides a computer program product that, when run on a computer, causes the computer to execute the communication method provided in this application.
[0335] This application also provides a chip or chip system. Exemplarily, the chip or chip system may be the aforementioned communication device. The chip or chip system includes: at least one processor, configured to execute a computer program or instructions to cause the communication method provided in this application to be performed.
[0336] This application also provides a communication system. The communication system includes a first node and a second node, which perform the communication method provided in this application through communication interaction.
[0337] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A communication method, characterized in that, Applied to the first node, the method includes: Send a pairing request; Receive a pairing response from the second node, the pairing response including indication information of the input / output capabilities of the second node; The first pairing method is determined from a variety of pairing methods supported by both the first node and the second node, wherein the variety of pairing methods are obtained based on the input and output capabilities of the first node and the second node; Send a pairing confirmation to the second node, the pairing confirmation including the first pairing method.
2. The method according to claim 1, characterized in that, The method further includes: A first verification message is sent to the second node. The first verification message includes a first verification code, which is used for authentication.
3. The method according to claim 2, characterized in that, The first verification code is obtained based on a first input message, which is related to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the pre-shared key (PSK) of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node. The salt value is related to the first pairing method.
4. The method according to claim 3, characterized in that, The first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
5. The method according to any one of claims 2-4, characterized in that, The method further includes: Receive a second verification message from the second node, the second verification message including a second verification code, the second verification code being used for authentication.
6. The method according to claim 5, characterized in that, The second verification code is obtained based on the second input message, which is related to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node. The salt value is related to the first pairing method.
7. The method according to claim 6, characterized in that, The second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
8. The method according to any one of claims 1-7, characterized in that, The step of determining the first pairing method from multiple pairing methods supported by both the first node and the second node includes: Based on the priority information of the multiple pairing methods, the first pairing method is determined from the multiple pairing methods.
9. A communication method, characterized in that, Applied to the second node, the method includes: Receive a pairing request from the first node; Send a pairing response to the first node, the pairing response including indication information of the input / output capabilities of the second node; Receive pairing confirmation from the first node, the pairing confirmation including a first pairing method, the first pairing method being determined from a variety of pairing methods supported by both the first node and the second node, the variety of pairing methods being obtained based on the input / output capabilities of the first node and the second node.
10. The method according to claim 9, characterized in that, The method further includes: Receive a first verification message from the first node, the first verification message including a first verification code, the first verification code being used for authentication.
11. The method according to claim 10, characterized in that, The first verification code is obtained based on a first input message, which is related to at least one of the following: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, a node identifier of the first node, and a node identifier of the second node. The salt value is related to the first pairing method.
12. The method according to claim 11, characterized in that, The first input message is obtained by concatenating the following information into strings: a first random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
13. The method according to any one of claims 10-12, characterized in that, The method further includes: A second verification message is sent to the first node. The second verification message includes a second verification code, which is used for authentication.
14. The method according to claim 13, characterized in that, The second verification code is obtained based on the second input message, which is related to at least one of the following: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node. The salt value is related to the first pairing method.
15. The method according to claim 14, characterized in that, The second input message is obtained by concatenating the following information into strings: a second random number, a salt value, an indication of the input / output capabilities of the first node, an indication of the input / output capabilities of the second node, an indication of the multiple pairing methods, priority information of the multiple pairing methods, an indication of the cryptographic algorithm, an indication of the PSK of the first node, an indication of the PSK of the second node, the node identifier of the first node, and the node identifier of the second node.
16. The method according to any one of claims 9-15, characterized in that, The first pairing method is determined from the multiple pairing methods based on the priority information of the multiple pairing methods.
17. A communication device, characterized in that, It includes at least one module or at least one unit, said at least one module or said at least one unit being used to perform the method as described in any one of claims 1-8, or to perform the method as described in any one of claims 9-16.
18. A communication device, characterized in that, include: Memory and at least one processor; The memory is coupled to the processor; wherein the memory stores computer program code, the computer program code including computer instructions, and when the computer instructions are executed by the processor, the communication device performs the method as described in any one of claims 1-8, or performs the method as described in any one of claims 9-16.
19. A computer-readable storage medium comprising computer instructions, characterized in that, When the computer instructions are executed on the computer, the computer causes the computer to perform the method as described in any one of claims 1-8, or to perform the method as described in any one of claims 9-16.
20. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-8, or the method as described in any one of claims 9-16.
21. A chip or chip system, characterized in that, include: At least one processor, the at least one processor being configured to execute a computer program or instructions to cause the method of any one of claims 1-8 to be executed, or to cause the method of any one of claims 9-16 to be executed.
22. A communication system, characterized in that, include: First node and second node; Wherein, the first node is used to perform the method as described in any one of claims 1-8, and the second node is used to perform the method as described in any one of claims 9-16.