File key storage method, system and apparatus, electronic device, and storage medium
View Patent ↗The present disclosure discloses a file key storage method, system and apparatus, an electronic device, and a storage medium. A terminal generates, after receiving an encryption request for a target file, a key for the target file based on the encryption request, and transmits a key storage request to an external safety device to request the external safety device to store a correspondence between an identifier of the target file and the key.
1. A file key storage method, performed by a terminal, the method comprising:
receiving an encryption request for a target file;
generating a key for the target file based on the encryption request; and
transmitting a key storage request to an external safety device, wherein the key storage request is configured to request the external safety device to store a correspondence between an identifier of the target file and the key,
wherein the external safety device is a wearable device comprising a first operating system and a second operating system, a storage space of the first operating system being independent of a storage space of the second operating system; and
wherein said transmitting the key storage request to the external safety device comprises:
transmitting the key storage request to the first operating system of the wearable device, wherein the key storage request is configured 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.
2. The file key storage method according to claim 1 , wherein the second operating system is a Real-Time Operating System (RTOS).
3. The file key storage method according to claim 1 , wherein power consumption of the first operating system is greater than power consumption of the second operating system.
4. The file key storage method according to claim 1 , comprising, subsequent to said transmitting the key storage request to the external safety device:
receiving a decryption request for the target file;
transmitting a key retrieval request to the external safety device based on the decryption request, wherein the key retrieval request carries the identifier of the target file and is configured to request the key corresponding to the identifier of the target file from the external safety device; and
receiving the key returned by the external safety device, and decrypting the target file based on the key.
5. The file key storage method according to claim 1 , wherein the external safety device is a smart watch, the first operating system is an Android system and the second operating system is a Real-Time Operating System (RTOS),
wherein said transmitting the key storage request to the external safety device comprises:
transmitting the key storage request to the Android system, the key storage request being forwarded by the Android system to the RTOS.
6. The file key storage method according to claim 1 , wherein the target file is a picture, a document, an account number and a password of an application, or an unlock password.
7. The file key storage method according to claim 1 , wherein the encryption request carries an encryption manner, wherein the encryption manner comprises password encryption, verification code encryption, or pattern encryption.
8. The file key storage method according to claim 1 , wherein the external safety device is a device connected to the terminal via a USB interface or in a wireless way.
9. A file decryption method, performed by a terminal, the method comprising:
receiving a decryption request for a target file;
transmitting a key retrieval request to an external safety device based on the decryption request, wherein the key retrieval request carries an identifier of the target file and is configured to request a key corresponding to the identifier of the target file from the external safety device; and
receiving the key returned by the external safety device, and decrypting the target file based on the key,
wherein the external safety device is a wearable device comprising a first operating system and a second operating system, a storage space of the first operating system being independent of a storage space of the second operating system; and
wherein said transmitting the key retrieval request to the external safety device comprises:
transmitting the key retrieval request to the first operating system of the wearable device, wherein the key retrieval request is configured to instruct the first operating system to retrieve the key corresponding to the identifier of the target file from the second operating system.
10. The file decryption method according to claim 9 , wherein the second operating system is a Real-Time Operating System (RTOS).
11. The file decryption method according to claim 9 , wherein said transmitting the key retrieval request to the external safety device comprises:
transmitting the key retrieval request to the first operating system; the key retrieval request being transmitted by the first operating system to the second operating system, the second operating system transmitting the key corresponding to the identifier of the target file to the first operating system.
12. An electronic device, comprising:
a memory having a computer program stored thereon; and
a processor,
wherein the computer program, when executed by the processor, causes the electronic device to:
receive an encryption request for a target file;
generate a key for the target file based on the encryption request; and
transmit a key storage request to an external safety device, wherein the key storage request is configured to request the external safety device to store a correspondence between an identifier of the target file and the key,
wherein the external safety device is a wearable device comprising a first operating system and a second operating system, a storage space of the first operating system being independent of a storage space of the second operating system; and
wherein said transmitting the key storage request to the external safety device comprises:
transmitting the key storage request to the first operating system of the wearable device, wherein the key storage request is configured 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.
13. The electronic device according to claim 12 , wherein the second operating system is a Real-Time Operating System (RTOS).
14. The electronic device according to claim 12 , wherein power consumption of the first operating system is greater than power consumption of the second operating system.
15. The electronic device according to claim 12 , wherein the computer program, when executed by the processor, further causes the electronic device to, subsequent to said transmitting the key storage request to the external safety device:
receive a decryption request for the target file;
transmit a key retrieval request to the external safety device based on the decryption request, wherein the key retrieval request carries the identifier of the target file and is configured to request the key corresponding to the identifier of the target file from the external safety device; and
receive the key returned by the external safety device, and decrypting the target file based on the key.
16. The electronic device according to claim 12 , wherein the external safety device is a smart watch, the first operating system is an Android system and the second operating system is a Real-Time Operating System (RTOS),
wherein said transmitting the key storage request to the external safety device comprises:
transmitting the key storage request to the Android system, the key storage request being forwarded by the Android system to the RTOS.
17. The electronic device according to claim 12 , wherein the target file is a picture, a document, an account number and a password of an application, or an unlock password.