File operation method, device, equipment, and readable storage medium
Through preset path encryption tables and key management systems, the file encryption requirements are flexibly configured, and the problem of waste of resources and insufficient security in existing transparent encryption technologies is solved, and more efficient file encryption and decryption operations are achieved, thus improving file confidentiality is improved. security.
Patent Information
- Application Number
- CN202210597415.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-05-30
AI Technical Summary
The existing transparent encryption technology leads to waste of resources and poor file confidentiality and security, and cannot be flexibly configured according to the user's file encryption needs, and uses the same key for different files.
Determine whether the file needs to be encrypted through the preset path encryption table, and generate different key information according to needs, respond to file operation requests, and realize flexible encryption and decryption of different files.
Improve resource utilization, enhance file confidentiality and security, avoid unnecessary resource waste, and generate unique key information for different files to improve security.
Smart Images

Figure CN114968935B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to information security technology, and in particular to a file operation method, device, equipment, and readable storage medium. Background Art
[0002] At present, with the development of mobile Internet, how to ensure that various private files and data are not leaked is an urgent problem that needs to be solved. In response to the need for file confidentiality, transparent encryption technology came into being.
[0003] In the prior art, the general process of transparent encryption technology is: create an encrypted disk through a transparent encryption file system, and save the encryption key through configuration or command line parameters. Mount the encrypted disk to a certain directory to provide services. When the application reads and writes all files in the directory and its subdirectories, the transparent encryption file system performs corresponding encryption and decryption operations through the encryption key.
[0004] However, the above method will cause a certain waste of resources and has poor security for file confidentiality. Summary of the invention
[0005] The present disclosure provides a file operation method, device, equipment, and readable storage medium to improve resource utilization and enhance the security of file confidentiality.
[0006] According to a first aspect of the present disclosure, a file operation method is provided, comprising:
[0007] Receiving an operation request for operating a file in a target file directory;
[0008] Determine whether the file needs to be encrypted according to the target file directory and the preset path encryption table; wherein the preset path encryption table is generated in advance based on the configuration operation of the user;
[0009] If it is determined that the file needs to be encrypted, obtaining key information corresponding to the file;
[0010] The operation request is responded to based on the key information.
[0011] According to a second aspect of the present disclosure, there is provided a file operation device, comprising:
[0012] A receiving unit, used for receiving an operation request for operating a file in a target file directory;
[0013] A determination unit, configured to determine whether the file needs to be encrypted according to the target file directory and a preset path encryption table; wherein the preset path encryption table is generated in advance based on a user's configuration operation;
[0014] A response unit, configured to obtain key information corresponding to the file if it is determined that the file needs to be encrypted;
[0015] The response unit is further used to respond to the operation request based on the secret key information.
[0016] According to a third aspect of the present disclosure, an electronic device is provided, including a memory and a processor; wherein:
[0017] The memory is used to store computer programs;
[0018] The processor is used to read the computer program stored in the memory and execute the file operation method as described in the first aspect according to the computer program in the memory.
[0019] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the file operation method described in the first aspect is implemented.
[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the file operation method as described in the first aspect is implemented.
[0021] The file operation method, device, equipment, and readable storage medium provided by the present disclosure include: receiving an operation request for operating a file in a target file directory; determining whether the file needs to be encrypted according to the target file directory and a preset path encryption table; wherein the preset path encryption table is pre-generated based on the user's configuration operation; if it is determined that the file needs to be encrypted, obtaining the key information corresponding to the file; and responding to the operation request based on the key information. The method provided by this solution can flexibly configure the user's file encryption requirements through a preset path encryption table to avoid unnecessary waste of resources; different key information can be generated for different files to improve the security of file confidentiality. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a file operation method shown in an exemplary embodiment of the present disclosure;
[0023] Figure 2 A flowchart of a file operation method shown in another exemplary embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram of a file operation process shown in an exemplary embodiment of the present disclosure;
[0025] Figure 4 A structural diagram of a file operation device shown as an exemplary embodiment of the present disclosure;
[0026] Figure 5 The present invention is a structural diagram of an electronic device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0027] At present, with the development of mobile Internet, how to ensure that various private files and data are not leaked is an urgent problem that needs to be solved. In response to the need for file confidentiality, transparent encryption technology came into being.
[0028] The file system refers to the method and data structure used by the operating system to identify files on a storage device or partition; that is, the method of organizing files on a storage device. The software organization in the operating system responsible for managing and storing file information is called a file management system, or file system for short.
[0029] Data encryption refers to converting plaintext into ciphertext through encryption algorithms and encryption keys; decryption refers to restoring ciphertext to plaintext through decryption algorithms and decryption keys.
[0030] The transparency in transparent encryption means that it is imperceptible to the user. When the user opens or edits a file, the system will automatically encrypt the unencrypted file and automatically decrypt the encrypted file. The file is ciphertext on the file system and plaintext in the memory. Once it leaves the usage environment, the application cannot be opened because it cannot obtain the automatic decryption service, thus protecting the file content.
[0031] In the prior art, the general process of transparent encryption technology is: create an encrypted disk through a transparent encryption file system, and save the encryption key through configuration or command line parameters. Mount the encrypted disk to a certain directory to provide services. When the application reads and writes all files in the directory and its subdirectories, the transparent encryption file system performs corresponding encryption and decryption operations through the encryption key.
[0032] However, the above method will encrypt and decrypt the read and write operations on the entire encrypted disk, and will also encrypt files that do not need to be encrypted. It cannot be flexibly configured according to the user's file encryption needs, which will result in some unnecessary waste of resources. At the same time, the same key is used for different files, which lacks the security of file confidentiality.
[0033] In order to solve the above technical problems, in the solution provided by the present invention, the user's file encryption requirements can be flexibly configured through a preset path encryption table to avoid unnecessary waste of resources; different key information can be generated for different files to improve the security of file confidentiality.
[0034] Figure 1 The figure is a flowchart of a file operation method shown in an exemplary embodiment of the present disclosure.
[0035] like Figure 1 As shown, the file operation method provided in this embodiment includes:
[0036] Step 101: receiving an operation request for operating a file in a target file directory.
[0037] The method provided by the present disclosure may be executed by an electronic device with computing capability, such as a computer, etc. The electronic device is capable of receiving an operation request for operating a file in a target file directory.
[0038] Specifically, the operation request includes a write request and a read request. The operation request includes a target file directory. If the operation request is a write request, the write request can be used to instruct to write a file into the target file directory; if the operation request is a read request, the read request can be used to instruct to read a file in the target file directory.
[0039] The target file directory may be, for example, / user / local / encrypt.
[0040] Step 102, determining whether the file needs to be encrypted according to the target file directory and the preset path encryption table; wherein the preset path encryption table is pre-generated based on the user's configuration operation.
[0041] The preset path encryption table may include paths that need to be encrypted and paths that do not need to be encrypted.
[0042] Specifically, an application programming interface (API) may be preset in the electronic device for operations such as adding, deleting, and modifying the encryption path.
[0043] Specifically, the target file directory can be compared with the path in the preset path encryption table, and whether the file needs to be encrypted can be determined based on the comparison result. For example, if the target file directory is in the path that needs to be encrypted but not in the path that does not need to be encrypted, it can be determined that the file needs to be encrypted.
[0044] Specifically, if it is determined that the file needs to be encrypted, the file needs to be encrypted when performing both read and write operations. On the other hand, if it is determined that the file does not need to be encrypted, the file does not need to be encrypted when performing both read and write operations.
[0045] Step 103: If it is determined that the file needs to be encrypted, the key information corresponding to the file is obtained.
[0046] The key information includes information that can be used to decrypt (during a read operation) or encrypt (during a write operation) a file.
[0047] Specifically, there is a corresponding relationship between the file and the key information. Different files can be configured with different key information.
[0048] Specifically, the key information corresponding to the file can be obtained from the loaded information.
[0049] Further, if it is determined that the file does not need to be encrypted, the file is operated according to the operation request.
[0050] Step 104, respond to the operation request based on the secret key information.
[0051] The operation request may include a read request and a write request.
[0052] If the operation request is a read request, the files in the target file directory included in the read request may be decompressed based on the secret key information, and the decompressed files may be read;
[0053] If the operation request is a write request, the file may be encrypted based on the secret key information, and the encrypted file may be written into the target file directory included in the write request.
[0054] The file operation method provided by the present disclosure includes: receiving an operation request for operating a file in a target file directory; determining whether the file needs to be encrypted according to the target file directory and a preset path encryption table; wherein the preset path encryption table is generated in advance based on the user's configuration operation; if it is determined that the file needs to be encrypted, obtaining the key information corresponding to the file; and responding to the operation request based on the key information. In the method provided by the present disclosure, the user's file encryption requirements can be flexibly configured through the preset path encryption table to avoid unnecessary waste of resources; different key information can be generated for different files to improve the security of file confidentiality.
[0055] Figure 2 The present invention is a flowchart of a file operation method according to another exemplary embodiment of the present invention.
[0056] like Figure 2 As shown, the file operation method provided in this embodiment includes:
[0057] Step 201: receiving an operation request for operating a file in a target file directory.
[0058] Specifically, the principle and implementation of step 201 are similar to those of step 101 and will not be described in detail.
[0059] Step 202, the preset path encryption table includes a first path that needs to be encrypted and a second path that does not need to be encrypted; the target file directory is compared with the first path and the second path to obtain a comparison result; wherein the preset path encryption table is generated in advance based on the user's configuration operation.
[0060] Specifically, for example, the first path includes: / user / local / encrypt;
[0061] The second path includes: / user / local / encrypt / exception_dir;
[0062] If the target file directory is: / user / local / encrypt / data1;
[0063] By comparing the target file directory with the first path and the second path, the comparison result obtained is: the target file directory is in the first path.
[0064] Step 203: Determine whether the file needs to be encrypted based on the comparison result.
[0065] Specifically, after step 203, step 204A or step 204B may be executed.
[0066] Specifically, if the comparison result shows that the target file directory is in the first path, it is determined that the file needs to be encrypted; if the comparison result shows that the target file directory is in the second path, it is determined that the file does not need to be encrypted; if the comparison result shows that the target file directory is not in the preset path encryption table, it is determined that the file does not need to be encrypted.
[0067] In one achievable manner, if the target file directory is not in the preset path encryption table, it is determined that the file does not need to be encrypted;
[0068] For example, the first path includes: / user / local / encrypt; the second path includes: / user / local / encrypt / exception_dir; if the target file directory is: / user / local / out / data1; then by comparing the target file directory with the first path and the second path, the comparison result obtained is: the target file directory is not in the preset path encryption table; then it is determined that the file does not need to be encrypted.
[0069] If the target file directory is in the second path, it is determined that the file does not need to be encrypted;
[0070] For example, the first path includes: / user / local / encrypt; the second path includes: / user / local / encrypt / exception_dir; if the target file directory is: / user / local / encrypt / exception_dir / data2; then by comparing the target file directory with the first path and the second path, the comparison result obtained is: the target file directory is under the second path; then it is determined that the file does not need to be encrypted.
[0071] If the target file directory is in the first path and the target file directory is not in the second path, it is determined that the file needs to be encrypted.
[0072] For example, the first path includes: / user / local / encrypt; the second path includes: / user / local / encrypt / exception_dir; if the target file directory is: / user / local / encrypt / sub_dir_1 / data1; then by comparing the target file directory with the first path and the second path, the comparison result is: the target file directory is under the first path, and the target file directory is not under the second path; then it is determined that the file needs to be encrypted.
[0073] Step 204A: If it is determined that the file does not need to be encrypted, the file is operated according to the operation request.
[0074] If the operation request is a read request, the file in the target file directory included in the read request may be read according to the read request;
[0075] If the operation request is a write request, the file may be written into the target file directory included in the write request according to the write request.
[0076] Step 204B: If it is determined that the file needs to be encrypted, determine whether the key information of the target file directory for storing the file has been loaded.
[0077] Specifically, after step 204B, step 205A or step 205B may be executed.
[0078] The key information includes information that can be used to decrypt (during a read operation) or encrypt (during a write operation) a file.
[0079] Specifically, there is a corresponding relationship between the file and the key information. Different files can be configured with different key information.
[0080] Step 205A: If the key information has been loaded, the key information of the target file directory is obtained.
[0081] Specifically, the key information corresponding to the file can be obtained from the loaded information.
[0082] Step 205B: If the key information is not loaded, query the database for the first key of the target file directory for storing files.
[0083] Specifically, after step 205B, step 206A or step 206B may be executed.
[0084] The first secret key is generated in advance based on the configuration operation of the user. The first secret key can be stored in a database.
[0085] Specifically, different target file directories may be configured with different first keys.
[0086] Step 206A: If the first key of the target file directory exists in the database, a key generation request for generating key information of the first key is sent to the key management system.
[0087] Specifically, a key management system may be pre-set to provide key generation and storage, recovery, cancellation, management and services. The first key may be input into the key management system to generate key information.
[0088] Step 207: Receive key information corresponding to the target file directory sent by the key management system.
[0089] The key generation request includes the first key. The key management system can generate key information of the first key according to the received key generation request.
[0090] Specifically, the key management system may send the generated key information to the electronic device. The electronic device may receive the key information corresponding to the target file directory sent by the key management system.
[0091] Step 208, load the key information, and obtain the key information of the loaded target file directory.
[0092] Specifically, after step 208, step 211 may be executed.
[0093] Specifically, the key information may be loaded first, and then the key information of the loaded target file directory may be obtained from the loaded information.
[0094] Step 206B: If the first key of the target file directory does not exist in the database, a key generation request for generating key information for the target file directory is sent to the key management system.
[0095] Specifically, the key generation request at this time does not include the first key. After receiving the key generation request that does not include the first key, the key management system can control a dialog box for the user to configure the first key to pop up. After the user configures the first key, the key management system can obtain the first key. And generate key information of the first key based on the first key.
[0096] Step 209: Receive the first key and key information corresponding to the target file directory sent by the key management system, and store the first key and key information in the database.
[0097] Specifically, the key management system may send the first key and the generated key information to the electronic device. The electronic device may receive the first key and the key information sent by the key management system, and store the first key and the key information in a database.
[0098] Step 210, load the key information, and obtain the key information of the loaded target file directory.
[0099] Specifically, the key information may be loaded first, and then the key information of the loaded target file directory may be obtained from the loaded information.
[0100] Step 211, respond to the operation request based on the secret key information.
[0101] Specifically, the operation request includes a read request and a write request, and the operation request can be responded to based on the key information.
[0102] In one implementable manner, if the operation request includes a read request, the file corresponding to the target file directory included in the read request is decrypted according to the secret key information to obtain a decrypted file; and the decrypted file is read.
[0103] If the operation request is a read request, the content stored in the target file directory can be read according to the file block size included in the read request, decrypted according to the secret key information, and then returned.
[0104] For example, if the file block size is 4096 bytes and the user reads file A, the offset is 100 bytes and the size is 200 bytes, then the file system loads the encrypted data from the offset 0 byte, and the loaded size is 4096 bytes. After the loading is completed, the key information is used for decryption, and after the decryption is completed, the data with an offset of 100 bytes and a length of 200 bytes is returned.
[0105] For another example: the file block size is 4096 bytes, the user reads file B, the offset is 5000 bytes, and the size is 6000 bytes, then the file system loads data from the offset 4096 bytes, and the loaded size is bytes. After the loading is completed, it is decrypted using the key information. After the decryption is completed, the data is returned starting from the offset 4 bytes, and the length of the returned data is 4092 bytes. The remaining 1908 bytes of data need to be returned, so the next file block is loaded, that is, the offset is 8192 bytes, the length of the data is 4096 bytes, and 1908 bytes of data are returned after decryption.
[0106] In one implementable manner, if the operation request includes a write request, the file included in the write request is encrypted according to the secret key information to obtain an encrypted file; and the encrypted file is written into a target file directory included in the write request.
[0107] If the operation request is a write request, the user's write request content can be encrypted based on the secret key information according to the file block size and saved in the target file directory.
[0108] For example, if the file block size is 4096 bytes and the user writes file C, the offset is 100 bytes and the size is 200 bytes, then the file system loads the encrypted data from the offset 0 byte position, and the load size is 4096 bytes. After the load is completed, the key information is used for decryption. After the decryption is completed, the data with an offset of 100 bytes and a length of 200 bytes is written, and then the current file block is encrypted, and the encrypted data is written back to the file block with an offset of 0 bytes, and the write length is 4096 bytes.
[0109] Figure 3 The figure is a schematic diagram of a file operation process according to an exemplary embodiment of the present disclosure.
[0110] like Figure 3 As shown, first, the preset path encryption table can be configured through the API.
[0111] Receive a file operation request; then determine whether the file needs to be encrypted based on the target file directory included in the operation request and a preset path encryption table.
[0112] If it is determined that the file does not need to be encrypted, respond to the operation request.
[0113] If it is determined that the file needs to be encrypted, then it is determined whether the key information has been loaded.
[0114] If it is determined that the key information is loaded, the operation request is responded to according to the key information.
[0115] If it is determined that the key information is not loaded, the database is queried to see whether the first key information exists, and based on the query result, a key generation request is sent to the key management system, the generated key information is received and loaded, and finally the operation request is responded to according to the key information.
[0116] Figure 4 The present invention is a structural diagram of a file operation device according to an exemplary embodiment of the present invention.
[0117] like Figure 4 As shown, the file operation device 400 provided by the present disclosure includes:
[0118] A receiving unit 410 is used to receive an operation request for operating a file in a target file directory;
[0119] The determination unit 420 is used to determine whether the file needs to be encrypted according to the target file directory and the preset path encryption table; wherein the preset path encryption table is generated in advance based on the configuration operation of the user;
[0120] The response unit 430 is used to obtain the key information corresponding to the file if it is determined that the file needs to be encrypted;
[0121] The response unit 430 is further configured to respond to the operation request based on the secret key information.
[0122] The determination unit 420 is specifically used to compare the target file directory with the first path and the second path to obtain a comparison result; the preset path encryption table includes the first path that needs to be encrypted and the second path that does not need to be encrypted;
[0123] Based on the comparison results, determine whether the file needs to be encrypted.
[0124] The determination unit 420 is specifically configured to determine that the file does not need to be encrypted if the target file directory is not in the preset path encryption table;
[0125] If the target file directory is in the second path, it is determined that the file does not need to be encrypted;
[0126] If the target file directory is in the first path and the target file directory is not in the second path, it is determined that the file needs to be encrypted.
[0127] The response unit 430 is further configured to operate the file according to the operation request if it is determined that the file does not need to be encrypted.
[0128] A response unit 430 is specifically used to determine whether the key information of the target file directory for storing files is loaded;
[0129] If the key information has been loaded, obtain the key information of the target file directory.
[0130] The response unit 430 is specifically configured to query the database for a first key of a target file directory for storing files if the key information is not loaded;
[0131] If the first key of the target file directory exists in the database, a key generation request for generating key information of the first key is sent to the key management system;
[0132] Receive the key information corresponding to the target file directory sent by the key management system;
[0133] Load the key information and obtain the key information of the loaded target file directory.
[0134] The responding unit 430 is specifically configured to send a key generation request for generating key information for the target file directory to the key management system if the first key of the target file directory does not exist in the database;
[0135] Receiving a first key and key information corresponding to a target file directory sent by a key management system, and storing the first key and key information in a database;
[0136] Load the key information and obtain the key information of the loaded target file directory.
[0137] The response unit 430 is specifically used for the operation request including a read request; decrypting the file corresponding to the target file directory included in the read request according to the secret key information to obtain a decrypted file; and reading the decrypted file.
[0138] The response unit 430 is specifically used for the operation request including a write request; encrypting the file included in the write request according to the secret key information to obtain an encrypted file; and writing the encrypted file into the target file directory included in the write request.
[0139] Figure 5 The present invention is a structural diagram of an electronic device according to an exemplary embodiment of the present invention.
[0140] like Figure 5 As shown, the electronic device provided in this embodiment includes:
[0141] Memory 501;
[0142] Processor 502; and
[0143] Computer programs;
[0144] The computer program is stored in the memory 501 and is configured to be executed by the processor 502 to implement any of the above file operation methods.
[0145] This embodiment also provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement any of the above file operation methods.
[0146] This embodiment also provides a computer program product, including a computer program, which implements any of the above-mentioned file operation methods when executed by a processor.
[0147] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A file operation method, characterized in that: The method comprises: Receiving an operation request for operating a file in a target file directory; Determine whether the file needs to be encrypted according to the target file directory and the preset path encryption table; wherein the preset path encryption table is generated in advance based on the configuration operation of the user; If it is determined that the file needs to be encrypted, obtaining key information corresponding to the file; Responding to the operation request based on the secret key information; The obtaining of key information corresponding to the file includes: Determining whether key information of the target file directory for storing the file is loaded; If the key information has been loaded, obtaining the key information of the target file directory; If the key information is not loaded, the method further comprises: querying a database for a first key of the target file directory for storing the file; If the first key of the target file directory exists in the database, sending a key generation request for generating key information of the first key to the key management system; Receiving key information corresponding to the target file directory sent by the key management system; Load the key information, and obtain the key information of the loaded target file directory; If the first key of the target file directory does not exist in the database, the method further includes: Sending a key generation request for generating key information for the target file directory to a key management system; Receiving a first key and key information corresponding to the target file directory sent by the key management system, and storing the first key and the key information in the database; Load the key information, and obtain the key information of the loaded target file directory.
2. The method according to claim 1, characterized in that The preset path encryption table includes a first path that needs to be encrypted and a second path that does not need to be encrypted; The step of determining whether the file needs to be encrypted according to the target file directory and the preset path encryption table includes: Comparing the target file directory with the first path and the second path to obtain a comparison result; According to the comparison result, it is determined whether the file needs to be encrypted.
3. The method according to claim 2, characterized in that Determining whether the file needs to be encrypted according to the comparison result includes: If the target file directory is not in the preset path encryption table, it is determined that the file does not need to be encrypted; If the target file directory is under the second path, determining that the file does not need to be encrypted; If the target file directory is in the first path, and the target file directory is not in the second path, it is determined that the file needs to be encrypted.
4. The method according to any one of claims 1 to 3, characterized in that: If it is determined that the file does not need to be encrypted, the file is operated according to the operation request.
5. The method according to claim 1, characterized in that The operation request includes a read request; The responding to the operation request based on the encryption key includes: Decrypt the file corresponding to the target file directory included in the read request according to the secret key information to obtain a decrypted file; and read the decrypted file.
6. The method according to claim 1, characterized in that The operation request includes a write request; The responding to the operation request based on the encryption key includes: The file included in the write request is encrypted according to the secret key information to obtain an encrypted file; and the encrypted file is written into the target file directory included in the write request.
7. A file operation device, characterized in that: The device comprises: A receiving unit, used for receiving an operation request for operating a file in a target file directory; A determination unit, configured to determine whether the file needs to be encrypted according to the target file directory and a preset path encryption table; wherein the preset path encryption table is generated in advance based on a user's configuration operation; A response unit, configured to obtain key information corresponding to the file if it is determined that the file needs to be encrypted; a response unit, further configured to respond to the operation request based on the secret key information; The response unit is specifically used to determine whether the key information of the target file directory for storing the file is loaded; If the key information has been loaded, obtaining the key information of the target file directory; The response unit is specifically configured to query a database for a first key of the target file directory for storing the file if the key information is not loaded; If the first key of the target file directory exists in the database, sending a key generation request for generating key information of the first key to the key management system; Receiving key information corresponding to the target file directory sent by the key management system; Load the key information, and obtain the key information of the loaded target file directory; The response unit is specifically configured to send a key generation request for generating key information for the target file directory to the key management system if the first key of the target file directory does not exist in the database; Receiving a first key and key information corresponding to the target file directory sent by the key management system, and storing the first key and the key information in the database; Load the key information, and obtain the key information of the loaded target file directory.
8. An electronic device, characterized in that: comprising a memory and a processor; wherein, The memory is used to store computer programs; The processor is used to read the computer program stored in the memory and execute the method according to any one of claims 1 to 6 according to the computer program in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and system for ciphertext and key rotation and version control
CN113886855A
File encryption method and device, file decryption method and device, computer equipment and storage medium
CN114398656A
