Method for configuring password of internet of things device and related apparatus
By encrypting the first authentication information in the IoT device and the client's intranet and decrypting it in the local password management service, the risk of leakage during the password reset process of IoT devices is resolved, and a secure and reliable password reset process is achieved.
Patent Information
- Application Number
- CN202611302376.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-17
AI Technical Summary
The password reset process for IoT devices in existing technologies is at risk of leakage, especially during server decryption, where the security of external network nodes is difficult to guarantee.
When IoT devices and clients are deployed on the same intranet, the first verification information is encrypted with a local public key, and the decryption process is locked in the local password management service and decrypted using a local private key. This ensures that encryption and decryption are separated from the server side and the verification process is completed only on the intranet.
It effectively reduces the risk of external network node leakage, ensures the security of the password reset process, and improves security by using multi-node collaborative confirmation, as the complete password reset loop cannot be completed without any node.
Smart Images

Figure CN123122811A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a method for configuring cryptographic settings for IoT devices and related apparatus. Background Technology
[0002] In existing technology, after the client sends a password reset request, the verification code is decrypted on the server, and then the server sends the verification code to the local device. However, this method has the risk of leakage. Summary of the Invention
[0003] This application provides a method for configuring passwords for Internet of Things (IoT) devices and related apparatus, which can improve the security of password reset.
[0004] This application provides a password configuration method for an Internet of Things (IoT) device. The method is applied to a client, where the client and the IoT device are deployed in the same intranet. The method includes: upon receiving a trigger command, the client sends a password reset request to a server located on an external network; upon receiving the password reset request, the server forwards the password reset request to the IoT device; the IoT device generates first verification information based on the password reset request and encrypts the first verification information using a pre-saved local public key to obtain encrypted verification information; wherein a local password management service deployed in the intranet pre-sends the local public key to the IoT device; and the IoT device transmits the encrypted verification information... The client sends the encrypted verification information to the server; the server forwards the encrypted verification information to the client; the client requests the local password management service to decrypt the encrypted verification information; the local password management service uses its local private key to decrypt the encrypted verification information to obtain second verification information, and sends the second verification information to the client; wherein, the local private key is stored by the local password management service; the client sends the second verification information to the IoT device; the IoT device verifies the first verification information and the second verification information based on a password reset request; in response to the IoT device successfully verifying the password reset request, the client resets the password of the IoT device.
[0005] A second aspect of this application provides an electronic device including a memory and a processor interconnected, wherein the memory is used to store a computer program, which, when executed by the processor, is used to implement the method as described in any of the above embodiments.
[0006] A third aspect of this application provides a computer-readable storage medium storing a computer program that can be executed by a processor to perform the steps of the method as described in any of the above embodiments.
[0007] Unlike existing technologies, the advantages of this application are as follows: By encrypting and locking the first verification information in the IoT device and decrypting the encrypted verification information in the local password management service, this application effectively separates encryption and decryption from the server side, reducing the risk of leakage at external network nodes. Although encryption and decryption are separated from the server side, the verification process still requires the server's participation to ensure that the password reset operation receives collaborative confirmation and flow from multiple nodes. Without any single node, a complete password reset loop cannot be completed, effectively improving the security of password reset. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a flowchart illustrating the password configuration method for IoT devices according to this application; Figure 2 This is a schematic diagram of one embodiment of the IoT device password configuration system of this application; Figure 3 This is a schematic diagram of one implementation of the IoT device password configuration system of this application; Figure 4 yes Figure 1 A flowchart illustrating an embodiment prior to step S100; Figure 5 This is a schematic diagram of another embodiment of the IoT device password configuration system of this application; Figure 6 This is a schematic diagram of another implementation of the IoT device password configuration system interaction of this application; Figure 7 yes Figure 1 A flowchart illustrating another implementation method prior to step S100; Figure 8 yes Figure 1 A flowchart illustrating one embodiment of step S300; Figure 9 This is a schematic diagram of the structure of one embodiment of the electronic device of this application; Figure 10 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0010] It should be noted that the terms "first" and "second" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0011] See Figure 1 , Figure 2 and Figure 3 , Figure 1 This is a flowchart illustrating the IoT device password configuration method of this application. Figure 2 This is a schematic diagram of one embodiment of the IoT device password configuration system of this application. Figure 3 This is a schematic diagram illustrating one embodiment of the IoT device password configuration system of this application. The first aspect of this application provides an IoT device password configuration method, which is applied to a client, and the client and the IoT device are deployed in the same intranet. The method includes: S100: Upon receiving the trigger command, the client sends a password reset request to the server located on the external network.
[0012] Specifically, in the context of this patent, "client" can refer to the mobile terminal device used by the user, such as a smartphone or tablet. As the entry point for user interaction, the client's primary task is to initiate the entire dynamic chain of password reset. The IoT device and the client are on the same intranet; the number of IoT devices can be single or multiple, and the method of this application is applicable to any IoT device. The trigger instruction refers to the specific action initiated by the user on the mobile interface or physical device operating terminal, such as clicking the "Reset Password" button or entering a specific password sequence. The client does not directly send a request to the IoT device but to a server deployed on the external network. The password reset request sent by the client may include necessary identification information (such as account number, device ID) and current status, but does not carry any encrypted data. The core technical effect of this step is that the client initiates the action, the server receives it, and the reset request bypasses the IoT device.
[0013] In addition to the aforementioned methods based on user-initiated clicks or commands, a passive triggering mode is also possible. This means the system can be configured to monitor specific environmental parameters or time thresholds within the client. For example, when abnormal network fluctuations are detected, a trigger command is automatically generated and a password reset request is sent to the server. This implementation extends the triggering mechanism from manual user operation to automated system maintenance, broadening the scope of application scenarios.
[0014] S200: After receiving a password reset request, the server forwards the password reset request to the IoT device.
[0015] Specifically, when the server receives a password reset request from the client containing the identifier, device number, and status requirements, it forwards the request to the IoT device. This forwarding is not a simple data copy; rather, it involves logical matching based on the IoT device registration database maintained internally by the server. The server first verifies whether the device number in the request matches its current online status list, confirming that the IoT device is interactive and has not been deregistered. Once verification is successful, the server directs the request signal to the corresponding physical IoT device location. This step, by forwarding the request from the external server to the internal IoT device, achieves isolation verification between physical and network spaces. Furthermore, communication with the external network ensures the time synchronization of the entire reset process, allowing subsequent encryption actions to be initiated based on accurate time responses, avoiding problems caused by time discrepancies.
[0016] S300: The IoT device generates first verification information based on the password reset request, and encrypts the first verification information using a pre-saved local public key to obtain encrypted verification information; wherein, the local password management service deployed in the intranet sends the local public key to the IoT device in advance.
[0017] Specifically, when an IoT device receives a password reset request forwarded by a server, it generates initial verification information and further encrypts it. This initial verification information is a verification code generated by the IoT device, consisting of random numbers, timestamps, or specific character sequences, used for verification matching in subsequent password resets. The IoT device first generates this information using its internal algorithm or random engine, ensuring its uniqueness and unpredictability. Next, the IoT device uses its pre-stored local public key to perform encryption operations on the initial verification information, transforming the plaintext information into ciphertext encrypted verification information. This local public key is not included with the IoT device at the factory; instead, it is pre-distributed and stored within the IoT device by a local password management service deployed on the intranet. The local password management service is used for key generation, distribution, and use. This step achieves encrypted encapsulation of the data stream, locking sensitive information in ciphertext. The effect of this technology is that the encrypted verification information no longer contains readable plaintext; even if intercepted by a third party, the content cannot be directly read, and only an entity holding a specific private key can decrypt it.
[0018] S400: IoT devices send encrypted verification information to the server.
[0019] Specifically, after generating encrypted verification information, the IoT device sends the encrypted verification information to the external network server through the communication channel.
[0020] S500: The server forwards the encrypted verification information to the client.
[0021] Specifically, when the server receives encrypted verification information from an IoT device, it forwards it to the client. The server does not perform any processing or decryption of the encrypted verification information; it simply transmits it to the client in its ciphertext form. At this stage, the server only acts as a data transmission channel. Since the server does not possess the local private key used to decrypt the encrypted verification information for its local password management service, it cannot decrypt the data in reverse. This design, where the server only forwards the information without decryption, eliminates the risk of external network leakage that might be introduced by the server acting as an intermediary node.
[0022] S600: The client requests the local password management service to decrypt the encrypted verification information.
[0023] Specifically, after the client receives the encrypted verification information forwarded by the server, it requests the local password management service to decrypt the encrypted verification information. The key point of this step is that the request is not directed to the server or other nodes on the external network, but rather to the local password management service on the internal network. This step ensures the accuracy and security of the decryption process by establishing a unique decryption path through the request to the local password management service.
[0024] S700: The local password management service uses the local private key to decrypt the encrypted verification information to obtain the second verification information, and sends the second verification information to the client; the local private key is stored by the local password management service.
[0025] Specifically, when the local password management service receives a decryption request from the client, it performs the decryption operation. After decryption, it sends the second verification information to the client. The local private key is not held by the IoT device or the client, but is securely stored and accessed by the local password management service. As a core node of the intranet, the local password management service's function is key decryption. Upon receiving a request signal, it uses its internally stored local private key to perform a reverse decryption operation on the encrypted verification information, restoring the ciphertext-based encrypted verification information to the plaintext-based second verification information. The local private key never leaves the local password management service entity; it exists only in the secure storage area within that entity. This step locks the decryption operation within a specific intranet entity, completely eliminating the risk of dispersed decryption capabilities.
[0026] S800: The client sends a second authentication message to the IoT device.
[0027] Specifically, after the local password management service completes the decryption operation and returns the second verification information, the client executes the sending action, sending the second verification information to the IoT device. The key point of this step is that it sends the information directly to the IoT device on the internal network, rather than to a server or other nodes on the external network, to avoid the risk of leakage of the second verification information.
[0028] S900: The IoT device verifies the first verification information and the second verification information based on the password reset request.
[0029] Specifically, after receiving the second verification information from the client, the IoT device performs a comparison verification. The IoT device not only receives the second verification information but also compares it with the first verification information generated during the original password reset request. The first verification information refers to the verification code content, such as the original random number or character sequence generated by the IoT device in step S300; the second verification information refers to the decrypted and restored result from the local password management service. If there is no tampering, the second verification information is completely identical to the first verification information. The IoT device performs a mathematical comparison or logical matching between the second and first verification information to ensure their consistency. If they match perfectly, the verification is considered successful; if there are discrepancies, the verification is considered unsuccessful, and the next step cannot be performed.
[0030] S1000: After the IoT device successfully verifies the password reset request, the client resets the password of the IoT device.
[0031] Specifically, once the IoT device completes the comparison and confirms the successful verification, it sends a signal to the client. The client then performs a password update operation, sending the new password to the IoT device. Password reset refers to the substantive operation of replacing the old password with the new one. After receiving the successful verification, the client uses its internal algorithm or interface to generate a new password and sends it to the IoT device.
[0032] Unlike existing technologies, this application effectively separates encryption and decryption from the server side by encrypting and locking the first verification information in the IoT device and decrypting the encrypted verification information in the local password management service, thus reducing the risk of leakage at external network nodes. Although encryption and decryption are separated from the server side, the verification process still requires the server's participation to ensure that the password reset operation receives collaborative confirmation and flow from multiple nodes. Without any one node, a complete password reset loop cannot be completed, effectively improving the security of password reset.
[0033] In one embodiment, see Figure 4 , Figure 4 yes Figure 1 A flowchart illustrating an embodiment prior to step S100, comprising the following steps prior to step S100: S11: Upon receiving the password initialization command, the local password management service generates a local private key and a local public key; the local private key is stored in the local password management service.
[0034] Specifically, upon receiving the password initialization command, the local password management service executes the key generation process, generating a local private key and a local public key. Specifically, the local password management service uses its internal algorithm to generate an asymmetric key pair (SM2), namely the local private key and the local public key. As the name suggests, neither the local public key nor the local private key leaves the intranet; both are stored in the relevant physical devices within the intranet. The local private key, after being generated by the local password management service, is stored in the physical device configured by the local password management service. This locks key pair generation within the intranet entity, eliminating the risk of key dispersion. Furthermore, the local password management service, as the sole key generator, holds the local private key and performs the computation, while clients, IoT devices, and servers do not possess the local private key and cannot decrypt the encrypted verification information, significantly reducing the risk of external decryption of the encrypted verification information.
[0035] Optionally, upon receiving a password initialization command, the local password management service generates a local private key and a local public key; the local private key can also be sent by the local password management service to other physical devices in the intranet, which may not be included in the IoT devices that require password reset.
[0036] S12: The local cryptography management service sends the local public key to the IoT device.
[0037] Specifically, after the local password management service completes the generation process and saves the local private key, it performs a distribution process, sending the local public key to IoT devices. The local public key is sent not to clients or external servers, but to IoT devices, bypassing intermediate nodes such as servers or clients. This reduces intermediate forwarding steps and stores the local public key within the IoT devices on the internal network, thus establishing a decentralized key architecture. The external network cannot obtain the local public key, preventing its potential leakage on the external network.
[0038] Optionally, the local password management service can also send the local public key to the client, and then the client can forward the local public key to the IoT device.
[0039] S13: IoT devices acquire and store local public keys.
[0040] Specifically, when an IoT device receives the local public key sent by the local cryptography management service, it saves the local public key. During saving, it is stored in a secure environment to prevent modification by other programs or external nodes. Simultaneously, the local public key can be encrypted; the encryption method is not restricted, and different IoT devices can choose different encryption methods.
[0041] In one embodiment, combined with Figure 2 and Figure 3 The local password management service is configured on a local security device outside the client, and the local private key is stored on the local security device.
[0042] Specifically, in this embodiment, the local password management service, acting as the generator of the local public and private keys, is configured within a local security device on the intranet. This local security device is a dedicated hardware entity independent of the client, possessing a higher level of security and isolation performance, resulting in a very high security coefficient. This configuration can be used in enterprise or industrial IoT environments. The local password management service can be a Key Management Service (KMS), a trusted service deployed on the intranet for convenient management and maintenance. Since the local password management service resides outside the client, the client needs to notify the local security device during password reset requests, allowing the local security device to execute the decryption operation of the local password management service on the encrypted verification information. It can be seen that deploying the local password management service within the local security device achieves multi-party isolation between the decryption operation and the client, IoT devices, and servers. Even if these parties are compromised, decryption of the encrypted verification information cannot be achieved.
[0043] In one implementation, the IoT device obtains the local public key for the local password management service through network identifier authentication on the intranet.
[0044] Specifically, intranet network identification authentication refers to the secure communication channel established between IoT devices and a local cryptographic management service deployed in the local network environment, which undergoes two-way or one-way identification verification. This channel ensures that data is transmitted only within a trusted intranet environment and does not pass through the external network. In enterprise-level intranet scenarios, this can be manifested as IoT devices establishing a secure connection using a pre-installed HTTPS (Hypertext Transfer Protocol Secure) server certificate from the local cryptographic management service, utilizing the TLS (Transport Layer Security) protocol, and carrying the device identifier or certificate for identification authentication, thereby obtaining the local public key from the local cryptographic management service.
[0045] In a specific implementation example, during the power-on initialization phase, an IoT device can initiate an HTTPS request to a local security device configured with KMS on the intranet. After verifying the device's identity, KMS returns a generated local public key, which the IoT device then saves to its local non-volatile storage. Obtaining the local public key through intranet authentication means that the distribution process is completed within a controlled trust domain, avoiding the risk of the local public key being tampered with or replaced on an untrusted external network. This design allows the IoT device to be confident that the obtained local public key indeed belongs to a legitimate local cryptographic management service, thus ensuring that the initial verification information encrypted with the local public key can only be decrypted by the local cryptographic management service holding the corresponding local private key, achieving a correspondence between the encryption source and the decryption source on the trust chain.
[0046] Of course, in some other implementations, IoT devices can also obtain the local public key of the local password management service directly without performing security authentication.
[0047] In one embodiment, see Figure 5 and Figure 6 , Figure 5 This is a schematic diagram of another embodiment of the IoT device password configuration system of this application. Figure 6 This is a schematic diagram of another implementation of the IoT device password configuration system interaction of this application. The local password management service is configured in the client, and the local private key is stored in the hardware secure storage area in the client.
[0048] Specifically, in this embodiment, the local password management service, acting as the generator of the local public and private keys, is configured in the client and stored in a hardware secure storage area. The hardware secure storage area refers to a highly isolated physical region within the client, such as iOS Keychain, Android Keystore, or TEE (Trusted Execution Environment). These hardware secure storage areas can be configured in a non-exportable mode, meaning the local private key stored there cannot be read as plaintext and transmitted to the client application's memory space; decryption can only be performed by calling the hardware interface. This configuration, with the local password management service configured on the client and the local private key stored in the hardware secure storage area, is suitable for consumer home scenarios. In this case, the functionality of the local password management service is implemented by software installed on the client. The client is responsible for generating key pairs, writing the local private key to the hardware secure storage area, and sending the local public key to IoT devices via a local area network. The introduction of a hardware secure storage area ensures that even if the client operating system is compromised or the APP process is infected by malware, attackers cannot directly extract the local private key stored in the hardware secure storage area, thus achieving hardware-level isolation protection of the local private key.
[0049] In one embodiment, the client is a smart speaker or mobile phone running the Android system. The local private key is stored in the Android Keystore system and configured to be non-exportable. The APP requests decryption through the Android Keystore. The decryption process is completed in the TEE. The local private key never leaves the hardware secure storage area.
[0050] In another embodiment, the client can be a device running iOS, with the private key stored in the Keychain and also protected at the hardware level. This design elevates the local private key storage environment from general software memory to a dedicated hardware security area, significantly increasing the technical difficulty of stealing the local private key through memory scanning.
[0051] The above approach, by configuring the local password management service on the client and storing the local private key in a hardware-secure storage area within the client, shifts the storage location of the private key from ordinary software storage media to a hardware-secure module with physical isolation and tamper-proof features, thereby further enhancing the security of the private key during the storage phase. The non-exportable nature of the hardware-secure storage area ensures that even if malicious code or system vulnerabilities exist in the client environment, attackers cannot read the local private key through software means, effectively isolating the local private key from the client application process and further reducing the risk of local private key leakage. This hardware-level storage protection mechanism enables the local password management service to securely perform key management and decryption functions within the client, without relying on an external server. This achieves decentralized deployment of the password reset process, which is beneficial for providing the same level of security in consumer-grade scenarios lacking an enterprise intranet environment.
[0052] In one implementation, the client provides the local public key for local cryptographic management services to the IoT device via LAN multicast and / or near-field communication.
[0053] Specifically, local area network multicast (such as WiFi (Wireless Fidelity) broadcasting or Bluetooth signals) is a network communication method that simultaneously sends data to multiple receivers within a local area, while near-field communication (such as NFC, sound waves, or QR codes) refers to data exchange through short-range wireless communication technology. In this embodiment, the transmission of the local public key does not pass through an external network server, but instead establishes a physical or logical near-field connection directly between the client and the IoT device.
[0054] In one application scenario, the client is a smartphone, and the IoT device is a smart door lock. When a password reset is required, the mobile app generates a key pair, stores the local private key in the hardware's secure storage area, and then broadcasts a data packet containing the local public key via WiFi multicast. The smart door lock listens for and receives this data packet within the local area network, thereby obtaining the local public key.
[0055] In another application scenario, the client is a smartphone, and the IoT device is a smart speaker. Near-field communication (NFC) can utilize Bluetooth or NFC technology. When the phone approaches the smart speaker, the local public key is directly transmitted to the smart speaker during the Bluetooth pairing process or upon NFC contact. Alternatively, it can use acoustic communication or QR code scanning. The phone screen displays a QR code containing the local public key, which the smart speaker scans to obtain; or the phone emits a specific frequency sound wave, which the smart speaker receives and decodes to obtain the local public key.
[0056] All of these methods fall under the category of local area networks (LANs) or near-field communication (NFC). Their common characteristics include short communication links, limited physical range, and data flow that does not pass through a remote server. In this way, the distribution of the local public key is confined to a controllable physical space, avoiding the risk of interception or tampering of the local public key during wide area network transmission, and also eliminating the need for a server to participate in key exchange.
[0057] In one embodiment, see Figure 7 , Figure 7 yes Figure 1 A flowchart illustrating another embodiment prior to step S100, which further includes the following before step S100: S21: In response to receiving the target key from the target device, the client determines whether the target key matches the local public key.
[0058] Specifically, the target device could be an IoT device or an intruded device. The target key could be a public key or other key information received from the target device to identify it. The target key could be a valid local public key or a forged malicious key. The client determines whether the device receiving the request is a legitimate, paired IoT device by comparing the target key with its local public key.
[0059] S22: If the target key matches the local public key, the client determines that the target device is an IoT device.
[0060] Specifically, if the target key matches the local public key, it indicates that the target device possesses the correct private key and is an authenticated legitimate device. At this point, the client, through this crucial verification step, can confirm the authenticity of the target device identifier. Therefore, the client can definitively determine that the target device is an IoT device.
[0061] S23: If the target key does not match the local public key, the client determines that the target device is not an IoT device.
[0062] Specifically, if the target key does not match the local public key, it indicates that the target device is not a legitimate paired device, and its key information cannot be verified by the local public key. In this case, the client determines that the target device is an illegitimate or unauthorized device. Therefore, the client determines that the target device is not an IoT device and immediately terminates the current interaction process.
[0063] The key-matching-based judgment logic described above enables the client to strictly distinguish between legitimate and illegitimate devices, avoiding security risks caused by unclear target device identification, further ensuring the accuracy of the password reset operation, and helping to prevent attackers from using forged devices to carry out man-in-the-middle attacks or illegally reset passwords.
[0064] Of course, in some other implementations, a two-way authentication mechanism can also be used, where both the client and the target device need to verify each other's identification credentials before establishing a connection. Under this mechanism, the target device also needs to verify the client's identification, ensuring that both communicating parties have legitimate identifications, thereby building a more robust two-way trust chain.
[0065] In one implementation, in response to a client change, the local password management service updates the local private key and notifies the IoT device to update the local public key.
[0066] Specifically, client-side changes can refer to situations such as the user changing their mobile terminal device, the client application being reinstalled, or the key being proactively rotated for security reasons. When such changes occur, the local password management service performs a local private key update operation, i.e., generates a new key pair and securely stores the new local private key in the hardware secure storage area within the client. Subsequently, the local password management service notifies the IoT device to update its local public key. This notification process is completed within the intranet, with the aim of enabling the IoT device to replace the local public key used for encrypting verification codes with the newly generated local public key. This design ensures the dynamism and timeliness of the key system, allowing the system to restore a secure state by updating the key pair even if the old local private key becomes insecure for some reason (such as device loss or application vulnerability patching), without having to reinitialize the key configuration of the entire IoT device.
[0067] In one application scenario, when an user replaces their smartphone, a new local key pair is generated within the app on the new phone, and the local private key is stored in the new phone's secure hardware storage. The app then sends the new local public key to an IoT device via LAN scanning or NFC contact. After verifying receipt, the IoT device updates its stored local public key.
[0068] In another application scenario, if the client application detects that the local private key is at risk of leakage or has reached a preset lifespan, the APP automatically triggers the key rotation process, generates a new local key pair, and notifies the IoT device to update the local public key through the existing communication channel, and the old local public key becomes invalid.
[0069] In one embodiment, see Figure 8 , Figure 8 yes Figure 1 A flowchart illustrating one embodiment of step S300, wherein step S300 further includes: S310: The IoT device uses the server's public key to encrypt the client's first contact information based on the password reset request, obtains the encrypted contact information, and sends the encrypted contact information to the server.
[0070] Specifically, this step involves encrypting two types of critical information generated by the IoT device—a primary verification message used to reset password verification and a primary contact method (e.g., phone number or email address) used to notify the client—using different public keys. The primary verification message is encrypted using a local public key, the corresponding local private key of which is held only by the local password management service on the intranet. The primary contact method, on the other hand, is encrypted using a server public key, which is sent by the server, and the corresponding server private key is held by the external server. This dual encryption mechanism effectively isolates the information.
[0071] S320: The server uses its private key to decrypt the encrypted contact information to obtain the client's second contact information. Based on the second contact information, the server sends encrypted verification information to the corresponding client.
[0072] Specifically, after receiving encrypted verification information and encrypted contact information from an IoT device, the server first decrypts the encrypted contact information using its own private key to obtain the client's second contact information (e.g., phone number or email address). Based on this second contact information, the server compares it with the first and second contact information. If the comparison is successful, the server determines the specific client to whom the encrypted verification information should be sent and forwards the information to that client. During this process, because the server does not possess its local private key, it cannot decrypt the encrypted verification information and therefore cannot know its plaintext content. Upon receiving the encrypted verification information, the client initiates a decryption request to the local password management service. The local password management service then uses its local private key to decrypt the information to obtain its plaintext, thus completing the verification.
[0073] See Figure 9 , Figure 9 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device 300 includes a processor 310 and a memory 320. The processor 310 is coupled to the memory 320. The memory 320 stores program data. The processor 310 executes the program data in the memory 320 to implement the steps in any of the above embodiments. The detailed steps can be found in the above embodiments and will not be repeated here.
[0074] Among them, electronic device 300 can be any device with algorithm capabilities, such as mobile phone, tablet computer, smartwatch, desktop computer or laptop computer, without any restrictions.
[0075] See Figure 10 , Figure 10This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 400 stores a computer program 410, which can be executed by a processor to implement the steps in any of the above methods. Detailed method steps can be found in the relevant content above, and will not be repeated here.
[0076] Specifically, the computer-readable storage medium 400 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a device that can store the computer program 410. Alternatively, it can be a server that stores the computer program 410, which can send the stored computer program 410 to other devices for execution, or it can run the stored computer program 410 itself.
[0077] The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for configuring passwords for an Internet of Things (IoT) device, characterized in that, The method is applied to a client, where the client and the IoT device are deployed on the same intranet, and the method includes: Upon receiving the trigger command, the client sends a password reset request to the server located on the external network; After receiving the password reset request, the server forwards the password reset request to the IoT device; The IoT device generates first verification information based on the password reset request, and encrypts the first verification information using a pre-saved local public key to obtain encrypted verification information; wherein, the local password management service deployed in the intranet sends the local public key to the IoT device in advance; The IoT device sends the encrypted verification information to the server; The server forwards the encrypted verification information to the client; The client requests the local password management service to decrypt the encrypted verification information; The local password management service uses a local private key to decrypt the encrypted verification information to obtain second verification information, and sends the second verification information to the client; wherein, the local private key is stored by the local password management service; The client sends the second verification information to the IoT device; The IoT device verifies the first verification information and the second verification information based on the password reset request; Upon successful verification of the password reset request by the IoT device, the client resets the password of the IoT device.
2. The method according to claim 1, characterized in that, Before the step of the client sending a password reset request to a server located on the external network, the following steps are included: Upon receiving a password initialization command, the local password management service generates the local private key and the local public key; wherein, the local private key is stored in the local password management service; The local password management service sends the local public key to the IoT device; The IoT device acquires and saves the local public key.
3. The method according to claim 2, characterized in that, The local password management service is configured on a local security device outside the client, and the local private key is stored on the local security device.
4. The method according to claim 3, characterized in that, The steps for the IoT device to acquire and save the local public key include: The IoT device obtains the local public key of the local password management service through the network identifier authentication of the intranet.
5. The method according to claim 2, characterized in that, The local password management service is configured in the client, and the local private key is stored in the hardware secure storage area within the client.
6. The method according to claim 5, characterized in that, The step of the local cryptographic management service sending the local public key to the IoT device includes: The client provides the local public key for the local password management service to the IoT device via the LAN multicast method and / or near-field communication method.
7. The method according to claim 5, characterized in that, Before the step of the client sending a password reset request to a server on the external network after receiving the trigger instruction, the procedure includes: Upon receiving the target key from the target device, the client determines whether the target key matches the local public key; If the target key matches the local public key, the client determines that the target device is the IoT device; If the target key does not match the local public key, the client determines that the target device is not the IoT device.
8. The method according to claim 5, characterized in that, The method further includes: In response to the client change, the local password management service updates the local private key and notifies the IoT device to update the local public key.
9. The method according to claim 1, characterized in that, The step of the IoT device generating first verification information based on the password reset request and encrypting the first verification information using a pre-saved local public key to obtain encrypted verification information further includes: The IoT device uses the server's public key to encrypt the client's first contact method based on the password reset request, obtains an encrypted contact method, and sends the encrypted contact method to the server. The server decrypts the encrypted contact method using its private key to obtain the client's second contact method. Based on the second contact method, the server sends the encrypted verification information to the corresponding client.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 9.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 9.
