A method, system, terminal and storage medium for processing key theft
By judging the type of private key loss and performing corresponding processing, the problem of incomplete security processing after private key loss in the prior art is solved, and security protection of cloud, local and device data is achieved.
Patent Information
- Application Number
- CN202410880220.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In the prior art, there is a lack of detailed methods for the security processing method after private key loss, resulting in security problems between servers and terminals.
By obtaining local information and cloud information, we judge the type of private key loss and perform corresponding processing accordingly, including updating the device-side firmware, updating the cloud-side key pair and replacing the encrypted storage medium.
Effectively handle private key loss, protect the security of cloud, local and device data, and prevent unauthorized use and data leakage.
Smart Images

Figure CN118740460B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of key theft processing, and in particular to a key theft processing method, system, terminal and storage medium. Background Art
[0002] In the authorization and activation process of the server and the terminal, the security of the device-side data is extremely important, and the security of the entire authorization and activation process mainly lies in the private key. At present, there are many security activation methods for the authorization and activation process of the server and the terminal, but they are all security protection methods at the process level. There is no detailed method for the security handling method after the private key is lost, which will cause security problems for the server and the terminal after the private key is lost. Therefore, the existing technology needs to be improved and developed. Summary of the invention
[0003] The main purpose of the present invention is to provide a key theft processing method, system, terminal and computer-readable storage medium, aiming to solve the problem that there is no detailed way to deal with the security after the private key is lost in the prior art, which will cause security problems of the server and terminal after the private key is lost.
[0004] To achieve the above object, the present invention provides a method for processing key theft, the method comprising the following steps:
[0005] When the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information;
[0006] When the current private key loss type is the first local private key loss type, updating the device-side firmware;
[0007] When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair;
[0008] When the current private key loss type is a cloud private key loss type, the cloud key pair is updated accordingly to obtain a cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair.
[0009] Optionally, when the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information, specifically including:
[0010] When receiving a key theft warning message, obtain local information and cloud information;
[0011] Determine the location where the private key is stolen based on the local information and the cloud information;
[0012] When the key theft location is the key theft in the cloud, the current private key theft type is the cloud private key loss type;
[0013] When the key theft location is a local key theft, determining the security status of the local dongle;
[0014] When the dongle security status is safe, the current private key theft type is the first local private key loss type;
[0015] When the dongle security status is unsafe, the current private key theft type is the second local private key loss type.
[0016] Optionally, when the current private key loss type is the first local private key loss type, updating the device-side firmware specifically includes:
[0017] When the current private key loss type is the first local private key loss type, obtaining information of the device end where the key is stolen;
[0018] Update the public key stored on the device, update the corresponding device firmware via OTA, and add the signature of the stolen key to the blacklist.
[0019] Optionally, when the current private key loss type is the second local private key loss type, updating the cloud key pair accordingly to obtain the second local public-private key pair, and updating the device-side firmware according to the second local public-private key pair specifically includes:
[0020] When the current private key loss type is the second local private key loss type, replace the encrypted storage medium, update the cloud key pair, and obtain the second local public-private key pair;
[0021] The device-side firmware is updated according to the second local public-private key pair, and the device-side is restarted.
[0022] Optionally, updating the cloud key pair to obtain a second local public-private key pair specifically includes:
[0023] Stop the current cloud service and notify the corresponding device;
[0024] Update the cloud key pair to obtain a second local public-private key pair, and send the public key in the second local public-private key pair to each device;
[0025] The service configuration in the cloud is updated according to the private key in the second local public-private key pair, and the old key is deleted in the cloud.
[0026] Optionally, the updating of the cloud key pair to obtain a second local public-private key pair may also include:
[0027] Pre-set storage space;
[0028] When the cloud key pair is updated, a log corresponding to the update operation of the cloud key pair is stored in the storage space.
[0029] Optionally, updating the device firmware according to the second local public-private key pair and restarting the device specifically includes:
[0030] Obtaining updated firmware, and packaging the updated firmware to obtain a firmware package;
[0031] Sign the firmware package according to the second local public-private key pair to obtain a signed firmware package, and send the signed firmware package to each device through the OTA service;
[0032] Receive update information from multiple devices, and when the update is complete, instruct the device to restart and run with the firmware.
[0033] In addition, to achieve the above-mentioned purpose, the present invention also provides a key theft processing system, wherein the key theft processing system comprises:
[0034] A type judgment module is used to obtain local information and cloud information when key theft prompt information is obtained, and judge the current private key theft type according to the local information and cloud device information;
[0035] A first processing module, configured to update the device-side firmware when the current private key loss type is the first local private key loss type;
[0036] A second processing module, configured to update the cloud key pair accordingly when the current private key loss type is the second local private key loss type, obtain the second local public-private key pair, and update the device-side firmware according to the second local public-private key pair;
[0037] The third processing module is used to update the cloud key pair accordingly when the current private key loss type is the cloud private key loss type, obtain the cloud public-private key pair, and update the device-side firmware according to the cloud public-private key pair.
[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a key theft processing program stored in the memory and executable on the processor, and when the key theft processing program is executed by the processor, the steps of the key theft processing method as described above are implemented.
[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a key theft processing program, and when the key theft processing program is executed by a processor, the steps of the key theft processing method described above are implemented.
[0040] In the present invention, when the key theft prompt information is obtained, the local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information; when the current private key loss type is the first local private key loss type, the device-side firmware is updated; when the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair; when the current private key loss type is the cloud private key loss type, the cloud key pair is updated accordingly to obtain the cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair. The present invention can perform corresponding processing according to the type of private key loss, that is, the location where the private key is lost, when the private key is lost, so that it can react as soon as possible when the private key is lost, and protect the security of cloud, local and device-side data. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flow chart of a preferred embodiment of the key theft processing method of the present invention;
[0042] Figure 2 It is a structural diagram of a preferred embodiment of the key theft processing system of the present invention;
[0043] Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below 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.
[0045] In the authorization and activation process of the server and the terminal, the security of the device-side data is extremely important, and the security of the entire authorization and activation process mainly lies in the private key. At present, there are many security activation methods for the authorization and activation process of the server and the terminal, but they are all security protection methods at the process level, and there is no more detailed way for the security handling method after the private key is lost, which will cause security problems for the server and the terminal after the private key is lost. In response to one or more of the above problems, when the key theft prompt information is obtained, the application obtains local information and cloud information, and determines the current private key theft type according to the local information and cloud device information; when the current private key loss type is the first local private key loss type, the device-side firmware is updated; when the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair; when the current private key loss type is the cloud private key loss type, the cloud key pair is updated accordingly to obtain the cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair.
[0046] The key theft processing method described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the key theft processing method includes the following steps, wherein steps S20, S30 and S40 are in parallel relationship:
[0047] Step S10: When the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information.
[0048] It should be noted that in this application, the processing is made for the situation of key theft in the system composed of the server and the device, wherein the minimum framework of the application of this application can be composed of a server and a client, wherein the client is the device, and for the client, after communicating with the server, data will be obtained, and these data are irrelevant to the program logic, so it is a separate entity; for the server, an interface is required to manage the server data, so this is also a separate entity. In one embodiment of the present application, the corresponding application system can be a license system, and the source of license data in the license system is generally generated by the terminal in an offline activation mode, or generated by the cloud, and in data generation, the core of the security of the entire system lies in the private key, and when the private key is stolen, it will bring serious security problems.
[0049] When you get the corresponding prompt information of key theft, you need to handle it accordingly to protect information security.
[0050] Furthermore, when the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information, specifically including:
[0051] When receiving a key theft warning message, obtain local information and cloud information;
[0052] Determine the location where the private key is stolen based on the local information and the cloud information;
[0053] When the key theft location is the key theft in the cloud, the current private key theft type is the cloud private key loss type;
[0054] When the key theft location is a local key theft, determining the security status of the local dongle;
[0055] When the dongle security status is safe, the current private key theft type is the first local private key loss type;
[0056] When the dongle security status is unsafe, the current private key theft type is the second local private key loss type.
[0057] Specifically, in the present application, when the key theft prompt information is obtained, the local information and cloud information recorded in the local server are obtained accordingly, wherein the local information is the log information of multiple devices, and the cloud information is the log information corresponding to the server. The location of the private key theft is determined by the corresponding local information and cloud information. When the key in the cloud is stolen, it is a cloud private key loss type; when the key on the device side is stolen, that is, when the local key is stolen, since the local key is stored in the dongle, it is necessary to determine the security status of the dongle. If the dongle is safe, it means that there is no problem with the security of the dongle itself, but the private key in it is leaked, then the cracker may be able to use the leaked private key to activate any number of devices, which belongs to the first local private key loss type; if the security status of the dongle is unsafe, the security of the dongle itself has problems, that is, the cracker can read and write the dongle, it can be considered that all the keys in the dongle have been leaked, and the cracker can activate any number of devices in an offline activation mode, which belongs to the second local private key loss type.
[0058] Step S20: When the current private key loss type is the first local private key loss type, the device-side firmware is updated.
[0059] Specifically, in the present application, when the current private key loss type is the first local private key loss type, the device-side firmware can be updated only through OTA, the algorithm in the API of the verification system can be updated, and the signature of the key can be added to the blacklist.
[0060] When the current private key loss type is the first local private key loss type, updating the device-side firmware specifically includes:
[0061] When the current private key loss type is the first local private key loss type, obtaining information of the device end where the key is stolen;
[0062] Update the public key stored on the device, update the corresponding device firmware via OTA, and add the signature of the stolen key to the blacklist.
[0063] Specifically, the information of the device where the key was stolen is obtained to update only the public key stored on the device, update the corresponding device firmware through OTA, and verify the algorithm in the system API to prevent unauthorized use, so that unauthorized users who use leaked private keys cannot pass the verification, thereby protecting the software from illegal copying or use. Correspondingly, the algorithm can also be updated to enhance security, and the introduction of new algorithms can increase the complexity of the program and make it difficult to crack, thereby improving overall security. After verification, the signature of the stolen key is added to the blacklist to prevent it from being further used.
[0064] Step S30: When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair.
[0065] Specifically, in the present invention, when the current private key loss type is the second local private key loss type, the cloud key pair must be updated accordingly. If there is a problem with the security of the dongle itself, the corresponding cloud key pair must be updated, and the storage medium must be replaced, and the cloud key pair must be updated accordingly.
[0066] When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair, specifically including:
[0067] When the current private key loss type is the second local private key loss type, replace the encrypted storage medium, update the cloud key pair, and obtain the second local public-private key pair;
[0068] The device-side firmware is updated according to the second local public-private key pair, and the device-side is restarted.
[0069] Specifically, in the present application, when the current private key loss type is the second local private key loss type, the corresponding encrypted storage medium is replaced. In one embodiment of the present application, the replaceable secure storage medium may be a TPM chip, a secure SD card or a secure SIM card.
[0070] Further, the updating of the cloud key pair to obtain the second local public-private key pair specifically includes:
[0071] Stop the current cloud service and notify the corresponding device;
[0072] Update the cloud key pair to obtain a second local public-private key pair, and send the public key in the second local public-private key pair to each device;
[0073] The service configuration in the cloud is updated according to the private key in the second local public-private key pair, and the old key is deleted in the cloud.
[0074] Specifically, in the present application, when updating the cloud key, the old cloud service must be stopped first and a notification must be given. At this time, all devices should not be able to be activated online, but offline activation will not be affected. When creating a new cloud service, the cloud key pair is updated to obtain a new key, that is, a second local public-private key pair, and the corresponding public key is sent to each device. After that, the cloud service, that is, the server-side service, is updated, and the server-side service configuration is updated with the new private key to ensure that all services use the new key pair for encryption and authentication, and in the server-side service, the old key pair is marked as invalid and deleted to prevent it from being further used.
[0075] Furthermore, in the second type of local private key loss, for offline activation, it is necessary to update the activation tool and all dongles, integrate the new cloud public key, and deal with the compatibility issues between the old version and the new version.
[0076] Further, the updating of the cloud key pair to obtain the second local public-private key pair also includes:
[0077] Pre-set storage space;
[0078] When the cloud key pair is updated, a log corresponding to the update operation of the cloud key pair is stored in the storage space.
[0079] Specifically, in the present application, when the key is updated, the logs of the entire update process are stored and recorded to ensure that all operations have detailed log records for post-auditing and monitoring.
[0080] Further, updating the device-side firmware according to the second local public-private key pair and restarting the device-side specifically includes:
[0081] Obtaining updated firmware, and packaging the updated firmware to obtain a firmware package;
[0082] Sign the firmware package according to the second local public-private key pair to obtain a signed firmware package, and send the signed firmware package to each device through the OTA service;
[0083] Receive update information from multiple devices, and when the update is complete, instruct the device to restart and run with the firmware.
[0084] Specifically, after the public key in the second local public-private key pair is sent to each device, the corresponding cloud service configuration needs to be updated. The specific update process is: the server first packages the updated firmware into OTA format, and then uses the server side, that is, the new private key in the cloud, to sign the firmware package to ensure the integrity and source of the firmware, and then push the firmware package to each affected device through the OTA service. After the device receives the corresponding firmware package, it uses the new public key for verification. After the verification is passed, the device automatically installs and updates the firmware. After the update is completed, the corresponding unfinished information, that is, the update information, is sent to the server. The server instructs the device to restart and run with the firmware. The device restarts and runs with the new firmware to ensure that all functions and security features are up to date.
[0085] Step S40: When the current private key loss type is a cloud private key loss type, the cloud key pair is updated accordingly to obtain a cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair.
[0086] It should be noted that when the current private key loss type is the cloud private key loss type, all encryption measures are meaningless. Only the cloud key pair can be updated, and all device-side firmware can be updated through OTA, and the corresponding process of updating the cloud key pair is the same as the process of updating the cloud key pair when the current private key loss type is the second local private key loss type, and the process of updating the device-side firmware according to the cloud public-private key pair is also the same as the process of updating the device-side firmware when the current private key loss type is the second local private key loss type, only the generated key pair is different.
[0087] When the key theft prompt information is obtained, the present invention obtains local information and cloud information, and determines the current private key theft type according to the local information and cloud device information; when the current private key loss type is the first local private key loss type, the device-side firmware is updated; when the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair; when the current private key loss type is the cloud private key loss type, the cloud key pair is updated accordingly to obtain the cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair.
[0088] Furthermore, if Figure 2 As shown, based on the above-mentioned key theft processing method, the present invention also provides a key theft processing system, wherein the key theft processing system includes:
[0089] The type determination module 21 is used to obtain local information and cloud information when the key theft prompt information is obtained, and determine the current private key theft type according to the local information and cloud device information;
[0090] A first processing module 22, configured to update the device-side firmware when the current private key loss type is the first local private key loss type;
[0091] The second processing module 23 is used to update the cloud key pair accordingly when the current private key loss type is the second local private key loss type, obtain the second local public-private key pair, and update the device-side firmware according to the second local public-private key pair;
[0092] The third processing module 24 is used to update the cloud key pair accordingly when the current private key loss type is the cloud private key loss type, obtain the cloud public-private key pair, and update the device-side firmware according to the cloud public-private key pair.
[0093] Furthermore, if Figure 3 As shown, based on the above-mentioned key theft processing method and system, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0094] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a key theft processing program 40 is stored on the memory 20, and the key theft processing program 40 can be executed by the processor 10, thereby realizing the key theft processing method in the present application.
[0095] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the key theft processing method.
[0096] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0097] In one embodiment, when the processor 10 executes the key theft processing program 40 in the memory 20, the following steps are implemented:
[0098] When the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information;
[0099] When the current private key loss type is the first local private key loss type, updating the device-side firmware;
[0100] When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair;
[0101] When the current private key loss type is a cloud private key loss type, the cloud key pair is updated accordingly to obtain a cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair.
[0102] Optionally, when the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information, specifically including:
[0103] When receiving a key theft warning message, obtain local information and cloud information;
[0104] Determine the location where the private key is stolen based on the local information and the cloud information;
[0105] When the key theft location is the key theft in the cloud, the current private key theft type is the cloud private key loss type;
[0106] When the key theft location is a local key theft, determining the security status of the local dongle;
[0107] When the dongle security status is safe, the current private key theft type is the first local private key loss type;
[0108] When the dongle security status is unsafe, the current private key theft type is the second local private key loss type.
[0109] Optionally, when the current private key loss type is the first local private key loss type, updating the device-side firmware specifically includes:
[0110] When the current private key loss type is the first local private key loss type, obtaining information of the device end where the key is stolen;
[0111] Update the public key stored on the device, update the corresponding device firmware via OTA, and add the signature of the stolen key to the blacklist.
[0112] Optionally, when the current private key loss type is the second local private key loss type, updating the cloud key pair accordingly to obtain the second local public-private key pair, and updating the device-side firmware according to the second local public-private key pair specifically includes:
[0113] When the current private key loss type is the second local private key loss type, replace the encrypted storage medium, update the cloud key pair, and obtain the second local public-private key pair;
[0114] The device-side firmware is updated according to the second local public-private key pair, and the device-side is restarted.
[0115] Optionally, updating the cloud key pair to obtain a second local public-private key pair specifically includes:
[0116] Stop the current cloud service and notify the corresponding device;
[0117] Update the cloud key pair to obtain a second local public-private key pair, and send the public key in the second local public-private key pair to each device;
[0118] The service configuration in the cloud is updated according to the private key in the second local public-private key pair, and the old key is deleted in the cloud.
[0119] Optionally, the updating of the cloud key pair to obtain a second local public-private key pair may also include:
[0120] Pre-set storage space;
[0121] When the cloud key pair is updated, a log corresponding to the update operation of the cloud key pair is stored in the storage space.
[0122] Optionally, updating the device firmware according to the second local public-private key pair and restarting the device specifically includes:
[0123] Obtaining updated firmware, and packaging the updated firmware to obtain a firmware package;
[0124] Sign the firmware package according to the second local public-private key pair to obtain a signed firmware package, and send the signed firmware package to each device through the OTA service;
[0125] Receive update information from multiple devices, and when the update is complete, instruct the device to restart and run with the firmware.
[0126] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a key theft processing program, and when the key theft processing program is executed by a processor, the steps of the key theft processing method described above are implemented.
[0127] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or terminal including the element.
[0128] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0129] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for handling key theft, characterized in that: The key theft processing method comprises: When the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information; When the current private key loss type is the first local private key loss type, updating the device-side firmware; When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair; When the current private key loss type is a cloud private key loss type, the cloud key pair is updated accordingly to obtain a cloud public-private key pair, and the device-side firmware is updated according to the cloud public-private key pair; When the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information, specifically including: When receiving a key theft warning message, obtain local information and cloud information; Determine the location where the private key is stolen based on the local information and the cloud information; When the key theft location is the key theft in the cloud, the current private key theft type is the cloud private key loss type; When the key theft location is a local key theft, determining the security status of the local dongle; When the dongle security status is safe, the current private key theft type is the first local private key loss type; When the dongle security status is unsafe, the current private key theft type is the second local private key loss type; Local information is the log information of multiple devices, and cloud information is the log information corresponding to the server; When the current private key loss type is the first local private key loss type, updating the device-side firmware specifically includes: When the current private key loss type is the first local private key loss type, obtaining information of the device end where the key is stolen; Update the public key stored on the device, update the corresponding device firmware via OTA, and add the signature of the stolen key to the blacklist; Obtain the information of the device where the key was stolen and only update the public key stored on the device. Update the corresponding device firmware through OTA and verify the algorithm in the system API to prevent unauthorized use. This can prevent unauthorized users who use the leaked private key from passing the verification. When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair, specifically including: When the current private key loss type is the second local private key loss type, replace the encrypted storage medium, update the cloud key pair, and obtain the second local public-private key pair; Updating the device firmware according to the second local public-private key pair, and restarting the device; When updating the cloud key, first stop the old cloud service and give a notification. At this time, all devices cannot be activated online, but offline activation is not affected.
2. The key theft processing method according to claim 1, characterized in that: The updating of the cloud key pair to obtain the second local public-private key pair specifically includes: Stop the current cloud service and notify the corresponding device; Update the cloud key pair to obtain a second local public-private key pair, and send the public key in the second local public-private key pair to each device; The service configuration in the cloud is updated according to the private key in the second local public-private key pair, and the old key is deleted in the cloud.
3. The key theft processing method according to claim 1, characterized in that: The updating of the cloud key pair to obtain the second local public-private key pair also includes: Pre-set storage space; When the cloud key pair is updated, a log corresponding to the update operation of the cloud key pair is stored in the storage space.
4. The key theft processing method according to claim 1, characterized in that: The updating of the device-side firmware according to the second local public-private key pair and restarting the device-side specifically includes: Obtaining updated firmware, and packaging the updated firmware to obtain a firmware package; Sign the firmware package according to the second local public-private key pair to obtain a signed firmware package Sending the signed firmware package to each device via OTA service; Receive update information from multiple devices, and when the update is complete, instruct the device to restart and run with the firmware.
5. A key theft processing system, characterized in that: The key theft processing system comprises: A type judgment module is used to obtain local information and cloud information when key theft prompt information is obtained, and judge the current private key theft type according to the local information and cloud device information; A first processing module, configured to update the device-side firmware when the current private key loss type is the first local private key loss type; A second processing module, configured to update the cloud key pair accordingly when the current private key loss type is the second local private key loss type, obtain the second local public-private key pair, and update the device-side firmware according to the second local public-private key pair; A third processing module is used to update the cloud key pair accordingly when the current private key loss type is a cloud private key loss type, obtain a cloud public-private key pair, and update the device-side firmware according to the cloud public-private key pair; When the key theft prompt information is obtained, local information and cloud information are obtained, and the current private key theft type is determined according to the local information and cloud device information, specifically including: When receiving a key theft warning message, obtain local information and cloud information; Determine the location where the private key is stolen based on the local information and the cloud information; When the key theft location is the key theft in the cloud, the current private key theft type is the cloud private key loss type; When the key theft location is a local key theft, determining the security status of the local dongle; When the dongle security status is safe, the current private key theft type is the first local private key loss type; When the dongle security status is unsafe, the current private key theft type is the second local private key loss type; Local information is the log information of multiple devices, and cloud information is the log information corresponding to the server; When the current private key loss type is the first local private key loss type, updating the device-side firmware specifically includes: When the current private key loss type is the first local private key loss type, obtaining information of the device end where the key is stolen; Update the public key stored on the device, update the corresponding device firmware via OTA, and add the signature of the stolen key to the blacklist; Obtain the information of the device where the key was stolen and only update the public key stored on the device. Update the corresponding device firmware through OTA and verify the algorithm in the system API to prevent unauthorized use. This can prevent unauthorized users who use the leaked private key from passing the verification. When the current private key loss type is the second local private key loss type, the cloud key pair is updated accordingly to obtain the second local public-private key pair, and the device-side firmware is updated according to the second local public-private key pair, specifically including: When the current private key loss type is the second local private key loss type, replace the encrypted storage medium, update the cloud key pair, and obtain the second local public-private key pair; Updating the device firmware according to the second local public-private key pair, and restarting the device; When updating the cloud key, first stop the old cloud service and give a notification. At this time, all devices cannot be activated online, but offline activation is not affected.
6. A terminal, characterized in that: The terminal includes: a memory, a processor, and a key theft processing program stored in the memory and executable on the processor. When the key theft processing program is executed by the processor, the steps of the key theft processing method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a key theft processing program, and when the key theft processing program is executed by a processor, the steps of the key theft processing method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Network authentication method and system based on data link encryption transmission
CN104125239A
Firmware verification method and system, server and electronic device
CN109829294A