Intel SGX trusted service cluster deployment implementation method, system and electronic device

By generating and decentralizing the ECC master key, using the key derivation function to realize data sharing in Intel SGX trusted services, solving the problem that data can only be used within a single trusted service in the prior art, and realizing the trusted service clustered deployment.

CN113922969BActive Publication Date: 2025-01-10SECURITY HERON PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111257826.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-01-10
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

In the existing Intel SGX technology, data implemented using the SGX_KEYPOLICY_MRENCLAVE strategy can only be used and stored within a single trusted service, and data interaction and sharing between multiple trusted services cannot be realized, resulting in the inability to realize the cluster deployment of trusted services. .

Method used

By generating the complete ECC master key, sharding and scattering, key sharding is restored when trusted services in the cluster are initialized, the same security key is derived using the key derivation function to encrypt and decrypt the business data to ensure the same All trusted services in the cluster can share data.

Benefits of technology

It realizes the secure sharing of business data between Intel SGX trusted services, solves the problem that data can only be used and stored within a single trusted service, and meets the cluster deployment requirements of trusted services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113922969B_ABST
    Figure CN113922969B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and electronic device for implementing clustered deployment of Intel SGX trusted services, wherein the method includes: generating a complete ECC master key; sharding the ECC master key into multiple key shards, and dispersing and storing the multiple key shards; when the trusted service based on Intel SGX in the cluster is initialized, receiving the input key shards reaching a preset number; in the Enclave program space, recovering the complete ECC master key according to the input key shards; inputting the ECC master key into a key derivation function to derive a security key; and using the security key to encrypt and decrypt business data. The present invention adopts the same ECC master key and the same key derivation function, and all Intel SGX trusted services in the same cluster can derive the same security key, achieving the purpose of secure sharing of business data within the cluster, realizing the technical effect of clustered deployment of Intel SGX trusted services, and solving the technical problem of being unable to realize clustered deployment of trusted services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of trusted computing applications, and in particular to an implementation method, system and electronic device for clustered deployment of Intel SGX trusted services. Background Art

[0002] At present, in the field of trusted computing (TEE) applications, Intel's SGX technology is the most mature and widely used. Most cloud service providers support developers to use Intel SGX technology to implement data encryption, confidential computing and other applications. The principle of Intel's SGX technology is to isolate an area called Enclave inside the Intel CPU. The program code and data loaded into the Enclave area will not be tampered with or spied on by the outside world. In short, Enclave is like a hardware-based security black box inside the CPU, so the program logic and data storage executed inside the Enclave are safe.

[0003] At the same time, Intel SGX provides the SGX_KEYPOLICY_MRENCLAVE policy for generating security keys within the Enclave. Enclave programs can use this policy to generate security keys to encrypt and decrypt data.

[0004] For the SGX_KEYPOLICY_MRENCLAVE policy provided by Intel SGX, the security key is derived from the code, data, signature, and CPU hardware information of the enclave itself, so the data encrypted with this security key can only be decrypted by the enclave itself. The steps to implement data security applications using this policy are as follows: the data to be processed is passed to the enclave; the enclave program uses the SGX_KEYPOLICY_MRENCLAVE policy to generate a security key; then the data is encrypted using the security key and saved to the database; subsequently, only the same enclave program under the hardware platform can derive the same security key, thereby ensuring that the data can only be decrypted within the enclave.

[0005] In actual applications, cloud security application platforms often need to be deployed in clusters to meet high availability and high load, which requires that multiple Intel SGX trusted services within the cluster can securely share business data.

[0006] However, according to the above steps of using the SGX_KEYPOLICY_MRENCLAVE policy to implement data security applications, it can be seen that the data can only be used and stored within a single trusted service, and data cannot be interacted and shared between multiple trusted services; for example, for two trusted services A and B, after the encrypted business data of trusted service A is stored in the database, trusted service B in the cluster can read the ciphertext from the database but cannot decrypt it, and clustered deployment of trusted services cannot be achieved. Summary of the invention

[0007] The main purpose of the present invention is to provide an implementation method and system for clustered deployment of Intel SGX trusted services to solve the problem that clustered deployment of trusted services cannot be achieved in related technologies.

[0008] In order to achieve the above object, a first aspect of the present invention provides a method for implementing Intel SGX trusted service cluster deployment, including:

[0009] Generate a complete ECC master key;

[0010] Slicing the ECC master key into a plurality of key slicings, and storing the plurality of key slicings in a dispersed manner;

[0011] When the Intel SGX-based trusted service in the cluster is initialized, a preset number of key shards are received as input;

[0012] In the Enclave program space, the complete ECC master key is restored based on the input key shards;

[0013] Inputting the ECC master key into a key derivation function to derive a security key;

[0014] The business data is encrypted and decrypted using the security key.

[0015] Optionally, inputting the ECC master key into a key derivation function to derive a security key includes:

[0016] Determine a key derivation function that meets preset requirements;

[0017] Inputting the public key of the ECC master key into the key derivation function;

[0018] Inputting the private key of the ECC master key into the key derivation function;

[0019] Performing a hash operation on the public key using the hash function in the key derivation function to obtain a public key hash value;

[0020] The hash function in the key derivation function is used to perform a hash operation on the public key hash value and the private key to obtain a security key.

[0021] Furthermore, a key derivation function KDF that meets the preset requirements is determined as follows:

[0022] KDF(p,d)=SHA256(SHA256(p),d)

[0023] Among them, p is the public key of the ECC master key, d is the private key of the ECC master key, and SHA256 is the standard SHA256 hash function.

[0024] Further, the preset requirements include: a first preset requirement and a second preset requirement;

[0025] The first preset requirement includes: when the input of the key derivation function is the same, the output result is consistent;

[0026] The second preset requirement includes: the length of data obtained as an output result of the key derivation function is the same as the length of the ECC master key.

[0027] Optionally, the business data includes original text data and ciphertext data;

[0028] The using the security key to encrypt and decrypt the business data includes:

[0029] Use the security key to perform symmetric encryption operation on the original data to obtain the ciphertext data;

[0030] Storing the ciphertext data in a ciphertext database of the cluster;

[0031] Use the security key to perform symmetric decryption on the ciphertext data to obtain the original data.

[0032] Optionally, multiple trusted services are deployed in the cluster, and each trusted service is used to provide the same business function;

[0033] All trusted services in the same cluster use the same ECC master key and the same key derivation function to derive the same security key so that business data can be shared within the cluster.

[0034] Optionally, before initializing the Intel SGX-based trusted service in the cluster, the method further includes:

[0035] Through the scheduling of the load balancing service, any trusted service in the cluster is randomly selected for access.

[0036] A second aspect of the present invention provides an implementation system for Intel SGX trusted service cluster deployment, including:

[0037] A generation unit, used to generate a complete ECC master key;

[0038] A sharding unit, configured to shard the ECC master key into a plurality of key shards, and store the plurality of key shards in a dispersed manner;

[0039] A receiving unit, used for receiving a preset number of key shards when initializing an Intel SGX-based trusted service in a cluster;

[0040] The recovery unit is used to recover the complete ECC master key based on the input key shards in the Enclave program space;

[0041] A derivation unit, used for inputting the ECC master key into a key derivation function to derive a security key;

[0042] The encryption and decryption unit is used to encrypt and decrypt the business data using the security key.

[0043] A third aspect of the present invention provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the implementation method of Intel SGX trusted service cluster deployment provided by any one of the first aspects.

[0044] The fourth aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the implementation method of the Intel SGX trusted service clustered deployment provided in any one of the first aspects.

[0045] In the implementation method of the clustered deployment of Intel SGX trusted services provided by the embodiment of the present invention, a complete ECC master key is generated; the ECC master key is sharded into multiple key shards, and the multiple key shards are stored in a dispersed manner; when the trusted service based on Intel SGX in the cluster is initialized, the input key shards reaching a preset number are received; in the Enclave program space, the complete ECC master key is restored according to the input key shards; the ECC master key is input into the key derivation function to derive a security key; and the business data is encrypted and decrypted using the security key. Since the present invention adopts the same ECC master key and the same key derivation function, all Intel SGX trusted services in the same cluster can derive the same security key, achieving the purpose of secure sharing of business data within the cluster, thereby achieving the technical effect of clustered deployment of Intel SGX trusted services, and further solving the technical problem in the related technology that the clustered deployment of trusted services cannot be achieved because the data can only be used and stored within a single trusted service. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A system structure diagram of an implementation system for Intel SGX trusted service cluster deployment provided by an embodiment of the present invention;

[0048] Figure 2 A flowchart of a method for implementing the clustered deployment of Intel SGX trusted services provided by an embodiment of the present invention;

[0049] Figure 3 A block diagram of an implementation system for clustered deployment of Intel SGX trusted services provided by an embodiment of the present invention;

[0050] Figure 4 A block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0053] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0054] Trusted computing (TEE) is a computing method that executes programs in a secure and trusted environment. The program code, logic, and calculation results running in the TEE will not be tampered with or hijacked by attackers. Trusted computing has been widely used in confidential computing, cloud computing and other application fields. In actual applications, cloud security application platforms often need to be clustered to meet high availability and high load, which requires that multiple Intel SGX trusted services in the cluster can securely share business data; Intel SGX is Intel's trusted computing technology solution based on CPU level implementation.

[0055] However, when the SGX_KEYPOLICY_MRENCLAVE policy is used in related technologies to implement data security applications, the data can only be used and stored within a single trusted service, and data cannot be interacted and shared between multiple trusted services; for example, for two trusted services A and B, after the encrypted business data of trusted service A is stored in the database, trusted service B in the cluster can read the ciphertext from the database but cannot decrypt it, and clustered deployment of trusted services cannot be achieved.

[0056] In order to solve the above problems, an embodiment of the present invention provides an implementation system for clustered deployment of Intel SGX trusted services. When the system includes two trusted services based on Intel SGX technology, the system structure diagram is as follows: Figure 1 As shown, where:

[0057] Trusted Service A and Trusted Service B: Two trusted services based on Intel SGX technology deployed in a cluster, providing the same business functions; in addition, this system can be expanded to cluster deployment of multiple Intel SGX trusted services;

[0058] Load balancing service: cluster scheduling service, responsible for randomly selecting one of the two trusted services A and B for access;

[0059] ECC master key sharding: key sharding of the ECC master key. When the trusted service is initialized, the administrator in charge of each key shard inputs the key shards into the trusted service respectively. The trusted service uses the key shards inside the Enclave program to restore the complete ECC master key. Among them, ECC is an elliptic curve algorithm, which is an asymmetric cryptographic algorithm. The key consists of a private key and a public key. The private key is kept by the key holder, and the public key is public.

[0060] KDF: Key derivation function, whose input parameter is the complete ECC master key;

[0061] K: security key, which only appears in the Enclave program space;

[0062] Ciphertext = K (original data): Data encryption process, using the security key K to perform symmetric encryption operation on the original data to obtain the ciphertext data;

[0063] Original text = K (ciphertext data): Data decryption process, using the security key K to perform symmetric decryption operation on the ciphertext data to obtain the original text data;

[0064] Ciphertext database: A database shared in a cluster where business data is stored in ciphertext form.

[0065] The present invention first generates a unified ECC master key for the Intel SGX trusted service in the cluster, and then shards it for dispersed storage; when the Intel SGX trusted service is initialized, the key shards are respectively input by the administrator of the key shards, and the trusted service obtains a complete ECC master key by restoring the shards; finally, a security key K is derived from the ECC master key, and K is used to encrypt and decrypt business data.

[0066] The embodiment of the present invention provides a method for implementing the clustered deployment of Intel SGX trusted services. The flowchart is as follows: Figure 2As shown, the method includes the following steps S101 to S106:

[0067] Step S101: Generate a complete ECC master key using a standard generation algorithm; first generate a complete ECC master key using a commonly used ECC master key generation algorithm, so that when the subsequent trusted service keeps the key fragments of the ECC master key, the same ECC master key can be restored.

[0068] Step S102: Shard the ECC master key into multiple key shards, and store the multiple key shards in a dispersed manner; for example, divide the ECC master key into a total of n key shards, and give the n key shards to n administrators for safekeeping, each administrator keeps and only keeps one key shard, where n>1.

[0069] Step S103: When the Intel SGX-based trusted service in the cluster is initialized, a preset number of key shards are received as input; when the Intel SGX trusted service is initialized, the administrator inputs the key shards kept by him / her respectively, and the number of key shards input is at least a preset k, and the preset k key shards are received as input, where k is the minimum number of key shards required to recover the ECC master key, 1 <k<=n;

[0070] Specifically, multiple trusted services are deployed in the cluster, and each trusted service is used to provide the same business function;

[0071] All trusted services in the same cluster use the same ECC master key and the same key derivation function to derive the same security key so that business data can be shared within the cluster.

[0072] Furthermore, before initializing the Intel SGX-based trusted service in the cluster, the method further includes:

[0073] Through the scheduling of the load balancing service, any trusted service in the cluster is randomly selected for access. Trusted services based on Intel SGX are currently widely used. In actual applications, in order to ensure high availability and high load of services, it is often necessary to cluster trusted services and randomly call any trusted service in the cluster to complete business calculations through the scheduling of the load balancing service.

[0074] Step S104: In the Enclave program space, the complete ECC master key is restored according to the input key shards;

[0075] Step S105: inputting the ECC master key into a key derivation function to derive a security key;

[0076] Specifically, the step S105 includes:

[0077] Determine a key derivation function that meets preset requirements; wherein the preset requirements include: a first preset requirement and a second preset requirement; the first preset requirement includes: when the input of the key derivation function is the same, the output result is consistent; the second preset requirement includes: the length of the data obtained by the output result of the key derivation function is the same as the length of the ECC master key, and the length of the ECC master key is a fixed length of 32 bytes.

[0078] Furthermore, a key derivation function KDF that meets the preset requirements is determined as follows:

[0079] KDF(p,d)=SHA256(SHA256(p),d)

[0080] Among them, p is the public key of the ECC master key, d is the private key of the ECC master key, and SHA256 is the standard SHA256 hash function. Hash operation is an irreversible cryptographic operation that can be used to process original data of any length. The result data of the operation is fixed-length data, and the original data cannot be derived from the result data; SHA256 is a commonly used hash operation algorithm, and the result data length of the operation is 32 bytes.

[0081] Inputting the public key of the ECC master key into the key derivation function;

[0082] Inputting the private key of the ECC master key into the key derivation function;

[0083] Performing a hash operation on the public key using the hash function in the key derivation function to obtain a public key hash value;

[0084] The hash function in the key derivation function is used to perform a hash operation on the public key hash value and the private key to obtain a security key.

[0085] The present invention performs two hash calculations, namely, hashing the public key and hashing the public key hash value and the private key. Compared with directly hashing the public key and the private key, the derived security key is more secure. The key derived from the derived function determined by the two hash functions is used as the security key, and data can be shared between the trusted services of Intel SGX, thereby realizing cluster deployment.

[0086] The key derivation function KDF in the present invention uses a standard SHA256 hash function, which can ensure that the calculation results are the same when the input parameters are the same, and the length of the ECC master key is the same as the result data length of the SHA256 hash function, both of which are fixed lengths of 32 bytes. Therefore, the key derivation function KDF using the SHA256 hash function meets the first preset requirement and the second preset requirement. Therefore, the present invention requires that the input parameter of the key derivation function KDF is the master key shared by the Intel SGX trusted service, ensuring that each Intel SGX trusted service can derive the same security key K. By setting up a master key, the Intel SGX trusted services in the cluster all derive the same security key K from the master key, thereby achieving the purpose of cluster deployment.

[0087] Step S106: encrypt and decrypt the business data using the security key.

[0088] Wherein, the business data includes original data and ciphertext data;

[0089] The using the security key to encrypt and decrypt the business data includes:

[0090] Use the security key to perform symmetric encryption operation on the original data to obtain the ciphertext data;

[0091] Storing the ciphertext data in a ciphertext database of the cluster;

[0092] The ciphertext data is symmetrically decrypted using a security key to obtain the original data. For security reasons, the business data in the trusted service is encrypted and stored in the database. When using the business data, the ciphertext in the database must be decrypted before business processing can be performed, so that the business data can be calculated in a secure and trusted computing environment. Through the above encryption and decryption, the present invention achieves the technical effect that business data encrypted and stored by a trusted service can be decrypted by other trusted services in the cluster.

[0093] It can be seen from the above steps that since the Intel SGX trusted services in the cluster can derive the same security key K through the same ECC master key, the present invention can share business data through the database to achieve the requirements of clustered deployment. The Intel SGX trusted services in the cluster use the ECC master key and generate a unified security key K through the key derivation function to encrypt business data, thereby achieving the sharing of business data. By using the security key to encrypt and decrypt business data, the technical effect of one trusted service encrypting and storing business data can be decrypted by other trusted services in the cluster.

[0094] From the above description, it can be seen that the present invention achieves the following technical effects:

[0095] Since the present invention uses the same ECC master key and the same key derivation function, all Intel SGX trusted services in the same cluster can derive the same security key, achieving the purpose of secure sharing of business data within the cluster, thereby achieving the technical effect of clustered deployment of Intel SGX trusted services, and further solving the technical problem in the related art that clustered deployment of trusted services cannot be achieved because data can only be used and stored within a single trusted service;

[0096] The Intel SGX trusted service in the cluster of the present invention can derive the same security key K through the same ECC master key, and can share business data through the database to achieve the requirements of clustered deployment; the Intel SGX trusted service in the cluster uses the ECC master key and generates a unified security key K through a key derivation function to encrypt business data, thereby achieving the sharing of business data, and by using the security key to encrypt and decrypt business data, a technical effect is achieved that business data encrypted and stored by a trusted service can be decrypted by other trusted services in the cluster.

[0097] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0098] The embodiment of the present invention also provides an implementation system for Intel SGX trusted service cluster deployment for implementing the implementation method of the Intel SGX trusted service cluster deployment, as shown in the schematic diagram Figure 3 As shown, the system includes:

[0099] A generating unit 31, used to generate a complete ECC master key;

[0100] A sharding unit 32, configured to shard the ECC master key into a plurality of key shards, and store the plurality of key shards in a dispersed manner;

[0101] A receiving unit 33 is used to receive a preset number of key shards when initializing a trusted service based on Intel SGX in a cluster;

[0102] A recovery unit 34 is used to recover the complete ECC master key according to the input key shards in the Enclave program space;

[0103] A derivation unit 35, configured to input the ECC master key into a key derivation function to derive a security key;

[0104] The encryption and decryption unit 36 ​​is used to encrypt and decrypt the business data using the security key.

[0105] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, the electronic device includes one or more processors 41 and a memory 42. Figure 4 A processor 41 is taken as an example.

[0106] The controller may further include: an input device 43 and an output device 44 .

[0107] The processor 41, the memory 42, the input device 43 and the output device 44 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0108] The processor 41 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips. The general-purpose processor may be a microprocessor or any conventional processor.

[0109] The memory 42 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the control method in the embodiment of the present invention. The processor 41 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 42, that is, the implementation method of the Intel SGX trusted service cluster deployment of the above method embodiment.

[0110] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of a processing device operated by the server, etc. In addition, the memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 42 may optionally include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to a network connection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0111] The input device 43 can receive input digital or character information, and generate key signal input related to user settings and function control of the processing device of the server. The output device 44 can include display devices such as a display screen.

[0112] One or more modules are stored in the memory 42, and when executed by one or more processors 41, the execution is as follows: Figure 1 The method shown.

[0113] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned motor control methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FM), a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0114] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for implementing Intel SGX trusted service cluster deployment, characterized in that: include: Generate a complete ECC master key; Slicing the ECC master key into a plurality of key slicings, and storing the plurality of key slicings in a dispersed manner; When the Intel SGX-based trusted service in the cluster is initialized, a preset number of key shards are received as input; In the Enclave program space, the complete ECC master key is restored based on the input key shards; Inputting the ECC master key into a key derivation function to derive a security key; encrypting and decrypting business data using the security key; Multiple trusted services are deployed in the cluster, and each trusted service is used to provide the same business function; All trusted services in the same cluster use the same ECC master key and the same key derivation function to derive the same security key so that business data can be shared within the cluster.

2. The method according to claim 1, characterized in that The step of inputting the ECC master key into a key derivation function to derive a security key comprises: Determine a key derivation function that meets preset requirements; Inputting the public key of the ECC master key into the key derivation function; Inputting the private key of the ECC master key into the key derivation function; Performing a hash operation on the public key using the hash function in the key derivation function to obtain a public key hash value; The hash function in the key derivation function is used to perform a hash operation on the public key hash value and the private key to obtain a security key.

3. The method according to claim 2, characterized in that Determine the key derivation function KDF that meets the preset requirements as follows: KDF(p,d)=SHA256(SHA256(p),d) Among them, p is the public key of the ECC master key, d is the private key of the ECC master key, and SHA256 is the standard SHA256 hash function.

4. The method according to claim 2, characterized in that: The preset requirements include: a first preset requirement and a second preset requirement; The first preset requirement includes: when the input of the key derivation function is the same, the output result is consistent; The second preset requirement includes: the length of data obtained as an output result of the key derivation function is the same as the length of the ECC master key.

5. The method according to claim 1, characterized in that The business data includes original data and ciphertext data; The using the security key to encrypt and decrypt the business data includes: Use the security key to perform symmetric encryption operation on the original data to obtain the ciphertext data; Storing the ciphertext data in a ciphertext database of the cluster; Use the security key to perform symmetric decryption on the ciphertext data to obtain the original data.

6. The method according to claim 1, characterized in that Before initializing the Intel SGX-based trusted service in the cluster, the method further includes: Through the scheduling of the load balancing service, any trusted service in the cluster is randomly selected for access.

7. An implementation system for Intel SGX trusted service cluster deployment, characterized in that: include: A generation unit, used to generate a complete ECC master key; A sharding unit, configured to shard the ECC master key into a plurality of key shards, and store the plurality of key shards in a dispersed manner; A receiving unit, used for receiving a preset number of key shards when initializing an Intel SGX-based trusted service in a cluster; The recovery unit is used to recover the complete ECC master key based on the input key shards in the Enclave program space; A derivation unit, used for inputting the ECC master key into a key derivation function to derive a security key; An encryption and decryption unit, used to encrypt and decrypt business data using the security key; Multiple trusted services are deployed in the cluster, and each trusted service is used to provide the same business function; All trusted services in the same cluster use the same ECC master key and the same key derivation function to derive the same security key so that business data can be shared within the cluster.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the implementation method of the Intel SGX trusted service cluster deployment described in any one of claims 1-6.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the implementation method of the Intel SGX trusted service cluster deployment described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for managing encryption key and system thereof

    CN106209353A

  • Secure private key generation method and system, encryption method and system, equipment and medium

    CN111949996A