Data protection method, data protection device, computer equipment and storage medium

By using encrypted volume files and dynamic random number pools to generate encryption keys in the data protection method, and using verification passwords to generate volume header keys, the problem of insufficient security of the key system in the existing technology is solved and the encryption key is realized The separation from the volume header key simplifies security management and improves the overall security of the system and the flexibility of key management.

CN118536140AInactive Publication Date: 2024-08-23中电信量子信息科技集团有限公司

Patent Information

Application Number
CN202411007608.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The key system of existing data protection methods is directly derived from user verification passwords, which can easily lead to weak passwords or password leaks, which reduces the security of the system. Moreover, the unpredictability of pseudo-random numbers is insufficient, posing security risks.

Method used

Adopt an encrypted volume file design, generate an encryption key through a random number pool, and use the verification password to generate a volume header key to encrypt the encryption key to ensure that the encryption key and volume header key are separated to avoid the need to modify data due to password changes. ciphertext requirements, simplifying the security management process, and building a dynamic random number pool through system real-time status information to improve key confidentiality.

Benefits of technology

It enhances the security of keys and the overall security of the system, improves the flexibility of key management, ensures that data protection maintains efficiency and stability despite password policy adjustments, reduces labor costs, and improves data security. and the overall security performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536140A
    Figure CN118536140A
Patent Text Reader

Abstract

The invention discloses a data protection method, a data protection device, computer equipment and a computer readable storage medium. The data protection method comprises the following steps: creating an encrypted volume file, wherein the encrypted volume file comprises a volume head space and a data space; an encryption key is generated according to the random number pool, the encryption key is used for encrypting the target data to form a data ciphertext, and the data space can be used for storing the data ciphertext; generating a volume header key according to the input verification password; and encrypting the encryption key by using the volume header key to obtain a key ciphertext, wherein the volume header space can be used for storing the key ciphertext. According to the data protection method, the volume header key is separated from the encryption key, the security of the key is improved, and the encryption key is not generated through the verification password, so that the encryption key does not change and the data ciphertext does not need to be modified under the condition that the verification password is changed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and more specifically, to a data protection method, a data protection device, a computer device and a computer-readable storage medium. Background Art

[0002] As a technology for encrypting data storage media such as disks, data protection methods can build a solid barrier for data security. The key factor in the security performance of data protection methods is the design of their key system. In related technologies, the key system of data protection methods is directly derived from the user's verification password. Once improperly managed or cracked by brute force, it is easy to cause weak passwords or password leaks, reducing the security of data protection methods. Summary of the invention

[0003] The embodiments of the present invention provide a data protection method, a data protection device, a computer device and a computer-readable storage device.

[0004] An embodiment of the present invention provides a data protection method, which includes: creating an encrypted volume file, the encrypted volume file including a volume header space and a data space; generating an encryption key based on a random number pool, the encryption key being used to encrypt target data to form a data ciphertext, and the data space being capable of being used to store the data ciphertext; generating a volume header key based on an input verification password; encrypting the encryption key using the volume header key to obtain a key ciphertext, and the volume header space being capable of being used to store the key ciphertext.

[0005] In this way, the header key is separated from the encryption key, which increases the security of the key. Since the encryption key is not generated by the verification password, the encryption key will not change when the verification password is changed, and there is no need to modify the data ciphertext. This design avoids the need to modify the data ciphertext due to password changes, thereby simplifying the security management process and enhancing the overall security of the system. This mechanism improves the flexibility of key management and ensures that data protection can maintain consistent efficiency and stability even when the password policy is adjusted.

[0006] In one implementation, the creating the encrypted volume file includes: creating the encrypted volume file on a disk according to a set space size.

[0007] In this way, an encrypted volume file is created on the disk according to the set space size. In this way, the disk space can be managed effectively while ensuring data security.

[0008] In one embodiment, the data protection method is applied to a computer device, and the data protection method also includes: collecting system real-time status information of the computer device to form the random number pool, the system real-time status information includes network card speed, mouse focus position, etc.

[0009] In this way, a random number pool full of randomness is constructed based on the real-time status information of the system such as the network card speed and the movement trajectory of the mouse pointer on the screen. This random number pool provides a dynamic and diverse source of random numbers. The random numbers in the random number pool are more unpredictable. The keys derived from the random numbers in the random number pool are more confidential and can better ensure data security.

[0010] In one embodiment, the collecting the real-time system status information of the computer device to form the random number pool includes: calling an application programming interface to collect the real-time system status information to form the random number pool.

[0011] In this way, calling the application programming interface to collect the real-time status information of the system to form a random number pool can automatically collect the real-time status information of the system without human intervention, thereby reducing labor costs and improving the efficiency and accuracy of collection.

[0012] In one embodiment, generating an encryption key according to a random number pool includes: generating a plurality of keys according to the random number pool as the encryption key, wherein the plurality of encryption keys are used to encrypt the target data to form the data ciphertext.

[0013] In this way, a suitable random number is extracted from the random number pool, and the random number is derived using a key derivation function to generate multiple keys. The generated multiple keys are used as encryption keys. These encryption keys are used to encrypt the target data to form data ciphertext to ensure the security of the data.

[0014] In one implementation, generating a volume header key according to an input verification password includes: generating the volume header key according to the verification password, a set number of iterations and a random noise value, and the volume header space can be used to store the number of iterations and the random noise value.

[0015] In this way, the verification password entered by the user, the preset number of iterations and the random noise value are combined to generate the header key through the key derivation function. This method of generating the header key increases the computational complexity and ensures that the confidentiality of the header key is strong enough. At the same time, the two key parameters, the number of iterations and the random noise value, are stored in the header space for key re-derivation and security auditing, which enhances the integrity and recoverability of the data.

[0016] In one embodiment, the data protection method includes: when the verification password is changed, generating a new volume header key according to the changed verification password, and re-encrypting the encryption key according to the new volume header key to form a new key ciphertext.

[0017] In this way, when the user changes the verification password, the system generates a new volume header key based on the new password. This new volume header key is used to re-encrypt the original encryption key to create a new encryption key ciphertext. This process ensures that the data remains secure even after the password is changed and the original encryption key is not affected.

[0018] In one implementation, the encryption key includes a primary key and an auxiliary key, and the data protection method includes: determining an adjustment value according to the auxiliary key; and encrypting the target data according to the primary key and the adjustment value to obtain the data ciphertext.

[0019] In this way, the adjustment value is determined according to the auxiliary key; then the target data is encrypted using the main key and the adjustment value to generate data ciphertext. This process increases the complexity and security of encryption and ensures the confidentiality of data during storage.

[0020] In one embodiment, the data protection method includes: when performing a read operation, decrypting the key ciphertext according to the volume header key to obtain the encryption key; and decrypting the data ciphertext according to the encryption key to obtain the target data.

[0021] In this way, when performing a read operation, the system first uses the volume header key to decrypt the key ciphertext, thereby recovering the encryption key; then, the encryption key is used to decrypt the data ciphertext, and finally the original target data is obtained. This method ensures the security of the target data during the storage stage, and also ensures the convenience and speed of reading the data.

[0022] An embodiment of the present invention provides a data protection device, which is used to: create an encrypted volume file, the encrypted volume file including a volume header space and a data space; generate an encryption key based on a random number pool, the encryption key is used to encrypt target data to form a data ciphertext, and the data space can be used to store the data ciphertext; generate a volume header key based on an input verification password; encrypt the encryption key using the volume header key to obtain a key ciphertext, and the volume header space can be used to store the key ciphertext.

[0023] In this way, the header key is separated from the encryption key, which increases the security of the key. Since the encryption key is not generated by the verification password, the encryption key will not change when the verification password is changed, and there is no need to modify the data ciphertext. This design avoids the need to modify the data ciphertext due to password changes, thereby simplifying the security management process and enhancing the overall security of the system. This mechanism improves the flexibility of key management and ensures that data protection can maintain consistent efficiency and stability even when the password policy is adjusted.

[0024] In one implementation, the encryption module is deployed in the kernel state of the system, and the encryption module encrypts and decrypts the encrypted volume file through a virtual disk driver technology.

[0025] In this way, the encryption module is deployed in the kernel state of the operating system, which means that the module has higher system access rights and efficiency. It implements encryption and decryption operations on encrypted volume files through virtual disk driver technology. By being deployed in the kernel state of the operating system, the encryption module efficiently manages the encryption and decryption process of encrypted volume files in the kernel state, ensuring the security of data throughout its life cycle.

[0026] An embodiment of the present invention provides a computer device, which includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the data protection method described in any one of the above embodiments are implemented.

[0027] In this way, the header key is separated from the encryption key, which increases the security of the key. Since the encryption key is not generated by the verification password, the encryption key will not change when the verification password is changed, and there is no need to modify the data ciphertext. This design avoids the need to modify the data ciphertext due to password changes, thereby simplifying the security management process and enhancing the overall security of the system. This mechanism improves the flexibility of key management and ensures that data protection can maintain consistent efficiency and stability even when the password policy is adjusted.

[0028] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the data protection method described in any one of the above embodiments are implemented.

[0029] Additional aspects and advantages of the embodiments of the present invention will be given in part in the following description and in part will become apparent from the following description or will be learned through the practice of the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 2 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 3 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 4 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 5 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 6 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 7 is a flow chart of a data protection method according to an embodiment of the present invention; Figure 8 is a flow chart of a data protection method according to an embodiment of the present invention; Fig. 9 is a schematic diagram of a data protection method according to an embodiment of the present invention; Fig.10 is a flow chart of a data protection method according to an embodiment of the present invention; Fig.11 is a schematic diagram of a data protection method according to an embodiment of the present invention; Fig.12 It is a schematic diagram of a data protection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The embodiments of the present invention are described in detail below, and the embodiments of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0032] In today's information age, data has become a new driving force for social development. The rapid progress of technologies such as big data, cloud computing, and artificial intelligence has made data play an indispensable role in personal life and business operations. For example, personal activities such as the use of social media, online shopping, and health monitoring, as well as corporate operations management, market analysis, decision-making, and public service optimization, all rely on data support.

[0033] However, the convenience brought by data is also accompanied by challenges in security and privacy protection. Data leakage may lead to huge losses, including personal privacy leakage and corporate secrets leakage. In this case, data protection methods, especially encryption technology for data storage media, have become an important means to protect data security.

[0034] The core of data protection methods is the design of their key system. In related technologies, the key system of most data protection methods is directly derived from the user verification password. This design is prone to weak passwords or password leaks when the password is improperly managed or subjected to brute force cracking, thereby reducing the security of the entire system. In addition, the pseudo-random numbers generated by the system widely used in related algorithms lack sufficient unpredictability, which is also a security risk.

[0035] Therefore, designing a key system that takes into account both security and efficiency has become an urgent problem to be solved. This key system needs to address the weaknesses of related technologies, such as enhancing the complexity of passwords and increasing the unpredictability of random numbers. At the same time, it should also consider user friendliness to ensure that while improving security, it does not affect the user experience. Through such a key system design, a more solid data security barrier can be built to protect digital assets from infringement.

[0036] See also Figure 1 The embodiment of the present invention provides a data protection method, the data protection method comprising: 011: Create an encrypted volume file, which includes a volume header space and a data space; 012: Generate an encryption key based on the random number pool. The encryption key is used to encrypt the target data to form a data ciphertext. The data space can be used to store the data ciphertext. 013: Generate the volume header key based on the entered verification password; 014: The encryption key is encrypted using the volume header key to obtain the key ciphertext. The volume header space can be used to store the key ciphertext.

[0037] Specifically, the volume header key is separated from the encryption key, which increases the security of the key. Since the encryption key is not generated by the verification password, the encryption key will not change when the verification password is changed, and there is no need to modify the data ciphertext. This design avoids the need to modify the data ciphertext due to password changes, thereby simplifying the security management process and enhancing the overall security of the system. This mechanism improves the flexibility of key management and ensures that data protection can maintain consistent efficiency and stability even when the password policy is adjusted. In the data protection method provided, the verification password entered is the password set by the user when creating the encrypted volume file.

[0038] See also Figure 2 In one implementation, step 011 (creating an encrypted volume file) includes: 0111: Create an encrypted volume file on the disk according to the set space size.

[0039] In the data protection method provided, an encrypted volume file is then created on the disk according to the set space size. In this way, the disk space can be effectively managed while ensuring data security. The required space size is determined according to the expected data storage needs, future growth, and the existing disk space size, and then the encrypted volume file can be created on the disk. After the encrypted volume file is created on the disk, the location of the encrypted volume file is determined, and the adjustment value of each data block on the encrypted volume can be obtained according to the location information. In this way, the disk space can be effectively managed while ensuring data security.

[0040] See also Figure 3 In one embodiment, the data protection method of the present invention is applied to a computer device, and the data protection method further includes: 015: Collect the real-time status information of the computer system to form a random number pool. The real-time status information includes the network card speed and the mouse focus position.

[0041] Specifically, this data protection method constructs a random number pool full of randomness based on the real-time status information of the system, such as the network card speed and the movement track of the mouse pointer on the screen. This random number pool provides a dynamic and diverse source of random numbers. The random numbers in the random number pool are more unpredictable, and the keys derived from the random numbers in the random number pool are more confidential and can better ensure the security of data. These real-time status information of the system include network card speed, mouse position, processor (CPU) status, memory (RAM) status, system processes and services, system temperature and power consumption, battery status, peripheral device status, etc. This type of real-time status information of the system contains a kind of true randomness. Compared with the pseudo-random numbers used in the relevant data protection methods, the random number pool generated using these status information has deeper unpredictability, providing a dynamic and diverse source of random numbers for the system. This method improves the security of data and greatly increases the difficulty of cracking, thereby providing a more solid barrier for data protection.

[0042] In other embodiments, the computer device may generate random numbers by using a pseudo-random number generator to form a random number pool.

[0043] See also Figure 4 In one embodiment, 015 (collecting real-time system status information of computer devices to form a random number pool) includes: 0151: Call the application programming interface to collect system real-time status information to form a random number pool.

[0044] Specifically, by calling the application programming interface to collect system real-time status information to form a random number pool, the real-time status information of the system can be collected automatically without human intervention, reducing labor costs and improving the efficiency and accuracy of collection. This process involves obtaining real-time data from multiple data sources, such as system status, network activity, user behavior, etc. These data are processed and converted to eventually form a random number pool containing rich, random and unpredictable values. This random number pool can be used in various security-related applications, such as key generation, encryption processes, etc., thereby significantly improving the overall security performance of the system.

[0045] See also Figure 5 In one implementation, step 012 (generating an encryption key according to a random number pool) includes: 0121: Generate multiple keys as encryption keys according to a random number pool, and the multiple encryption keys are used to encrypt target data to form data ciphertext.

[0046] Specifically, a suitable random number is extracted from the random number pool, and the random number is derived using a key derivation function to generate multiple keys. The generated multiple keys are used as encryption keys. Such encryption keys encrypt the target data to form data ciphertext to ensure the security of the data. Key derivation involves multiple steps, each of which may include encryption algorithms such as hash functions and pseudo-random functions to ensure that the generated keys have extremely high security and unpredictability. In this way, even if the information in the random number pool is leaked, the encryption key cannot be easily derived, thereby protecting the security of the data. An implementation example is as follows: two 128-byte random numbers are taken from the random number pool; the master key KS and the auxiliary key KS2 are derived from these two random numbers. These two keys are generated from the random number pool during the creation of the encrypted volume. Once generated, these keys remain constant to ensure the consistency, continuity and stability of data encryption.

[0047] See also Figure 6 In one implementation, step 013 (generating a volume header key according to the input verification password) includes: 0131: Generate a header key based on the verification password, the set number of iterations and the random noise value. The header space can be used to store the number of iterations and the random noise value.

[0048] Specifically, in the data protection method, the verification password input by the user, the preset number of iterations and the random noise value are combined to generate the header key through the key derivation function. This method of generating the header key increases the computational complexity and ensures that the confidentiality of the header key is strong enough. In addition, the header key will also generate the key ciphertext of the header key through the encryption algorithm. The key ciphertext is used for security verification when reading data. At the same time, the three key parameters of the header key, the key ciphertext, the number of iterations and the random noise value, are stored in the header space for security auditing, which enhances the integrity and recoverability of the data. The header space also stores loading information such as the memory size and database size of the encrypted volume file. First, the system obtains the number of iterations PIM set by the user and the verification password input. The number of iterations PIM is a key security parameter that affects the strength and computational complexity of the encryption algorithm. Then, the advanced derivation function is used to encrypt and derive the verification password input by the user, and the process is repeated PIM times. At the same time, the system also adds a random noise value Salt. This random noise value increases the uncertainty and randomness of the key derivation process, thereby significantly increasing the difficulty of cracking. Through such encryption algorithm processing, the user verification password is converted into a strong and secure header key HK. The header key is the key to the entire encryption mechanism. It is not only used to protect the primary key and auxiliary key, but also ensures the security of data throughout its life cycle. Through such a design, we not only create a strong and flexible encryption system, but also ensure the long-term stability and security of the system, providing a solid guarantee for the user's data security.

[0049] A method for generating a header key is as follows: first, the verification password is processed. If the length of the verification password is greater than the hash block size (64 bytes), the password is hashed using the SM3 cryptographic hash algorithm; if the length is less than the hash block size, 0 is padded at the end to reach the hash block size; the obtained key is divided into two equal-length parts, L and R. Then, L and R are XORed with some specific constants to generate two internal keys. Then, the result of the XOR operation of the data and the specific constant is concatenated with L, and then processed using the SM3 cryptographic hash algorithm. Then, the hash value obtained in the previous step is concatenated with R, and processed again using the SM3 cryptographic hash algorithm to obtain an HMAC value. In the process of completing the above steps, a random noise value Salt is added, and these steps are repeated PIM times, and the final value obtained is the required header key. The header key is used to encrypt these encryption keys to obtain key ciphertexts, and the header space can be used to store these key ciphertexts.

[0050] In other implementations, the data protection method may generate a volume header key using an algorithm such as a SHA-256-HMAC algorithm, a SHA-512-HMAC algorithm, or the like.

[0051] See also Figure 7 In one embodiment, the data protection method includes: 020: When the verification password is changed, a new volume header key is generated according to the changed verification password, and the encryption key is re-encrypted according to the new volume header key to form a new key ciphertext.

[0052] Specifically, when the user changes the verification password, the system generates a new header key based on the new password. This new header key is used to re-encrypt the original encryption key to create a new encryption key ciphertext. This process ensures that the data remains secure even after the password is changed and does not affect the original encryption key. This data protection method innovatively adopts the method of separating the header key from the encryption master key. This design shows significant advantages when the user changes the password. After the user enters the new verification password, the system generates a new header key based on the encryption algorithm and parameters. This new header key is then used to re-encrypt the encryption key to form a new key ciphertext. Due to the separate existence of the encryption master key and the header key HK, the system does not need to re-encrypt the data in the entire data space, which is an efficient and resource-saving processing method. This process ensures that when the verification password is changed, the key ciphertext of the encryption key can be updated in a timely and secure manner, and the encryption key remains unchanged, thereby maintaining the security of the data. Through such a mechanism, the system not only adapts to the changes in user security requirements and improves the efficiency of the system in processing password changes, but also reduces the consumption of computing resources, while maintaining data security and system stability. This design represents a delicate balance between security, efficiency, and user-friendliness in this data protection approach.

[0053] See also Figure 8 In one embodiment, the encryption key includes a primary key and a secondary key, and the data protection method includes: 016: Determine the adjustment value based on the auxiliary key; 017: Encrypt the target data according to the master key and the adjustment value to obtain the data ciphertext.

[0054] Specifically, first, the system determines the adjustment value according to the auxiliary key; then the master key and the adjustment value are used to encrypt the target data to generate data ciphertext. This process increases the complexity and security of encryption and ensures the confidentiality of data during storage. During the encryption process, the master key provides the core encryption capability, while the adjustment value adds an additional security layer, making the encryption process more complex and unpredictable. This double encryption mechanism ensures the high security of data during transmission or storage. After the target data is encrypted into data ciphertext, only users with the correct key can decrypt and access the target data. Through such steps, the data protection method not only improves the security of data, but also enhances the system's defense capability against potential threats. The data insurance method first uses the IoCreateDevice interface to create a virtual device in the kernel state and specifies its device type as FILE_DEVICE_DISK. By calling the IoCreateDevice interface, a virtual disk device is created in the kernel state. This device simulates an actual disk device in the kernel, allowing the operating system and user applications to treat it like a normal disk. Specify its type as FILE_DEVICE_DISK, which tells the operating system that this device is a disk device and that access to it should be handled using operations related to disk devices. At the same time, a worker thread and queue are created in kernel mode to handle requests for the virtual device.

[0055] like Fig. 9 As shown, a specific encryption process is as follows: Based on the auxiliary key KS2 and the sector number of each data block on the encrypted volume, a unique adjustment value Tweak of the data block is calculated. Then, the module uses the master key and the XTS mode to encrypt the data block. The XTS mode divides the data into n fixed-size groups and encrypts each group.

[0056] Encryption process: First, the adjustment value Tweak and (Galois field modular multiplication of primitive elements over finite field GF field) is multiplied to obtain an intermediate value X; then, the data plaintext of each group (i.e., target data) is XORed with the intermediate value X to obtain a value, and the value is used as the new data plaintext of the group; then, each group is encrypted with the master key and the new data plaintext through the SM4 encryption algorithm to obtain the ciphertext of the group; finally, the ciphertext of each group is XORed with the intermediate value X to obtain a value, and the value is used as the final data ciphertext.

[0057] In other implementations, the data protection method may encrypt the target data using encryption techniques such as the AES-XTS encryption algorithm.

[0058] During encryption, the adjustment value is used to ensure that even identical data blocks produce different ciphertext after encryption. This is achieved by first performing an XOR (exclusive OR) operation on the adjustment value and the data block during encryption.

[0059] See also Fig.10 In one embodiment, the data protection method includes: 018: When performing a read operation, the key ciphertext is decrypted according to the volume header key to obtain the encryption key; 019: Decrypt the data ciphertext according to the encryption key to obtain the target data.

[0060] Specifically, when performing a read operation, the system first uses the volume header key to decrypt the key ciphertext, thereby recovering the encryption key; then, the encryption key is used to decrypt the data ciphertext, and finally the original target data is obtained. This method ensures the security of the target data during the storage stage, and also ensures the convenience and speed of reading the data.

[0061] like Fig.11 As shown, a specific decryption process is as follows: decrypt the key ciphertext according to the volume header key to obtain the master key KS and the auxiliary key KS2; then calculate the adjustment value Tweak based on the auxiliary key KS2 and the location information of the encrypted volume file; the module uses the adjustment value Tweak and the Galois field modular multiplication of the primitive element on the finite field GF field to obtain the intermediate value X; use the intermediate value X to perform an XOR operation on the ciphertext block (a group of data separated from the data ciphertext) to obtain a new ciphertext block; use the master key and the inverse process of the SM4 encryption algorithm to decrypt this new ciphertext block to obtain the data plaintext; perform an XOR operation on the data plaintext and the intermediate value X to restore the target data.

[0062] This decryption process ensures that the data stored on the disk will not be leaked even in the case of unauthorized access, because the data has been encrypted before physical storage. The decryption process is only performed when the data is accessed by authorized users, ensuring the confidentiality, integrity and security of the data.

[0063] An embodiment of the present invention provides a data protection device, which can be used to: create an encrypted volume file, the encrypted volume file includes a volume header space and a data space; generate an encryption key based on a random number pool, the encryption key is used to encrypt target data to form a data ciphertext, and the data space can be used to store the data ciphertext; generate a volume header key based on an input verification password; encrypt the encryption key using the volume header key to obtain a key ciphertext, and the volume header space can be used to store the key ciphertext.

[0064] Specifically, the volume header key is separated from the encryption key, which increases the security of the key. Since the encryption key is not generated by the verification password, the encryption key will not change when the verification password is changed, and the data ciphertext does not need to be modified. This design avoids the need to modify the data ciphertext due to password changes, thereby simplifying the security management process and enhancing the overall security of the system. This mechanism improves the flexibility of key management and ensures that data protection can maintain consistent efficiency and stability even when the password policy is adjusted. In the process of creating an encrypted volume file, the system follows a series of steps to ensure the security of the data. First, the system creates an encrypted volume file including a volume header space and a data space. The volume header space is specifically used to store key information related to the encryption process, such as key ciphertext, random noise value, and iteration number PIM, while the data space is used to store encrypted data, that is, data ciphertext. Next, the system generates an encryption key based on the created random number pool. The key is specifically used to encrypt the target data into data ciphertext, ensuring the security of the data during storage or transmission. The data ciphertext is then stored in the data space to maintain its security and confidentiality. Then, in order to further protect the encryption key and make it more complex, the system generates a volume header key based on the verification password entered by the user. This volume header key is then used to encrypt the previously generated encryption key to form the key ciphertext of the encryption key. The key ciphertext of the encryption key is securely stored in the volume header space, ensuring that even if the key information is leaked, it cannot be accessed by unauthorized persons. Through this design, the encrypted volume file not only ensures the security of the data, but also ensures that only authorized users can access and decrypt the data, greatly enhancing the overall security performance of the system.

[0065] In one implementation, the data protection device includes an encryption module, which is deployed in the kernel state of the system. The encryption module encrypts and decrypts the encrypted volume file through a virtual disk drive technology.

[0066] Specifically, the encryption module is deployed in the kernel state of the operating system (the state of running operating system programs and operating hardware), which means that the module has higher system access rights and efficiency. It implements encryption and decryption operations on encrypted volume files through virtual disk driver technology. Since it is deployed in the kernel state of the operating system, the encryption module efficiently manages the encryption and decryption process of encrypted volume files in the kernel state, ensuring the security of data throughout its life cycle. Fig.12, by using virtual disk driver technology, Hook file access operation and other technologies, the encryption module deployed in kernel state can use Windows system interface in user state (the state of running user programs) to assign a drive letter to the virtual device without affecting the normal function of the user's operating system. This can redirect the virtual device to a .hc file (that is, an encrypted volume file with .hc as the suffix), so that the virtual disk can be accessed like a normal partition. This design achieves an imperceptible transparent encryption effect, that is, the user does not need to be aware that the data has been encrypted during the operation, and allows the user to have kernel state permissions under user state conditions, thereby improving the user experience and ensuring data security and convenience of operation. In the above encryption and decryption process, Hook file access operation plays a relatively important role. Specifically, Hook technology is used to insert specific encryption and decryption logic when the operating system performs file read and write operations. First, Hook technology intercepts the operating system's read and write requests for files. This is usually achieved by modifying the operating system's I / O processing function or using a hook mechanism. Then, when the operating system tries to read or write an encrypted volume file, the Hook code intervenes to encrypt or decrypt the data. If a read operation is performed on an encrypted volume file, Hook will decrypt the data ciphertext; if a write operation is performed on an encrypted volume file, Hook will encrypt the data. This process is transparent to the user, who continues to interact with the file in the usual way without knowing that the data is actually encrypted and decrypted in real time during each read and write operation. Hook file access operations ensure the security of data during transmission and storage while reducing the impact on system performance. Encryption and decryption operations are very fast, and users can hardly feel the delay.

[0067] An embodiment of the present invention provides a computer device, including one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the data protection method of any one of the above embodiments are implemented.

[0068] In this way, the header key is separated from the encryption key, which increases the security of the key. Since the encryption key is not generated by the verification password, the encryption key will not change when the verification password is changed, and there is no need to modify the data ciphertext. This design avoids the need to modify the data ciphertext due to password changes, thereby simplifying the security management process and enhancing the overall security of the system. This mechanism improves the flexibility of key management and ensures that data protection can maintain consistent efficiency and stability even when the password policy is adjusted.

[0069] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the data protection method of any one of the above embodiments are implemented.

[0070] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0071] In addition, the term "connection" should be understood in a broad sense, for example, it can include fixed connection, detachable connection, or integral connection; it can include direct connection, indirect connection through an intermediate medium, and internal communication between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0072] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0073] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0074] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A data protection method, characterized in that: The data protection method comprises: Creating an encrypted volume file, wherein the encrypted volume file includes a volume header space and a data space; Generate an encryption key according to a random number pool, wherein the encryption key is used to encrypt target data to form a data ciphertext, and the data space can be used to store the data ciphertext; Generate a volume header key based on the entered verification password; The encryption key is encrypted using the volume header key to obtain a key ciphertext, and the volume header space can be used to store the key ciphertext.

2. The data protection method according to claim 1, characterized in that: The step of creating an encrypted volume file includes: The encrypted volume file is created on the disk according to the set space size.

3. The data protection method according to claim 1, characterized in that: The data protection method is applied to a computer device, and the data protection method further comprises: The system real-time status information of the computer device is collected to form the random number pool, wherein the real-time status information includes a network card speed and a mouse focus position.

4. The data protection method according to claim 3, characterized in that: The collecting the real-time system status information of the computer device to form the random number pool includes: An application programming interface is called to collect the real-time status information of the system to form the random number pool.

5. The data protection method according to claim 1, characterized in that: The step of generating an encryption key according to a random number pool comprises: A plurality of keys are generated according to the random number pool to serve as the encryption keys, and the plurality of encryption keys are used to encrypt the target data to form the data ciphertext.

6. The data protection method according to claim 1, characterized in that: Generating a volume header key according to the input verification password includes: The volume header key is generated according to the verification password, a set number of iterations and a random noise value, and the volume header space can be used to store the number of iterations and the random noise value.

7. The data protection method according to claim 1, characterized in that: The data protection method comprises: In the case where the verification password is changed, a new volume header key is generated according to the changed verification password, and the encryption key is re-encrypted according to the new volume header key to form a new key ciphertext.

8. The data protection method according to claim 1, characterized in that: The encryption key includes a primary key and an auxiliary key, and the data protection method includes: determining an adjustment value according to the auxiliary key; The target data is encrypted according to the master key and the adjustment value to obtain the data ciphertext.

9. The data protection method according to claim 1, characterized in that: The data protection method comprises: When performing a read operation, decrypting the key ciphertext according to the volume header key to obtain the encryption key; The data ciphertext is decrypted according to the encryption key to obtain the target data.

10. A data protection device, characterized in that: The data protection device is used for: Creating an encrypted volume file, wherein the encrypted volume file includes a volume header space and a data space; Generate an encryption key according to a random number pool, wherein the encryption key is used to encrypt target data to form a data ciphertext, and the data space can be used to store the data ciphertext; Generate a volume header key based on the entered verification password; The encryption key is encrypted using the volume header key to obtain a key ciphertext, and the volume header space can be used to store the key ciphertext.

11. A computer device, characterized in that: The computer device includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the data protection method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the data protection method described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Data encryption mobile storage management method based on virtual disk

    CN103065102A

  • USB (Universal Serial Bus) flash disk encryption-based data access method and system

    CN104751080A

  • Encrypted authentication method of block chain communication system

    CN108259467A

  • Safe multi-cloud password management method based on bit-level threshold

    CN111314090A

  • LUKS key offline extraction method, terminal equipment and storage medium

    CN113839773A

Cited By

  • Secret key generation method and device and computer equipment

    CN119030713A

  • Key replacement method, cluster system, device, medium and product

    CN119402192A

  • A method for key replacement, a cluster system, a device, a medium, and a product

    CN119402192B

  • Switching method of key storage mechanism, cluster system, device, medium and product

    CN119402193A

  • Method and system for transparently encrypting and decrypting DCS (Distributed Control System) controller file

    CN119696928A