Network distribution method, device, terminal and computer readable storage medium
Through the encryption transmission and decryption of the secret key between the distributed network equipment and the target equipment, the problem of distribution network information leakage is solved, the secure transmission of distribution network information is realized, and the security in the distribution network process is improved.
Patent Information
- Application Number
- CN202011580129.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-12-28
AI Technical Summary
In the prior art, there is a risk of distributing network information leakage when distributing equipment, and it needs to be improved to improve security.
The distributed network equipment and the target device randomly generate the secret key, and after the secret key is transmitted through encryption, both parties decrypt and obtain the secret key, and then the distributed network information is encrypted by the distributed network equipment to send the target device, and the target device decrypts the distribution network information to obtain the distribution network information. Distribution network.
Transmission of distribution network information through secondary encryption effectively avoids distribution network information leakage and improves security in distribution network process.
Smart Images

Figure CN114697000B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a network distribution method, device, terminal and computer-readable storage medium. Background Art
[0002] Before smart devices can use networking functions, they need to be configured with the network. In the existing technology, users are required to download the corresponding control application of the device and manually search for the device to be configured. The control application then directly sends the configuration information to the device to be configured for configuration. In this process, there is a risk of leakage of configuration information.
[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The embodiments of the present invention provide a network configuration method, an apparatus, a terminal and a computer-readable storage medium, which are intended to solve the problem of risk of network configuration information leakage when configuring network for devices in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides a network configuration method, which is applied to a network-configured device, including:
[0006] Randomly generate a first secret key, encrypt the first secret key to generate a first ciphertext, and send the first ciphertext to a target device so that the target device decrypts the first ciphertext to obtain the first secret key;
[0007] Receiving a second ciphertext sent by the target device, and decrypting the second ciphertext to obtain a second secret key;
[0008] The network configuration information is encrypted according to the first key and the second key to generate a third ciphertext, and the third ciphertext is sent to the target device, so that the target device decrypts the third ciphertext according to the first key and the second key to obtain the network configuration information.
[0009] In a second aspect, an embodiment of the present invention provides a network configuration method, which is applied to a target device, including:
[0010] Randomly generate a second secret key, encrypt the second secret key to generate a second ciphertext, and send the second ciphertext to the configured network device so that the configured network device decrypts the second ciphertext to obtain the second secret key;
[0011] Obtain a first ciphertext sent by the configured network device, and decrypt the first ciphertext to obtain a first secret key;
[0012] Receive the third ciphertext sent by the network-configured device, decrypt the third ciphertext according to the first secret key and the second secret key to obtain network configuration information, and perform network configuration according to the network configuration information.
[0013] In a third aspect, an embodiment of the present invention provides a network distribution device, which is applied to a network-distributed device, and the device includes:
[0014] A key generation module, used to randomly generate a first key, encrypt the first key to generate a first ciphertext, and send the first ciphertext to a target device so that the target device decrypts the first ciphertext to obtain the first key;
[0015] A secret key acquisition module, used for receiving a second ciphertext sent by a target device, and decrypting the second ciphertext to obtain a second secret key;
[0016] The encryption module is used to encrypt the network configuration information according to the first key and the second key, generate a third ciphertext, and send the third ciphertext to the target device, so that the target device decrypts the third ciphertext according to the first key and the second key to obtain the network configuration information.
[0017] In a fourth aspect, an embodiment of the present invention provides a network distribution device, which is applied to a target device, and the device includes:
[0018] A key generation module is used to randomly generate a second key, encrypt the second key to generate a second ciphertext, and send the second ciphertext to the configured network device so that the configured network device decrypts the second ciphertext to obtain the second key;
[0019] A key acquisition module, used to acquire a first ciphertext sent by a configured network device, and decrypt the first ciphertext to obtain a first key;
[0020] The decryption module is used to receive the third ciphertext sent by the network-configured device, decrypt the third ciphertext according to the first secret key and the second secret key to obtain the network configuration information, and perform network configuration according to the network configuration information.
[0021] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory, a processor, and a network configuration program stored in the memory and executable on the processor, wherein when the processor executes the network configuration program, the method provided in the first aspect and / or the steps of the method provided in the second aspect are implemented.
[0022] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a network configuration program. When the network configuration program is executed by a processor, the steps of the method provided in the first aspect and / or the method provided in the second aspect are implemented.
[0023] Beneficial effect: Compared with the prior art, the present invention provides a network configuration method, device, terminal and computer-readable storage medium, in which a network configuration device and a network configuration device respectively randomly generate secret keys and encrypt them and send them to each other, and the two parties decrypt and obtain the secret keys randomly generated by both parties. The network configuration device then encrypts the network configuration information with the secret keys randomly generated by both parties and sends it to the network configuration device, and the network configuration device obtains the network configuration information after decryption for network configuration, thereby improving the security of the network configuration information during transmission and preventing the leakage of the network configuration information. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flow chart of an embodiment of a network configuration method provided by the present invention and applied to a network-configured device;
[0025] Figure 2 A schematic diagram of the interaction between a configured device and a target device in an embodiment of the network configuration method provided by the present invention;
[0026] Figure 3 A flow chart of an embodiment of a network configuration method applied to a target device provided by the present invention;
[0027] Figure 4 A schematic diagram of an embodiment of a terminal provided by the present invention;
[0028] Figure 5 A schematic diagram of the functional modules of a distribution network device provided by the present invention;
[0029] Figure 6 A schematic diagram of functional modules of another network distribution device provided by the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0031] Embodiment 1
[0032] The network configuration method provided by the present invention is applied to the network-configured device and the target device. The target device obtains the network configuration information and configures the network by interacting with the network-configured device. Please refer to Figure 1 and Figure 3 , Figure 1 and Figure 3 The flowcharts of the network configuration method provided by the present invention on the configured device side and the target device side respectively, the method includes:
[0033] S110: The network-provisioned device randomly generates a first key, encrypts the first key to generate a first ciphertext, and sends the first ciphertext to a target device, so that the target device decrypts the first ciphertext to obtain the first key.
[0034] S210: The target device randomly generates a second secret key, encrypts the second secret key to generate a second ciphertext, and sends the second ciphertext to the configured device, so that the configured device decrypts the second ciphertext to obtain the second secret key.
[0035] Specifically, in the application scenario of the present invention, at least one device that has been networked (networked device) is included. The networked device can be a user's smart terminal, such as a mobile phone, a tablet computer, etc., or it can be other Internet of Things devices, such as a smart refrigerator, a sweeping robot, etc. When the target device needs to be networked, information can be sent to the networked device. Specifically, the target device can continuously broadcast beacon frames including its own information within a preset time to request network configuration, such as a probe request frame, after powering on or starting the network configuration function. After receiving the beacon frame broadcast by the target device, the networked device determines that the target device is to be networked.
[0036] After the configured device receives the information of the network configuration request sent by the target device, it randomly generates a first key and encrypts it to obtain the first ciphertext. After the target device sends the information of the network configuration request, it randomly generates a second key and encrypts it to obtain the second ciphertext. Specifically, the configured device and the target device can encrypt the first key and the second key respectively by AES encryption or other encryption methods to obtain the first ciphertext and the second ciphertext. After generating the first ciphertext, the configured device sends the first ciphertext to the target device, which specifically includes:
[0037] The configured network device broadcasts a beacon frame carrying the first ciphertext, so that the target device obtains the first ciphertext after receiving the beacon frame.
[0038] The target device sends the second ciphertext to the configured network device, which can also be achieved by broadcasting a beacon frame carrying corresponding data.
[0039] S120: The network-provisioned device receives the second ciphertext and decrypts the second ciphertext to obtain a second secret key.
[0040] S220: The target device receives the first ciphertext, and decrypts the first ciphertext to obtain a first secret key.
[0041] like Figure 2 As shown, the target device and the configured device generate a first ciphertext and a second ciphertext respectively and send them to each other. After receiving the second ciphertext, the configured device decrypts the second ciphertext to obtain the second key and stores it. After receiving the first ciphertext, the target device decrypts the first ciphertext to obtain the first key and stores it.
[0042] S130: The network-configured device encrypts the network configuration information according to the first key and the second key to generate a third ciphertext, and sends the third ciphertext to the target device, so that the target device decrypts the third ciphertext according to the first key and the second key to obtain the network configuration information.
[0043] S230: The target device receives the third ciphertext sent by the network-configured device, decrypts the third ciphertext according to the first key and the second key to obtain network configuration information, and performs network configuration according to the network configuration information.
[0044] After the above steps S110, S210, S120 and S220, both the network-configured device and the target device store the first secret key and the second secret key, and the network-configured device has been network-configured, that is, the network-configured device stores network configuration information: the SSID and password of the router, and the network-configured device uses the first secret key and the second secret key as secret keys to encrypt the network configuration information and then generates a third ciphertext and sends it to the target device. After the target device receives the third ciphertext, it can obtain the network configuration information by decrypting the third ciphertext according to the first secret key and the second secret key, and performs network configuration according to the network configuration information. It is not difficult to see from the above process that in the process of transmitting the network configuration information, the first secret key and the second secret key randomly generated by the network-configured device and the target device are used for encryption, and the encryption is also performed when the secret key is transmitted between the network-configured device and the target device. Through the secondary encryption method, the leakage of network configuration information can be effectively avoided.
[0045] In order to prevent devices not permitted by the user from using the network configuration information for network configuration, before the configured device encrypts the network configuration information according to the first key and the second key, the network configuration method provided in this embodiment further includes the following steps:
[0046] The configured device obtains the MAC address of the target device;
[0047] When the MAC address of the target device is in the whitelist, the network-configured device triggers an operation of encrypting the network configuration information according to the first key and the second key.
[0048] Specifically, the target device can send its own MAC address while sending the second ciphertext so that the network-configured device can obtain the MAC address of the target device. When each device to be configured requests network configuration, that is, as described above, when a beacon frame including a request for network configuration is sent, its own MAC address and identification information are carried in the beacon frame requesting network configuration. After the network-configured device obtains the beacon frame requesting network configuration, it obtains the MAC address and identification information of the device broadcasting the beacon frame, and determines whether the device is a device allowed to be configured by the user based on the identification information. If so, the MAC address of the device is added to the whitelist, and if not, the MAC address of the device is added to the blacklist. Specifically, before the network-configured device generates the first secret key, the network configuration method provided in this embodiment also includes the steps of:
[0049] The target device sends the identification information of the configured device to the configured device;
[0050] The network-connected device receives the identification information of the target device and sends the identification information to the preset terminal for display;
[0051] When the configured device receives the confirmation information sent by the preset terminal, the MAC address of the target device is added to the whitelist.
[0052] The identification information of the target device may be the name, product serial number, picture and other information of the target device. The preset terminal may be a device such as a mobile phone or a tablet computer of the user, or other terminals with a display screen. After sending the information requesting network configuration, the target device sends its own identification information to the network-configured device. The network-configured device sends the identification information of the target device to the preset terminal for display. The user determines whether to allow the target device to configure the network through the identification information of the target device displayed on the preset terminal. If it is determined that the target device is allowed to configure the network, a confirmation operation may be performed. After receiving the user's confirmation operation, the preset terminal sends a confirmation message to the network-configured device. The network-configured device adds the MAC address of the target device to the whitelist. When the MAC address of the target device is in the whitelist, it is determined that the second ciphertext sent by the target device is received and decrypted to obtain the second secret key, and then the network configuration information may be encrypted and sent to the target device.
[0053] like Figure 2 As shown, after the target device receives the third ciphertext and decrypts it to obtain the network configuration information, it can return confirmation information to the network configuration device to confirm that the network configuration information has been obtained. Further, after obtaining the network configuration information, the target device performs network configuration according to the network configuration information, that is, connects to the router according to the network configuration information. If a connection error or other connection abnormality occurs, a beacon frame carrying prompt information can be broadcast to enable other devices to confirm whether the router is normal, and the network configuration information can be resent to the target device.
[0054] Furthermore, in order to facilitate the user to control the networking status of the target device, the network configuration method provided in this embodiment further includes the steps of:
[0055] The target device randomly generates a third secret key and encrypts it to generate a fourth ciphertext, and sends the fourth ciphertext to the configured network device, so that the configured network device decrypts the fourth ciphertext to obtain the third secret key;
[0056] The target device receives the fifth ciphertext sent by the configured network device, which is generated by encrypting the management password according to the third secret key, and decrypts the fifth ciphertext to obtain the management password.
[0057] The management password is a password used to obtain the authority to control the target device. After the target device is networked, the method provided in this embodiment enables the user to control the target device through a preset terminal. Specifically, the networked device can generate the management password for obtaining the authority to control the target device by itself, or receive the management password assigned to the target device by the cloud, or receive the management password defined by the user and sent by the preset terminal, and send the management password to the target device. When other terminals try to obtain the control authority of the target device, they need to send the correct management password, and the target device will open the authority of the terminal to control itself. In order to prevent the management password of the target device from being stolen and causing security risks, in this embodiment, the target terminal first randomly generates a third secret key and encrypts it and sends it to the networked device. After the networked device decrypts the third secret key, it encrypts the management password and sends it to the target device. The target device receives and stores the management password. In this way, the management password is transmitted in an encrypted form to avoid leakage.
[0058] After the target device obtains the management password, it determines whether to open its control permissions to a certain terminal based on the management password, including:
[0059] Receive a control authority request carrying a control instruction, and when the control authority request is consistent with the management password, perform a corresponding operation according to the control instruction.
[0060] The control permission request can be issued by the target terminal, which can be the user's mobile phone, tablet computer and other terminals. When the user wants to use the target terminal to control the target device, the control permission request carrying the control instruction is sent through the target terminal. The control permission request includes the management password. After receiving the control permission request, the target device determines whether the management password in the control permission request is consistent with the management password stored in itself. If they are consistent, it means that the target terminal is legal and can perform corresponding operations according to the control instruction sent by the target terminal, such as controlling the target terminal to disconnect from the network. In this way, the user can remotely control the network status of the target device through the target terminal. For example, when the parents are not at home, they can remotely send a disconnection instruction to devices such as smart TVs to prevent children from continuing to watch.
[0061] In summary, the present invention provides a network configuration method, in which a network device to be configured and a networked device randomly generate keys respectively, encrypt them and send them to each other, and the two parties decrypt them to obtain the keys randomly generated by both parties. The configured network device then encrypts the network configuration information with the keys randomly generated by both parties and sends it to the network device to be configured. The network device to be configured decrypts and obtains the network configuration information for network configuration, thereby improving the security of the network configuration information during transmission and preventing leakage of the network configuration information.
[0062] It should be understood that, although the various steps in the flowcharts given in the accompanying drawings of the present specification are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0063] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0064] Embodiment 2
[0065] Based on the above-mentioned embodiment 1, the present invention provides a network distribution device. The network distribution device provided in this embodiment is applied to a network-distributed device, such as Figure 5 As shown, the distribution network device includes:
[0066] A key generation module, used to randomly generate a first key, encrypt the first key to generate a first ciphertext, and send the first ciphertext to a target device so that the target device decrypts the first ciphertext to obtain the first key, as described in the first embodiment;
[0067] A key acquisition module, used for receiving a second ciphertext sent by a target device, and decrypting the second ciphertext to obtain a second key, as described in the first embodiment;
[0068] An encryption module is used to encrypt the network configuration information according to the first key and the second key to generate a third ciphertext, and send the third ciphertext to the target device so that the target device decrypts the third ciphertext according to the first key and the second key to obtain the network configuration information, as described in Example 1.
[0069] The key generation module is specifically used to broadcast a beacon frame carrying a first ciphertext, so that the target device obtains the first ciphertext after receiving the beacon frame.
[0070] The encryption module is also specifically used to obtain the MAC address of the target device before encrypting the network configuration information according to the first key and the second key. When the MAC address of the target device is in the whitelist, the operation of encrypting the network configuration information according to the first key and the second key is triggered.
[0071] The network distribution device provided in this embodiment also includes a whitelist management module, which is used to receive identification information of the target device before the key generation module randomly generates the first key, send the identification information to a preset terminal for display, and add the MAC address of the target device to the whitelist when receiving confirmation information sent by the preset terminal.
[0072] Embodiment 3
[0073] Based on the above-mentioned embodiment 1, the present invention provides a network distribution device. The network distribution device provided in this embodiment is applied to a network-distributed device, such as Figure 6 As shown, the distribution network device includes:
[0074] A key generation module, used to randomly generate a second key, encrypt the second key to generate a second ciphertext, and send the second ciphertext to the configured network device so that the configured network device decrypts the second ciphertext to obtain the second key, as described in the first embodiment;
[0075] A key acquisition module, used to acquire a first ciphertext sent by a configured network device, and decrypt the first ciphertext to obtain a first key, as described in the first embodiment;
[0076] The decryption module is used to receive the third ciphertext sent by the network-configured device, decrypt the third ciphertext according to the first key and the second key to obtain the network configuration information, and perform network configuration according to the network configuration information, as specifically described in the first embodiment.
[0077] The key generation module is also used to send the identification information of the target device to the configured device, so that the configured device adds the MAC address of the target device to the whitelist.
[0078] The network configuration device provided in this embodiment also includes a management module, which is used to randomly generate a third key and encrypt the third key to generate a fourth ciphertext after the decryption module performs network configuration according to the network configuration information, and send the fourth ciphertext to the configured device so that the configured device decrypts the fourth ciphertext to obtain the third key, and receives a fifth ciphertext sent by the configured device that is generated by encrypting a management password according to the third key, decrypts the fifth ciphertext, and obtains a management password used to obtain authority to control the target device.
[0079] The management module is also used to receive a control authority request carrying a control instruction, and when the control authority request is consistent with the management password, execute a corresponding operation according to the control instruction.
[0080] Embodiment 4
[0081] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Figure 4 The terminal includes a memory 10 and a processor 20. The memory 10 stores a network configuration program that can be run on the processor 20. When the processor 10 executes the network configuration program, the steps of the method in the first embodiment can be implemented.
[0082] Embodiment 4
[0083] The present invention also provides a computer-readable storage medium, which stores a network configuration program. When the network configuration program is executed by a processor, the method described in the above embodiment 1 and / or the steps of the method in embodiment 2 are implemented.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network distribution method, characterized in that: Applied to a network-connected device, the method includes: Randomly generate a first secret key, encrypt the first secret key to generate a first ciphertext, and send the first ciphertext to a target device so that the target device decrypts the first ciphertext to obtain the first secret key; Receiving a second ciphertext sent by the target device, and decrypting the second ciphertext to obtain a second secret key; Encrypting the network configuration information according to the first key and the second key to generate a third ciphertext, and sending the third ciphertext to the target device, so that the target device decrypts the third ciphertext according to the first key and the second key to obtain the network configuration information; Before encrypting the network configuration information according to the first secret key and the second secret key, the method further includes: Obtaining the MAC address of the target device; When the MAC address of the target device is in the whitelist, triggering the operation of encrypting the network configuration information according to the first key and the second key; Before randomly generating the first secret key, the method further includes: Receiving identification information of the target device, and sending the identification information to a preset terminal for display; When receiving the confirmation information sent by the preset terminal, adding the MAC address of the target device to the whitelist; receiving a fourth ciphertext sent by the target device, and decrypting the fourth ciphertext to obtain a third secret key; Generate a management password for obtaining the authority to control the target device, or receive a management password assigned to the target device by the cloud, or receive a user-preset management password sent by a preset terminal; The management password is encrypted according to the third secret key to generate a fifth ciphertext, and the fifth ciphertext is sent to the target device.
2. The method according to claim 1, characterized in that The sending the first ciphertext to the target device includes: A beacon frame carrying the first ciphertext is broadcasted, so that the target device obtains the first ciphertext after receiving the beacon frame.
3. A network distribution method, characterized in that: Applied to a target device, the method comprises: Randomly generate a second secret key, encrypt the second secret key to generate a second ciphertext, and send the second ciphertext to the configured network device so that the configured network device decrypts the second ciphertext to obtain the second secret key; Obtaining a first ciphertext sent by the configured network device, and decrypting the first ciphertext to obtain a first secret key; receiving a third ciphertext sent by the network-configured device, decrypting the third ciphertext according to the first secret key and the second secret key to obtain network configuration information, and performing network configuration according to the network configuration information; After performing network configuration according to the network configuration information, the method further includes: Randomly generate a third secret key and encrypt the third secret key to generate a fourth ciphertext, and send the fourth ciphertext to the configured network device, so that the configured network device decrypts the fourth ciphertext to obtain the third secret key; Receive a fifth ciphertext sent by the network-connected device, which is generated by encrypting the management password according to the third secret key, decrypt the fifth ciphertext, and obtain the management password, where the management password is used to obtain permission to control the target device.
4. The method according to claim 3, characterized in that Before randomly generating the second secret key, the method further includes: The identification information of the target device is sent to the configured device, so that the configured device adds the MAC address of the target device to a whitelist.
5. The method according to claim 3, characterized in that: After obtaining the management password, the method further includes: A control authority request carrying a control instruction is received, and when the control authority request is consistent with the management password, a corresponding operation is performed according to the control instruction.
6. A network distribution device, characterized in that: Applied to network-connected equipment, the device comprises: A key generation module is used to randomly generate a first key, encrypt the first key to generate a first ciphertext, and send the first ciphertext to a target device so that the target device decrypts the first ciphertext to obtain the first key; obtain the MAC address of the target device; when the MAC address of the target device is in the whitelist, trigger the operation of encrypting the network configuration information with the first key and the second key; receive the identification information of the target device, and send the identification information to a preset terminal for display; when receiving the confirmation information sent by the preset terminal, add the MAC address of the target device to the whitelist; A key acquisition module, configured to receive a second ciphertext sent by the target device, decrypt the second ciphertext to obtain a second key; receive a fourth ciphertext sent by the target device, and decrypt the fourth ciphertext to obtain a third key; An encryption module is used to encrypt the network configuration information according to the first secret key and the second secret key to generate a third ciphertext, and send the third ciphertext to the target device, so that the target device decrypts the third ciphertext according to the first secret key and the second secret key to obtain the network configuration information; generate a management password for obtaining the authority to control the target device, or receive the management password assigned to the target device by the cloud, or receive the management password preset by the user sent by a preset terminal; encrypt the management password according to the third secret key to generate a fifth ciphertext, and send the fifth ciphertext to the target device.
7. A network distribution device, characterized in that: Applied to a target device, the apparatus comprises: A key generation module, used to randomly generate a second key, encrypt the second key to generate a second ciphertext, and send the second ciphertext to the configured network device so that the configured network device decrypts the second ciphertext to obtain the second key; A key acquisition module, used to acquire a first ciphertext sent by the configured network device, and decrypt the first ciphertext to obtain a first key; A decryption module is used to receive a third ciphertext sent by the networked device, decrypt the third ciphertext according to the first key and the second key to obtain network configuration information, and perform network configuration according to the network configuration information; randomly generate a third key and encrypt the third key to generate a fourth ciphertext, and send the fourth ciphertext to the networked device, so that the networked device decrypts the fourth ciphertext to obtain the third key; receive a fifth ciphertext sent by the networked device that is generated by encrypting a management password according to the third key, decrypt the fifth ciphertext, and obtain the management password, where the management password is used to obtain the authority to control the target device.
8. A terminal, characterized in that: The terminal includes a memory, a processor, and a network configuration program stored in the memory and executable on the processor. When the processor executes the network configuration program, the method according to any one of claims 1 to 2 and / or the steps of the method according to any one of claims 3 to 5 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a network configuration program, and when the network configuration program is executed by the processor, the method according to any one of claims 1 to 2 and / or the steps of the method according to any one of claims 3 to 5 are implemented.
