File key storage method, system, device, electronic device and storage medium
By receiving encryption requests in the smartphone terminal device and generating a secret key, and then storing it in an external security device, the problem that the openness of the smartphone operating system makes it difficult to guarantee the security of the secret key, and achieving higher secret key storage security.
Patent Information
- Application Number
- CN202010124455.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2040-09-24
AI Technical Summary
The openness of the smartphone operating system makes its code logic and encryption solutions easy to be stolen, which in turn affects the security of system-level permissions of terminal devices, making it difficult to ensure the security of the secret keys stored in the operating system.
By receiving the encryption request of the target file in the terminal device, the key of the target file is generated and stored in the external security device. The external security device independently stores and isolates the key to ensure that it is not easy to be stolen.
Improve the security of key storage, prevent keys from being stolen, and ensure the security of the file encryption and decryption process.
Smart Images

Figure CN113312658B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a file key storage method, system, device, electronic device and storage medium. Background Art
[0002] With the advancement of technology, terminal devices are becoming more and more popular. In the process of using smart phones, many related files will be stored in the terminal devices, some of which are actively uploaded by users, and some are automatically generated during the use of applications.
[0003] Taking smartphones as an example, generally, some highly private files (hereinafter referred to as private files) are stored in smartphones after being encrypted. Therefore, all encryption schemes for private files are based on the operating system of the smartphone. However, some operating systems used in current smartphones are naturally open, such as the Android system, which makes their code logic and schemes easy to be known.
[0004] Therefore, when the system-level permissions of a terminal device are stolen, the security of the secret keys stored in the operating system of the terminal device is difficult to guarantee. Summary of the invention
[0005] The embodiments of the present application provide a file key storage method, system, device, electronic device and storage medium, which can store keys more securely.
[0006] A file key storage method, the method comprising:
[0007] Receive an encryption request for a target file;
[0008] Generate the secret key of the target file according to the encryption request;
[0009] A key storage request is sent to an external security device; the key storage request is used to request the external security device to store the correspondence between the identifier of the target file and the key.
[0010] A file decryption method, the method comprising:
[0011] Receive a decryption request for a target file;
[0012] According to the decryption request, a key acquisition request is sent to the external security device; the key acquisition request carries the identifier of the target file; the key acquisition request is used to request the key corresponding to the identifier of the target file from the external security device;
[0013] Receive the secret key returned by the external security device and decrypt the target file based on the secret key.
[0014] A file key storage system, the system comprising: a terminal and an external security device;
[0015] The terminal is used to receive an encryption request for a target file, generate a secret key for the target file according to the encryption request, and then send a secret key storage request to an external security device;
[0016] The external security device is used to receive the secret key storage request sent by the terminal, and store the corresponding relationship between the identifier of the target file and the secret key according to the secret key storage request.
[0017] A file key storage device, the device comprising:
[0018] A receiving module, used for receiving an encryption request for a target file;
[0019] A generation module, used to generate a secret key for a target file according to an encryption request;
[0020] The sending module is used to send a key storage request to an external security device; the key storage request is used to request the external security device to store the corresponding relationship between the identifier of the target file and the key.
[0021] An electronic device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the above-mentioned file key storage method.
[0022] A computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned file key storage method when executed by a processor.
[0023] The above-mentioned file key storage method, system, device, electronic device and storage medium, after receiving the encryption request of the target file, the terminal generates the key of the target file according to the encryption request, and sends a key storage request to the external security device; to request the external security device to store the correspondence between the identifier of the target file and the key. In this embodiment, since the terminal stores the key in the external security device after generating the key for the target file, it is equivalent to using independent storage hardware and hardware-level security isolation to store the key, so that the key is not easy to be stolen, which greatly improves the security of key storage. And what is stored in the external security device is the correspondence between the identifier of the target file and the key, through which the key of the target file can be accurately located. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 This is an application environment diagram of a file key storage method in an embodiment;
[0026] Figure 2 is a schematic diagram of the internal structure of a terminal in one embodiment;
[0027] Figure 3 is a flowchart of a method for storing a file key in one embodiment;
[0028] Figure 4 A schematic diagram of a dual system of a smart watch in one embodiment;
[0029] Figure 5 A flowchart of a file key storage method in another embodiment;
[0030] Figure 6 A schematic diagram of file encryption and decryption in one embodiment;
[0031] Figure 7 is a structural block diagram of a file key storage device in one embodiment;
[0032] Figure 8 4 is a structural block diagram of a file key storage device in an embodiment. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] Figure 1 FIG. 1 is a schematic diagram of an application environment of a file key storage method in an embodiment. Figure 1 As shown, the application environment includes a terminal 110 and an external security device 120, wherein the terminal 110 includes but is not limited to electronic devices such as smart phones, personal computers, laptops, desktop computers, media players, smart TVs, tablet computers, etc. The external security device 120 may be a portable wearable device, for example, the portable wearable device may be a smart watch, a smart necklace, a smart helmet, etc. The external security device and the terminal may be connected via Bluetooth, infrared, wifi, USB interface, etc.
[0035] The internal structure diagram of the terminal 110 can be referred to Figure 2 As shown in the figure, the internal structure diagram of the terminal includes a processor and a memory connected by a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire terminal. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a file key storage method provided in each of the following embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium.
[0036] The following will explain in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems through embodiments and in combination with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the present application provides a file key storage method, Figure 3-Figure 6 The execution subject is the terminal, where Figure 3-Figure 6 The execution subject may also be a file key storage device, wherein the device may be implemented as part or all of the terminal through software, hardware, or a combination of software and hardware.
[0037] Figure 3 Flow chart of a method for storing a file key in one embodiment. The method for storing a file key in this embodiment is executed on Figure 1 The terminal in is described as an example. Figure 3 As shown, the file key storage method includes steps 302 to 306.
[0038] Step 302: Receive an encryption request for a target file.
[0039] The target file represents the file to be encrypted in the current terminal. For example, in actual applications, when users store some relatively private files, they will encrypt these private files to ensure privacy. The file to be encrypted can be a picture, for example, the encryption pattern of the payment software, including the user's face unlocking or payment image, etc.; the file to be encrypted can also be a document, for example, the user actively edits or uploads the document to the terminal; the file to be encrypted can also be other types, such as the account and password of each application, the unlocking password, etc.; this embodiment does not limit the type and quantity of the target file.
[0040] The encryption request for the target file indicates a request triggered when the current user needs to encrypt the target file. For example, the user triggers the encryption request for the target file on the terminal display screen, and the terminal receives the encryption request for the target file. The user may trigger the encryption request for the target file by voice, touch, or external input device, which is not limited in this embodiment.
[0041] In some scenarios, the encryption request may carry the encryption method, for example, through password encryption, verification code encryption, pattern encryption, etc.
[0042] Step 304: Generate a secret key for the target file according to the encryption request.
[0043] After receiving the encryption request, the terminal encrypts the target file and generates the secret key of the target file. The secret key can also be called a key, which refers to a secret information used to complete cryptographic applications such as encryption, decryption, and integrity verification.
[0044] The method for generating the target file key by the terminal is not limited. For example, after receiving the encryption request, the terminal can encrypt the target file by a built-in encryption algorithm and generate the target file key after encryption. Of course, the encryption algorithm can be a data encryption algorithm (Data Encryption Algorithm, DEA), a data encryption standard (Data Encryption Standard, DES), a hash algorithm, etc., and this embodiment does not limit the encryption algorithm.
[0045] Step 306, sending a key storage request to the external security device; the key storage request is used to request the external security device to store the correspondence between the identifier of the target file and the key.
[0046] The external security device refers to an external device used to store the secret key of the target file. For example, the external device can be a device connected to the terminal through a UEB interface, such as a USB shield; or a device connected to the terminal wirelessly, such as a wearable device that can be connected via Bluetooth or WiFi. There is no limitation on the type of the external security device.
[0047] Based on the secret key of the target file generated by the terminal, the terminal sends the correspondence between the target file and the secret key to the external security device for storage. That is, the terminal sends a secret key storage request to the external security device, and the secret key storage request is used to request the external security device to store the correspondence between the identifier of the target file and the secret key. The identifier of the target file can be text, numbers, letters, or a combination thereof, which is not limited.
[0048] In the file key storage method of this embodiment, after receiving the encryption request of the target file, the terminal generates the key of the target file according to the encryption request, and sends a key storage request to the external security device; to request the external security device to store the correspondence between the identifier of the target file and the key. In this embodiment, since the terminal stores the key in the external security device after generating the key for the target file, it is equivalent to using independent storage hardware and hardware-level security isolation to store the key, so that the key is not easy to be stolen, which greatly improves the security of key storage. And what is stored in the external security device is the correspondence between the identifier of the target file and the key, through which the key of the target file can be accurately located.
[0049] For the external security device, taking the external security device being a wearable device as an example, the process of the terminal sending a key storage request to the external security device and the external security device storing the key is described.
[0050] In one embodiment, the external security device is a wearable device; the sending of the key storage request to the external security device includes: sending the key storage request to the wearable device. Optionally, the wearable device includes an RTOS system; the sending of the key storage request to the wearable device includes: sending the key storage request to the wearable device; the key storage request is used to request the wearable device to store the corresponding relationship between the identifier of the target file and the key in the RTOS system.
[0051] In this embodiment, if the external security device is a wearable device, the terminal establishes a connection with the wearable device in advance, and then sends a key storage request to the wearable device, requesting the wearable device to store the correspondence between the identifier of the target file and the key of the target file.
[0052] In one scenario, if the wearable device includes an RTOS system, wherein the RTOS system is a real-time operating system (RTOS), which will run in order, manage system resources, and provide a consistent basis for developing applications. Since the biggest feature of the RTOS system compared to the general operating system is "real-time", if there is a task to be executed, the real-time operating system will immediately (in a short time) execute the task without a long delay, and this feature ensures the timely execution of each task. Based on these characteristics of the RTOS system, if the wearable device includes an RTOS system, after the terminal sends a key storage request to the wearable device, the wearable device will store the corresponding relationship between the identifier of the target file and the key in the RTOS system, so that when the file key storage method provided by the present application is actually applied, the file key storage process can be completed quickly and in real time.
[0053] In another scenario, if the wearable device includes two operating systems, one of which consumes more power than the other operating system, for example, the operating system with high power consumption is a common operating system of the wearable device, and the operating system with low power consumption is a backup operating system of the wearable device. For this scenario, an embodiment is provided to illustrate the process of a terminal sending a key storage request to an external security device and the external security device storing a key.
[0054] In one embodiment, the wearable device includes a first operating system and a second operating system, and the storage spaces of the first operating system and the second operating system are independent of each other; then the above-mentioned sending of a key storage request to the wearable device includes: sending a key storage request to the first operating system of the wearable device, and the key storage request is used to instruct the first operating system to store the corresponding relationship between the identifier of the target file and the key in the second operating system. Optionally, the power consumption of the first operating system is greater than the power consumption of the second operating system. Optionally, the first operating system and the second operating system use different chips.
[0055] In this embodiment, the wearable device includes a first operating system and a second operating system, and the storage spaces of the first operating system and the second operating system are independent of each other. The power consumption of the first operating system in the wearable device is greater than that of the second operating system. The second operating system with lower power consumption is used to store the correspondence between the identifier of the target file and the key, which can reduce the power consumption of the wearable device. In addition, the first operating system and the second operating system use different chips. Even in the wearable device, chip-level physical isolation is used to improve the security of the correspondence between the identifier of the target file and the key. In this way, when the terminal device sends a key storage request to the wearable device, the key storage request first reaches the first operating system. After the first operating system receives the key storage request, the correspondence between the identifier of the target file and the key is stored in the second operating system. Since the storage spaces of the two operating systems are independent and the second operating system is not a common system for wearable devices, the key is stored in the second operating system, which can ensure the security of the key storage.
[0056] In one embodiment, the first operating system is an Android system, and the second operating system is an RTOS system; optionally, the wearable device is a smart watch.
[0057] Take a smart watch including an Android system and an RTOS system as an example, that is, the smart watch has dual systems and dual modes, such as Figure 4The figure shows the schematic diagram of the same sports APP relative to two operating systems. The large core of the smart watch uses the Android system, and the small core uses the RTOS system. The two use different chips and have independent storage spaces. Among them, users can switch freely between the Android system and the RTOS system. The Android system provides more complete functions, and the RTOS system provides low-power, ultra-long standby and security reinforcement capabilities. The power consumption of the Android system is greater than that of the RTOS system.
[0058] When the smart watch uses the large-core Android system, it corresponds to the normal mode of the smart watch because of its relatively complete functions. When the smart watch uses the small-core RTOS system, it corresponds to the bracelet mode of the smart watch because the RTOS system does not switch to a low-power ultra-long standby mode.
[0059] For example, after the terminal generates the secret key of the target file, it sends a secret key storage request carrying the target file identifier and the corresponding relationship between the secret key to the big core Android system of the smart watch. After receiving the secret key storage request, the big core Android system of the smart watch continues to forward it to the small core RTOS system of the smart watch, that is, to store the corresponding relationship between the identifier of the target file and the secret key. In this way, the secret key is stored using independent storage hardware and hardware-level security isolation, and the secret key is not easily stolen, which greatly improves the security of the key storage.
[0060] In this embodiment, the terminal stores the secret key of the target file in the wristband mode of the smart watch. When the target file needs to be decrypted, the terminal is connected to the wristband, and the target file can be opened with the secret key stored in the wristband mode, thereby ensuring the security of the target file when used.
[0061] In addition to the process of encrypting the target file and storing the secret key involved in the above embodiment, in actual application, when the target file needs to be used, it is necessary to obtain the secret key to open the target file. Therefore, an embodiment is provided to illustrate the target file decryption process. Figure 5 As shown, in one embodiment, after sending a key storage request to an external security device, the method includes:
[0062] Step S502: receiving a decryption request for a target file.
[0063] The target file can refer to the description in the above step S302, which will not be repeated here. The decryption request refers to a request triggered when the user wants to decrypt the target file. For example, the user can trigger the decryption request on the display screen of the terminal.
[0064] Step S504: according to the decryption request, a key acquisition request is sent to the external security device; the key acquisition request carries the identifier of the target file; the key acquisition request is used to request the key corresponding to the identifier of the target file from the external security device.
[0065] Similarly, the external security device can refer to the description in the previous embodiment, which will not be repeated here.
[0066] In this step, after receiving the decryption request, the terminal sends a key acquisition request to the external security device. In order to accurately obtain the key of the target file, the terminal sends the key acquisition request to the external security device with the identifier of the target file. After the external security device receives the key acquisition request, it can locate the key corresponding to the target file according to the identifier of the target file and send the key back to the terminal.
[0067] Step S506, receiving the secret key returned by the external security device, and decrypting the target file according to the secret key.
[0068] After the terminal receives the secret key returned by the external security device, the terminal can decrypt the target file according to the secret key. Since the secret key is stored in independent storage hardware and hardware-level security isolation, the storage security is relatively high. When the secret key is used to unlock the target file and apply the target file, the security of the target file is also greatly guaranteed.
[0069] In one embodiment, if the external security device is a wearable device and the wearable device includes an RTOS system, then in one embodiment, the terminal sends a key acquisition request to the external security device, including: sending a key acquisition request to the wearable device; the key acquisition request is used to request the RTOS system of the wearable device for a key corresponding to the identifier of the target file.
[0070] If the external security device is a wearable device, then the terminal has pre-stored the file key in the wearable device. When the wearable device includes an RTOS system, the file key is stored in the RTOS system of the wearable device. Then, the terminal sends a key acquisition request to the external security device to request the file key from the RTOS system of the wearable device. Based on the introduction of the RTOS system characteristics in the previous embodiment, the RTOS system of the wearable device will respond immediately after receiving the key acquisition request and send the key corresponding to the target file identifier to the terminal. In this way, by requesting the file key from the RTOS system of the wearable device, the file key can be quickly and real-time acquired to complete the subsequent file decryption process.
[0071] In another embodiment, if the external security device is a wearable device, the wearable device includes a first operating system and a second operating system, and the storage space of the first operating system and the second operating system are independent of each other; then the above-mentioned sending of a key acquisition request to the external security device includes: sending a key acquisition request to the first operating system of the wearable device, and the key acquisition request is used to instruct the first operating system to obtain a key corresponding to the identifier of the target file from the second operating system.
[0072] In this embodiment, the first operating system and the second operating system of the wearable device can refer to the introduction in the aforementioned embodiment, and will not be described again in this embodiment.
[0073] In the case where the wearable device includes a first operating system and a second operating system, the terminal pre-stores the file key in the second operating system of the wearable device. Then, the terminal sends a key acquisition request to the external security device to request the file key from the second operating system of the wearable device.
[0074] Optionally, the first operating system and the second operating system use different chips, and the power consumption of the first operating system in the wearable device is greater than that of the second operating system. The terminal stores the file key in advance in the second operating system with lower power consumption of the wearable device. The correspondence between the identifier and the key of the target file is stored in the second operating system with lower power consumption, which can reduce the power consumption of the wearable device. In addition, the first operating system and the second operating system use different chips, and even in the wearable device, chip-level physical isolation is used to improve the security of the target file key.
[0075] For example, the wearable device is a smart watch, the first operating system is an Android system, and the second operating system is an RTOS system. When the terminal device sends a key acquisition request to the wearable device, the key acquisition request first reaches the first operating system. After the first operating system receives the key acquisition request, it continues to request the second operating system for the key corresponding to the identifier of the target file. That is, the terminal device sends the key acquisition request to the Android system first, and after the Android system receives it, it sends it to the RTOS system. In this way, after receiving the key acquisition request, the RTOS system will respond immediately and send the key corresponding to the identifier of the target file to the Android system, so that the Android system will continue to send it to the terminal, so as to quickly and real-time obtain the file key and complete the decryption of the target file.
[0076] like Figure 6 As shown, taking the wearable device as the above dual-system dual-mode smart watch and the terminal as a mobile phone as an example, an embodiment of storing an encrypted file key and obtaining an encrypted file key is provided, and the embodiment includes:
[0077] File encryption steps:
[0078] S11, the user encrypts the file on the mobile phone.
[0079] S12, the mobile phone creates an encrypted file and generates a corresponding secret key.
[0080] S13, the mobile phone sends the secret key to the smart watch core.
[0081] S14, the smart watch big core sends the secret key to the smart watch small core.
[0082] S15, the smart watch small core stores the secret key in the small core's independent storage space.
[0083] File decryption steps:
[0084] S21, view the encrypted file.
[0085] S22, the mobile phone obtains the secret key from the smart watch.
[0086] S23, the smart watch big core obtains the secret key from the smart watch small core.
[0087] S24, the smart watch small core returns the secret key to the smart watch big core.
[0088] S25, the smartwatch core returns the secret key to the phone.
[0089] S26, the mobile phone uses the secret key to decrypt the file.
[0090] This example provides a joint file encryption processing strategy for a mobile phone and a smart watch with a dual-core dual-system architecture. Because the file key is stored in the small core of the smart watch, and the small core of the smart watch uses an RTOS system with independent storage space, the security of the file key storage can be improved, making it difficult for intruders to obtain the file key, thereby effectively increasing the security of mobile phone files.
[0091] It should be understood that although Figure 3-Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3-Figure 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0092] In addition, the present application also provides a file key storage system, which can be referred to above Figure 1 As shown, the system includes: a terminal and an external security device; wherein the terminal is used to receive an encryption request for a target file, and generate a secret key for the target file according to the encryption request, and then send a secret key storage request to the external security device; wherein the external security device is used to receive the secret key storage request sent by the terminal, and store the correspondence between the identifier of the target file and the secret key according to the secret key storage request.
[0093] In one embodiment, the external security device is a wearable device.
[0094] In one embodiment, the wearable device includes an RTOS system; the wearable device is used to store the correspondence between the identifier of the target file and the secret key in the RTOS system.
[0095] In one embodiment, the wearable device includes a first operating system and a second operating system, and the storage spaces of the first operating system and the second operating system are independent of each other; the first operating system of the wearable device is used to receive a key storage request, and store the correspondence between the identifier of the target file and the key in the second operating system according to the key storage request.
[0096] In one embodiment, the power consumption of the first operating system is greater than the power consumption of the second operating system.
[0097] In one embodiment, the first operating system and the second operating system use different chips.
[0098] In one embodiment, the first operating system is an Android system, and the second operating system is an RTOS system.
[0099] In one embodiment, the wearable device is a smart watch.
[0100] In one embodiment, the terminal is also used to receive a decryption request for the target file, and based on the decryption request, send a key acquisition request to the external security device; and receive the key returned by the external security device, and decrypt the target file based on the key; the external security device is also used to receive the key acquisition request sent by the terminal, and based on the key acquisition request, send a key corresponding to the identifier of the target file to the terminal.
[0101] The above embodiment provides a file key storage system, whose implementation principle and technical effect are similar to those of the above embodiment of the file key storage method, and will not be repeated here.
[0102] In addition, a virtual device corresponding to the above file key storage method is also provided. In one embodiment, Figure 7 The following is a structural block diagram of a file key storage device provided by an embodiment. Figure 7As shown, the device includes: an encryption request receiving module 10, a generating module 11 and a sending module 12, wherein:
[0103] The encryption request receiving module 10 is used to receive an encryption request for a target file;
[0104] A generating module 11, used to generate a secret key of the target file according to the encryption request;
[0105] The sending module 12 is used to send a key storage request to the external security device; the key storage request is used to request the external security device to store the corresponding relationship between the identifier of the target file and the key.
[0106] In one embodiment, the sending module 12 is specifically configured to send a key storage request to the wearable device.
[0107] In one embodiment, the sending module 12 is further specifically used to send a key storage request to the wearable device; the key storage request is used to request the wearable device to store the correspondence between the identifier of the target file and the key in the RTOS system.
[0108] In one embodiment, the sending module 12 is further specifically used to send a key storage request to the first operating system of the wearable device, and the key storage request is used to instruct the first operating system to store the correspondence between the identifier of the target file and the key in the second operating system.
[0109] In one embodiment, the power consumption of the first operating system is greater than the power consumption of the second operating system.
[0110] In one embodiment, the first operating system and the second operating system use different chips.
[0111] In one embodiment, the first operating system is an Android system, and the second operating system is an RTOS system.
[0112] In one embodiment, the wearable device is a smart watch.
[0113] In one embodiment, a file key storage device is provided, such as Figure 8 As shown, the device includes: a decryption request receiving module 13, an acquisition module 14 and a decryption module 15, wherein:
[0114] A decryption request receiving module 13, used for receiving a decryption request for a target file;
[0115] The acquisition module 14 is used to send a key acquisition request to the external security device according to the decryption request; the key acquisition request carries the identifier of the target file; the key acquisition request is used to request the key corresponding to the identifier of the target file from the external security device;
[0116] The decryption module 15 is used to receive the secret key returned by the external security device and decrypt the target file according to the secret key.
[0117] In one embodiment, the acquisition module 14 is specifically used to send a key acquisition request to the wearable device; the key acquisition request is used to request the RTOS system of the wearable device for a key corresponding to the identifier of the target file.
[0118] In one embodiment, the acquisition module 14 is further specifically used to send a key acquisition request to the first operating system of the wearable device, where the key acquisition request is used to instruct the first operating system to acquire a key corresponding to the identifier of the target file from the second operating system.
[0119] The implementation principles and technical effects of all the file key storage devices provided in the above embodiments are similar to those of the above embodiments of the file key storage method, and will not be repeated here.
[0120] The division of the various modules in the above-mentioned file key storage device is only for illustration. In other embodiments, the file key storage device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned file key storage.
[0121] For the specific definition of the file key storage device, please refer to the definition of the file key storage method above, which will not be repeated here. Each module in the above-mentioned file key storage device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0122] In one embodiment, an electronic device is provided. The internal structure diagram of the electronic device can refer to the above Figure 2 As shown in the internal structure diagram of the terminal, the electronic device includes a processor and a memory connected via a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a file key storage method provided in each of the following embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a car computer, a wearable device, etc.
[0123] The implementation of each module in the file key storage device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program module constituted by the computer program may be stored in the memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.
[0124] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the file key storage method.
[0125] A computer program product comprising instructions, when the computer program product is run on a computer, enables the computer to perform a file key storage method.
[0126] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0127] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A file key storage method, characterized in that: The method comprises: Receive an encryption request for a target file; Generate a secret key for the target file according to the encryption request; Sending a key storage request to an external security device; the key storage request is used to request the external security device to store a correspondence between the identifier of the target file and the key; The external security device is a wearable device; the wearable device includes a first operating system and a second operating system; and sending a key storage request to the external security device includes: The key storage request is sent to a first operating system of the wearable device, where the key storage request is used to instruct the first operating system to store a correspondence between the identifier of the target file and the key in the second operating system.
2. The method according to claim 1, characterized in that The wearable device includes a real-time operating system RTOS system; The sending of a key storage request to an external security device includes: Sending the key storage request to the wearable device; The key storage request is used to request the wearable device to store the corresponding relationship between the identifier of the target file and the key in the RTOS system.
3. The method according to claim 1, characterized in that The storage spaces of the first operating system and the second operating system are independent of each other.
4. The method according to claim 3, characterized in that The power consumption of the first operating system is greater than the power consumption of the second operating system.
5. The method according to claim 1, characterized in that After sending the key storage request to the external security device, the method includes: Receiving a decryption request for the target file; According to the decryption request, a key acquisition request is sent to the external security device; the key acquisition request carries the identifier of the target file; the key acquisition request is used to request the external security device for a key corresponding to the identifier of the target file; Receive the secret key returned by the external security device, and decrypt the target file according to the secret key.
6. A file decryption method, characterized in that: The method comprises: Receive a decryption request for a target file; According to the decryption request, a key acquisition request is sent to the external security device; the key acquisition request carries the identifier of the target file; the key acquisition request is used to request the external security device for a key corresponding to the identifier of the target file; Receive the secret key returned by the external security device, and decrypt the target file according to the secret key; The external security device is a wearable device; the wearable device includes a first operating system and a second operating system; and the step of sending a key acquisition request to the external security device includes: The key acquisition request is sent to a first operating system of the wearable device, where the key acquisition request is used to instruct the first operating system to obtain a key corresponding to the identifier of the target file from the second operating system.
7. The method according to claim 6, characterized in that The wearable device includes an RTOS system; The sending of a key acquisition request to an external security device includes: Sending the secret key acquisition request to the wearable device; The key acquisition request is used to request the RTOS system of the wearable device for a key corresponding to the identifier of the target file.
8. The method according to claim 6, characterized in that The storage spaces of the first operating system and the second operating system are independent of each other.
9. A file key storage system, characterized in that: The system comprises: a terminal and an external security device; The terminal is used to receive an encryption request for a target file, generate a secret key for the target file according to the encryption request, and then send a secret key storage request to the external security device; The external security device is used to receive a key storage request sent by the terminal, and store a corresponding relationship between the identifier of the target file and the key according to the key storage request; Wherein, the external security device is a wearable device; the wearable device includes a first operating system and a second operating system; the sending of the key storage request to the external security device includes: sending the key storage request to the first operating system of the wearable device; The first operating system of the wearable device is used to receive a key storage request sent by the terminal, and store the corresponding relationship between the identifier of the target file and the key in the second operating system according to the key storage request.
10. A file key storage device, characterized in that: The device comprises: A receiving module, used for receiving an encryption request for a target file; A generating module, used for generating a secret key of the target file according to the encryption request; A sending module, used for sending a key storage request to an external security device; the key storage request is used for requesting the external security device to store a correspondence between the identifier of the target file and the key; The external security device is a wearable device; the wearable device includes a first operating system and a second operating system; and sending a key storage request to the external security device includes: The key storage request is sent to a first operating system of the wearable device, where the key storage request is used to instruct the first operating system to store a correspondence between the identifier of the target file and the key in the second operating system.
11. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the file key storage method according to any one of claims 1 to 8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the file key storage method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and device for generating secrete key and method and device for loading secrete key
CN101784045A