Communication method, device, equipment, storage medium, chip, product and program
Patent Information
- Application Number
- CN202280095998.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2024-12-27
AI Technical Summary
In the existing technology, the configuration information of the device is fixed before leaving the factory and cannot be adjusted by the user, which makes the device inconvenient to use and the transmission of the configuration information is unsafe.
By determining the digital key, a channel between devices is established, configuration information is sent securely, and device configuration adjustment and secure transmission are realized.
It improves the convenience for users to use the device and the security of configuration information transmission, allows users to adjust device configuration information according to needs, and ensures the security of information transmission through encrypted channels.
Smart Images

Figure CN119213728A_ABST
Abstract
Description
Communication method, device, equipment, storage medium, chip, product and program Technical Field
[0001] The present application relates to the field of mobile communication technology, and specifically to a communication method, apparatus, device, storage medium, chip, product and program. Background Art
[0002] In related technologies, the configuration information of a device is configured before the device leaves the factory. Users cannot reconfigure or modify the configuration information of the device, which results in users being unable to adjust the configuration information of the device according to their needs, causing inconvenience to users in using the device.
[0003] Summary of the Invention
[0004] Embodiments of the present application provide a communication method, apparatus, device, storage medium, chip, product, and program.
[0005] In a first aspect, an embodiment of the present application provides a communication method, the method comprising:
[0006] The first device determines the first key;
[0007] The first device establishes a first channel between the first device and the second device based on the first key;
[0008] The first device sends configuration information to the second device based on the first channel.
[0009] In a second aspect, an embodiment of the present application provides a communication method, the method comprising:
[0010] The second device determines the first key;
[0011] The second device establishes a first channel between the first device and the second device based on the first key;
[0012] The second device receives the configuration information sent by the first device based on the first channel.
[0013] In a third aspect, an embodiment of the present application provides a communication device, the communication device comprising:
[0014] a determining unit, configured to determine a first key;
[0015] an establishing unit, configured to establish a first channel between the first device and the second device based on the first key;
[0016] A communication unit is configured to send configuration information to the second device based on the first channel.
[0017] In a fourth aspect, an embodiment of the present application provides a communication device, comprising:
[0018] a determining unit, configured to determine a first key;
[0019] an establishing unit, configured to establish a first channel between the first device and the second device based on the first key;
[0020] A communication unit is configured to receive, based on the first channel, configuration information sent by the first device.
[0021] In a fifth aspect, an embodiment of the present application provides a first device, comprising: a processor and a memory,
[0022] The memory stores a computer program executable on the processor.
[0023] When the processor executes the program, the method of the first aspect is implemented.
[0024] In a sixth aspect, an embodiment of the present application provides a second device, including: a processor and a memory,
[0025] The memory stores a computer program executable on the processor.
[0026] When the processor executes the program, the method of the second aspect is implemented.
[0027] In a seventh aspect, an embodiment of the present application provides a computer storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect or the second aspect.
[0028] In an eighth aspect, an embodiment of the present application provides a chip, comprising: a processor, configured to call and run a computer program from a memory to execute the method described in the first aspect or the second aspect.
[0029] In the ninth aspect, an embodiment of the present application provides a computer program product, which includes a computer storage medium, the computer storage medium storing a computer program, and the computer program including instructions that can be executed by at least one processor, and when the instructions are executed by the at least one processor, the method described in the first aspect or the second aspect is implemented.
[0030] In a tenth aspect, an embodiment of the present application provides a computer program, which enables a computer to execute the method described in the first aspect or the second aspect.
[0031] In an embodiment of the present application, a first device determines a first key; based on the first key, the first device establishes a first channel between the first device and a second device; and based on the first channel, the first device sends configuration information to the second device. Thus, by sending configuration information from the first device to the second device, the first device can configure the second device, allowing the configuration information of the second device to be adjusted as needed, thereby improving the convenience of the user using the second terminal. Furthermore, the first device sends configuration information to the second device over the first channel established based on the first key, thereby improving the security of the transmission of configuration information. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0033] FIG1 is a schematic diagram of an application scenario of an embodiment of the present application;
[0034] FIG2 is a schematic diagram of a digital key stored in a security chip provided in an embodiment of the present application;
[0035] FIG3 is a schematic diagram of a vehicle key pair and a digital key certificate stored in a vehicle electronic control unit provided by an embodiment of the present application;
[0036] FIG4 is a flow chart of a communication method provided in an embodiment of the present application;
[0037] FIG5 is a flow chart of another communication method provided in an embodiment of the present application;
[0038] FIG6 is a flow chart of another communication method provided in an embodiment of the present application;
[0039] FIG7 is a flow chart of another communication method provided in an embodiment of the present application;
[0040] FIG8 is a flow chart of a communication method provided in another embodiment of the present application;
[0041] FIG9 is a flow chart of a communication method provided in yet another embodiment of the present application;
[0042] FIG10 is a flow chart of a communication method provided in yet another embodiment of the present application;
[0043] FIG11 is a flow chart of another communication method provided in another embodiment of the present application;
[0044] FIG12 is a flow chart of another communication method provided in another embodiment of the present application;
[0045] FIG13 is a flow chart of another communication method provided in another embodiment of the present application;
[0046] FIG14 is a flow chart of another communication method provided in yet another embodiment of the present application;
[0047] FIG15 is a flow chart of another communication method provided in another embodiment of the present application;
[0048] FIG16 is a flow chart of another communication method provided in yet another embodiment of the present application;
[0049] FIG17 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0050] FIG18 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application;
[0051] FIG19 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0052] FIG20 is a schematic structural diagram of a chip according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0054] The technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict. In the description of the present application, "multiple" means two or more, unless otherwise clearly defined.
[0055] FIG1 is a schematic diagram of an application scenario of an embodiment of the present application. As shown in FIG1 , a communication system 100 may include a first device 101 and a second device 102. The first device 101 and the second device 102 may communicate with each other via a wired or wireless method. For example, the first device 101 and the second device 102 may communicate via a connection line (e.g., a USB connection line). For another example, the first device 101 may communicate via Bluetooth, Wireless Fidelity (WiFi), 4G network communication, 5G network communication, or future 6G network communication.
[0056] The first device 101 or the second device 102 can be called user equipment (UE), mobile station (MS), mobile terminal (MT), user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The first device 101 or the second device 102 may include one of the following or a combination of at least two: a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a server, a mobile phone, a tablet computer (Pad), a computer with wireless transceiver function, a handheld computer, a desktop computer, a personal digital assistant, a portable media player, a smart speaker, a navigation device, a smart watch, a smart glasses, a smart necklace and other wearable devices, a pedometer, a digital TV, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a car, a processing module of a car, a communication module of a car, a control module of a car, an electronic control unit (ECU) of a car Control Unit (ECU), vehicle-mounted equipment, vehicle-mounted modules, wireless modems, handheld devices, customer premises equipment (CPE), and smart home appliances.
[0057] In some embodiments, as shown in FIG1 , the first device 101 and the second device 102 may be different devices, for example, the first device 101 is a mobile phone and the second device 102 is a car. Unlike FIG1 , in other embodiments, the first device and the second device may be the same device, for example, the first device and the second device may both be mobile phones, or the first device and the second device may both be cars. In some embodiments, one first device 101 may be able to communicate with multiple second devices 102. For example, if a user has multiple cars, the user's first device 101 may be associated with multiple second devices 102. In other embodiments, one second device 102 may be able to communicate with multiple first devices 101. For example, the car owner's first device 101 may be associated with the second device 102, and the car owner's family's first device 101 may also be associated with the second device 102.
[0058] Figure 1 exemplarily shows a communication scenario between a first device 101 and a second device 102. Optionally, the wireless communication system 100 may also include a communication scenario between a first device 101 and multiple second devices 102, a communication scenario between multiple first devices 101 and one second device 102, or a communication scenario between multiple first devices 101 and multiple second devices 102.
[0059] It should be noted that Figure 1 is merely an example of a system applicable to this application. Of course, the methods described in the embodiments of this application can also be applied to other systems. Furthermore, the terms "system" and "network" are often used interchangeably herein. The term "and / or" herein simply describes an association relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " generally indicates that the associated objects are in an "or" relationship. It should also be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, "A indicates B" can mean that A directly indicates B, for example, B can obtain information through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can obtain information through C; or it can mean that A and B have an association relationship. It should also be understood that the "correspondence" mentioned in the embodiments of this application can mean that there is a direct or indirect correspondence between two objects, or that there is an association relationship between the two objects, or a relationship between an indicator and the indicated, a configuration and the configured, and so on. It should also be understood that the “predefined”, “protocol agreement”, “predetermined” or “predefined rules” mentioned in the embodiments of the present application can be implemented by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a first device and / or a second device), and the present application does not limit its specific implementation method. For example, predefined may refer to a definition in a protocol. It should also be understood that in the embodiments of the present application, the “protocol” may refer to a standard protocol in the field of communications, for example, it may include the Long Term Evolution (LTE) protocol, the New Radio (NR) protocol and related protocols used in future communication systems, and the present application does not limit this.
[0060] It should be noted that the keys and secret keys in the embodiments of the present application can be understood as the same. For example, the first key can be understood as the first secret key, the shared key can be understood as the shared secret key, the second key can be understood as the second secret key, and so on.
[0061] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following relevant technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.
[0062] According to the standards of the Car Connectivity Consortium (CCC), the digital key can be stored in the secure chip (Secure Element) of the first device. Optionally, the secure chip can also be called a security module or a security element. The digital key includes: a digital key public and private key pair, the public key Vehicle.PK in the vehicle certificate, and authorization authentication information Authorized.PK. Optionally, the digital key public and private key pair includes the digital key public key DigitalKey.PK and the digital key private key DigitalKey.SK. Optionally, the authorization authentication information can be generated on the vehicle side. Optionally, the public key in the vehicle certificate can be called the vehicle public key.
[0063] Figure 2 is a schematic diagram of a digital key stored in a security chip according to an embodiment of the present application. As shown in Figure 2, a digital key may be stored in the security chip. Optionally, one digital key may correspond to one vehicle. It should be noted that Figure 2 shows a single digital key stored in the security chip, but in other embodiments, the security chip may store multiple digital keys.
[0064] In Figure 2, the digital key includes: a digital key private key DigitalKey.SK, a digital key public key DigitalKey.PK, authorization authentication information Authorized.PK, and a vehicle public key Vehicle.PK.
[0065] Figure 3 is a schematic diagram of a vehicle key pair and digital key certificate stored in a vehicle electronic control unit provided by an embodiment of the present application. As shown in Figure 3, the vehicle electronic control unit (ECU) includes a vehicle key pair (Vehicle Key Pair) and a digital key certificate (Digital Key Certificate). The vehicle key pair may include a vehicle private key (Vehicle.SK) and a vehicle public key (Vehicle.PK), and the digital key certificate may include a digital key public key (DigitalKey.PK) and a signature (Signature) of a certification authority (CA) for an instance.
[0066] However, the related art does not provide a secure pairing solution for the first device to configure the vehicle before controlling the vehicle.
[0067] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.
[0068] FIG4 is a flow chart of a communication method provided in an embodiment of the present application. As shown in FIG4 , the method includes:
[0069] S401: The first device determines a first key.
[0070] S402: The first device establishes a first channel between the first device and a second device based on the first key.
[0071] S403: The first device sends configuration information to the second device based on the first channel.
[0072] In some embodiments, the first key can be referred to as one of the following: a shared key, a shared secret key, a master key, or a master secret key. Alternatively, the first device can determine the first key based on preconfiguration information. Alternatively, the first device can determine the first key based on configuration information sent by the second device. Alternatively, the first key can be pre-stored on the first device. Alternatively, the first key can be generated by the first device before each first channel is established.
[0073] Optionally, the first keys corresponding to the first channels established at different times may be the same or different.
[0074] Optionally, the first channel may be a channel encrypted by a first key. Optionally, the first channel may be referred to as an encrypted channel or a secure channel. Optionally, the first channel may include a data channel and / or a control channel.
[0075] It should be noted that the channel in any embodiment of the present application can be called a passage, a path or a channel, etc.
[0076] Alternatively, the first key may include a sequence of one or more bits, or may include a sequence of one or more characters.
[0077] In an embodiment of the present application, a first device determines a first key; based on the first key, the first device establishes a first channel between the first device and a second device; and based on the first channel, the first device sends configuration information to the second device. Thus, by sending configuration information from the first device to the second device, the first device can configure the second device, allowing the configuration information of the second device to be adjusted as needed, thereby improving the convenience of the user using the second terminal. Furthermore, the first device sends configuration information to the second device over the first channel established based on the first key, thereby improving the security of the transmission of configuration information.
[0078] FIG5 is a flow chart of another communication method provided in an embodiment of the present application. As shown in FIG5 , the method includes:
[0079] S501: The second device determines the first key.
[0080] S502: The second device establishes a first channel between the first device and the second device based on the first key.
[0081] S503: The second device receives configuration information sent by the first device based on the first channel.
[0082] Optionally, the first key determined by the second device and the key determined by the first device may be the same.
[0083] Alternatively, the second device may determine the first key based on pre-configured information. Alternatively, the second device may determine the first key based on configuration information sent by the first device. Alternatively, the first key may be pre-stored on the second device. Alternatively, the first key may be generated by the second device before each establishment of the first channel.
[0084] FIG6 is a flow chart of another communication method provided in an embodiment of the present application. As shown in FIG6 , the method includes:
[0085] S601: The first device determines a first key.
[0086] S602: The second device determines the first key.
[0087] S603: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0088] Optionally, the first channel may be used only for transmitting configuration information. Optionally, in other embodiments, the first channel may be used not only for transmitting configuration information but also for transmitting other information.
[0089] Optionally, when the first channel is established, the first device and the second device may disconnect the Bluetooth connection, or the first device and the second device may still maintain the Bluetooth connection.
[0090] S604: The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0091] Optionally, the configuration information may include: an interoperability certificate used for interoperation between the first device and the second device.
[0092] Optionally, the configuration information may include: Access Control Lists (ACLs) of the second device. Optionally, the ACL of the second device may include ACLs corresponding to one or more specific IP addresses. Optionally, the one or more specific IP addresses may include the IP address of the first device. In some embodiments, upon receiving the ACL, the second device may merge the received ACL with the ACL pre-stored by the second terminal to obtain a new ACL and store the new ACL. In other embodiments, the second device may delete the previously stored ACL and store the ACL sent by the first device. Optionally, the configuration information may also include operation information for the ACL. The operation information may include at least one of the following: adding information, deleting information, and modifying information.
[0093] Optionally, the second device may have multiple functional modules, and the configuration information may include configuration information of at least one functional module.
[0094] For example, the configuration information may include configuration information for the vehicle's display module. For example, the configuration information may include at least one of the following: the font used for text displayed on the display module, the size of text displayed on the display module, the size of images displayed on the display module, the display style of the display module, the display mode of the display module, and the display theme of the display module. For example, the display mode may include normal mode or minimalist mode. Thus, when the user turns on the display module, the display module can display according to the configuration information sent by the first device.
[0095] For example, the configuration information may include configuration information for the vehicle's playback module. For example, the configuration information may include at least one of the following: playback volume, playback voice package, playback speed, etc. Thus, when the user uses the playback module to play, the playback module can play according to the configuration information sent by the first device.
[0096] For example, the configuration information may include configuration information for the vehicle's air conditioner. For example, the configuration information may include at least one of the following: the air conditioner's temperature, the air conditioner's fan speed, the air conditioner's operating mode, etc. Thus, when the user turns on the air conditioner, the air conditioner will operate according to the configuration information sent by the first device.
[0097] Optionally, the user can operate the application (Application, App) of the first device to cause the first device to generate configuration information. Optionally, the user can operate the setting interface of the first device to cause the first device to generate configuration information. Optionally, the user can operate the webpage of the first device to cause the first device to generate configuration information. Optionally, the first device can receive configuration information sent by the server associated with the second device, thereby obtaining the first configuration information. Optionally, in any embodiment of the present application, the server associated with the second device can be a car server.
[0098] FIG7 is a flow chart of another communication method provided in an embodiment of the present application. As shown in FIG7 , the method includes:
[0099] S701. The first device sends first information to the second device; the second device receives the first information sent by the first device; the first information is used to indicate: at least one authentication type information supported by the first device.
[0100] Illustratively, the at least one authentication type information may indicate at least one of the following: a digital key certificate (digital_key_cert), a digital key, a password (passcode), etc. It should be understood that the at least one authentication type information may also include other information, which is not limited in the embodiment of the present application.
[0101] Optionally, the digital key in any embodiment of the present application can be understood as a digital key.
[0102] Optionally, the at least one authentication type information may be all or part of the authentication type information supported by the first device. Optionally, the user may select all authentication type information supported by the first device, and the first device may determine the selected authentication type information as the at least one authentication type information. Optionally, the at least one authentication type information may be authentication type information associated with the second device from among all authentication type information supported by the first device.
[0103] S702. The second device sends second information to the first device; the first device receives the second information sent by the second device; the second information is used to indicate first authentication type information, and the first authentication type information is included in the at least one authentication type information.
[0104] The first authentication type information may be information selected from at least one authentication type information.
[0105] Optionally, the first authentication type information may be one authentication type information or multiple authentication type information. Optionally, the first authentication type information is authentication type information supported by the second device.
[0106] Exemplarily, the first authentication type information may indicate a digital key certificate. In another exemplary embodiment, the first authentication type information may indicate a password, or indicate a digital key certificate and a password.
[0107] Optionally, the second device may display at least one authentication type information, and the user may select first authentication type information from the at least one authentication type information. Optionally, the second device may store the priority of each authentication type information supported by the second device. Based on the priority and the at least one authentication type information, the second device may select the authentication type information supported by the second device and having the highest priority from the at least one authentication type information, and determine the authentication type information as the first authentication type information. Optionally, the second device may randomly select one authentication type information supported by the second device from the at least one authentication type information, and determine the selected authentication type information as the first authentication type information.
[0108] S703: The first device determines the first key.
[0109] Optionally, the first device may determine the first key when the received first authentication type information indicates a digital key certificate or a digital key.
[0110] Optionally, when the first authentication type information received by the second device is multiple authentication type information, authentication type information indicating a digital key certificate or digital key can be selected from the multiple authentication type information, and then the authentication type information indicating a digital key certificate or digital key can be sent to the second device.
[0111] Optionally, the next time the first device needs to establish a channel with the second device, it can directly send authentication type information indicating the digital key certificate or digital key to the second device without sending at least one authentication type information indicating that the first device supports.
[0112] S704: The second device determines the first key.
[0113] Optionally, the second device may determine the first key when the first authentication type information sent indicates a digital key certificate or a digital key. Optionally, the second device may determine the first key when the authentication type information sent by the first device indicates a digital key certificate or a digital key.
[0114] S705: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0115] S706: The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0116] FIG8 is a flow chart of a communication method provided in another embodiment of the present application. As shown in FIG8 , the method includes:
[0117] S801. The first device sends a first confirmation value to the second device; and the second device receives the first confirmation value sent by the first device.
[0118] Optionally, the confirmation value in any embodiment of the present application (for example, including the first confirmation value, the second confirmation value, or the third confirmation value) may be referred to as Confirmation.
[0119] Optionally, the first confirmation value may be the first confirmation information, or the first confirmation value may be included in the first confirmation information. Optionally, the first confirmation value may be associated with the first key determined by the first device.
[0120] S802. When the verification of the first confirmation value is successful, the second device sends third information to the first device; the first device receives the third information sent by the second device; the third information is used to indicate that the verification of the first confirmation value is successful.
[0121] Alternatively, the second device successfully verifying the first confirmation value may include: the second device determining a second confirmation value, and determining that the verification of the first confirmation value is successful if the first confirmation value and the second confirmation value match or correspond. Optionally, the second confirmation value may be associated with the first key determined by the second device.
[0122] Optionally, the first confirmation value and the second confirmation value match or correspond, which may include: the first confirmation value and the second confirmation value are identical. Optionally, the first confirmation value and the second confirmation value may also have other matching or corresponding modes, such as, for example, partial values in the first confirmation value and partial values in the second confirmation value are identical, or at least partial values in the first confirmation value and at least partial values in the second confirmation value conform to a predetermined relationship, which is not limited in this embodiment of the present application.
[0123] S803: The first device determines the first key.
[0124] S804: The second device determines the first key.
[0125] Optionally, the embodiment of the present application does not limit the execution order of S801-S802 and S803-S804. For example, S801-S802 may be executed before S803-S804, or S801-S802 may be executed after S803-S804.
[0126] S805: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0127] S806. The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0128] FIG9 is a flow chart of a communication method provided in another embodiment of the present application. As shown in FIG9 , the method includes:
[0129] S901. The second device sends a second confirmation value to the first device; the first device receives the second confirmation value sent by the second device.
[0130] S902. When the second confirmation value is successfully verified, the first device sends fourth information to the second device; the second device receives the fourth information sent by the first device; the fourth information is used to indicate that the second confirmation value is successfully verified.
[0131] Optionally, the first device successfully verifies the first confirmation value, which may include: the first device determines the first confirmation value, and when the first confirmation value and the second confirmation value match or correspond, determines that the verification of the second confirmation value is successful.
[0132] S903: The first device determines the first key.
[0133] S904: The second device determines the first key.
[0134] Optionally, the embodiment of the present application does not limit the execution order of S901-S902 and S903-S904. For example, S901-S902 may be executed before S903-S904, or S901-S902 may be executed after S903-S904.
[0135] S905: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0136] S906: The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0137] An implementation of determining the first key by the first device is described below:
[0138] In some embodiments, the method further includes: the first device obtains a first random value; the first device receives a second random value sent by the second device; the first device determines a first key, including: the first device determines the first key based on the first random value and the second random value.
[0139] It should be noted that the random value (including the first random value or the second random value) can be understood as a random number or random information. For example, the first random value can be a first random number or first random information, and the second random value can be a second random number or second random information. Optionally, the random value can include a sequence of one or more bits, or a sequence of one or more characters.
[0140] Optionally, the first random value may be a client random value (ClientRandom), or the first random value may be called a device random value, a terminal random value, a mobile phone random value, or an APP random value, etc. Optionally, the second random value may be a server random value (ServerRandom), or the second random value may be a car random value.
[0141] Optionally, the first random value may be a value randomly generated by the first device. Optionally, the first random value may be a value generated based on the timestamp of the first device. Optionally, the second random value may be a value randomly generated by the second device. Optionally, the second random value may be a value generated based on the timestamp of the second device. Optionally, the bit length of the first random value may be the same as or different from the bit length of the second random value. Optionally, the first random value and the second random value may be different or the same. Optionally, the first random value and the second random value may be generated based on the same configuration information or different configuration information.
[0142] In some embodiments, the first device determines the first key based on the first random value and the second random value, including: the first device determines the third key based on the first digital key and the second key of the second device; the first device determines the first key based on the third key, the first random value and the second random value.
[0143] It should be noted that in any embodiment of the present application, the first digital key can be a digital key private key DigitalKey.SK. The second key of the second device can be the public key of the second device (for example, the vehicle public key Vehicle.PK). The third key can be an input key (inputKey). Optionally, the input key can be understood as an input key.
[0144] Optionally, the first device may use a key agreement algorithm to determine a third key based on the first digital key and the second key of the second device. Optionally, the key agreement algorithm in any embodiment of the present application may include one of the following: Elliptic Curve Diffie-Hellman key Exchange (ECDH) algorithm, Diffie-Hellman algorithm, or National Secret SM2 algorithm, etc. The embodiments of the present application do not limit the specific key agreement algorithm used.
[0145] For example, the third key = key agreement algorithm (first digital key, second key of the second device), wherein the key agreement algorithm may be ECDH, etc. Exemplarily, inputKey = key agreement algorithm (such as ECDH, etc.) (DigitalKey.SK, Vehicle.PK).
[0146] It should be noted that the DigitalKey.SK in the first device cannot be read directly and needs to be accessed through the interface of the security chip. Alternatively, Vehicle.PK and / or DigitalKey.PK can be read through or without the interface of the security chip.
[0147] In some embodiments, the first device determines the first key based on the third key, the first random value, and the second random value, which may include: the first device determines a first salt value based on the first random value and the second random value; and the first device determines the first key based on the third key and the first salt value.
[0148] Optionally, the first salt value may include a sequence of one or more bits, or may include a sequence of one or more characters.
[0149] Optionally, the first device determines the first salt value based on the first random value and the second random value, which may include: determining a combined value of the first random value and the second random value, and determining the first salt value based on the combined value. For example, a hash operation may be performed on the combined value to obtain the first salt value. Optionally, the embodiment of the present application does not limit the merging method of the first random value and the second random value. For example, the second random value may be placed after the first random value, or the first random value may be placed after the second random value, or the first random value and the second random value may be cross-merged.
[0150] Optionally, the first salt value Salt may be calculated as Salt=hash algorithm (ClientRandom||ServerRandom). In any embodiment of the present application, “||” is a connection symbol.
[0151] In some embodiments, the first device determines the first key based on the third key, the first random value and the second random value, which may include: the first device obtains a preset value; the first device determines the first key based on the preset value, the third key, the first random value and the second random value.
[0152] Optionally, the preset value in any embodiment of the present application may also be referred to as a preset fixed value or a fixed value. Optionally, the preset value in any embodiment of the present application may be a preset fixed string of characters. Optionally, the preset value in any embodiment of the present application may include a sequence of one or more bits, or may include a sequence of one or more characters.
[0153] Optionally, the preset value may be pre-configured in the first device. For example, the preset value may be generated by the first device when the first device first associates with the second device, configured by the second device to the first device, or sent by a server associated with the second device. Alternatively, the first device may read the preset value from its own storage space.
[0154] Optionally, the preset value in any embodiment of the present application may also be referred to as key information (key info) or provision key (ProvisionKey).
[0155] Optionally, the first device may determine the first key based on the preset value, the third key and the first salt value.
[0156] In some embodiments, the first key is determined based on a first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the first digital key and the second key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0157] Optionally, the first key derivation algorithm may include a key derivation function (KDF). Optionally, the first key derivation algorithm may be implemented through a KDF interface.
[0158] Optionally, the parameters in the first key derivation function or the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length. Optionally, the parameters in the first key derivation function or the first key derivation algorithm include: a third key, a first salt value, a preset value, and the first length.
[0159] Optionally, the first result may be KDF(third key, first salt value, preset value, first length). Exemplarily, the first result may be KDF(inputKey, Salt, info, length), where inputKey, Salt, info, and length represent the third key, the first salt value, the preset value, and the first length, respectively.
[0160] Optionally, the first key may be a partial character or partial bit selected from the first result. Optionally, the length of the first key (e.g., character length or bit length) may be a preconfigured length, or a length determined based on preconfigured information, or a length configured by the second device. Optionally, the position and / or length corresponding to the first key may be preconfigured, and the first key may be selected from the first result based on the position and / or length corresponding to the preconfigured first key. Optionally, the length of the first result may be the first length.
[0161] An implementation of determining the first confirmation value by the first device is described below:
[0162] In some embodiments, the method further includes: the first device determining a first confirmation value based on the first random value and the second random value.
[0163] In some embodiments, the first device determines a first confirmation value based on the first random value and the second random value, including: the first device determines a first challenge code based on the first random value and the second random value; the first device determines the first confirmation value based on the first challenge code, the first random value and the second random value.
[0164] Optionally, the first challenge code may also be referred to as a first challenge password or a first challenge value. Optionally, the first challenge code may include a sequence of one or more bits, or may include a sequence of one or more characters.
[0165] In some embodiments, the first device determines the first confirmation value based on the first challenge code, the first random value and the second random value, including: the first device merges the first challenge code, the first random value and the second random value to obtain a second merged result; the first device performs a hash operation on the second merged result to obtain the first confirmation value.
[0166] Optionally, the embodiment of the present application does not limit the merging method of merging the first challenge code, the first random value, and the second random value. For example, the first challenge code, the first random value, and the second random value may be sequentially connected to obtain a second merging result. For another example, the first random value, the second random value, and the first challenge code may be sequentially connected to obtain a second merging result. For another example, the result of cross-merging the first challenge code with the first random value and the second random value may be connected to obtain a second merging result. For another example, the first challenge code, the first random value, and the second random value may be cross-merged to obtain a second merging result.
[0167] Optionally, the first confirmation value in this embodiment can be represented by Confirmation, where Confirmation = hash algorithm (Challenge||ClientRandom||ServerRandom).
[0168] In some embodiments, the first device determines a first challenge code based on the first random value and the second random value, including: the first device determines a third key based on a first digital key and a second key of the second device; the first device determines the first challenge code based on the third key, the first random value, and the second random value.
[0169] Optionally, in this embodiment, the manner in which the first device determines the third key based on the first digital key and the second key of the second device may refer to the description of the above embodiment.
[0170] In some embodiments, the first device determines the first challenge code based on the third key, the first random value, and the second random value, including: the first device determines a first salt value based on the first random value and the second random value; the first device determines the first challenge code based on the third key and the first salt value.
[0171] Optionally, in this embodiment, the manner in which the first device determines the first salt value based on the first random value and the second random value may refer to the description of the above embodiment.
[0172] In some embodiments, the first device determines the first challenge code based on the third key, the first random value and the second random value, including: the first device obtains a preset value; the first device determines the first challenge code based on the preset value, the third key, the first random value and the second random value.
[0173] Optionally, the first device may determine the first challenge code based on the preset value, the third key and the first salt value.
[0174] In some embodiments, the first challenge code is determined based on the first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the first digital key and the second key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0175] Optionally, the first challenge code may be a partial character or partial bit selected from the first result. Optionally, the length of the first challenge code (e.g., character length or bit length) may be a preconfigured length, or a length determined based on preconfiguration information, or a length configured by the second device. Optionally, the first device may preconfigure the position and / or length corresponding to the first challenge code, and select the first challenge code from the first result based on the position and / or length corresponding to the preconfigured first challenge code.
[0176] Optionally, the position of the first challenge code and the position of the first key may partially overlap, or the position of the first challenge code and the position of the first key may not overlap. Optionally, the length of the first challenge code may be the same as or different from the length of the first key. Exemplarily, the length of the first challenge code may differ from the length of the first key by a target number of bits or characters.
[0177] Optionally, the first challenge code may be a value in the first result excluding the first key.
[0178] In some embodiments, the first result is a result obtained by combining the first key and the first challenge code.
[0179] Alternatively, the first key may precede the first challenge code, or the first key may follow the first challenge code, or the first key and the first challenge code may be arranged in an interlaced manner. For example, the first result may be first key || first challenge code. Exemplarily, the first result in this embodiment may be ShareKey || Challenge. ShareKey represents the first key, and Challenge represents the first challenge code.
[0180] In some embodiments, the first device determines a first salt value based on the first random value and the second random value, including: the first device merges the first random value and the second random value to obtain a first merged result; the first device performs a hash operation on the first merged result to obtain the first salt value.
[0181] An implementation method for determining the first key by the second device is described below:
[0182] In some embodiments, the method further includes: the second device receives a first random value sent by the first device; the second device obtains a second random value; the second device determines the first key, including: the second device determines the first key based on the first random value and the second random value.
[0183] In some embodiments, the second device determines the first key based on the first random value and the second random value, including: the second device determines the third key based on the second digital key and the fourth key of the second device; the second device determines the first key based on the third key, the first random value and the second random value.
[0184] It should be noted that the second digital key in any embodiment of the present application can be a digital key public key DigitalKey.PK. The fourth key of the second device in any embodiment of the present application can be a private key of the second device (for example, a vehicle private key Vehicle.SK). The third key in any embodiment of the present application can be an input key (inputKey). Optionally, the input key can be understood as an input key.
[0185] Optionally, the second device may adopt a key agreement algorithm to determine the third key based on the second digital key and the fourth key of the second device.
[0186] Optionally, the third key determined by the second device and the third key determined by the first device are the same key.
[0187] In some embodiments, the second device determines the first key based on the third key, the first random value, and the second random value, including: the second device determines a first salt value based on the first random value and the second random value; the second device determines the first key based on the third key and the first salt value.
[0188] Optionally, the second device may determine the first salt value in the same manner as the first device determines the first salt value. Optionally, the first salt value determined by the second device is the same salt value as the first salt value determined by the first device.
[0189] In some embodiments, the second device determines the first key based on the third key, the first random value and the second random value, including: the second device obtains a preset value; the second device determines the first key based on the preset value, the third key, the first random value and the second random value.
[0190] Optionally, the preset value may be pre-configured in the second device. For example, the preset value may be generated by the second device when the second device first associates with the first device, configured by the first device to the second device, or sent by a server associated with the second device. Alternatively, the second device may read the preset value from its own storage space.
[0191] Optionally, the second device may determine the first key based on the preset value, the third key and the first salt value.
[0192] In some embodiments, the first key is determined based on a first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the second digital key and the fourth key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0193] Optionally, the second device may determine the first result in the same manner as the first device determines the first result. Optionally, the second device may determine the first key based on the first result in the same manner as the first device determines the first key based on the first result.
[0194] An implementation manner in which the second device determines the second confirmation value is described below:
[0195] In some embodiments, the method further includes: the second device determining a second confirmation value based on the first random value and the second random value.
[0196] Optionally, the second confirmation value may be the same as or different from the first confirmation value. For example, when the first device and the second device are associated, the second confirmation value may be the same as the first confirmation value, otherwise they may be different.
[0197] In some embodiments, the second device determines a second confirmation value based on the first random value and the second random value, including: the second device determines a first challenge code based on the first random value and the second random value; the second device determines the second confirmation value based on the first challenge code, the first random value and the second random value.
[0198] In some embodiments, the second device determines the second confirmation value based on the first challenge code, the first random value and the second random value, including: the second device merges the first challenge code, the first random value and the second random value to obtain a second merged result; the second device performs a hash operation on the second merged result to obtain the second confirmation value.
[0199] Optionally, the second device may obtain the second merged result in the same manner as the first device obtains the second merged result. Optionally, the second device may obtain the second merged result in the same manner as the first device obtains the second merged result.
[0200] In some embodiments, the second device determines a first challenge code based on the first random value and the second random value, including: the second device determines a third key based on a second digital key and a fourth key of the second device; the second device determines the first challenge code based on the third key, the first random value and the second random value.
[0201] Optionally, in this embodiment, the method for determining the third key based on the second digital key and the fourth key of the second device can refer to the description of the above embodiment.
[0202] In some embodiments, the second device determines the first challenge code based on the third key, the first random value, and the second random value, including: the second device determines a first salt value based on the first random value and the second random value; the second device determines the first challenge code based on the third key and the first salt value.
[0203] Optionally, in this embodiment, the manner of determining the first salt value based on the first random value and the second random value may refer to the description of the above embodiment.
[0204] In some embodiments, the second device determines the first challenge code based on the third key, the first random value and the second random value, including: the second device obtains a preset value; the second device determines the first challenge code based on the preset value, the third key, the first random value and the second random value.
[0205] Optionally, the second device determines the first challenge code based on the preset value, the third key and the first salt value.
[0206] In some embodiments, the first challenge code is determined based on the first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the second digital key and the fourth key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0207] Optionally, the second device may preconfigure a position and / or length corresponding to the first challenge code, and select the first challenge code from the first result based on the preconfigured position and / or length corresponding to the first challenge code.
[0208] Optionally, the first challenge code determined by the second device may be the same as the first challenge code determined by the first device.
[0209] In some embodiments, the first result is a result obtained by combining the first key and the first challenge code.
[0210] In some embodiments, the second device determines a first salt value based on the first random value and the second random value, including: the second device merges the first random value and the second random value to obtain a first merged result; and the second device performs a hash operation on the first merged result to obtain the first salt value.
[0211] FIG10 is a flow chart of a communication method provided in yet another embodiment of the present application. As shown in FIG10 , the method includes:
[0212] S1001. The first device obtains a first random value;
[0213] S1002. The first device sends first verification information to the second device; the second device receives the first verification information sent by the first device; the first verification information includes a first random value and a first signature.
[0214] S1003. When the second device successfully verifies the first signature based on the second digital key and the first random value, the second device obtains a second random value; the second device determines the first key based on the first random value and the second random value.
[0215] S1004: The first device determines the first key.
[0216] S1005: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0217] S1006. The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0218] FIG11 is a flow chart of another communication method provided in another embodiment of the present application. As shown in FIG11 , the method includes:
[0219] S1101: The second device obtains a second random value.
[0220] S1102. The second device sends second verification information to the first device; the first device receives the second verification information sent by the second device; the second verification information includes a second random value and a second signature.
[0221] S1103: If the first device successfully verifies the second signature based on the second random value and the second key of the second device, determine the first key.
[0222] S1104: The second device determines the first key.
[0223] S1105: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0224] S1106. The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0225] FIG12 is a flow chart of another communication method provided by another embodiment of the present application. As shown in FIG12 , it should be noted that the car in FIG12 may correspond to the second device described above, and the mobile phone in FIG12 may correspond to the first device described above. In some embodiments, the mobile phone may be a mobile phone APP. The method includes:
[0226] S1201. The vehicle performs Bluetooth broadcasting (corresponding to the broadcast Bluetooth information in the following embodiment). The broadcast information carries the vehicle's identity information (corresponding to the identification of the second device in the following embodiment) and / or information indicating whether the vehicle is configurable (corresponding to the indication information used to indicate that the second device is configurable) (corresponding to the following indication information).
[0227] Optionally, the Bluetooth broadcast may include a Bluetooth Low Energy (BLE) broadcast. Optionally, the vehicle identity information may include a vehicle identifier (vehicle_identifier).
[0228] For example, the car sends a BLE pairing broadcast. After the mobile phone establishes a digital car key connection, the car can also use BLE to perform pairing broadcasts. The broadcast should at least contain vehicle identifier (ID assigned by the car manufacturer) and commissionable (whether it is configurable) information.
[0229] S1202: The mobile phone detects the Bluetooth broadcast of the vehicle and determines the identity of the vehicle and / or the configurability of the vehicle.
[0230] S1203: The mobile phone and the vehicle establish a Bluetooth connection.
[0231] Optionally, before establishing a secure channel, the mobile phone and the car transmit information via a Bluetooth connection.
[0232] S1204: The mobile phone sends a configuration phase session establishment request to the vehicle (corresponding to the first information in the above embodiment).
[0233] This request carries the authentication types supported by the phone, such as a digital key certificate (digital_key_cert) and a password (passcode). For example, when a phone requests a vehicle to establish a session during the configuration phase, the request carries the authentication types supported by the phone ([digital_key_cert, passcode]) for negotiation with the vehicle.
[0234] S1205: The vehicle sends a request response message (corresponding to the second message in the above embodiment) to the mobile phone.
[0235] The request response message indicates the selected configuration phase master key generation method. Optionally, the request response message also includes a vehicle identifier, such as a vehicle device ID. For example, the selected configuration phase master key generation method may be a digital key certificate (digital_key_cert) method (corresponding to the first authentication type information described above).
[0236] For example, the car selects to generate the configuration phase key generation method "digital key cert" and Vehicle Device ID (used by the mobile phone to determine which specific car to establish a connection with) based on the session request (corresponding to the above-mentioned configuration phase session establishment request).
[0237] S1206. The mobile phone generates a client random number (ClientRandom, corresponding to the first random number in the above embodiment), and uses the digital key DigitalKey.SK (corresponding to the first digital key in the above embodiment) to sign ClientRandom through the relevant interface to generate a client signature (ClientSignature, corresponding to the first signature in the above embodiment).
[0238] Optionally, the relevant interface in any embodiment of the present application may be an interface of a security chip.
[0239] For example, the mobile phone generates a random number ClientRandom, and uses DigitalKey.SK to sign ClientRandom and generate ClientSignature through the relevant interface.
[0240] S1207. The mobile phone sends a verification request to the car; the verification request carries the client random number ClientRandom and the client signature ClientSignature.
[0241] For example, the mobile phone sends a verification application (i.e., a verification request) to the car, carrying the data CleintRandom and ClientSignature.
[0242] S1208, the vehicle parses the verification request; obtains the public key (DigitalKey.PK, corresponding to the second digital key mentioned above) of the stored digital key certificate (digital_key_cert), and verifies the client signature ClientSignature; if the verification is successful, generates a server random number (ServerRandom, corresponding to the second random number mentioned above); uses the vehicle private key (Vehicle.SK, corresponding to the fourth key of the second device in the above embodiment) to sign the server random number ServerRandom to obtain the server signature (ServerSignature, corresponding to the second signature mentioned above).
[0243] Optionally, the car can verify the client signature ClientSignature through the client random number ClientRandom and the digital key public key.
[0244] For example, the vehicle obtains the public key DigitalKey.PK of the stored digital_key_cert, verifies ClientSignature, generates a random number ServerRandom, and uses Vehicle.SK to sign ClientRandom to obtain ServerSignature.
[0245] S1209. The vehicle sends a verification response message to the mobile phone; the verification response message may carry the server random number ServerRandom and the server signature ServerSignature.
[0246] For example, the car returns a verification response (ie, verification response information) carrying the data ServerRandom and ServerSignature.
[0247] The vehicle can also generate a ShareKey and Challenge. The calculation methods for ShareKey and Challenge refer to the steps on the phone. The parameters used to calculate the inputKey on the vehicle side are different. On the vehicle side, inputKey = key agreement algorithm (such as ECDH, etc.) (Vehicle.SK, DigitalKey.PK). However, the inputKey calculated on the vehicle side is the same as the inputKey calculated on the phone side.
[0248] S1210. The mobile phone parses and verifies the response information; uses the vehicle public key (Vehicle.PK, corresponding to the second key of the second device in the above embodiment) through the relevant interface to verify the server signature ServerSignature; if the verification is successful, the mobile phone generates a shared key (ShareKey, corresponding to the first key in the above embodiment) and a first challenge code (Challenge); the mobile phone calculates a first confirmation value (Confirmation).
[0249] Optionally, the mobile phone can verify the sent ServerSignature using the server random number ServerRandom and the vehicle public key Vehicle.PK.
[0250] For example, after receiving the verification response from the vehicle, the mobile phone uses Vehicle.PK to verify ServerSignature through the relevant interface and generates ShareKey and Challenge;
[0251] First, the phone generates an inputKey, where inputKey = key agreement algorithm (such as ECDH, etc.) (DigitalKey.SK, Vehicle.PK). It should be understood that DigitalKey.SK cannot be read directly on the phone side, and the data in the security chip can only be used through the interface accessed by the security chip.
[0252] Next, generate Salt (salt value) = Hash algorithm (ClientRandom||ServerRandom). In any embodiment of the present application, "||" is a connection symbol.
[0253] Again, obtain the key info (corresponding to the above preset value), which may be ProvisionKey.
[0254] Then, ShareKey is generated: ShareKey||Challenge=KDF(inputKey, Salt, info, length), where info is the key info and length is the first length mentioned above.
[0255] Finally, the Confirmation is calculated, where Confirmation (corresponding to the first confirmation value mentioned above) = hash algorithm (Challenge||ClientRandom||ServerRandom).
[0256] S1211. The mobile phone sends a first confirmation value Confirmation to the car.
[0257] S1212: The car generates a shared key ShareKey and a first challenge code Challenge; the car calculates a second confirmation value Confirmation.
[0258] For example, the vehicle side calculates the second confirmation value Confirmation using the same calculation method as the mobile phone side calculates the first confirmation value Confirmation, and then compares it with the Confirmation sent by the first device. If they are the same, it means the inspection has passed.
[0259] S1213: The vehicle verifies the first confirmation value Confirmation.
[0260] Optionally, when the first confirmation value Confirmation is the same as the second confirmation value Confirmation, it is determined that the verification of the first confirmation value Confirmation is successful.
[0261] S1214: When the vehicle successfully verifies the first confirmation value Confirmation, the vehicle sends a Session Establish Finished message to the mobile phone.
[0262] For example, the car returns a pairing channel establishment completion (corresponding session establishment completion) message to the mobile phone.
[0263] Optionally, the session establishment completion information may be used to indicate that the verification of the first confirmation value is successful.
[0264] S1215: The mobile phone and the car establish a secure channel based on the master key, and the car configuration operation is completed based on the channel.
[0265] For example, the mobile phone and the car establish a secure channel based on digital key negotiation, and the car configuration operation is completed based on this channel.
[0266] Optionally, the mobile phone and / or car can execute all or part of the steps in the embodiment shown in Figure 12. The embodiment of the present application is not limited to this, as long as it constitutes a complete technical solution.
[0267] Another implementation method for determining the first key is described below:
[0268] In some embodiments, on the first device side, the method further includes: the first device determining the first key based on the first digital key and the second key of the second device.
[0269] In some embodiments, on the second device side, the method further includes: the second device determining the first key based on a second digital key and a fourth key of the second device.
[0270] Optionally, the first device may use a key agreement algorithm to determine the first key based on the first digital key and the second key of the second device. The second device may use a key agreement algorithm to determine the first key based on the second digital key and the fourth key of the second device.
[0271] In some embodiments, on the first device side, the method further includes: the first device obtains a third confirmation value; the first device uses the first key to encrypt the third confirmation value to obtain a first confirmation value; and the first device sends the first confirmation value to the second device.
[0272] Optionally, the third confirmation value may be preset by the second device and / or the first device, or the third confirmation value may be configured by the second device to the first device, or the third confirmation value may be configured by the first device to the second device, or the third confirmation value may be sent by a server associated with the second device.
[0273] Optionally, the third confirmation value may include a sequence of one or more bits, or may include a sequence of one or more characters.
[0274] In this way, the second device obtains a third confirmation value, and encrypts the third confirmation value using the first key to obtain a second confirmation value. If the second device determines that the first confirmation value and the second confirmation value are the same, it determines that the verification of the first confirmation value is successful, and then the second device sends a verification success indication to the first device. Based on this, the first and second devices then perform the step of determining the first key.
[0275] In other embodiments, the verification step may be performed by the first device. For example, in some embodiments, on the second device side, the method further includes: the second device obtaining a third confirmation value; the second device encrypting the third confirmation value using the first key to obtain a second confirmation value; and the second device sending the second confirmation value to the first device.
[0276] In this way, the first device obtains the third confirmation value and encrypts the third confirmation value using the first key to obtain the first confirmation value. If the first device determines that the first confirmation value and the second confirmation value are the same, it determines that the verification of the second confirmation value is successful. The first device then sends a verification success indication to the second device. Based on this, the first and second devices then perform the step of determining the first key.
[0277] In some embodiments, on the first device side, the method further includes: the first device receiving indication information sent by the second device, or the first device sending indication information to the second device; the indication information is used to indicate the determination of the first key based on a key agreement algorithm.
[0278] In some embodiments, on the second device side, the method further includes: the second device sending indication information to the first device, or the second device receiving indication information sent by the first device; the indication information is used to indicate the determination of the first key based on a key agreement algorithm.
[0279] In some embodiments, on the first device side, the method further includes: the first device receives a second confirmation value sent by the second device; when the first device successfully verifies the second confirmation value based on the first key, the first device sends fourth information to the second device; the fourth information is used to indicate that the verification of the second confirmation value is successful.
[0280] In some embodiments, on the second device side, the method further includes: the second device receives a first confirmation value sent by the first device; when the second device successfully verifies the first confirmation value based on the first key, the second device sends third information to the first device; the third information is used to indicate that the verification of the first confirmation value is successful.
[0281] In this way, when the first confirmation value and / or the second confirmation value are successfully verified, the first device and the second device perform the step of determining the first key.
[0282] FIG13 is a flow chart of another communication method provided by another embodiment of the present application. As shown in FIG13 , it should be noted that the car in FIG13 may correspond to the second device described above, and the mobile phone in FIG13 may correspond to the first device described above. In some embodiments, the mobile phone may be a mobile phone APP. The method includes:
[0283] S1301: The vehicle performs a Bluetooth broadcast, where the broadcast information carries the vehicle's identity information and / or information indicating whether the vehicle is commissionable.
[0284] S1302: The mobile phone detects the Bluetooth broadcast of the vehicle and determines the identity of the vehicle and / or the configurability of the vehicle.
[0285] S1303: The mobile phone and the vehicle establish a Bluetooth connection.
[0286] S1304: The mobile phone sends a configuration phase session establishment request to the vehicle (corresponding to the first information in the above embodiment).
[0287] The request carries the authentication type supported by the mobile phone, for example, a digital key certificate (digital_key_cert) and a password (passcode).
[0288] S1305: The car sends a request response message (corresponding to the second message in the above embodiment) to the mobile phone.
[0289] The request response message indicates the selection of a configuration phase master key generation method and / or a prompt for direct negotiation of the master key (corresponding to the aforementioned determination of the first key based on the key agreement algorithm). Optionally, the request response message also includes a vehicle identifier, such as a vehicle device ID. For example, the configuration phase master key generation method may be a digital key certificate (digital_key_cert) method (corresponding to the aforementioned first authentication type information).
[0290] Optionally, the master key prompt is directly negotiated, and the solution adopted is that the car sends an instruction message to the mobile phone, and the instruction message indicates the negotiation of the master key.
[0291] S1306. The vehicle uses the digital key public key DigitalKey.PK and the vehicle private key Vehicle.SK to generate the master key ShareKey.
[0292] For example, the vehicle can generate the master key ShareKey using DigitalKey.PK and Vehicle.SK based on the directly negotiated master key prompt.
[0293] S1307. The mobile phone uses the vehicle public key Vehicle.PK and the digital key private key DigitalKey.SK to generate the master key ShareKey.
[0294] For example, the phone can use Vehicle.PK and DigitalKey.SK to generate the master key ShareKey based on the directly negotiated master key prompt.
[0295] In the embodiment of the present application, the mobile phone and the car directly generate ShareKey, and the method for determining ShareKey can be the same as the method for determining inputKey in the embodiment corresponding to Figure 12.
[0296] S1308. The mobile phone sends a first confirmation value Confirmation encrypted using the master key ShareKey to the car.
[0297] A fixed value is used when confirming the Confirmation. The value may be negotiated before the phone and the car are paired, or obtained by the phone from the car, or obtained remotely (for example, from a car server).
[0298] S1309: The vehicle verifies the first confirmation value.
[0299] S1310: When the vehicle successfully verifies the first confirmation value Confirmation, the vehicle sends a Session Establish Finished message to the mobile phone.
[0300] Optionally, the session establishment completion information may be used to indicate that verification of the first confirmation value Confirmation is successful.
[0301] S1311. The mobile phone and the car establish a secure channel based on the master key, and the car configuration operation is completed based on this channel.
[0302] Optionally, the mobile phone and / or car can execute all or part of the steps in the embodiment shown in Figure 13. The embodiment of the present application is not limited to this, as long as it constitutes a complete technical solution.
[0303] Another implementation of determining the first key by the first device is described below:
[0304] In some embodiments, the method further includes: the first device obtaining a first secret; and the first device determining the first key based on the first secret.
[0305] It should be noted that the first secret may be a first secret value or second secret information. Optionally, the first secret may be a shared secret (ShareSecret). Optionally, the first secret may include a sequence of one or more bits, or may include a sequence of one or more characters. Optionally, the first secret may be pre-configured by the first device, or the first secret may be generated based on pre-configuration information. Optionally, the first secret and / or configuration information used to generate the first secret may be sent by the second device, or may be sent by a server associated with the second device.
[0306] In some embodiments, the first device determines the first key based on the first secret, comprising: the first device obtains a first random value; and the first device determines the first key based on the first secret and the first random value.
[0307] Optionally, the description of the first random value and the manner in which the first device obtains the first random value may refer to the description in the above embodiment and will not be repeated here.
[0308] In some embodiments, the first device determines the first key based on the first secret and the first random value, including: the first device determines a second salt value based on the first random value; the first device determines the first key based on the second salt value and the first secret.
[0309] Optionally, the second salt value may include a sequence of one or more bits, or may include a sequence of one or more characters.
[0310] Optionally, determining the second salt value based on the first random value may include: performing a hash operation on the first random value to obtain the second salt value. Optionally, the second salt value Salt may be calculated as Salt = Hash Algorithm (ClientRandom).
[0311] In some embodiments, the first device determines the first key based on the first secret, comprising: the first device obtains a preset value; and the first device determines the first key based on the preset value and the first secret.
[0312] Optionally, for a description of the preset value and how the first device obtains the preset value, please refer to the description of the above embodiment, which will not be repeated here.
[0313] Optionally, the first device may determine the first key based on the preset value, the first secret and the second salt value.
[0314] In some embodiments, the first key is determined based on a second result; the second result is determined by a second key derivation algorithm, and parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on a first random value obtained by the first device; the length of the second result is less than or equal to the second length.
[0315] Optionally, the second key derivation algorithm may include a key derivation function (KDF). Optionally, the second key derivation algorithm may be implemented through a KDF interface.
[0316] Optionally, the parameters in the second key derivation function or the second key derivation algorithm include at least one of the following: the first secret, the second salt value, a preset value, and the second length. Optionally, the parameters in the second key derivation function or the second key derivation algorithm include the first secret, the second salt value, a preset value, and the second length.
[0317] Optionally, the second result may be KDF(first secret, second salt value, preset value, second length). Exemplarily, the second result may be KDF(ShareSecret, salt, info, length), where ShareSecret, salt, info, and length represent the first secret, the second salt value, the preset value, and the second length, respectively.
[0318] Optionally, the first key may be a partial character or partial bit selected from the second result. Optionally, the length of the first key (e.g., character length or bit length) may be a preconfigured length, or a length determined based on preconfigured information, or a length configured by the first device. Optionally, the position and / or length corresponding to the first key may be preconfigured, and the first key may be selected from the second result based on the position and / or length corresponding to the preconfigured first key. Optionally, the length of the second result may be the second length.
[0319] An implementation of determining the first confirmation value by the first device is described below:
[0320] In some embodiments, the method further includes: the first device obtaining a first random value; and the first device determining a first confirmation value based on the first secret and the first random value.
[0321] In some embodiments, the first device determines a first confirmation value based on the first secret and the first random value, and determining the first confirmation value includes: the first device determines a second challenge code based on the first secret; the first device determines the first confirmation value based on the second challenge code and the first random value.
[0322] Optionally, the second challenge code may also be referred to as a second challenge password or a second challenge value. Optionally, the second challenge code may include a sequence of one or more bits, or a sequence of one or more characters.
[0323] In some embodiments, the first device determines the first confirmation value based on the second challenge code and the first random value, including: the first device combines the second challenge code and the first random value to obtain a third combined result; the first device performs a hash operation on the third combined result to obtain the first confirmation value.
[0324] Optionally, the embodiment of the present application does not limit the merging method of the second challenge code and the first random value. For example, the second challenge code can be before the first random value, or the second challenge code can be after the first random value, or the second challenge code and the first random value are cross-merged.
[0325] Optionally, the first confirmation value in this embodiment can be represented by Confirmation, where Confirmation=hash algorithm (Challenge||ClientRandom).
[0326] In some embodiments, the first device determines a second challenge code based on the first secret, including: the first device determines a second salt value based on the first random value; the first device determines the second challenge code based on the second salt value and the first secret.
[0327] In some embodiments, the first device determines the second challenge code based on the first secret, including: the first device obtains a preset value; and the first device determines the second challenge code based on the preset value and the first secret.
[0328] Optionally, the first device may determine the second challenge code based on the preset value, the first secret and the second salt value.
[0329] In some embodiments, the second challenge code is determined based on the second result; the second result is determined by a second key derivation algorithm, and the parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the first device; the length of the second result is less than or equal to the second length.
[0330] Optionally, the second challenge code may be a partial character or partial bit selected from the second result. Optionally, the length of the second challenge code (e.g., character length or bit length) may be a preconfigured length, or a length determined based on preconfiguration information, or a length configured by the first device. Optionally, the first device may preconfigure the position and / or length corresponding to the second challenge code, and select the second challenge code from the second result based on the position and / or length corresponding to the preconfigured second challenge code.
[0331] Optionally, the position of the second challenge code and the position of the first key may partially overlap, or the position of the second challenge code and the position of the first key may not overlap. Optionally, the length of the second challenge code may be the same as or different from the length of the first key. Exemplarily, the length of the second challenge code may differ from the length of the first key by a set number of bits or characters.
[0332] Optionally, the second challenge code may be a value in the second result excluding the first key.
[0333] In some embodiments, the second result is a result obtained by combining the first key and the second challenge code.
[0334] Alternatively, the first key may precede the second challenge code, or the first key may follow the second challenge code, or the first key and the second challenge code may be arranged in an interlaced manner. For example, the second result may be first key || second challenge code. Exemplarily, the second result in this embodiment may be ShareKey || Challenge. ShareKey represents the first key, and Challenge represents the second challenge code.
[0335] In some embodiments, the first device determines a second salt value based on the first random value, including: the first device performs a hash operation on the first random value to obtain the second salt value.
[0336] An implementation method for determining the first key by the second device is described below:
[0337] In some embodiments, the method further includes: the second device receiving a second secret sent by the first device; and the second device determining the first key based on the second secret.
[0338] Optionally, the second secret can be determined based on the first secret. For example, in some embodiments, the second secret can be determined based on the second key (public key, such as Vehicle.PK) of the second device and the first secret. Exemplarily, the first secret can be encrypted using the second key of the second device to obtain the second secret. In other embodiments, the second secret can be determined based on a first digital key (such as DigitalKey.SK) and the first secret. Exemplarily, the first secret can be encrypted using the first digital key to obtain the second secret.
[0339] Optionally, the first device may use a key agreement algorithm to encrypt the first secret to obtain the second secret.
[0340] In some embodiments, the second device determining the first key based on the second secret includes: the second device determining the first secret based on the second secret and a fourth key of the second device; and the second device determining the first key based on the first secret. Exemplarily, the second device may use the fourth key of the second device to decrypt the second secret to obtain the first secret.
[0341] In some other embodiments, the second device determining the first key based on the second secret includes: the second device determining the first secret based on the second secret and the second digital key (e.g., DigitalKey.PK); and the second device determining the first key based on the first secret. Exemplarily, the second device may use the second digital key to decrypt the second secret to obtain the first secret.
[0342] Optionally, the second device may use a key agreement algorithm to decrypt the second secret to obtain the first secret.
[0343] In some embodiments, the second device determines the first key based on the first secret, including: the second device receives a first random value sent by the first device; and the second device determines the first key based on the first secret and the first random value.
[0344] In some embodiments, the second device determines the first key based on the first secret and the first random value, including: the second device determines a second salt value based on the first random value; the second device determines the first key based on the second salt value and the first secret.
[0345] Optionally, for the description of the second salt value and the method for determining the second salt value based on the first random value, reference may be made to the description in the above embodiment, which will not be repeated here.
[0346] Optionally, the second device may determine the second salt value in the same manner as the first device determines the second salt value. Optionally, the second salt value determined by the second device is the same salt value as the second salt value determined by the first device.
[0347] In some embodiments, the second device determines the first key based on the first secret, comprising: the second device obtains a preset value; and the second device determines the first key based on the preset value and the first secret.
[0348] Optionally, the second device may determine the first key based on the preset value, the second salt value, and the first secret.
[0349] In some embodiments, the first key is determined based on the second result; the second result is determined by a second key derivation algorithm, and the parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the second device; the length of the second result is less than or equal to the second length.
[0350] Optionally, the second device may determine the second result in the same manner as the first device determines the second result. Optionally, the second device may determine the first key based on the second result in the same manner as the first device determines the first key based on the second result.
[0351] An implementation manner in which the second device determines the second confirmation value is described below:
[0352] In some embodiments, the method further includes: the second device receiving a first random value sent by the first device; and the second device determining a second confirmation value based on the first secret and the first random value.
[0353] In some embodiments, the second device determines a second confirmation value based on the first secret and the first random value, including: the second device determines a second challenge code based on the first secret; the second device determines the second confirmation value based on the second challenge code and the first random value.
[0354] In some embodiments, the second device determines the second confirmation value based on the second challenge code and the first random value, including: the second device combines the second challenge code and the first random value to obtain a third combined result; the second device performs a hash operation on the third combined result to obtain the second confirmation value.
[0355] Optionally, the second device may obtain the third combined result in the same manner as the first device obtains the third combined result. Optionally, the second device may obtain the third combined result in the same manner as the first device obtains the third combined result.
[0356] In some embodiments, the second device determines a second challenge code based on the first secret, including: the second device determines a second salt value based on the first random value; the second device determines the second challenge code based on the second salt value and the first secret.
[0357] In some embodiments, the second device determines the second challenge code based on the first secret, including: the second device obtains a preset value; and the second device determines the second challenge code based on the preset value and the first secret.
[0358] Optionally, the second device may determine the second challenge code based on a preset value, the second salt value, and the first secret.
[0359] In some embodiments, the second challenge code is determined based on the second result; the second result is determined by a second key derivation algorithm, and the parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the second device; the length of the second result is less than or equal to the second length.
[0360] Optionally, the second device may preconfigure a position and / or length corresponding to the second challenge code, and select the second challenge code from the second result based on the preconfigured position and / or length corresponding to the second challenge code.
[0361] Optionally, the second challenge code determined by the second device may be the same as the second challenge code determined by the first device.
[0362] In some embodiments, the second result is a result obtained by combining the first key and the second challenge code.
[0363] In some embodiments, the second device determines a second salt value based on the first random value, including: the second device performs a hash operation on the first random value to obtain the second salt value.
[0364] FIG14 is a flow chart of another communication method provided in yet another embodiment of the present application. As shown in FIG14 , the method includes:
[0365] S1401: The first device obtains a first secret;
[0366] S1402: The first device determines the first key based on the first secret.
[0367] S1403: The first device determines a second secret based on the second key of the second device and the first secret.
[0368] S1404. The first device sends third verification information to the second device; the second device receives the third verification information sent by the first device; the third verification information includes the first random value, the first signature, and the second secret obtained by the first device.
[0369] S1405. When the second device successfully verifies the first signature based on the second digital key and the first random value, the second device determines the first key based on the second secret.
[0370] S1406: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0371] S1407: The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0372] The following describes an implementation method for determining the first signature by the first device in any embodiment of the present application:
[0373] The first device determines the first signature based on the first random value and a first digital key.
[0374] Optionally, the first device may use the first digital key (DigitalKey.SK) to sign the first random value (ClientRandom) to generate a first signature (ClientSignature).
[0375] In this way, on the second device side, the second device verifies the first signature based on the second digital key (DigitalKey.PK) and the first random value (ClientRandom). For example, the second device can determine a random value based on the second digital key and the first signature. If the random value is the same as the first random value, the first signature verification is successful. For another example, the second device can determine a signature based on the second digital key and the first random value. If the signature is the same as the first signature, the first signature verification is successful.
[0376] FIG15 is a flow chart of another communication method provided in another embodiment of the present application. As shown in FIG15 , the method includes:
[0377] S1501. The second device broadcasts Bluetooth information; the Bluetooth information carries at least one of the following: an identifier of the second device, and indication information indicating that the second device is configurable.
[0378] S1502: The first device discovers broadcast Bluetooth information.
[0379] S1503: The second device establishes a Bluetooth connection with the second device based on the Bluetooth information.
[0380] S1504: The first device determines a first key.
[0381] S1505: The second device determines the first key.
[0382] Optionally, when the first device and the second device establish a Bluetooth connection, the first device and the second device may transmit and receive information via the Bluetooth connection to determine the first key based on the transmitted and received information.
[0383] S1506: The first device and the second device establish a first channel between the first device and the second device based on the first key.
[0384] S1507: The first device sends configuration information to the second device based on the first channel; the second device receives the configuration information sent by the first device based on the first channel.
[0385] FIG16 is a flow chart of another communication method provided by another embodiment of the present application. As shown in FIG16 , it should be noted that the car in FIG16 may correspond to the second device described above, and the mobile phone in FIG16 may correspond to the first device described above. In some embodiments, the mobile phone may be a mobile phone APP. The method includes:
[0386] S1601. The vehicle performs Bluetooth broadcasting (corresponding to the broadcast Bluetooth information in the above embodiment). The broadcast information carries the vehicle's identity information (corresponding to the identification of the second device in the above embodiment) and / or information indicating whether the vehicle is configurable (corresponding to the above-mentioned indication information for indicating that the second device is configurable).
[0387] S1602: The mobile phone detects the Bluetooth broadcast of the vehicle and determines the identity of the vehicle and / or the configurability of the vehicle.
[0388] S1603: The mobile phone and the vehicle establish a Bluetooth connection.
[0389] S1604: The mobile phone sends a configuration phase session establishment request to the car (corresponding to the first information in the above embodiment).
[0390] This request carries the authentication types supported by the phone, such as a digital key certificate (digital_key_cert) and a password (passcode). For example, when a phone requests a vehicle to establish a session during the configuration phase, the request carries the authentication types supported by the phone ([digital_key_cert, passcode]) for negotiation with the vehicle.
[0391] S1605: The car sends a request response message (corresponding to the second message in the above embodiment) to the mobile phone.
[0392] The request response message indicates the selected configuration phase master key generation method. Optionally, the request response message also includes a vehicle identifier, such as a vehicle device ID. For example, the selected configuration phase master key generation method may be a digital key certificate (digital_key_cert) method (corresponding to the first authentication type information described above).
[0393] For example, the car selects to generate the configuration phase key generation method "digital key cert" and Vehicle Device ID (used by the mobile phone to determine which specific car to establish a connection with) based on the session request (corresponding to the above-mentioned configuration phase session establishment request).
[0394] S1606. The mobile phone generates a client random number (ClientRandom, corresponding to the first random number in the above embodiment), and generates a shared secret ShareSecret (corresponding to the first secret in the above embodiment); the mobile phone uses the digital key private key DigitalKey.SK (corresponding to the first digital key in the above embodiment) to sign ClientRandom through the relevant interface to generate the client signature ClientSignature (corresponding to the first signature in the above embodiment); the mobile phone uses the vehicle public key Vehicle.PK (corresponding to the second key of the second device in the above embodiment) through the relevant interface to encrypt ShareSecret and obtain the client secret ClientSecret (corresponding to the second secret in the above embodiment).
[0395] In this embodiment, the mobile phone needs to generate ShareSecret, and then encrypt it using Vehicle.PK through the interface to obtain ClientSecret.
[0396] S1607. The mobile phone sends a verification request to the car; the verification request carries the client random number ClientRandom, the client signature ClientSignature, and the client secret ClientSecret.
[0397] In this embodiment, after receiving ClientSecret, the vehicle side uses Vehicle.SK to decrypt the data to obtain ShareSecret.
[0398] S1608. The vehicle parses the verification request; obtains the public key (DigitalKey.PK, corresponding to the second digital key mentioned above) of the stored digital key certificate (digital_key_cert) and verifies the client signature ClientSignature; if the verification is successful, uses the vehicle private key Vehicle.SK (corresponding to the fourth key of the second device in the above embodiment) to decrypt the client secret ClientSecret to obtain the shared secret ShareSecret; the vehicle generates the shared key ShareKey and the second challenge code Challenge; the vehicle calculates the second confirmation value Confirmation.
[0399] S1609: The mobile phone generates a shared key ShareKey and a second challenge code Challenge; and calculates a first confirmation value Confirmation.
[0400] In S1608 and S1609, the mobile phone and car need to use ShareSecret to generate ShareKey.
[0401] ShareKey||Challenge=KDF(ShareSecret,salt,info,length); wherein Challenge here represents the second challenge code; salt represents the second salt value, and the calculation method of the second salt value is Salt=hash algorithm (ClientRandom); info is the preset value in the above embodiment, and the calculation method of the first confirmation value and / or the second confirmation value Confirmation is Confirmation=hash algorithm (Challenge||ClientRandom).
[0402] S1610. The vehicle sends a verification response message to the mobile phone; the verification response message may carry a second confirmation value Confirmation calculated by the second device.
[0403] S1611. The mobile phone verifies the second confirmation value Confirmation.
[0404] Exemplarily, when the mobile phone determines that the second confirmation value Confirmation is the same as the first confirmation value Confirmation calculated by the mobile phone, the second confirmation value Confirmation is successfully verified.
[0405] Optionally, after S1611, the process may further include: if the mobile phone successfully verifies the second confirmation value Confirmation, the mobile phone sends a Session Establish Finished message to the vehicle. Optionally, the Session Establish Finished message may be used to indicate that the second confirmation value is successfully verified.
[0406] S1612: The mobile phone and the car establish a secure channel based on the master key, and the car configuration operation is completed based on this channel.
[0407] Optionally, the mobile phone and / or car can execute all or part of the steps in the embodiment shown in Figure 16. The embodiment of the present application is not limited to this, as long as it constitutes a complete technical solution.
[0408] In an embodiment of the present application, when it is necessary to configure the vehicle, a secure communication channel can be established for the configuration operation, making data interaction more secure when the mobile phone configures the vehicle.
[0409] Optionally, after the phone configures the vehicle, a control channel can be established between the phone and the vehicle, allowing the phone to control the vehicle. Optionally, after the control channel is established, the secure channel used to send configuration information can be released or not. For example, if it is not released, the phone can still send configuration information to the vehicle through the secure channel during the control process.
[0410] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will no longer describe the various possible combinations separately. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the idea of the present application, they should also be regarded as the contents disclosed in the present application. For another example, under the premise of no conflict, the various embodiments and / or the technical features in each embodiment described in the present application can be arbitrarily combined with the prior art, and the technical solution obtained after the combination should also fall within the scope of protection of the present application.
[0411] It should also be understood that in the various method embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply a precedence in the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, in the embodiments of the present application, the terms "downlink," "uplink," and "sidelink" are used to indicate the transmission direction of signals or data, where "downlink" is used to indicate the first direction of transmission of signals or data from a site to a user equipment in a cell, "uplink" is used to indicate the second direction of transmission of signals or data from a user equipment in a cell to a site, and "sidelink" is used to indicate the third direction of transmission of signals or data from user equipment 1 to user equipment 2. For example, "downlink signal" indicates that the transmission direction of the signal is the first direction. In addition, in the embodiments of the present application, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships can exist. Specifically, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0412] FIG17 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, which is applied to a first device. As shown in FIG17 , the communication device 1700 includes:
[0413] A determining unit 1701 is configured to determine a first key;
[0414] An establishing unit 1702 is configured to establish a first channel between the first device and the second device based on the first key;
[0415] The communication unit 1703 is configured to send configuration information to the second device based on the first channel.
[0416] In some embodiments, the communication unit 1703 is also used to: send first information to the second device; the first information is used to indicate: at least one authentication type information supported by the first device; receive second information sent by the second device; the second information is used to indicate the first authentication type information, and the first authentication type information is included in the at least one authentication type information.
[0417] In some embodiments, the communication unit 1703 is further used to: send a first confirmation value to the second device; receive third information sent by the second device; and the third information is used to indicate that the verification of the first confirmation value is successful.
[0418] In some embodiments, the communication unit 1703 is further used to: receive a second confirmation value sent by the second device; if the second confirmation value is successfully verified, send fourth information to the second device; the fourth information is used to indicate that the second confirmation value is successfully verified.
[0419] In some embodiments, the determination unit 1701 is further used to obtain a first random value; the communication unit 1703 is further used to receive a second random value sent by the second device; the determination unit 1701 is further used to determine the first key based on the first random value and the second random value.
[0420] In some embodiments, the determination unit 1701 is further used to: determine a third key based on the first digital key and the second key of the second device; and determine the first key based on the third key, the first random value, and the second random value.
[0421] In some embodiments, the determining unit 1701 is further configured to: determine a first salt value based on the first random value and the second random value; and determine the first key based on the third key and the first salt value.
[0422] In some embodiments, the determining unit 1701 is further configured to: obtain a preset value; and determine the first key based on the preset value, the third key, the first random value, and the second random value.
[0423] In some embodiments, the first key is determined based on a first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the first digital key and the second key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0424] In some embodiments, the determining unit 1701 is further configured to: determine a first confirmation value based on the first random value and the second random value.
[0425] In some embodiments, the determining unit 1701 is further configured to: determine a first challenge code based on the first random value and the second random value; and determine the first confirmation value based on the first challenge code, the first random value, and the second random value.
[0426] In some embodiments, the determination unit 1701 is further configured to: merge the first challenge code, the first random value, and the second random value to obtain a second merged result; and perform a hash operation on the second merged result to obtain the first confirmation value.
[0427] In some embodiments, the determination unit 1701 is further used to: determine a third key based on the first digital key and the second key of the second device; and determine the first challenge code based on the third key, the first random value, and the second random value.
[0428] In some embodiments, the determining unit 1701 is further configured to: determine a first salt value based on the first random value and the second random value; and determine the first challenge code based on the third key and the first salt value.
[0429] In some embodiments, the determining unit 1701 is further configured to: obtain a preset value; and determine the first challenge code based on the preset value, the third key, the first random value, and the second random value.
[0430] In some embodiments, the first challenge code is determined based on the first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the first digital key and the second key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0431] In some embodiments, the first result is a result obtained by combining the first key and the first challenge code.
[0432] In some embodiments, the determination unit 1701 is further configured to: merge the first random value and the second random value to obtain a first merged result; and perform a hash operation on the first merged result to obtain the first salt value.
[0433] In some embodiments, the communication unit 1703 is further used to: send first verification information to the second device; the first verification information includes a first random value and a first signature.
[0434] In some embodiments, the communication unit 1703 is further used to: receive second verification information sent by the second device; the second verification information includes a second random value and a second signature; the determination unit 1701 is further used to: determine the first key when the first device successfully verifies the second signature based on the second random value and the second key of the second device.
[0435] In some embodiments, the determination unit 1701 is further configured to: determine the first key based on the first digital key and the second key of the second device.
[0436] In some embodiments, the determination unit 1701 is further used to: obtain a third confirmation value; encrypt the third confirmation value using the first key to obtain a first confirmation value; and the communication unit 1703 is further used to: send the first confirmation value to the second device.
[0437] In some embodiments, the communication unit 1703 is further used to: receive indication information sent by the second device, or send indication information to the second device; the indication information is used to indicate the determination of the first key based on a key agreement algorithm.
[0438] In some embodiments, the communication unit 1703 is further used to: receive a second confirmation value sent by the second device; and send fourth information to the second device if the second confirmation value is successfully verified based on the first key; the fourth information is used to indicate that the verification of the second confirmation value is successful.
[0439] In some embodiments, the determining unit 1701 is further configured to: obtain a first secret; and determine the first key based on the first secret.
[0440] In some embodiments, the determining unit 1701 is further configured to: obtain a first random value; and determine the first key based on the first secret and the first random value.
[0441] In some embodiments, the determining unit 1701 is further configured to: determine a second salt value based on the first random value; and determine the first key based on the second salt value and the first secret.
[0442] In some embodiments, the determining unit 1701 is further configured to: obtain a preset value; and determine the first key based on the preset value and the first secret.
[0443] In some embodiments, the first key is determined based on a second result; the second result is determined by a second key derivation algorithm, and parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on a first random value obtained by the first device; the length of the second result is less than or equal to the second length.
[0444] In some embodiments, the determining unit 1701 is further configured to: obtain a first random value; and determine a first confirmation value based on the first secret and the first random value.
[0445] In some embodiments, the determining unit 1701 is further configured to: determine a second challenge code based on the first secret; and determine the first confirmation value based on the second challenge code and the first random value.
[0446] In some embodiments, the determining unit 1701 is further configured to: combine the second challenge code and the first random value to obtain a third combined result; and perform a hash operation on the third combined result to obtain the first confirmation value.
[0447] In some embodiments, the determining unit 1701 is further configured to: determine a second salt value based on the first random value; and determine the second challenge code based on the second salt value and the first secret.
[0448] In some embodiments, the determining unit 1701 is further configured to: obtain a preset value; and determine the second challenge code based on the preset value and the first secret.
[0449] In some embodiments, the second challenge code is determined based on the second result; the second result is determined by a second key derivation algorithm, and the parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the first device; the length of the second result is less than or equal to the second length.
[0450] In some embodiments, the second result is a result obtained by combining the first key and the second challenge code.
[0451] In some embodiments, the determining unit 1701 is further configured to perform a hash operation on the first random value to obtain the second salt value.
[0452] In some embodiments, the determination unit 1701 is further used to: determine the second secret based on the second key of the second device and the first secret; the communication unit 1703 is further used to: send third verification information to the second device; the third verification information includes the first random value, first signature and second secret obtained by the first device.
[0453] In some embodiments, the determination unit 1701 is further used to: determine the first signature based on the first random value and the first digital key.
[0454] In some embodiments, the communication unit 1703 is further used to: discover broadcast Bluetooth information; the Bluetooth information carries at least one of the following: an identifier of the second device, and indication information indicating that the second device is configurable; the establishment unit 1702 is further used to: establish a Bluetooth connection with the second device based on the Bluetooth information.
[0455] FIG18 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application, which is applied to a second device. As shown in FIG18 , the communication device 1800 includes:
[0456] Determining unit 1801, configured to determine a first key;
[0457] An establishing unit 1802 is configured to establish a first channel between the first device and the second device based on the first key;
[0458] The communication unit 1803 is configured to receive configuration information sent by the first device based on the first channel.
[0459] In some embodiments, the communication unit 1803 is also used to: receive first information sent by the first device; the first information is used to indicate: at least one authentication type information supported by the first device; send second information to the first device; the second information is used to indicate the first authentication type information, and the first authentication type information is included in the at least one authentication type information.
[0460] In some embodiments, the communication unit 1803 is further used to: receive a first confirmation value sent by the first device; if the first confirmation value is successfully verified, send third information to the first device; the third information is used to indicate that the first confirmation value is successfully verified.
[0461] In some embodiments, the communication unit 1803 is further used to: send a second confirmation value to the first device; receive fourth information sent by the first device; and the fourth information is used to indicate that the verification of the second confirmation value is successful.
[0462] In some embodiments, the communication unit 1803 is further used to: receive a first random value sent by the first device; the determination unit 1801 is further used to: obtain a second random value; and determine the first key based on the first random value and the second random value.
[0463] In some embodiments, the determination unit 1801 is further used to: determine a third key based on the second digital key and the fourth key of the second device; and determine the first key based on the third key, the first random value, and the second random value.
[0464] In some embodiments, the determining unit 1801 is further configured to: determine a first salt value based on the first random value and the second random value; and determine the first key based on the third key and the first salt value.
[0465] In some embodiments, the determining unit 1801 is further configured to: obtain a preset value; and determine the first key based on the preset value, the third key, the first random value, and the second random value.
[0466] In some embodiments, the first key is determined based on a first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the second digital key and the fourth key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0467] In some embodiments, the determining unit 1801 is further configured to: determine a second confirmation value based on the first random value and the second random value.
[0468] In some embodiments, the determining unit 1801 is further configured to: determine a first challenge code based on the first random value and the second random value; and determine the second confirmation value based on the first challenge code, the first random value, and the second random value.
[0469] In some embodiments, the determination unit 1801 is further configured to: merge the first challenge code, the first random value, and the second random value to obtain a second merged result; and perform a hash operation on the second merged result to obtain the second confirmation value.
[0470] In some embodiments, the determination unit 1801 is further used to: determine a third key based on the second digital key and the fourth key of the second device; and determine the first challenge code based on the third key, the first random value, and the second random value.
[0471] In some embodiments, the determining unit 1801 is further configured to: determine a first salt value based on the first random value and the second random value; and determine the first challenge code based on the third key and the first salt value.
[0472] In some embodiments, the determining unit 1801 is further configured to: obtain a preset value; and determine the first challenge code based on the preset value, the third key, the first random value, and the second random value.
[0473] In some embodiments, the first challenge code is determined based on the first result; the first result is determined by a first key derivation algorithm, and the parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the second digital key and the fourth key of the second device; the first salt value is determined based on the first random value and the second random value; the length of the first result is less than or equal to the first length.
[0474] In some embodiments, the first result is a result obtained by combining the first key and the first challenge code.
[0475] In some embodiments, the determination unit 1801 is further configured to: merge the first random value and the second random value to obtain a first merged result; and perform a hash operation on the first merged result to obtain the first salt value.
[0476] In some embodiments, the communication unit 1803 is further used to: receive first verification information sent by the first device; the first verification information includes a first random value and a first signature; the determination unit 1801 is further used to: determine the first key when the second device successfully verifies the first signature based on the second digital key and the first random value.
[0477] In some embodiments, the communication unit 1803 is further used to: send second verification information to the first device; the second verification information includes a second random value and a second signature.
[0478] In some embodiments, the determination unit 1801 is further configured to: determine the first key based on a second digital key and a fourth key of the second device.
[0479] In some embodiments, the determination unit 1801 is further used to: obtain a third confirmation value; encrypt the third confirmation value using the first key to obtain a second confirmation value; and the communication unit 1803 is further used to: send the second confirmation value to the first device.
[0480] In some embodiments, the communication unit 1803 is further used to: send indication information to the first device, or receive indication information sent by the first device; the indication information is used to instruct to determine the first key based on a key agreement algorithm.
[0481] In some embodiments, the communication unit 1803 is further used to: receive a first confirmation value sent by the first device; if the first confirmation value is successfully verified based on the first key, the second device sends third information to the first device; the third information is used to indicate that the verification of the first confirmation value is successful.
[0482] In some embodiments, the communication unit 1803 is further configured to: receive a second secret sent by the first device; and the determination unit 1801 is further configured to: determine the first key based on the second secret.
[0483] In some embodiments, the determining unit 1801 is further configured to: determine the first secret based on the second secret and a fourth key of the second device; and determine the first key based on the first secret.
[0484] In some embodiments, the communication unit 1803 is further used to: receive a first random value sent by the first device; and the determination unit 1801 is further used to: determine the first key based on the first secret and the first random value.
[0485] In some embodiments, the determining unit 1801 is further configured to: determine a second salt value based on the first random value; and determine the first key based on the second salt value and the first secret.
[0486] In some embodiments, the determining unit 1801 is further configured to: obtain a preset value; and determine the first key based on the preset value and the first secret.
[0487] In some embodiments, the first key is determined based on the second result; the second result is determined by a second key derivation algorithm, and the parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the second device; the length of the second result is less than or equal to the second length.
[0488] In some embodiments, the communication unit 1803 is further used to: receive a first random value sent by the first device; and the determination unit 1801 is further used to: determine a second confirmation value based on the first secret and the first random value.
[0489] In some embodiments, the determining unit 1801 is further configured to: determine a second challenge code based on the first secret; and determine the second confirmation value based on the second challenge code and the first random value.
[0490] In some embodiments, the determining unit 1801 is further configured to: combine the second challenge code and the first random value to obtain a third combined result; and perform a hash operation on the third combined result to obtain the second confirmation value.
[0491] In some embodiments, the determining unit 1801 is further configured to: determine a second salt value based on the first random value; and determine the second challenge code based on the second salt value and the first secret.
[0492] In some embodiments, the determining unit 1801 is further configured to: obtain a preset value; and determine the second challenge code based on the preset value and the first secret.
[0493] In some embodiments, the second challenge code is determined based on the second result; the second result is determined by a second key derivation algorithm, and the parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the second device; the length of the second result is less than or equal to the second length.
[0494] In some embodiments, the second result is a result obtained by combining the first key and the second challenge code.
[0495] In some embodiments, the determining unit 1801 is further configured to: perform a hash operation on the first random value to obtain the second salt value.
[0496] In some embodiments, the communication unit 1803 is further used to: receive third verification information sent by the first device; the third verification information includes the first random value, the first signature and the second secret obtained by the first device; the determination unit 1801 is further used to: determine the first key based on the second secret when the second device successfully verifies the first signature based on the second digital key and the first random value.
[0497] In some embodiments, the communication unit 1803 is further used to: broadcast Bluetooth information; the Bluetooth information carries at least one of the following: an identifier of the second device, and indication information indicating that the second device is configurable.
[0498] Those skilled in the art should understand that the relevant description of the above-mentioned communication device in the embodiment of the present application can be understood with reference to the relevant description of the communication method in the embodiment of the present application.
[0499] Figure 19 is a schematic structural diagram of a communication device provided in an embodiment of the present application. The communication device 1900 can be a first device or a second device. The communication device 1900 shown in Figure 19 may include a processor 1910 and a memory 1920. The memory 1920 stores a computer program that can be executed on the processor 1910. When the processor 1910 executes the program, it implements the communication method in any of the above embodiments.
[0500] Optionally, the memory 1920 may be a separate device independent of the processor 1910 , or may be integrated into the processor 1910 .
[0501] In some embodiments, as shown in FIG19 , the communication device 1900 may further include a transceiver 1930 , and the processor 1910 may control the transceiver 1930 to communicate with other devices. Specifically, the transceiver 1930 may send information or data to other devices, or receive information or data sent by other devices.
[0502] The transceiver 1930 may include a transmitter and a receiver. The transceiver 1930 may further include an antenna, and the number of antennas may be one or more.
[0503] In some embodiments, the communication device 1900 may specifically be the first device of the embodiment of the present application, and the communication device 1900 may implement the corresponding processes implemented by the first device in each method of the embodiment of the present application. For the sake of brevity, they will not be repeated here.
[0504] In some embodiments, the communication device 1900 may specifically be the second device of the embodiment of the present application, and the communication device 1900 may implement the corresponding processes implemented by the second device in each method of the embodiment of the present application. For the sake of brevity, they will not be repeated here.
[0505] An embodiment of the present application further provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the communication method in any embodiment of the present application.
[0506] In some embodiments, the computer-readable storage medium can be applied to the first device or the second device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the first device or the second device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0507] Figure 20 is a schematic structural diagram of the chip of an embodiment of the present application. The chip 2000 shown in Figure 20 includes a processor 2010, which is used to call and run a computer program from a memory so that a device equipped with the chip executes the communication method in any embodiment of the present application.
[0508] In some embodiments, as shown in FIG20 , the chip 2000 may further include a memory 2020. The processor 2010 may call and execute a computer program from the memory 2020 to implement the method in the embodiment of the present application.
[0509] The memory 2020 may be a separate device independent of the processor 2010 , or may be integrated into the processor 2010 .
[0510] In some embodiments, the chip 2000 may further include an input interface 2030. The processor 2010 may control the input interface 2030 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.
[0511] In some embodiments, the chip 2000 may further include an output interface 2040. The processor 2010 may control the output interface 2040 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.
[0512] In some embodiments, the chip can be applied to the first device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the first device in each method of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0513] In some embodiments, the chip can be applied to the second device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the second device in each method of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0514] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0515] An embodiment of the present application also provides a computer program product, which includes a computer storage medium, the computer storage medium storing a computer program, and the computer program including instructions that can be executed by at least one processor. When the instructions are executed by the at least one processor, the communication method in any embodiment of the present application is implemented.
[0516] In some embodiments, the computer program product can be applied to the first device or the second device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the first device or the second device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0517] Optionally, the computer program product in the embodiments of the present application may also be referred to as a software product in other embodiments.
[0518] An embodiment of the present application further provides a computer program, which enables a computer to execute the communication method in any embodiment of the present application.
[0519] In some embodiments, the computer program can be applied to the first device or the second device in the embodiments of the present application. When the computer program runs on the computer, the computer executes the corresponding processes implemented by the first device or the second device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0520] The processor, communication device or chip of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above-mentioned method embodiment can be completed by the integrated logic circuit of the hardware in the processor or the instruction in the form of software. The above-mentioned processor, communication device or chip may include any one or more of the following integrations: general-purpose processor, application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), central processing unit (CPU), graphics processing unit (GPU), embedded neural network processor (neural-network processing units, NPU), controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, discrete hardware component. Each method, step and logic block diagram disclosed in the embodiment of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0521] It is understood that the memory, storage space or computer storage medium in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0522] It should be understood that the above-mentioned memory, storage space, or computer storage medium is illustrative but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM RAM (DR RAM), etc. In other words, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0523] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0524] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0525] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0526] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0527] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0528] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a first device or a second device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0529] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A communication method, comprising: The first device determines the first key; The first device establishes a first channel between the first device and the second device based on the first key; The first device sends configuration information to the second device based on the first channel.
2. The method according to claim 1, wherein The method further comprises: The first device sends first information to the second device; the first information is used to indicate: at least one authentication type information supported by the first device; The first device receives second information sent by the second device; the second information is used to indicate first authentication type information, and the first authentication type information is included in the at least one authentication type information.
3. The method according to claim 1 or 2, wherein: The method further comprises: The first device sends a first confirmation value to the second device; The first device receives third information sent by the second device; the third information is used to indicate that the verification of the first confirmation value is successful.
4. The method according to any one of claims 1 to 2, wherein: The method further comprises: The first device receives a second confirmation value sent by the second device; In a case where the second confirmation value is successfully verified, the first device sends fourth information to the second device; the fourth information is used to indicate that the second confirmation value is successfully verified.
5. The method according to any one of claims 1 to 4, wherein: The method further comprises: The first device obtains a first random value; The first device receives a second random value sent by the second device; The first device determines a first key, including: the first device determines the first key based on the first random value and the second random value.
6. The method according to claim 5, wherein: The first device determines the first key based on the first random value and the second random value, including: The first device determines a third key based on the first digital key and the second key of the second device; The first device determines the first key based on the third key, the first random value, and the second random value.
7. The method according to claim 6, wherein: The first device determines the first key based on the third key, the first random value, and the second random value, including: The first device determines a first salt value based on the first random value and the second random value; The first device determines the first key based on the third key and the first salt value.
8. The method according to claim 6 or 7, wherein: The first device determines the first key based on the third key, the first random value, and the second random value, including: The first device obtains a preset value; The first device determines the first key based on the preset value, the third key, the first random value, and the second random value.
9. The method according to any one of claims 5 to 8, wherein: The first key is determined based on the first result; the first result is determined by a first key derivation algorithm, and parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the first digital key and the second key of the second device; The first salt value is determined based on the first random value and the second random value; The length of the first result is less than or equal to the first length.
10. The method according to any one of claims 5 to 9, wherein: The method further comprises: The first device determines a first confirmation value based on the first random value and the second random value.
11. The method according to claim 10, wherein: The first device determines a first confirmation value based on the first random value and the second random value, including: The first device determines a first challenge code based on the first random value and the second random value; The first device determines the first confirmation value based on the first challenge code, the first random value, and the second random value.
12. The method according to claim 11, wherein The first device determines the first confirmation value based on the first challenge code, the first random value, and the second random value, including: The first device combines the first challenge code, the first random value, and the second random value to obtain a second combined result; The first device performs a hash operation on the second combined result to obtain the first confirmation value.
13. The method according to claim 11 or 12, wherein: The first device determines a first challenge code based on the first random value and the second random value, including: The first device determines a third key based on the first digital key and the second key of the second device; The first device determines the first challenge code based on the third key, the first random value, and the second random value.
14. The method according to claim 13, wherein The first device determines the first challenge code based on the third key, the first random value, and the second random value, including: The first device determines a first salt value based on the first random value and the second random value; The first device determines the first challenge code based on the third key and the first salt value.
15. The method according to claim 13 or 14, wherein: The first device determines the first challenge code based on the third key, the first random value, and the second random value, including: The first device obtains a preset value; The first device determines the first challenge code based on the preset value, the third key, the first random value, and the second random value.
16. The method according to any one of claims 11 to 15, wherein: The first challenge code is determined based on the first result; the first result is determined by a first key derivation algorithm, and parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the first digital key and the second key of the second device; The first salt value is determined based on the first random value and the second random value; The length of the first result is less than or equal to the first length.
17. The method according to claim 16, wherein The first result is a result obtained by combining the first key and the first challenge code.
18. The method according to claim 7 or 14, wherein The first device determines a first salt value based on the first random value and the second random value, including: The first device combines the first random value and the second random value to obtain a first combined result; The first device performs a hash operation on the first combined result to obtain the first salt value.
19. The method according to any one of claims 5 to 18, wherein: The method further comprises: The first device sends first verification information to the second device; the first verification information includes a first random value and a first signature.
20. The method according to any one of claims 5 to 19, wherein: The method further comprises: The first device receives second verification information sent by the second device, where the second verification information includes a second random value and a second signature; The first device determines the first key, including: determining the first key when the first device successfully verifies the second signature based on the second random value and the second key of the second device.
21. The method according to any one of claims 1 to 4, wherein: The method further comprises: The first device determines the first key based on a first digital key and a second key of the second device.
22. The method according to claim 21, wherein The method further comprises: The first device obtains a third confirmation value; The first device encrypts the third confirmation value using the first key to obtain a first confirmation value; The first device sends the first confirmation value to the second device.
23. The method according to claim 21 or 22, wherein The method further comprises: The first device receives the indication information sent by the second device, or the first device sends the indication information to the second device; The indication information is used to instruct to determine the first key based on a key agreement algorithm.
24. The method according to any one of claims 21 to 23, wherein: The method further comprises: The first device receives a second confirmation value sent by the second device; In a case where the first device successfully verifies the second confirmation value based on the first key, the first device sends fourth information to the second device; the fourth information is used to indicate that the verification of the second confirmation value is successful.
25. The method according to any one of claims 1 to 4, wherein: The method further comprises: The first device obtains a first secret; The first device determines the first key based on the first secret.
26. The method according to claim 25, wherein The first device determines the first key based on the first secret, including: The first device obtains a first random value; The first device determines the first key based on the first secret and the first random value.
27. The method according to claim 26, wherein The first device determines the first key based on the first secret and the first random value, including: The first device determines a second salt value based on the first random value; The first device determines the first key based on the second salt value and the first secret.
28. The method according to any one of claims 25 to 27, wherein The first device determines the first key based on the first secret, including: The first device obtains a preset value; The first device determines the first key based on the preset value and the first secret.
29. The method according to any one of claims 25 to 28, wherein The first key is determined based on the second result; the second result is determined by a second key derivation algorithm, and parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the first device; The length of the second result is less than or equal to the second length.
30. The method according to any one of claims 25 to 29, wherein The method further comprises: The first device obtains a first random value; The first device determines a first confirmation value based on the first secret and the first random value.
31. The method according to claim 30, wherein The first device determines a first confirmation value based on the first secret and the first random value, and the determining of the first confirmation value includes: The first device determines a second challenge code based on the first secret; The first device determines the first confirmation value based on the second challenge code and the first random value.
32. The method according to claim 31, wherein The first device determines the first confirmation value based on the second challenge code and the first random value, including: The first device combines the second challenge code and the first random value to obtain a third combination result; The first device performs a hash operation on the third combined result to obtain the first confirmation value.
33. The method according to claim 31 or 32, wherein The first device determines a second challenge code based on the first secret, including: The first device determines a second salt value based on the first random value; The first device determines the second challenge code based on the second salt value and the first secret.
34. The method according to any one of claims 31 to 33, wherein: The first device determines a second challenge code based on the first secret, including: The first device obtains a preset value; The first device determines the second challenge code based on the preset value and the first secret.
35. The method according to any one of claims 31 to 34, wherein: The second challenge code is determined based on the second result; the second result is determined by a second key derivation algorithm, and parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the first device; The length of the second result is less than or equal to the second length.
36. The method according to claim 35, wherein The second result is a result obtained by combining the first key and the second challenge code.
37. The method according to claim 27 or 33, wherein The first device determines a second salt value based on the first random value, including: The first device performs a hash operation on the first random value to obtain the second salt value.
38. The method according to any one of claims 25 to 37, wherein The method further comprises: The first device determines a second secret based on a second key of the second device and the first secret; The first device sends third verification information to the second device; the third verification information includes the first random value obtained by the first device, the first signature, and the second secret.
39. The method according to claim 19 or 38, wherein The method further comprises: The first device determines the first signature based on the first random value and a first digital key.
40. The method according to any one of claims 1 to 39, wherein The method further comprises: The first device discovers broadcast Bluetooth information; the Bluetooth information carries at least one of the following: an identifier of the second device, and indication information indicating that the second device is configurable; The second device establishes a Bluetooth connection with the second device based on the Bluetooth information.
41. A communication method, the method comprising: The second device determines the first key; The second device establishes a first channel between the first device and the second device based on the first key; The second device receives the configuration information sent by the first device based on the first channel.
42. The method according to claim 41, wherein The method further comprises: The second device receives first information sent by the first device, wherein the first information is used to indicate at least one authentication type information supported by the first device; The second device sends second information to the first device; the second information is used to indicate first authentication type information, and the first authentication type information is included in the at least one authentication type information.
43. The method according to claim 41 or 42, wherein The method further comprises: The second device receives a first confirmation value sent by the first device; In a case where the verification of the first confirmation value is successful, the second device sends third information to the first device; the third information is used to indicate that the verification of the first confirmation value is successful.
44. The method according to claim 41 or 42, wherein The method further comprises: The second device sends a second confirmation value to the first device; The second device receives fourth information sent by the first device; the fourth information is used to indicate that verification of the second confirmation value is successful.
45. The method according to any one of claims 41 to 44, wherein The method further comprises: The second device receives the first random value sent by the first device; The second device obtains a second random value; The second device determines the first key, including: the second device determines the first key based on the first random value and the second random value.
46. The method of claim 45, wherein The second device determines the first key based on the first random value and the second random value, including: The second device determines a third key based on the second digital key and a fourth key of the second device; The second device determines the first key based on the third key, the first random value, and the second random value.
47. The method of claim 46, wherein The second device determines the first key based on the third key, the first random value, and the second random value, including: The second device determines a first salt value based on the first random value and the second random value; The second device determines the first key based on the third key and the first salt value.
48. The method according to claim 46 or 47, wherein The second device determines the first key based on the third key, the first random value, and the second random value, including: The second device obtains a preset value; The second device determines the first key based on the preset value, the third key, the first random value, and the second random value.
49. The method according to any one of claims 45 to 48, wherein The first key is determined based on the first result; the first result is determined by a first key derivation algorithm, and parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the second digital key and the fourth key of the second device; The first salt value is determined based on the first random value and the second random value; The length of the first result is less than or equal to the first length.
50. The method according to any one of claims 45 to 49, wherein The method further comprises: The second device determines a second confirmation value based on the first random value and the second random value.
51. The method of claim 50, wherein: The second device determines a second confirmation value based on the first random value and the second random value, including: The second device determines a first challenge code based on the first random value and the second random value; The second device determines the second confirmation value based on the first challenge code, the first random value, and the second random value.
52. The method of claim 51, wherein The second device determines the second confirmation value based on the first challenge code, the first random value, and the second random value, including: The second device combines the first challenge code, the first random value, and the second random value to obtain a second combined result; The second device performs a hash operation on the second combined result to obtain the second confirmation value.
53. The method according to claim 51 or 52, wherein The second device determines a first challenge code based on the first random value and the second random value, including: The second device determines a third key based on the second digital key and a fourth key of the second device; The second device determines the first challenge code based on the third key, the first random value, and the second random value.
54. The method of claim 53, wherein: The second device determines the first challenge code based on the third key, the first random value, and the second random value, including: The second device determines a first salt value based on the first random value and the second random value; The second device determines the first challenge code based on the third key and the first salt value.
55. The method according to claim 53 or 54, wherein The second device determines the first challenge code based on the third key, the first random value, and the second random value, including: The second device obtains a preset value; The second device determines the first challenge code based on the preset value, the third key, the first random value, and the second random value.
56. The method according to any one of claims 51 to 55, wherein The first challenge code is determined based on the first result; the first result is determined by a first key derivation algorithm, and parameters in the first key derivation algorithm include at least one of the following: a third key, a first salt value, a preset value, and a first length; wherein the third key is determined based on the second digital key and the fourth key of the second device; The first salt value is determined based on the first random value and the second random value; The length of the first result is less than or equal to the first length.
57. The method of claim 56, wherein The first result is a result obtained by combining the first key and the first challenge code.
58. The method of claim 47 or 54, wherein The second device determines a first salt value based on the first random value and the second random value, including: The second device combines the first random value and the second random value to obtain a first combined result; The second device performs a hash operation on the first combined result to obtain the first salt value.
59. The method according to any one of claims 45 to 58, wherein The method further comprises: The second device receives first verification information sent by the first device; the first verification information includes a first random value and a first signature; The second device determines the first key, including: when the second device successfully verifies the first signature based on the second digital key and the first random value, the second device determines the first key.
60. The method according to any one of claims 45 to 59, wherein The method further comprises: The second device sends second verification information to the first device; the second verification information includes a second random value and a second signature.
61. The method according to any one of claims 41 to 44, wherein The method further comprises: The second device determines the first key based on a second digital key and a fourth key of the second device.
62. The method of claim 61, wherein The method further comprises: The second device obtains a third confirmation value; The second device encrypts the third confirmation value using the first key to obtain a second confirmation value; The second device sends the second confirmation value to the first device.
63. The method according to claim 61 or 62, wherein The method further comprises: The second device sends indication information to the first device, or the second device receives indication information sent by the first device; The indication information is used to instruct to determine the first key based on a key agreement algorithm.
64. The method according to any one of claims 61 to 63, wherein The method further comprises: The second device receives a first confirmation value sent by the first device; In a case where the second device successfully verifies the first confirmation value based on the first key, the second device sends third information to the first device; the third information is used to indicate that the verification of the first confirmation value is successful.
65. The method according to any one of claims 41 to 44, wherein The method further comprises: The second device receives the second secret sent by the first device; The second device determines the first key based on a second secret.
66. The method of claim 65, wherein The second device determines the first key based on the second secret, including: the second device determining the first secret based on the second secret and a fourth key of the second device; The second device determines the first key based on the first secret.
67. The method of claim 66, wherein The second device determines the first key based on the first secret, including: The second device receives the first random value sent by the first device; The second device determines the first key based on the first secret and the first random value.
68. The method of claim 67, wherein The second device determines the first key based on the first secret and the first random value, including: The second device determines a second salt value based on the first random value; The second device determines the first key based on the second salt value and the first secret.
69. The method according to any one of claims 66 to 68, wherein The second device determines the first key based on the first secret, including: The second device obtains a preset value; The second device determines the first key based on the preset value and the first secret.
70. The method according to any one of claims 66 to 69, wherein The first key is determined based on the second result; the second result is determined by a second key derivation algorithm, and parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the second device; The length of the second result is less than or equal to the second length.
71. The method according to any one of claims 66 to 70, wherein The method further comprises: The second device receives the first random value sent by the first device; The second device determines a second confirmation value based on the first secret and the first random value.
72. The method of claim 71, wherein The second device determines a second confirmation value based on the first secret and the first random value, including: The second device determines a second challenge code based on the first secret; The second device determines the second confirmation value based on the second challenge code and the first random value.
73. The method of claim 72, wherein: The second device determines the second confirmation value based on the second challenge code and the first random value, including: The second device combines the second challenge code and the first random value to obtain a third combination result; The second device performs a hash operation on the third combined result to obtain the second confirmation value.
74. The method of claim 72 or 73, wherein The second device determines a second challenge code based on the first secret, including: The second device determines a second salt value based on the first random value; The second device determines the second challenge code based on the second salt value and the first secret.
75. The method according to any one of claims 72 to 74, wherein The second device determines a second challenge code based on the first secret, including: The second device obtains a preset value; The second device determines the second challenge code based on the preset value and the first secret.
76. The method according to any one of claims 72 to 75, wherein The second challenge code is determined based on the second result; the second result is determined by a second key derivation algorithm, and parameters in the second key derivation algorithm include at least one of the following: a first secret, a second salt value, a preset value, and a second length; wherein the second salt value is determined based on the first random value obtained by the second device; The length of the second result is less than or equal to the second length.
77. The method of claim 76, wherein The second result is a result obtained by combining the first key and the second challenge code.
78. The method of claim 68 or 74, wherein The second device determines a second salt value based on the first random value, including: The second device performs a hash operation on the first random value to obtain the second salt value.
79. The method according to any one of claims 65 to 78, wherein The method further comprises: The second device receives third verification information sent by the first device; the third verification information includes the first random value, the first signature, and the second secret obtained by the first device; The second device determines the first key based on the second secret, including: when the second device successfully verifies the first signature based on the second digital key and the first random value, the second device determines the first key based on the second secret.
80. The method according to any one of claims 41 to 79, wherein The method further comprises: The second device broadcasts Bluetooth information; the Bluetooth information carries at least one of the following: an identifier of the second device, and indication information indicating that the second device is configurable.
81. A communication device, comprising: a determining unit, configured to determine a first key; an establishing unit, configured to establish a first channel between the first device and the second device based on the first key; A communication unit is configured to send configuration information to the second device based on the first channel.
82. A communication device, comprising: a determining unit, configured to determine a first key; an establishing unit, configured to establish a first channel between the first device and the second device based on the first key; A communication unit is configured to receive, based on the first channel, configuration information sent by the first device.
83. A first device comprising: processor and memory, The memory stores a computer program executable on the processor. When the processor executes the program, the method according to any one of claims 1 to 40 is implemented.
84. A second device comprising: processor and memory, The memory stores a computer program executable on the processor. When the processor executes the program, the method according to any one of claims 41 to 80 is implemented.
85. A computer storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the method of any one of claims 1 to 40 or any one of claims 41 to 80.
86. A chip comprising: A processor, configured to call and run a computer program from a memory to perform the method according to any one of claims 1 to 40 or any one of claims 41 to 80.
87. A computer program product, comprising a computer storage medium storing a computer program, wherein the computer program comprises instructions executable by at least one processor, and wherein the instructions, when executed by the at least one processor, implement the method of any one of claims 1 to 40 or any one of claims 41 to 80.
88. A computer program, the computer program causing a computer to execute the method according to any one of claims 1 to 40 or any one of claims 41 to 80.