Trusted data space application program data disk encryption storage method and system
By using Haiguang CSV technology to derive a combination of sealing keys and random encryption keys in data disk encryption, the problem that data disk encryption cannot prevent illegal use and tampering is solved, and advanced security and private protection of data are achieved .
Patent Information
- Application Number
- CN202411070782.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-06
AI Technical Summary
In the prior art, data drop-off encryption cannot prevent illegal use or malicious disclosure of data by users with host and virtual machine permissions, and cannot prevent illegal use or tampering by other applications in the same host and virtual machine system environment.
The sealing key in each secure virtual machine is derived using Haiguang CSV technology, and the plain text data is encrypted through the randomly generated data encryption key, stored in the first storage unit, and the encryption key is encrypted and stored in the in the second storage unit. When the application restarts, use the seal key to obtain plaintext data, ensuring that the data can only be accessed by the application that created it.
In addition to preventing data leakage during storage media loss, theft or hacking, it also prevents illegal use and tampering, ensuring the security and privacy of the data.
Smart Images

Figure CN119004566A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of encryption processing technology, and in particular to a method and system for encrypting and storing application data in a trusted data space. Background Art
[0002] Data encryption is often used to protect sensitive information, such as personal data, financial records, and confidential business data, to prevent data leakage when the storage medium is lost, stolen, or attacked by hackers. It is an important part of data security measures and can improve the overall security of information systems.
[0003] Dataspace is a virtual data space that leverages existing standards and technologies as well as widely accepted governance models in the data economy to facilitate secure and standardized data exchange and data linkage in a trusted business ecosystem. As a result, it provides a foundation for creating smart service scenarios and promoting innovative cross-company business processes while guaranteeing the data sovereignty of data owners. Data sovereignty is a core aspect of dataspace, which can be defined as the ability of natural persons or legal entities to make full autonomous decisions about their data.
[0004] Data security is particularly important in the data space. In addition to the conventional prevention of data leakage when the storage media is lost, stolen or attacked by hackers, it is also necessary to prevent users with host and virtual machine permissions from illegally using or maliciously leaking data, and prevent other applications in the same host and virtual machine system environment from illegally using or tampering with data, ensuring that data can only be accessed by the application that created it.
[0005] Currently, no effective solution has been proposed to address the problem that data encryption in the existing technology can only prevent data leakage when the storage medium is lost, stolen or attacked by hackers, but cannot prevent illegal use or malicious leakage of data by users with host and virtual machine permissions, or illegal use or tampering by other applications in the same host and virtual machine system environment. Summary of the invention
[0006] In an embodiment of the present invention, a method and system for encrypting and storing application data in a trusted data space is provided to solve the problem that in the prior art, data encryption can only prevent data leakage when the storage medium is lost, stolen or attacked by hackers, but cannot prevent illegal use or malicious leakage of data by users with host and virtual machine permissions, and cannot prevent illegal use or tampering by other applications in the same host and virtual machine system environment.
[0007] To achieve the above-mentioned purpose, on the one hand, the present invention provides a method for encrypting and storing application data in a trusted data space on a disk, the method comprising: S1, deriving a seal key for each application in each secure virtual machine based on the Haiguang CSV technology; S2, obtaining current plaintext data, encrypting the current plaintext data in the current application using a randomly generated current data encryption key to obtain current ciphertext data, and storing the current ciphertext data in a first storage unit; and sealing the randomly generated current data encryption key using the seal key of the current application, and storing the sealed current data encryption key in a second storage unit; S3, when the current application is restarted, obtaining the current ciphertext data in the first storage unit and the sealed current data encryption key in the second storage unit; decrypting the sealed current data encryption key using the seal key of the current application to obtain the current data encryption key; and decrypting the current ciphertext data using the current data encryption key to obtain the current plaintext data.
[0008] Optionally, the sealing key of each secure virtual machine is derived through the root key of the Haiguang security chip; based on the sealing key of the current secure virtual machine, the identity ID of the current application in the current secure virtual machine, and other characteristic information, the CMAC algorithm is used to derive the sealing key of the current application in the current secure virtual machine.
[0009] Optionally, there is a one-to-many correspondence between the application and the plaintext data; there is a one-to-one correspondence between the plaintext data and the data encryption key.
[0010] Optionally, in the current application, a symmetric encryption key with a specified number of key bits is randomly generated as the current data encryption key.
[0011] Optionally, the other characteristic information includes: version number, version name, characteristic value; the first storage unit includes: disk or external database; the second storage unit includes: secure hardware, disk or external database.
[0012] On the other hand, the present invention provides a trusted data space application data disk encryption storage system, the system comprising: a derivation unit, used to derive a seal key for each application in each secure virtual machine based on the Haiguang CSV technology; an encryption storage unit, used to obtain current plaintext data, encrypt the current plaintext data in the current application by a randomly generated current data encryption key to obtain current ciphertext data, and store the current ciphertext data in a first storage unit; and to seal the randomly generated current data encryption key by the seal key of the current application, and store the sealed current data encryption key in a second storage unit; a decryption unit, used to obtain the current ciphertext data in the first storage unit and the sealed current data encryption key in the second storage unit when the current application is restarted; to decrypt the sealed current data encryption key by the seal key of the current application to obtain the current data encryption key; and to decrypt the current ciphertext data by the current data encryption key to obtain the current plaintext data.
[0013] Optionally, the derivation unit includes: a first derivation sub-unit, used to derive the sealing key of each secure virtual machine through the Haiguang security chip root key; a second derivation sub-unit, used to derive the sealing key of the current application in the current secure virtual machine using the CMAC algorithm based on the sealing key of the current secure virtual machine, the identity ID of the current application in the current secure virtual machine, and other characteristic information.
[0014] Optionally, there is a one-to-many correspondence between the application and the plaintext data; there is a one-to-one correspondence between the plaintext data and the data encryption key.
[0015] Optionally, in the current application, a symmetric encryption key with a specified number of key bits is randomly generated as the current data encryption key.
[0016] Optionally, the other characteristic information includes: version number, version name, characteristic value; the first storage unit includes: disk or external database; the second storage unit includes: secure hardware, disk or external database.
[0017] Beneficial effects of the present invention:
[0018] The present invention provides a method and system for encrypting and storing application data in a trusted data space, wherein the method derives a seal key for each application in each secure virtual machine based on the Haiguang CSV technology; encrypts the current plaintext data in the current application by a randomly generated current data encryption key to obtain the current ciphertext data, and stores the current ciphertext data in a first storage unit; and seals the randomly generated current data encryption key by the seal key of the current application, and stores the sealed current data encryption key in a second storage unit. In addition to preventing data leakage when the storage medium is lost, stolen, or attacked by hackers, the method can also prevent users with host and virtual machine permissions from illegally using or maliciously leaking data, and prevent other applications in the same host and virtual machine system environment from illegally using or tampering with data, ensuring that data can only be accessed by the application that created the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of a method for storing encrypted data in a trusted data space application program provided by an embodiment of the present invention;
[0020] Figure 2 It is a flow chart of a method for deriving a sealing key for each application in each secure virtual machine provided by an embodiment of the present invention;
[0021] Figure 3 It is a schematic diagram of the structure of a trusted data space application data disk encryption storage system provided by an embodiment of the present invention;
[0022] Figure 4 It is a schematic diagram of the structure of a derivation unit provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Data encryption is often used to protect sensitive information, such as personal data, financial records, and confidential business data, to prevent data leakage when the storage medium is lost, stolen, or attacked by hackers. It is an important part of data security measures and can improve the overall security of information systems.
[0025] Trusted Execution Environment (TEE) is an independent, secure computing environment designed to protect sensitive data and code. TEE usually exists in the main processor of the device, isolated from the operating system and other applications, ensuring protection from malware or other attacks when processing sensitive operations. This technology is widely used in scenarios that require high security, such as data space, mobile payment, digital rights management, authentication, and password storage. By providing an isolated and secure execution space, TEE technology enhances the overall security and data privacy protection of the device.
[0026] Dataspace is a virtual data space that leverages existing standards and technologies as well as widely accepted governance models in the data economy to facilitate secure and standardized data exchange and data linkage in a trusted business ecosystem. As a result, it provides a foundation for creating smart service scenarios and promoting innovative cross-company business processes while guaranteeing the data sovereignty of data owners. Data sovereignty is a core aspect of dataspace, which can be defined as the ability of natural persons or legal entities to make full autonomous decisions about their data.
[0027] Data Spaces is designed to meet the following strategic requirements:
[0028] Trust: Trust is the foundation of the data space. Every participant is evaluated and authenticated before being granted access to a trusted business ecosystem.
[0029] Security and Data Sovereignty: All components of the data space rely on state-of-the-art security measures. In addition to architectural specifications, security is primarily ensured through the evaluation and certification of each technical component used in the data space. According to the core aspect of ensuring data sovereignty, data owners in the data space attach usage restriction information to their data before transferring it to data consumers. To use the data, data consumers must fully accept the data owner's usage policy.
[0030] Data Ecosystem: The architecture of the data space does not require a central data storage function. Instead, it pursues the idea of decentralized data storage, which means that data physically remains in the hands of the respective data owner until it is transferred to a trusted party. This approach requires a comprehensive description of each data source and the value and availability of the data to other companies, combined with the ability to integrate domain-specific data vocabularies. In addition, metadata brokers in the ecosystem provide real-time data search services.
[0031] Standardized interoperability: DataSpace connectors are core components of the architecture, implemented in different variants and available from different vendors. Nonetheless, each connector is able to communicate with any other connector (or other technology component) in the DataSpace ecosystem.
[0032] Value-added applications: Dataspaces allow applications to be injected into Dataspace connectors to provide services on top of the data exchange process. This includes, for example, services for data processing, data format alignment, and data exchange protocols. Additionally, data analytics services can be provided through remote execution of algorithms.
[0033] Data Marketplace: Dataspace enables the creation of novel data-driven services that leverage data applications. It also fosters new business models for these services by providing clearing mechanisms and billing capabilities and creating domain-specific metadata broker solutions and markets. In addition, Dataspace provides templates and other methodological support for participants to use when specifying usage restriction information and requesting legal information.
[0034] Data security is particularly important in the data space. In addition to the conventional prevention of data leakage when the storage media is lost, stolen or attacked by hackers, it is also necessary to prevent users with host and virtual machine permissions from illegally using or maliciously leaking data, and prevent other applications in the same host and virtual machine system environment from illegally using or tampering with data, ensuring that data can only be accessed by the application that created it.
[0035] Therefore, the present invention provides a method for storing encrypted data in a trusted data space application program. Figure 1 FIG. 1 is a flow chart of a method for storing encrypted application data in a trusted data space provided by an embodiment of the present invention. Figure 1 As shown, the method includes:
[0036] S1. Derive the sealing key of each application in each secure virtual machine based on Haiguang CSV technology;
[0037] Figure 2 is a flow chart of a method for deriving a sealing key for each application in each secure virtual machine provided by an embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0038] S11, derive the sealing key of each secure virtual machine through the root key of the Haiguang security chip;
[0039] Hygon's CSV technology ensures that the secure virtual machine has a unique sealing key, that is, the sealing keys of each secure virtual machine are different. They are derived from the root key of the Hygon security chip and cannot be deduced or cracked.
[0040] S12. According to the sealing key of the current secure virtual machine, the identity ID of the current application in the current secure virtual machine, and other characteristic information, a CMAC algorithm is used to derive the sealing key of the current application in the current secure virtual machine.
[0041] Specifically, when the current application is built in the current secure virtual machine, an identity ID and an interference factor are randomly generated, and are shuffled and dispersed before being hard-coded in the current application (i.e., the identity ID data and the interference factor data are sliced and shuffled and dispersed in the current application). Among them, the identity ID is used as a key parameter for deriving the sealing key of the current application. The characteristic is that the current application will be different each time it is built, and each application is also different. After being interfered and shuffled and dispersed, it is difficult to crack and extract.
[0042] After the current application in the current secure virtual machine is started, the CMAC encryption algorithm is adopted to derive the seal key of the current secure virtual machine derived based on the Haiguang CSV technology, and use the identity ID of the current application in the current secure virtual machine (that is, the original identity ID reconstructed by the current application using the scrambled and scattered identity ID data slices. It should be noted that the current application can reconstruct the original identity ID from the scrambled and scattered identity ID data slices, but other applications cannot crack and reconstruct) and other characteristic information (the other characteristic information includes version number, version name, characteristic value, additional information, etc.) to derive a seal key unique to the current application in the current secure virtual machine.
[0043] This method can ensure that each application running in each secure virtual machine has its own unique sealing key, and cannot be detected or cracked by other applications even if they are running in the same secure virtual machine environment.
[0044] Furthermore, the full name of CMAC is Cipher-based Message Authentication Code. CMAC is a message authentication code based on a symmetric key block encryption algorithm, which can be regarded as an operation mode of the symmetric algorithm. It generates multiple subkeys from a master key by using key derivation technology to implement different security functions, such as secure communication protocols, storage encryption and decryption, and password management. CMAC has a wide range of application scenarios, including but not limited to improving data security and reducing the user's memory burden. The security of the key-derived CMAC depends on the size of the generated subkey space, the derivation algorithm used, and the key protection measures.
[0045] S2, obtaining current plaintext data, encrypting the current plaintext data in the current application using the randomly generated current data encryption key to obtain current ciphertext data, and storing the current ciphertext data in the first storage unit; and sealing the randomly generated current data encryption key using the sealing key of the current application, and storing the sealed current data encryption key in the second storage unit;
[0046] Specifically, the application and the plaintext data have a one-to-many correspondence relationship; the plaintext data and the data encryption key have a one-to-one correspondence relationship.
[0047] In the current application, multiple plaintext data can be obtained, and each plaintext data has a one-to-one corresponding data encryption key.
[0048] Take one of the plaintext data as an example:
[0049] Before the current plaintext data is stored on the disk, the current data encryption key corresponding to the current plaintext data is randomly generated according to the current plaintext data security policy level; the current plaintext data is encrypted in the current application using the randomly generated current data encryption key to obtain the current ciphertext data, effectively preventing data leakage. It should be noted that in the current application, a randomly generated symmetric encryption key with a specified number of key bits is used as the current data encryption key. The symmetric encryption key means that both the encryption key and the decryption key use the same key. For example: a 256-bit symmetric encryption key can be randomly generated; different plaintext data have different data encryption keys, which can further ensure data security.
[0050] The current ciphertext data is stored in a first storage unit; the first storage unit includes: a disk or an external database; specifically, the current ciphertext data is persistently stored in the disk or the external database.
[0051] Use the current application's seal key to encrypt and seal the randomly generated current data encryption key, effectively preventing the current data encryption key from being leaked.
[0052] The current data encryption key after encryption and sealing is stored in a second storage unit; the second storage unit includes: secure hardware, a disk or an external database. Specifically, the current data encryption key after encryption and sealing is persistently stored in secure hardware, a disk or an external database.
[0053] It should be noted that if the current data encryption key is directly placed in the memory of the current application, the current data encryption key will disappear when the current application is restarted. Therefore, the current data encryption key needs to be encrypted and stored in the second storage unit.
[0054] S3. When the current application is restarted, the current ciphertext data in the first storage unit and the current data encryption key after being sealed in the second storage unit are obtained; the current data encryption key after being sealed is decrypted by the sealing key of the current application to obtain the current data encryption key; and the current ciphertext data is decrypted by the current data encryption key to obtain the current plaintext data.
[0055] When the current application is restarted, the current data encryption key is loaded: that is, the current data encryption key after encryption and sealing is read from the security hardware, disk or external database; the current data encryption key after encryption and sealing is decrypted using the sealing key of the current application to obtain the current data encryption key. It should be noted that the current data encryption key after encryption and sealing can only be decrypted by the sealing key of the current application in the current secure virtual machine, and cannot be decrypted by the sealing keys of other applications in the current secure virtual machine, nor can it be decrypted by the sealing keys of all applications in other secure virtual machines.
[0056] Load the current ciphertext data: that is, read the current ciphertext data from the disk or external database; use the current data encryption key corresponding to the current ciphertext data (that is, the current data encryption key obtained by decrypting the sealed current data encryption key through the sealing key of the current application in the above) to decrypt the current ciphertext data to obtain the current plaintext data.
[0057] The present invention can prevent data leakage by encrypting different plaintext data with different data encryption keys and storing them in the first storage unit; and deriving a seal key for each application in each secure virtual machine, where different applications have different seal keys; using the seal key of the current application to encrypt and seal the current data encryption key in the current application and store it in the second storage unit, effectively preventing the data encryption key from being leaked; in addition to preventing data leakage when the storage medium is lost, stolen or attacked by hackers, this method can also prevent users with host and virtual machine permissions from illegally using or maliciously leaking data, and prevent other applications in the same host and virtual machine system environment from illegally using or tampering with data, ensuring that data can only be accessed by the application that created the data.
[0058] Figure 3 FIG. 1 is a schematic diagram of a structure of a trusted data space application data disk encryption storage system provided by an embodiment of the present invention. Figure 3 As shown, the system includes:
[0059] A derivation unit 201, used to derive a sealing key of each application in each secure virtual machine based on the Haiguang CSV technology;
[0060] Figure 4 is a schematic diagram of the structure of a derivation unit provided in an embodiment of the present invention, such as Figure 4 As shown, the derivation unit 201 includes:
[0061] The first derivation subunit 2011 is used to derive the sealing key of each secure virtual machine through the Haiguang security chip root key;
[0062] The second derivation subunit 2012 is used to derive the seal key of the current application in the current secure virtual machine using the CMAC algorithm according to the seal key of the current secure virtual machine, the identity ID of the current application in the current secure virtual machine, and other characteristic information.
[0063] In an optional implementation, the other characteristic information includes but is not limited to: version number, version name, characteristic value, etc.
[0064] The encryption storage unit 202 is used to obtain current plaintext data, encrypt the current plaintext data in the current application program using the randomly generated current data encryption key to obtain current ciphertext data, and store the current ciphertext data in the first storage unit; and seal the randomly generated current data encryption key using the sealing key of the current application program, and store the sealed current data encryption key in the second storage unit;
[0065] In an optional implementation, the application and the plaintext data have a one-to-many correspondence; the plaintext data and the data encryption key have a one-to-one correspondence.
[0066] In an optional implementation, in the current application, a symmetric encryption key with a specified number of key bits is randomly generated as the current data encryption key.
[0067] The first storage unit includes: a disk or an external database;
[0068] The second storage unit includes: secure hardware, a disk or an external database.
[0069] The decryption unit 203 is used to obtain the current ciphertext data in the first storage unit and the current data encryption key after being sealed in the second storage unit when the current application is restarted; decrypt the current data encryption key after being sealed by the sealing key of the current application to obtain the current data encryption key; and decrypt the current ciphertext data by the current data encryption key to obtain the current plaintext data.
[0070] Beneficial effects of the present invention:
[0071] The present invention provides a method and system for encrypting and storing application data in a trusted data space, wherein the method derives a seal key for each application in each secure virtual machine based on the Haiguang CSV technology; encrypts the current plaintext data in the current application by a randomly generated current data encryption key to obtain the current ciphertext data, and stores the current ciphertext data in a first storage unit; and seals the randomly generated current data encryption key by the seal key of the current application, and stores the sealed current data encryption key in a second storage unit. In addition to preventing data leakage when the storage medium is lost, stolen, or attacked by hackers, the method can also prevent users with host and virtual machine permissions from illegally using or maliciously leaking data, and prevent other applications in the same host and virtual machine system environment from illegally using or tampering with data, ensuring that data can only be accessed by the application that created the data.
[0072] 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for encrypting and storing application data in a trusted data space, characterized in that: include: S1. Derive the sealing key of each application in each secure virtual machine based on Haiguang CSV technology; S2, obtaining current plaintext data, encrypting the current plaintext data in the current application using a randomly generated current data encryption key to obtain current ciphertext data, and storing the current ciphertext data in a first storage unit; and sealing the randomly generated current data encryption key by using the sealing key of the current application, and storing the sealed current data encryption key in the second storage unit; S3, when the current application is restarted, the current ciphertext data in the first storage unit and the current data encryption key after encryption and sealing in the second storage unit are obtained; Decrypting the sealed current data encryption key using the sealing key of the current application to obtain the current data encryption key; The current ciphertext data is decrypted using the current data encryption key to obtain the current plaintext data.
2. The method according to claim 1, characterized in that The S1 includes: The sealing key of each secure virtual machine is derived from the root key of the Hygon security chip; According to the sealing key of the current secure virtual machine, the identity ID of the current application in the current secure virtual machine and other characteristic information, the CMAC algorithm is used to derive the sealing key of the current application in the current secure virtual machine.
3. The method according to claim 1, characterized in that: The application and the plaintext data have a one-to-many correspondence relationship; the plaintext data and the data encryption key have a one-to-one correspondence relationship.
4. The method according to claim 3, characterized in that: In the current application, a symmetric encryption key with a specified number of key bits is randomly generated as the current data encryption key.
5. The method according to claim 2, characterized in that: The other characteristic information includes: version number, version name, characteristic value; The first storage unit includes: a disk or an external database; The second storage unit includes: secure hardware, a disk or an external database.
6. A trusted data space application data disk encryption storage system, characterized in that: include: A derivation unit, used to derive the sealing key of each application in each secure virtual machine based on the Haiguang CSV technology; An encryption storage unit, used for obtaining current plaintext data, encrypting the current plaintext data in the current application program by using a randomly generated current data encryption key to obtain current ciphertext data, and storing the current ciphertext data in a first storage unit; and sealing the randomly generated current data encryption key by using the sealing key of the current application, and storing the sealed current data encryption key in the second storage unit; A decryption unit, used to obtain the current ciphertext data in the first storage unit and the current data encryption key after encryption and sealing in the second storage unit when the current application is restarted; Decrypting the sealed current data encryption key using the sealing key of the current application to obtain the current data encryption key; The current ciphertext data is decrypted using the current data encryption key to obtain the current plaintext data.
7. The system according to claim 6, characterized in that The derivation unit comprises: A first derivation sub-unit is used to derive a sealing key of each secure virtual machine through a root key of a Haiguang security chip; The second derivation subunit is used to derive the sealing key of the current application in the current secure virtual machine using the CMAC algorithm according to the sealing key of the current secure virtual machine, the identity ID of the current application in the current secure virtual machine, and other characteristic information.
8. The system according to claim 6, characterized in that: The application and the plaintext data have a one-to-many correspondence relationship; the plaintext data and the data encryption key have a one-to-one correspondence relationship.
9. The system according to claim 8, characterized in that: In the current application, a symmetric encryption key with a specified number of key bits is randomly generated as the current data encryption key.
10. The system according to claim 7, characterized in that: The other characteristic information includes: version number, version name, characteristic value; The first storage unit includes: a disk or an external database; The second storage unit includes: secure hardware, a disk or an external database.
Citation Information
Patent Citations
Method for storing file encryption key in linux operating system environment
CN115098034A
Direct storage access method and device and related equipment
CN116048716A
Direct storage access request processing method and device and related equipment
CN117632811A
Key protection method, device and system and storage medium
CN118041518A
Zero-trust remote authentication service deployment system based on confidential virtual machine
CN118171257A
