CN114006741A - Method and system for realizing cluster security deployment of Intel SGX trusted service - Google Patents

Method and system for realizing cluster security deployment of Intel SGX trusted service Download PDF

Info

Publication number
CN114006741A
CN114006741A CN202111255962.8A CN202111255962A CN114006741A CN 114006741 A CN114006741 A CN 114006741A CN 202111255962 A CN202111255962 A CN 202111255962A CN 114006741 A CN114006741 A CN 114006741A
Authority
CN
China
Prior art keywords
key
ecc
security
master
cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111255962.8A
Other languages
Chinese (zh)
Inventor
何剑虹
姚有方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Xianbing Technology Co ltd
Original Assignee
Hangzhou Xianbing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Xianbing Technology Co ltd filed Critical Hangzhou Xianbing Technology Co ltd
Priority to CN202111255962.8A priority Critical patent/CN114006741A/en
Publication of CN114006741A publication Critical patent/CN114006741A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves

Abstract

The invention discloses a method and a system for realizing cluster security deployment of Intel SGX trusted service, wherein the method comprises the following steps: partitioning the ECC main key by adopting a Shamir partitioning algorithm, dividing the ECC main key into a plurality of key partitions, and storing the key partitions in a scattered manner; receiving an input key fragment when a trusted service based on Intel SGX in a cluster is initialized; in an Enclave program space, recovering a complete ECC (error correction code) main key through a Shamir fragmentation algorithm according to input key fragmentation; inputting the ECC main key into a key derivation function to derive a security key; and encrypting and decrypting the service data by using the security key. The invention adopts the same ECC main key and the same key derivation function, and all Intel SGX trusted services in the same cluster can derive the same security key, thereby realizing the secure sharing of service data in the cluster; the method adopts a Shamir sharding algorithm to shard the ECC master key, and a plurality of administrators respectively manage the key sharding, thereby avoiding the centralized management of the master key and improving the security of the system.

Description

Method and system for realizing cluster security deployment of Intel SGX trusted service
Technical Field
The invention relates to the field of trusted computing application, in particular to a method and a system for realizing clustered safe deployment of Intel SGX trusted services.
Background
At present, in the field of trusted computing (TEE) application, the Intel SGX technology is the most mature and widely applied, and most cloud service businesses support developers to realize applications such as data encryption and confidential computing by adopting the Intel SGX technology. The principle of the SGX technology of Intel is to isolate an area called Enclave inside an Intel CPU, and program codes and data loaded in the Enclave area will not be tampered and peeped by the outside. In short, Enclave is like a hardware-based security black box inside the CPU, so that the program logic and data storage executed inside the Enclave are secure.
Meanwhile, the Intel SGX provides a policy for generating a security key inside the Enclave, the Enclave program can generate the security key by using the policy to encrypt and decrypt data, and the commonly used Enclave security key generation policy is the SGX _ keyolic _ MRSIGNER policy.
When the SGX _ keyline _ MRSIGNER policy is adopted, the security key is derived from the public key of the signer of the Enclave, and the public key refers to the public key in the RSA key that signs the Enclave program code when the developer issues the Enclave. Data encrypted using the security key generated by this policy can be decrypted inside all encrvases signed by the same developer. The steps for implementing data security application using this policy are as follows: the data to be processed is transmitted into an Enclave; the program of Enclave generates a security key by using an SGX _ KEYPOLICY _ MRSIGNER strategy; then, encrypting the data by using a security key, and then storing the data in a database; the subsequent Enclave program which is issued after the RSA key of the same developer is signed can derive the security key, so that the ciphertext data can be decrypted.
In practical application, in order to meet high availability and high load, a cloud security application platform often needs to be deployed in a clustering manner, which requires that multiple Intel SGX trusted services in a cluster can safely share service data.
However, if the SGX _ keyline _ MRSIGNER policy is used, all trusted service Enclave modules in the cluster use the same RSA key for code signing, and since the security key under the policy is derived from the RSA public key of the developer, as long as the Enclave program signed by the same RSA key can decrypt data; thus, the security of data is completely dependent on how the developer keeps and uses the RSA key of the code signature, which greatly reduces the security of data.
In addition, developers often have only one RSA key for code signing, and the use of the one RSA key for code signing of multiple products also results in that secure data cannot be isolated within a single-service cluster, and that data cannot be securely shared only among trusted services within the same cluster.
Disclosure of Invention
The invention mainly aims to provide a method and a system for realizing cluster security deployment of Intel SGX trusted services, so as to solve the problems that the security of data is low and the data cannot be safely shared only among the trusted services in the same cluster in the related technology.
In order to achieve the above object, a first aspect of the present invention provides a method for implementing an Intel SGX trusted service clustered security deployment, including:
the method comprises the steps that a Shamir fragmentation algorithm is adopted to fragment a pre-generated ECC master key, the ECC master key is divided into a plurality of key fragments, and the key fragments are stored in a scattered mode;
receiving an input key fragment when a trusted service based on Intel SGX in a cluster is initialized;
in an Enclave program space, recovering a complete ECC main key through the Shamir slicing algorithm according to input key slices;
inputting the ECC main key into a key derivation function to derive a security key;
and encrypting and decrypting the service data by using the security key.
Optionally, the fragmenting, by using a Shamir fragmentation algorithm, the pre-generated ECC master key, dividing into a plurality of key fragments, and storing the plurality of key fragments in a distributed manner, includes:
generating a complete ECC master key (d, p) in advance, wherein d is a private key of the ECC master key, and p is a public key of the ECC master key;
setting fragmentation parameters (k, n) of the Shamir fragmentation algorithm, wherein n is the number of divided key fragments, k is the minimum number of key fragments required to be input when an ECC master key is restored, and 1< k < ═ n;
f (x) is determined as follows:
f(x)=a0+a1x+a2x2+...+ak-1xk-1
wherein, a0=d,a1、a2...ak-1Is k-1 random numbers, the independent variable x is a random number, and the dependent variable f (x) and the independent variable x form a key fragment { x, f (x) };
generating n random numbers x1、x2...xnAnd substituting into the above formula to obtain f (x)1)、f(x2)...f(xn);
Will { x1,f(x1)}、{x2,f(x2)}...{xn,f(xn) N key fragments which are used as the private key of the ECC master key, and the n key fragments are handed to n administrators to be kept respectively.
Further, in the Enclave program space, recovering the complete ECC master key by the Shamir fragmentation algorithm according to the input key fragments includes:
receiving input k key splits { x1,y1}、{x2,y2}...{xk,yk};
The k key fragments are respectively substituted into f (x) a0+a1x+a2x2+...+ak-1xk-1The following k polynomials are obtained:
Figure BDA0003324112100000031
after the k polynomials are converted into a matrix, the coefficient a is obtained by solving according to the following formula0、a1、a2...ak-1
Figure BDA0003324112100000032
System obtained by solvingNumber a0、a1、a2...ak-1Substituted formula f (x) ═ a0+a1x+a2x2+...+ak-1xk-1Wherein x is 0 to obtain a0A private key of the recovered ECC master key;
and obtaining a complete ECC main key according to the public key of the ECC main key and the recovered private key of the ECC main key.
Optionally, the inputting the ECC master key into a key derivation function to derive a security key includes:
determining a key derivation function meeting preset requirements;
inputting a public key of an ECC master key into the key derivation function;
inputting a private key of an ECC master key into the key derivation function;
carrying out Hash operation on a public key by utilizing a Hash function in the key derivation function to obtain a Hash value of the public key;
and carrying out hash operation on the public key hash value and the private key by using a hash function in the key derivation function to obtain a secure key.
Further, the key derivation function KDF is determined as follows:
KDF(p,d)=SHA256(SHA256(p),d)
wherein, p is the public key of the ECC master key, d is the private key of the ECC master key, and SHA256 is a standard SHA256 hash function.
Optionally, the service data includes original text data and ciphertext data;
the encrypting and decrypting the service data by using the security key comprises the following steps:
carrying out symmetric encryption operation on the original text data by using the security key to obtain ciphertext data;
storing the ciphertext data into a ciphertext database of the cluster;
and carrying out symmetric decryption operation on the ciphertext data by using the security key to obtain the original text data.
Optionally, a plurality of trusted services are deployed in the cluster, and each trusted service is used for providing the same business function;
all trusted services in the same cluster adopt the same ECC master key and the same key derivation function to derive the same security key, so that the business data can be shared in the cluster.
A second aspect of the present invention provides a system for implementing Intel SGX trusted service clustered security deployment, including:
the sharding unit is used for sharding the pre-generated ECC master key by adopting a Shamir sharding algorithm, dividing the ECC master key into a plurality of key shards and storing the key shards in a scattered manner;
the receiving unit is used for receiving the input key fragments when the trusted service based on the Intel SGX in the cluster is initialized;
the recovery unit is used for recovering a complete ECC (error correction code) main key through the Shamir fragmentation algorithm according to the input key fragmentation in the Enclave program space;
the derivation unit is used for inputting the ECC main key into a key derivation function and deriving a security key;
and the encryption and decryption unit is used for encrypting and decrypting the service data by using the security key.
A third aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute an implementation method of the Intel SGX trusted service clustered security deployment provided in any one of the first aspects.
A fourth aspect of the present invention provides an electronic apparatus, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform a method of implementing an Intel SGX trusted services clustered security deployment as provided in any of the first aspects.
In the method and system for realizing the clustered secure deployment of the Intel SGX trusted service, provided by the embodiment of the invention, an ECC (error correction code) master key generated in advance is fragmented by adopting a Shamir fragmentation algorithm to obtain a plurality of key fragments, and the key fragments are stored in a scattered manner; receiving an input key fragment when a trusted service based on Intel SGX in a cluster is initialized; in an Enclave program space, recovering a complete ECC main key through the Shamir slicing algorithm according to input key slices; inputting the ECC main key into a key derivation function to derive a security key; and encrypting and decrypting the service data by using the security key. The invention adopts the same ECC main key and the same key derivation function, so that all Intel SGX trusted services in the same cluster can derive the same security key, thereby realizing the security sharing of service data in the cluster and ensuring that the data is only safely shared among the trusted services in the same cluster; in addition, the Shamir fragmentation algorithm is adopted to fragment the ECC master key, and a plurality of managers respectively manage the master key fragmentation, so that centralized management of the master key is avoided, the security of the ECC master key is ensured, the security of the whole system is improved, and the problems that in the related technology, the security of data is low, and the data cannot be safely shared only among trusted services in the same cluster are solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for implementing an Intel SGX trusted service clustered security deployment according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for implementing an Intel SGX trusted service clustered security deployment according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances in order to facilitate the description of the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present invention, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "center", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings. These terms are used primarily to better describe the invention and its embodiments and are not intended to limit the indicated systems, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meanings of these terms in the present invention can be understood by those skilled in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in communication between two systems, components or parts. The specific meanings of the above terms in the present invention can be understood by those of ordinary skill in the art according to specific situations.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In practical application, in order to meet high availability and high load, a cloud security application platform often needs to be deployed in a clustering manner, which requires that multiple Intel SGX trusted services in a cluster can safely share service data. However, if the SGX _ keyline _ MRSIGNER policy is used, the security of data is completely dependent on how the developer keeps and uses the RSA key of the code signature, which greatly reduces the security of data; in addition, developers often have only one RSA key for code signing, and the use of the one RSA key for code signing of multiple products also results in that secure data cannot be isolated within a single-service cluster, and that data cannot be securely shared only among trusted services within the same cluster.
In order to solve the above problem, an embodiment of the present invention provides a method for implementing an Intel SGX trusted service clustered security deployment, where as shown in fig. 1, the method includes the following steps S101 to S105:
step S101: the method comprises the steps that a Shamir fragmentation algorithm is adopted to fragment a pre-generated ECC master key, the ECC master key is divided into a plurality of key fragments, and the key fragments are stored in a scattered mode;
the Shamir slicing algorithm is a key slicing (sharing) algorithm, and the basic idea is that a distributor decomposes a secret s into n secrets through a secret polynomial and distributes the n secrets to a holder, wherein any secret which is not less than k secrets can recover a ciphertext, and any secret which is not less than k secrets can not obtain any information of the ciphertext, wherein n is greater than 1, and 1< k ═ n; ECC is an elliptic curve algorithm, and is an asymmetric cryptographic algorithm, a secret key consists of a private key and a public key, the private key is kept by a secret key holder, and the public key is public.
Specifically, the step S101 includes:
generating a complete ECC master key (d, p) in advance, wherein d is a private key of the ECC master key, and p is a public key of the ECC master key; generating a complete ECC master key in advance through a standard ECC master key generation algorithm;
setting fragmentation parameters (k, n) of the Shamir fragmentation algorithm, wherein n is the number of divided key fragments, k is the minimum number of key fragments required to be input when an ECC master key is recovered, and k is more than 1 and less than n;
f (x) is determined as follows:
f(x)=a0+a1x+a2x2+...+ak-1xk-1
wherein, a0=d,a1、a2…ak-1Is k-1 random numbers, the independent variable x is a random number, and the dependent variable f (x) and the independent variable x form a key fragment { x, f (x) };
n random numbers x1 and x2.. xn are generated and are respectively substituted into the formula to respectively obtain f (x)1)、f(x2)...f(xn);
Will { x1,f(x1)}、{x2,f(x2)}...{xn,f(xn) N key fragments which are used as the private key of the ECC master key, and the n key fragments are handed to n administrators to be kept respectively.
The ECC master key is established, the ECC master key is divided by adopting a Shamir key sharing algorithm, and the master key is managed by a plurality of managers respectively, so that the centralized management of the ECC master key is avoided, the safety of the ECC master key is improved, and the safety of the whole system is further improved; and the sharer key sharing algorithm is adopted to segment and store the ECC master key, so that the security of the master key is greatly improved, and the security of service data is ensured.
Step S102: receiving an input key fragment when a trusted service based on Intel SGX in a cluster is initialized; when the Intel SGX trusted service in the cluster is started, an administrator inputs key fragments stored by the administrator, the input number of the key fragments is at least k, and the input key fragments are received by at least k.
The cluster is provided with a plurality of trusted services, and each trusted service is used for providing the same business function; when the trusted service is required to be accessed for trusted computing, the trusted service in the cluster can be dispatched through the load balancing service, so that a service function is provided;
all the trusted services in the same cluster adopt the same ECC master key and the same key derivation function to derive the same security key, so that the business data is shared in the cluster, and the data is ensured to be only safely shared among the trusted services in the same cluster.
Step S103: in an Enclave program space, recovering a complete ECC main key through the Shamir slicing algorithm according to input key slices;
specifically, the step S103 includes:
when the number of key fragments input by the administrator is k, the input k key fragments { x } are received1,y1}、{x2,y2}...{xk,yk};
The k key fragments are respectively substituted into f (x) a0+a1x+a2x2+...+ak-1xk-1The following k polynomials are obtained:
Figure BDA0003324112100000091
after the k polynomials are converted into a matrix, the coefficient a is obtained by solving according to the following formula0、a1、a2...ak-1
Figure BDA0003324112100000092
The coefficient a obtained by solving0、a1、a2...ak-1Substituted formula f (x) ═ a0+a1x+a2x2+...+ak-1xk-1Wherein x is 0 to obtain a0A private key of the recovered ECC master key;
and obtaining a complete ECC main key according to the public key of the ECC main key and the recovered private key of the ECC main key.
Because the public key of the ECC master key is public, the private key of the ECC master key is divided into a plurality of key fragments by a Shamir fragmentation algorithm, and each key fragment is kept by a manager, after the private key of the ECC master key is recovered, a complete ECC master key can be obtained according to the recovered private key and the public key. The invention adopts Shamir slicing algorithm to slice the main key, and multiple persons manage the main key, thereby improving the security of the main key.
In the invention, a Shamir algorithm is adopted to segment the ECC master key to obtain a plurality of key segment data which are respectively managed by a plurality of managers, thereby avoiding the situation that a certain person manages the master key independently and greatly improving the security of the master key and the overall security of the cluster; moreover, the number of the administrators is more than 1, and the specific number of the administrators can be determined according to the actual situation, so that the flexibility and the expansibility are high.
Step S104: inputting the ECC main key into a key derivation function to derive a security key;
specifically, the inputting the ECC master key into a key derivation function to derive a security key includes:
determining a key derivation function meeting preset requirements; the preset requirements include: when the inputs of the key derivation functions are the same, the output results are consistent; the length of data obtained by the output result of the key derivation function is the same as that of the ECC master key, and the length of the ECC master key is a fixed length and is 32 bytes.
Specifically, the key derivation function KDF is determined as follows:
KDF(p,d)=SHA256(SHA256(p),d)
wherein, p is the public key of the ECC master key, d is the private key of the ECC master key, and SHA256 is a standard SHA256 hash function. The Hash operation is an irreversible cipher operation, and can perform operation processing on original text data with any length, the operation result data is data with fixed length, and the original text data cannot be deduced from the result data; SHA256 is a common hash algorithm, and the length of the result data is 32 bytes.
Inputting a public key of an ECC master key into the key derivation function;
inputting a private key of an ECC master key into the key derivation function;
carrying out Hash operation on a public key by utilizing a Hash function in the key derivation function to obtain a Hash value of the public key;
and carrying out hash operation on the public key hash value and the private key by using a hash function in the key derivation function to obtain a secure key.
The invention carries out two times of hash calculation by carrying out hash operation on the public key and carrying out hash operation on the public key hash value and the private key, and compared with directly carrying out one time of hash operation on the public key and the private key, the derived safe key is safer. And a key obtained by a derivative function determined by the two hash functions is used as a security key, so that data sharing can be performed between trusted services of the Intel SGX, and cluster deployment is realized.
The key derivation function KDF adopts a standard SHA256 hash function, so that the calculation results are the same under the condition that the input parameters are the same, and the length of the ECC main key is the same as the data length of the operation result of the SHA256 hash function and is 32 bytes in fixed length, so that the key derivation function KDF adopting the SHA256 hash function meets the preset requirement. Therefore, the invention requires that the input parameter of the key derivation function KDF is the master key shared by the Intel SGX trusted services, and ensures that each Intel SGX trusted service can derive the same security key K. By establishing a master key, the same security key K is derived from the master key for the Intel SGX trusted services in the cluster, thereby realizing the purpose of cluster deployment.
Step S105: and encrypting and decrypting the service data by using the security key.
The business data comprises original text data and ciphertext data;
the encrypting and decrypting the service data by using the security key comprises the following steps:
carrying out symmetric encryption operation on the original text data by using the security key to obtain ciphertext data;
storing the ciphertext data into a ciphertext database of the cluster;
and carrying out symmetric decryption operation on the ciphertext data by using the security key to obtain the original text data. For safety, the business data in the trusted service of a cluster is encrypted and then the ciphertext is stored in the database, and when the business data is used, the ciphertext in the database needs to be decrypted first to perform business processing, so that the business data is calculated in a safe environment inside the cluster. The invention achieves the technical effect that the business data encrypted and stored by one trusted service in the cluster and other trusted services in the cluster can be decrypted through the encryption and decryption.
In the method and the system for realizing the Intel SGX trusted service clustered security deployment, provided by the invention, the key derivation function KDF adopts a standard SHA256 hash function, so that the same calculation result can be ensured under the condition of the same input parameters. Therefore, the invention requires that the input parameter of the key derivation function KDF is the same ECC master key shared by the Intel SGX trusted services, ensures that each Intel SGX trusted service can derive the same security key, and ensures that data is only safely shared among the trusted services in the same cluster;
the invention adopts Shamir slicing algorithm to slice the ECC main key to obtain a plurality of key slicing data which are respectively managed by a plurality of managers, thereby avoiding the situation that a certain person independently manages the main key, improving the security of the main key and further improving the overall security of the cluster;
when the ECC master key is sliced, the ECC master key is divided into a plurality of key slices, a plurality of managers respectively manage the key slices held by the managers, and the number of the managers can be determined according to actual conditions, so that the ECC master key slicing system has higher flexibility and expansibility.
From the above description, it can be seen that the present invention achieves the following technical effects:
the invention adopts the same ECC main key and the same key derivation function, so that all Intel SGX trusted services in the same cluster can derive the same security key, thereby realizing the security sharing of service data in the cluster and ensuring that the data is only safely shared among the trusted services in the same cluster;
moreover, the Shamir fragmentation algorithm is adopted to fragment the ECC master key, and a plurality of managers respectively manage the master key fragmentation, so that the centralized management of the master key is avoided, the security of the ECC master key is ensured, the security of the whole system is improved, and the problems that the security of data is low and the data can not be safely shared only among trusted services in the same cluster in the related technology are solved;
in the master key fragmentation mode, a plurality of administrators are selected to jointly store master key fragmentation data, the number of the administrators is more than 1, the specific number of the administrators can be determined according to actual conditions, and the flexibility and the expansibility are high.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
An embodiment of the present invention further provides an implementation system for implementing the Intel SGX trusted service clustered security deployment, where the implementation system is used to implement the implementation method for the Intel SGX trusted service clustered security deployment, and as shown in fig. 2, the implementation system includes:
the sharding unit 21 is configured to shard the pre-generated ECC master key by using a Shamir sharding algorithm, divide the ECC master key into a plurality of key shards, and store the key shards in a distributed manner;
a receiving unit 22, configured to receive an input key fragment when a trusted service based on an Intel SGX in a cluster is initialized;
a recovery unit 23, configured to recover, in the Enclave program space, a complete ECC master key through the Shamir fragmentation algorithm according to the input key fragmentation;
a derivation unit 24, configured to input the ECC master key into a key derivation function, and derive a security key;
and the encryption and decryption unit 25 is used for encrypting and decrypting the service data by using the security key.
An embodiment of the present invention further provides an electronic device, as shown in fig. 3, the electronic device includes one or more processors 31 and a memory 32, where one processor 31 is taken as an example in fig. 3.
The controller may further include: an input device 33 and an output device 34.
The processor 31, the memory 32, the input device 33 and the output device 34 may be connected by a bus or other means, and fig. 3 illustrates the connection by a bus as an example.
The Processor 31 may be a Central Processing Unit (CPU), the Processor 31 may also be other general-purpose processors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field Programmable Gate Arrays (FPGA), other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof, and the general-purpose Processor may be a microprocessor or any conventional Processor.
The memory 32, which is a non-transitory computer readable storage medium, may be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the control method in the embodiments of the present invention. The processor 31 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 32, that is, the method for implementing the Intel SGX trusted service clustered security deployment of the above method embodiment.
The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a processing device operated by the server, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, which may be connected to a network connection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 33 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the server. The output device 34 may include a display device such as a display screen.
One or more modules are stored in the memory 32, which when executed by the one or more processors 31 perform the method as shown in fig. 1.
Those skilled in the art will appreciate that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and the processes of the embodiments of the motor control methods described above can be included when the computer program is executed. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (FM), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
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 invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. An implementation method for clustered security deployment of an Intel SGX trusted service is characterized by comprising the following steps:
the method comprises the steps that a Shamir fragmentation algorithm is adopted to fragment a pre-generated ECC master key, the ECC master key is divided into a plurality of key fragments, and the key fragments are stored in a scattered mode;
receiving an input key fragment when a trusted service based on Intel SGX in a cluster is initialized;
in an Enclave program space, recovering a complete ECC main key through the Shamir slicing algorithm according to input key slices;
inputting the ECC main key into a key derivation function to derive a security key;
and encrypting and decrypting the service data by using the security key.
2. The method of claim 1, wherein the sharer slicing algorithm is used to slice the pre-generated ECC master key into a plurality of key slices, and the key slices are stored in a distributed manner, and comprises:
generating a complete ECC master key (d, p) in advance, wherein d is a private key of the ECC master key, and p is a public key of the ECC master key;
setting fragmentation parameters (k, n) of the Shamir fragmentation algorithm, wherein n is the number of divided key fragments, k is the minimum number of key fragments required to be input when an ECC master key is recovered, and k is more than 1 and less than n;
f (x) is determined as follows:
f(x)=a0+a1x+a2x2+...+ak-1xk-1
wherein, a0=d,a1、a2...ak-1Is k-1 random numbers, the independent variable x is a random number, and the dependent variable f (x) and the independent variable x form a key fragment { x, f (x) };
generating n random numbers x1、x2...xnAnd substituting into the above formula to obtain f (x)1)、f(x2)...f(xn);
Will { x1,f(x1)}、{x2,f(x2)}...{xn,f(xn) N key fragments which are used as the private key of the ECC master key, and the n key fragments are handed to n administrators to be kept respectively.
3. The method of claim 2, wherein recovering the complete ECC master key from the input key shard through the Shamir sharding algorithm in the Enclave program space comprises:
receiving input k key splits { x1,y1}、{x2,y2}...{xk,yk};
The k key fragments are respectively substituted into f (x) a0+a1x+a2x2+...+ak-1xk-1The following k polynomials are obtained:
Figure FDA0003324112090000021
after the k polynomials are converted into a matrix, the coefficient a is obtained by solving according to the following formula0、a1、a2...ak-1
Figure FDA0003324112090000022
The coefficient a obtained by solving0、a1、a2...ak-1Substituted formula f (x) ═ a0+a1x+a2x2+...+ak-1xk-1Wherein x is 0 to obtain a0A private key of the recovered ECC master key;
and obtaining a complete ECC main key according to the public key of the ECC main key and the recovered private key of the ECC main key.
4. The method of claim 1, wherein inputting the ECC master key to a key derivation function to derive a security key comprises:
determining a key derivation function meeting preset requirements;
inputting a public key of an ECC master key into the key derivation function;
inputting a private key of an ECC master key into the key derivation function;
carrying out Hash operation on a public key by utilizing a Hash function in the key derivation function to obtain a Hash value of the public key;
and carrying out hash operation on the public key hash value and the private key by using a hash function in the key derivation function to obtain a secure key.
5. Method according to claim 4, characterized in that the key derivation function KDF is determined as follows:
KDF(p,d)=SHA256(SHA256(p),d)
wherein, p is the public key of the ECC master key, d is the private key of the ECC master key, and SHA256 is a standard SHA256 hash function.
6. The method of claim 1, wherein the business data comprises textual data and ciphertext data;
the encrypting and decrypting the service data by using the security key comprises the following steps:
carrying out symmetric encryption operation on the original text data by using the security key to obtain ciphertext data;
storing the ciphertext data into a ciphertext database of the cluster;
and carrying out symmetric decryption operation on the ciphertext data by using the security key to obtain the original text data.
7. The method of claim 1, wherein a plurality of trusted services are deployed in the cluster, and each trusted service is configured to provide the same business function;
all trusted services in the same cluster adopt the same ECC master key and the same key derivation function to derive the same security key, so that the business data can be shared in the cluster.
8. An implementation system for Intel SGX trusted service clustered security deployment, comprising:
the sharding unit is used for sharding the pre-generated ECC master key by adopting a Shamir sharding algorithm, dividing the ECC master key into a plurality of key shards and storing the key shards in a scattered manner;
the receiving unit is used for receiving the input key fragments when the trusted service based on the Intel SGX in the cluster is initialized;
the recovery unit is used for recovering a complete ECC (error correction code) main key through the Shamir fragmentation algorithm according to the input key fragmentation in the Enclave program space;
the derivation unit is used for inputting the ECC main key into a key derivation function and deriving a security key;
and the encryption and decryption unit is used for encrypting and decrypting the service data by using the security key.
9. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform a method for implementing an Intel SGX trusted service clustered security deployment as claimed in any one of claims 1 to 7.
10. An electronic device, characterized in that the electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform a method of implementing an Intel SGX trusted service clustered secure deployment as claimed in any one of claims 1 to 7.
CN202111255962.8A 2021-10-27 2021-10-27 Method and system for realizing cluster security deployment of Intel SGX trusted service Pending CN114006741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111255962.8A CN114006741A (en) 2021-10-27 2021-10-27 Method and system for realizing cluster security deployment of Intel SGX trusted service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111255962.8A CN114006741A (en) 2021-10-27 2021-10-27 Method and system for realizing cluster security deployment of Intel SGX trusted service

Publications (1)

Publication Number Publication Date
CN114006741A true CN114006741A (en) 2022-02-01

Family

ID=79924228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111255962.8A Pending CN114006741A (en) 2021-10-27 2021-10-27 Method and system for realizing cluster security deployment of Intel SGX trusted service

Country Status (1)

Country Link
CN (1) CN114006741A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826625A (en) * 2022-07-01 2022-07-29 广东电力交易中心有限责任公司 SGX-based block chain key storage method, evaluation method and device
CN115484031A (en) * 2022-09-13 2022-12-16 山东大学 SGX-based method and system for removing duplicate of cloud storage ciphertext without trusted third party
WO2023198036A1 (en) * 2022-04-11 2023-10-19 华为技术有限公司 Key generation method and apparatus, and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595793A (en) * 2013-11-13 2014-02-19 华中科技大学 Cloud data safe deleting system and method without support of trusted third party
CN108418680A (en) * 2017-09-05 2018-08-17 矩阵元技术(深圳)有限公司 A kind of block chain key recovery method, medium based on Secure computing technique
CN110969431A (en) * 2019-11-27 2020-04-07 北京贵泽系统技术有限公司 Safe trusteeship method, equipment and system of block chain digital currency private key
US20210144002A1 (en) * 2019-10-11 2021-05-13 Atakama LLC Secondary Channel Authentication of Public Keys
CN113300846A (en) * 2020-02-24 2021-08-24 华为技术有限公司 Signature method, terminal equipment and network equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595793A (en) * 2013-11-13 2014-02-19 华中科技大学 Cloud data safe deleting system and method without support of trusted third party
CN108418680A (en) * 2017-09-05 2018-08-17 矩阵元技术(深圳)有限公司 A kind of block chain key recovery method, medium based on Secure computing technique
US20210144002A1 (en) * 2019-10-11 2021-05-13 Atakama LLC Secondary Channel Authentication of Public Keys
CN110969431A (en) * 2019-11-27 2020-04-07 北京贵泽系统技术有限公司 Safe trusteeship method, equipment and system of block chain digital currency private key
CN113300846A (en) * 2020-02-24 2021-08-24 华为技术有限公司 Signature method, terminal equipment and network equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023198036A1 (en) * 2022-04-11 2023-10-19 华为技术有限公司 Key generation method and apparatus, and device
CN114826625A (en) * 2022-07-01 2022-07-29 广东电力交易中心有限责任公司 SGX-based block chain key storage method, evaluation method and device
CN114826625B (en) * 2022-07-01 2022-09-02 广东电力交易中心有限责任公司 SGX-based block chain key storage method, evaluation method and device
CN115484031A (en) * 2022-09-13 2022-12-16 山东大学 SGX-based method and system for removing duplicate of cloud storage ciphertext without trusted third party
CN115484031B (en) * 2022-09-13 2024-03-08 山东大学 SGX-based trusted-free third-party cloud storage ciphertext deduplication method and system

Similar Documents

Publication Publication Date Title
US11036861B2 (en) Host attestation
CN114006741A (en) Method and system for realizing cluster security deployment of Intel SGX trusted service
US9703965B1 (en) Secure containers for flexible credential protection in devices
US8732462B2 (en) Methods and apparatus for secure data sharing
CN112926051B (en) Multi-party security computing method and device
US9086819B2 (en) System and method for combining deduplication and encryption of data
US20180219678A1 (en) Origin certificate based online certificate issuance
CN111245597B (en) Key management method, system and equipment
US20230254129A1 (en) Key management for multi-party computation
US10298551B1 (en) Privacy-preserving policy enforcement for messaging
US10601590B1 (en) Secure secrets in hardware security module for use by protected function in trusted execution environment
US9374221B1 (en) Distributed protection of credential stores utilizing multiple keys derived from a master key
JP2022501971A (en) Methods for key management, user devices, management devices, storage media and computer program products
WO2015154285A1 (en) Device file encryption and decryption method and device
EP4258593A1 (en) Ota update method and apparatus
CN114157415A (en) Data processing method, computing node, system, computer device and storage medium
US20190044922A1 (en) Symmetric key identity systems and methods
US9906361B1 (en) Storage system with master key hierarchy configured for efficient shredding of stored encrypted data items
CN106797316A (en) By data distribution from network to user equipment
CN103731423A (en) Safe method for repeated data deleting
US11086701B2 (en) Master control plane for infrastructure and application operations
CN104821884A (en) Private key protection method based on asymmetric secret key system
US10797888B1 (en) Methods for secured SCEP enrollment for client devices and devices thereof
WO2024021958A1 (en) Communication processing method and system, client, communication server and supervision server
CN113438205A (en) Block chain data access control method, node and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination