Task key distribution method and device based on cluster environment

By generating and distributing task keys in the cluster environment, and using attribute encryption to control client access to task keys, the problem of access control in the cluster environment is solved, and efficient and secure data processing task execution is achieved.

CN117675244BActive Publication Date: 2024-11-05BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211045778.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2024-11-05
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

In a cluster environment, how to achieve efficient access control and ensure that the client's data processing tasks can be processed reliably is lacking effective access control methods.

Method used

By generating task keys and key access policies in a trusted execution environment, using attribute encryption to embed key access policies into task keys, and sending task key ciphertext to the client, so that clients that meet the policy can decrypt The task key is used, and a trusted computing node is determined in the server cluster to encrypt and decrypt the task data to realize access control of the client.

Benefits of technology

It realizes efficient access control of the server cluster, ensures that the client can only call services within its permissions, improves the security and efficiency of data processing tasks, and reduces the complexity of authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117675244B_ABST
    Figure CN117675244B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and device for distributing task keys in a cluster environment, wherein the method generates a task key and a key access policy by receiving a data processing task sent by a client through a central node in a server cluster, embeds the key access policy into the task key by using attribute encryption to obtain a task key ciphertext and sends it to the client, so that the client whose attributes meet the key access policy can decrypt and obtain the task key, and the client's access to the task key is controlled by attribute encryption, thereby controlling the client's access to the server cluster; the central node sends the task key ciphertext to a corresponding trusted computing node, the trusted computing node decrypts and obtains the task key and records the task key and the data processing task, and controls the client from calling services outside its authority based on the recorded task key and data processing task information, and realizes efficient access control to the server cluster through the distribution of task keys.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a method and device for distributing task keys in a cluster environment. Background Art

[0002] Trusted Execution Environment (TEE) is a security architecture based on hardware and operating systems. It divides secure and non-secure areas to build a computing environment isolated from the outside world, protecting data from external access during use. Building applications (i.e., services) based on TEE can provide protection for data and service code. Service providers can build server clusters based on TEE and complete data processing tasks through one or more nodes in the server cluster, thereby improving task processing efficiency.

[0003] Since different clients can use different cluster resources and call different services, it is necessary to control the client's access to the server cluster to ensure that the data processing tasks initiated by the client are processed reliably and efficiently. How to achieve efficient access control of the service cluster is a problem that needs to be solved urgently. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a method and device for distributing task keys in a cluster environment.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for distributing task keys in a cluster environment, including:

[0006] Receive a data processing task sent by a client, and generate a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment;

[0007] Based on the key access policy and the first communication key between the client and the task key, attribute encryption is performed on the task key to obtain a first task key ciphertext, and the first task key ciphertext is sent to the client; the first task key ciphertext supports decryption by a client whose attribute satisfies the key access policy to obtain the task key and is used for task data encryption to obtain a task data ciphertext;

[0008] Determining a trusted computing node that executes the data processing task from a server cluster;

[0009] The task key is encrypted based on the second communication key between the trusted computing node to obtain a second task key ciphertext, and the second task key ciphertext and the data processing task are sent to the trusted computing node, instructing the trusted computing node to decrypt the second task key ciphertext to obtain the task key, and use the task key to decrypt the task data ciphertext corresponding to the data processing task. When the decryption is successful, access control is performed based on the target cluster service that the client has calling authority.

[0010] In a second aspect, an embodiment of the present disclosure provides a method for distributing task keys in a cluster environment, including:

[0011] Sending a data processing task to a central node in a server cluster, so that the central node generates a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment in response to the data processing task;

[0012] receiving a first task key ciphertext sent by the central node, where the first task key ciphertext is obtained by the central node performing attribute encryption on the task key based on the key access policy and a first communication key between the central node and the central node;

[0013] When the attribute satisfies the key access policy, decrypting the first task key ciphertext by using the first communication key to obtain the task key;

[0014] The task data of the data processing task is encrypted according to the task key to obtain the task data ciphertext, and the task data ciphertext is sent to the trusted computing node in the server cluster, instructing the trusted computing node to decrypt the task data ciphertext based on the task key recorded by it, and when the decryption is successful, access control is performed based on the target cluster service that the client has the right to call.

[0015] In a third aspect, an embodiment of the present disclosure provides a method for distributing task keys in a cluster environment, including:

[0016] Receiving a second task key ciphertext sent by a central node of a server cluster and a data processing task sent by a client to the central node;

[0017] Decrypting the second task key ciphertext according to the second communication key between the central node and the central node to obtain a task key, and recording the task key and the data processing task;

[0018] The task data ciphertext corresponding to the data processing task sent by the client is decrypted using the task key, and when the decryption is successful, access control is performed based on the target cluster service that the client has the calling authority.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a task key distribution device based on a cluster environment, comprising:

[0020] A receiving module, used for receiving data processing tasks sent by the client;

[0021] A processing module, configured to generate a task key and a key access policy corresponding to the data processing task in a trusted execution environment; and, based on the key access policy and a first communication key between the client and the task key, attribute-encrypt the task key to obtain a first task key ciphertext;

[0022] A sending module, used for sending the first task key ciphertext to the client, the first task key ciphertext supports decryption by a client whose attribute satisfies the key access policy to obtain the task key and is used for task data encryption to obtain task data ciphertext;

[0023] The processing module is further used to determine a trusted computing node that executes the data processing task from the server cluster; and encrypt the task key based on a second communication key between the trusted computing node and the trusted computing node to obtain a second task key ciphertext;

[0024] The sending module is also used to send the second task key ciphertext and the data processing task to the trusted computing node, instruct the trusted computing node to decrypt the second task key ciphertext to obtain the task key, and use the task key to decrypt the task data ciphertext corresponding to the data processing task, and when the decryption is successful, perform access control based on the target cluster service that the client has the right to call.

[0025] In a fifth aspect, an embodiment of the present disclosure provides a task key distribution device based on a cluster environment, comprising:

[0026] A sending module, used to send a data processing task to a central node in a server cluster, so that the central node generates a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment;

[0027] A receiving module, used for receiving a first task key ciphertext sent by the central node, where the first task key ciphertext is obtained by the central node performing attribute encryption on the task key based on the key access policy and a first communication key between the central node and the central node;

[0028] a processing module, configured to decrypt the first task key ciphertext by using the first communication key to obtain the task key when the attribute satisfies the key access policy;

[0029] The processing module is further used to encrypt the task data corresponding to the data processing task according to the task key to obtain the task data ciphertext;

[0030] The sending module is also used to send the task data ciphertext to the trusted computing node in the server cluster, instructing the trusted computing node to decrypt the task data ciphertext based on the task key recorded by it, and perform access control based on the target cluster service that the client has the right to call when the decryption is successful.

[0031] In a sixth aspect, an embodiment of the present disclosure provides a task key distribution device based on a cluster environment, comprising:

[0032] A receiving module, used for receiving the second task key ciphertext sent by the central node of the server cluster and the data processing task sent by the client to the central node;

[0033] a processing module, configured to decrypt the second task key ciphertext according to a second communication key between the central node and the central node to obtain the task key, and record the task key and the data processing task;

[0034] The access control module is used to use the task key to decrypt the task data ciphertext corresponding to the data processing task; and, when the decryption is successful, perform access control based on the target cluster service that the client has the calling authority.

[0035] In the seventh aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory and a processor; the memory is configured to store computer program instructions; the processor is configured to execute the computer program instructions, so that the electronic device implements the task key distribution method based on a cluster environment as in the first aspect, the second aspect, or the third aspect.

[0036] In an eighth aspect, an embodiment of the present disclosure provides a readable storage medium, comprising: computer program instructions; the computer program instructions are executed by a processor of an electronic device, so that the electronic device implements the task key distribution method based on a cluster environment as in the first aspect, the second aspect, or the third aspect.

[0037] In a ninth aspect, an embodiment of the present disclosure provides a computer program product. When an electronic device runs the computer program product, the electronic device implements the task key distribution method based on a cluster environment as in the first aspect, the second aspect, or the third aspect.

[0038] The embodiment of the present disclosure provides a method and device for distributing task keys in a cluster environment, wherein the method generates a task key and a key access policy corresponding to the task key by receiving and responding to a data processing task sent by a client through a central node in a server cluster, embeds the key access policy into the task key by using attribute encryption to obtain a first task key ciphertext and sends it to the client, so that the client whose attribute satisfies the key access policy can decrypt and obtain the task key, and controls the client's access to the task key by attribute encryption, thereby controlling the client's access to the server cluster; the central node also encrypts the task key and sends it to the corresponding trusted computing node, and the trusted computing node decrypts and obtains the task key and records the task key and the data processing task, and controls the client to be unable to call services outside its authority according to the recorded task key and data processing task information, and realizes efficient access control to the server cluster through the distribution of the task key. In addition, the present disclosure completes the identity authentication of each node participating in the data processing task through the central node, reducing the complexity of authentication. In addition, the client uses the task key to encrypt and transmit the task data corresponding to the data processing task, and the trusted computing node uses the task key to encrypt and transmit the task processing result, which not only verifies the correctness of the task key, but also effectively ensures the security of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 A schematic diagram of an application scenario of a task key distribution method based on a cluster environment provided by an embodiment of the present disclosure;

[0042] Figure 2 A flowchart of a task key distribution method based on a cluster environment provided by an embodiment of the present disclosure;

[0043] Figure 3 A flowchart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure;

[0044] Figure 4 A flowchart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure;

[0045] Figure 5A flowchart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure;

[0046] Figure 6 A flowchart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure;

[0047] Figure 7 A schematic diagram of the structure of a task key distribution device based on a cluster environment provided by an embodiment of the present disclosure;

[0048] Figure 8 A schematic diagram of the structure of a task key distribution device based on a cluster environment provided by another embodiment of the present disclosure;

[0049] Fig. 9 A schematic diagram of the structure of a task key distribution device based on a cluster environment provided by another embodiment of the present disclosure;

[0050] Fig.10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0051] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0053] Figure 1 This is a schematic diagram of an application scenario of a task key distribution method based on a cluster environment provided by an embodiment of the present disclosure. Figure 1 As shown, the scenario includes: multiple clients 101 and a server cluster 102 .

[0054] The client 101 may be installed in an electronic device, and the user may call the server cluster 102 through the client 101 to execute a data processing task and obtain the task execution result issued by the server cluster 102. The data processing task may be any type of task, such as a privacy-preserving set intersection (PSI) task, a model training task, a data query task, a data analysis task, and the like.

[0055] Electronic devices may include, but are not limited to: smart phones, laptop computers, desktop computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), smart TVs, smart screens, high-definition TVs, 4K TVs, smart speakers, smart projectors, and other Internet of Things (IOT) devices. The present disclosure does not impose any restrictions on the specific types of electronic devices.

[0056] The number of the client 101 may be one or more. Figure 1 In the example, two clients 101 are taken as an example.

[0057] The server cluster 102 may include multiple servers, each of which can provide TEE and install corresponding applications (i.e., services) in the TEE, so that the server cluster 102 can provide the TEE cluster to the client of the client 101 to execute the data processing tasks initiated by the client 101, and the security of the task data, task execution results, and service code can be effectively protected through the TEE. The servers included in the server cluster 102 can be called TEE nodes.

[0058] In this scenario, a data processing task may require the participation of multiple clients 101. For example, in a PSI task, multiple clients 101 provide original task data respectively, and the server cluster 102 performs calculations to obtain the intersection of the task data. Alternatively, a data processing task may need to be completed by multiple servers (i.e., multiple TEE nodes) in the server cluster 102.

[0059] In order to ensure that the data processing task can be executed efficiently and accurately, it is necessary to control the access of the client 101 to the server cluster 102. In the present disclosure, the server cluster 102 may include a central node 102a and a trusted computing node 102b; the central node 102a performs the generation of task keys and the generation of key access policies corresponding to the task keys, attribute encryption processing, envelope encryption, distribution of task keys, configuration of computing resources, authentication with the client 101, and two-way authentication with the trusted computing node 102b, etc.; the trusted computing node 102b decrypts the task data ciphertext sent by the client 101 based on the received task key and data processing task, and determines the target cluster service that the client has the authority to perform access control based on the recorded data processing task, so as to ensure that the client 101 cannot call the cluster service outside its authority; and after successfully decrypting the plaintext task data and determining the target cluster service that the client 101 has the authority to call based on the data processing task, the trusted computing node 102b calls the cluster service within its authority to perform the corresponding data processing task and returns the task processing result to the client 101.

[0060] In this embodiment, the server cluster 102 includes one central node 102a and three trusted computing nodes 102b. It can be understood that the number of central nodes 102a and trusted computing nodes 102b can be set according to actual needs, and the number can be more or less, and is not limited to Figure 1 Examples in .

[0061] In some embodiments, the server cluster 102 may also include a message processing node (also referred to as a message server, etc.). Figure 1 The message processing nodes are not shown in the figure, and data can be transmitted between the central node 102a and the trusted computing node 102b through the message processing nodes, and data can be transmitted between the central node 102a and the client 101, and between the trusted computing node 102b and the client 101 through the message processing nodes. In addition, the number of message processing nodes can be one or more, which is not limited in the present disclosure.

[0062] Figure 2 A flowchart of a task key distribution method based on a cluster environment provided by an embodiment of the present disclosure. Figure 2 In the illustrated embodiment, the client can send a data processing task to the central node in the server cluster; the central node can embed the key access policy into the task key through attribute encryption in the TEE and return it to the client to control the client's access to the task key; and the central node allocates computing resources to the data processing task, that is, determines the trusted computing node (i.e. Figure 1The trusted computing node records the corresponding relationship between the task key and the data processing task, and uses the task key to decrypt the task data ciphertext corresponding to the data processing task, and performs access control on the data processing tasks sent by the client to prevent the client from calling other TEE cluster services outside its authority.

[0063] Figure 3 This is a flowchart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure. Figure 3 As shown, the method of this embodiment includes:

[0064] S301, the client sends a data processing task to the central node. Correspondingly, the central node receives the data processing task.

[0065] The data processing task may include task information, such as task ID, task type, identity of the task participant (i.e., identity of the client participating in the task), identity of the task processing result acquirer, whether it is a distributed task, etc. The identity of the task participant / task processing result acquirer may be, but is not limited to, the account number, nickname, hardware identifier of the electronic device on which the corresponding client is installed, etc. of the corresponding client.

[0066] In some embodiments, the client can send a data processing task to a server cluster based on a user's trigger operation, wherein the task information can be manually input by the user or configured based on relevant options provided by the client. The present disclosure does not limit the implementation method in which the client obtains the task information and the implementation method in which the user triggers the client to send the data processing task.

[0067] Combination Figure 1 In the scenario shown, the client can send data processing tasks to the message processing nodes in the server cluster, and the central node can read the data processing tasks from the message processing nodes.

[0068] S302. The central node responds to the data processing task and generates a task key and key access policy corresponding to the data processing task in the TEE.

[0069] In some embodiments, the task key may include an asymmetric key pair and a symmetric key, wherein the asymmetric key pair is used to protect the task data corresponding to the data processing task owned by the client, and the symmetric key is used to protect the task processing result. In the following, the asymmetric key pair is denoted as (job_pk, job_sk), job_pk is a public key used to encrypt the task data, and the encryption algorithm may be but is not limited to RSA-3072, etc., job_sk is a private key used to decrypt the task data ciphertext; the symmetric key is denoted as result_key, which can be a secure random number. The sender of the task processing result can use the symmetric key for encryption, and the acquirer of the task processing result can use the symmetric key to decrypt the task processing result ciphertext to obtain the task processing result.

[0070] Key access policies can include access policies for asymmetric keys and access policies for symmetric keys. It should be noted that the client, as the sender of task data, needs to encrypt the task data using the task's public key job_pk, and the task's private key job_sk needs to be sent to the trusted computing node to decrypt the task data ciphertext. Therefore, the access policy for asymmetric keys can be understood as the client's access policy for the task's public key job_pk.

[0071] Among them, the key used to protect task data is implemented in the form of an asymmetric key. Since the public key is sent to the client, if multiple clients participate in the data processing task, even if a client obtains the task data of other clients, it cannot be decrypted because the client does not hold the private key, which can protect the security of client data. The key used by the user to protect the task execution result is implemented in the form of a symmetric key. When the task execution result needs to be sent to multiple participants, since each participant obtains the same symmetric key, the trusted computing node can generate the task execution result ciphertext that can be sent to all participants through a single encryption, which can reduce the amount of calculation of the trusted computing node.

[0072] As a possible implementation method, the central node can generate an asymmetric key access policy in the TEE based on the identity of the task participants, the task type, the type of computing resources that can be called, the time and other attribute information; the central node can generate a symmetric key access policy in the TEE based on the name of the task processing result acquirer, the number of task result acquirers and other attribute information.

[0073] For example, assuming that the access policy of a task's job_pk is "The name of the executable task is A or B or C or D, and the service expiration time is before T time, and participants who can use cluster S-level resources or above can access it", only participants who meet the access policy can decrypt and obtain the task's job_pk. Attackers, participants whose names are not A, B, C, D, participants whose validity period has expired, participants who cannot use S-level resources or above, etc. cannot decrypt and obtain job_pk and initiate data processing tasks. Assuming that the access policy of the task's result_key is "Accessible to participants named A or B", only participants A and B can decrypt and obtain the task's result_key, and further use the result_key to decrypt and obtain the task processing result. Participants C, D, and other participants cannot decrypt and obtain the result_key, and thus cannot decrypt and obtain the task processing result.

[0074] In other embodiments, the task key may also include two sets of asymmetric keys, one set of asymmetric keys is used to protect the task data, and the other set of asymmetric keys is used to protect the task execution results. Since the task execution results that need to be sent to each participant are the same, each participant can hold the same private key for decrypting the ciphertext of the task execution results. Compared with the above example, although the key form used to protect the task execution results is different, it can also achieve mutual isolation of client task data and protect the security of the task execution results.

[0075] In other embodiments, the task key may also include two symmetric keys, one of which is used to protect the task data and the other is used to protect the task execution result. When two symmetric keys are used for implementation, it can be applicable to scenarios with low requirements for client task data isolation.

[0076] The user can set the form of the task key based on actual needs, and is not limited to the above example. In addition, it should be noted that when the task key is composed of keys of different forms, the implementation method of generating the key access policy is similar to the above example, which will not be repeated here.

[0077] In some embodiments, after receiving a data processing task, the central node may first verify the authenticity and integrity of the message, and then generate a key access policy and a task key after the verification is passed.

[0078] S303: The central node performs attribute encryption on the task key in the TEE based on the key access policy and the first communication key between the central node and the client to obtain a first task key ciphertext.

[0079] Among them, the central node performs attribute encryption in TEE according to the job_pk of the task, the access policy for job_pk, and the first communication key between the central node and the client, and obtains the ciphertext corresponding to job_pk, which is recorded as enc(job_pk); in TEE, the central node performs attribute encryption according to the result_key of the task, the access policy for result_key, and the first communication key between the central node and the client, and obtains the ciphertext corresponding to result_key, which is recorded as enc(result_key); therefore, the first task key ciphertext includes enc(job_pk) and enc(result_key).

[0080] S304: The central node sends the first task key ciphertext to the client. Correspondingly, the client receives the first task key ciphertext sent by the central node.

[0081] In some embodiments, the central node may send the first task key ciphertext to the message processing node, and the message processing node may return the first task key ciphertext to the client.

[0082] In addition, combined with the above, a data processing task may require the participation of multiple clients, then the central node can use the above method to perform attribute encryption and send the first task key ciphertext to multiple clients respectively. It should be noted that the first communication keys between the multiple clients and the central node are different. Therefore, the first communication key used when generating the first task key ciphertext for each client is different to ensure that each client can correctly decrypt and obtain the task key.

[0083] It should be understood that the first communication key between multiple clients participating in the data processing task and the central node can also be the same, which can reduce the amount of data processing when the central node generates the first task key ciphertext and improve the key distribution efficiency.

[0084] S305: When the attribute satisfies the key access policy, the client decrypts the first task key ciphertext using the first communication key to obtain the task key.

[0085] Among them, the client can match the access policy of the asymmetric key pair based on its own attribute set, and when the match is successful, decrypt enc(job_pk) through the first communication key to obtain the job_pk of the task. The client can match the access policy of the symmetric key based on its own attribute set, and when the match is successful, decrypt enc(result_key) through the first communication key to obtain the result_key of the task.

[0086] The aforementioned steps S303 to S305 are mainly the process of the central node distributing the task key to the client. Since the trusted computing nodes in the server cluster need to control the access of the client and need to decrypt the task data ciphertext sent by the client and encrypt the task processing results, the task key also needs to be distributed to the trusted computing nodes. The distribution of task keys to the trusted computing nodes may include the following steps S306 to S309.

[0087] S306: The central node determines a trusted computing node that executes the data processing task.

[0088] The central node allocates computing resources for the data processing task, and the number of the trusted computing nodes can be one or more, which is not limited in the present disclosure. The present disclosure does not limit the implementation method of the central node allocation of computing resources, and any method can be used for implementation. For example, the trusted computing node can be determined based on the type of data processing task, the size of computing resources required for the task, etc.

[0089] S307. The central node uses the second communication key to encrypt the task key to obtain a second task key ciphertext.

[0090] The second communication key is the communication key between the central node and the trusted computing node, which can be an asymmetric key pair, in which the public key needs to be sent to the central node for encrypting the task key, and the private key is held by the trusted computing node for decrypting the received task key ciphertext. The second communication key can be generated by the trusted computing node in the TEE and sent to the central node.

[0091] In some embodiments, the central node may perform envelope encryption on the job_sk of the task and the result_key of the task to obtain a second task key ciphertext. The implementation of envelope encryption is as follows: randomly generate a symmetric key (referred to as a random symmetric key), encrypt the task key using the random symmetric key to obtain an encrypted task key, and encrypt the random symmetric key using the public key in the second communication key to obtain a random symmetric key ciphertext, then the second task key ciphertext includes: the encrypted task key and the random symmetric key ciphertext.

[0092] In some embodiments, the central node can generate a shared random symmetric key for envelope encryption of the task's job_sk and the task's result_key, or it can generate corresponding random symmetric keys for the task's job_sk and the task's result_key for envelope encryption respectively, which is not limited in this disclosure.

[0093] S308, the central node sends the second task key ciphertext and the data processing task to the trusted computing node. Correspondingly, the trusted computing node receives the second task key ciphertext and the data processing task sent by the central node.

[0094] Combination Figure 1 In an embodiment, the central node may send the second task key ciphertext to the message processing node, and the trusted computing node obtains the second task key ciphertext through the message processing node. The data processing task may be encrypted and transmitted using the second communication key, and the encryption algorithm is not limited.

[0095] S309. The trusted computing node uses the second communication key to decrypt the second task key ciphertext to obtain the task key, and records the task key and the data processing task, and uses the task key to decrypt the task data ciphertext corresponding to the data processing task. When the decryption is successful, access control is performed based on the target cluster service that the client has the right to call.

[0096] The trusted computing node can decrypt the random symmetric key ciphertext using the private key in the second communication key to obtain the random symmetric key, and then decrypt the task key ciphertext using the random symmetric key to obtain the task key, that is, obtain the job_sk and result_key of the task.

[0097] The trusted computing node records the correspondence between the task's job_sk and the task's result_key and the data processing task, where the task information contained in the data processing task indicates the task features that can be executed based on the corresponding job_sk. For example, if the task type of the data processing task is PSI, the participant can only use the corresponding public key to encrypt the task data to initiate the PSI task. Other types of tasks cannot be executed by the trusted computing node.

[0098] Here is a detailed description of "Access Control":

[0099] After receiving the task data ciphertext and data processing task sent by the client, the trusted computing node can obtain the task key corresponding to the data processing task by querying the corresponding relationship, and use the task key to decrypt the task data ciphertext. If the decryption is successful, it means that the trusted computing node needs to execute the task. If the decryption is not successful, it means that the trusted computing node needs to refuse to execute the task.

[0100] In addition, the trusted computing node compares the data processing tasks sent by the client with the data processing tasks recorded by itself, thereby preventing the client from calling cluster services beyond its authority during the task data transmission phase.

[0101] It should be noted that the above steps S302 to S305 and steps S306 to S309 can be executed in parallel, that is, the central node distributes the task key to the client and the central node distributes the task key to the trusted computing node can be executed in parallel.

[0102] In this embodiment, the central node in the server cluster receives the data processing task sent by the client, generates a task key and a key access policy, and uses attribute encryption to embed the key access policy into the task key to obtain the first task key ciphertext and send it to the client, so that the client whose attributes meet the key access policy can decrypt and obtain the task key. The client's access to the task key is controlled by attribute encryption, thereby controlling the client's access to the server cluster; the central node also sends the encrypted second task key ciphertext to the corresponding trusted computing node, and the trusted computing node decrypts to obtain the task key and records the task key and the data processing task, encrypts the task data based on the task key, and performs access control on the data processing task sent by the client based on the recorded data processing task, ensuring that the client cannot call services outside its authority. Through the distribution of task keys, efficient access control of the server cluster is achieved.

[0103] Figure 4 This is a flow chart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure. Figure 4 As shown, in this embodiment Figure 2 Based on the illustrated embodiment, it also includes: a process of client authenticating a central node and a two-way authentication process between the central node and the trusted computing node.

[0104] The authentication of the client authentication center node may include the client authenticating the identity of the center node and authenticating whether the related services called by the data processing task are running in the TEE environment of the center node. The authentication of whether the service is running in the TEE environment of the center node can be verified based on the certification information generated by the center node.

[0105] Among them, the authentication of the trusted computing node by the central node may include: the central node authenticates the identity of the trusted computing node and authenticates whether the relevant services called by the data processing task are running in the TEE environment of the trusted computing node. Among them, the authentication of whether the service is running in the TEE environment of the trusted computing node can be verified according to the certification information generated by the trusted computing node. Similarly, the authentication of the central node by the trusted computing node may include: the trusted computing node authenticates the identity of the central node and authenticates whether the relevant services called by the data processing task are running in the TEE environment of the central node. Among them, the authentication of whether the service is running in the TEE environment of the central node can be verified according to the certification information generated by the central node.

[0106] Figure 5 This is a flowchart of a task key distribution method based on a cluster environment provided by another embodiment of the present disclosure. Figure 5 The embodiment shown will mainly introduce the implementation method of authentication. Figure 5 As shown, the method of this embodiment includes:

[0107] S501. The client sends a data processing task to the central node.

[0108] S502. The central node responds to the data processing task and generates a task key and key access policy corresponding to the data processing task in the TEE.

[0109] S503: The client sends a first authentication request to the central node, requesting authentication of the central node.

[0110] As a possible implementation, the client can generate a random value and add the random value to the first authentication request and send it to the central node to initiate the client-to-central node authentication. The random value generated by the client can also be used for subsequent verification of the central node identity.

[0111] S504: The central node responds to the first authentication request and sends first identity information to the client. The first identity information includes: a digital signature generated by the central node, a signature public key, and first certification information.

[0112] As a possible implementation, after receiving the first authentication request sent by the client, the central node can generate a key pair, which is recorded as (center_pk_verify, center_sk_verify). Among them, the private key center_sk_verify in the key pair can be used to sign the random value client-nonce included in the first authentication request to obtain the digital signature information center_sig, and the public key center_pk_verify in the key pair can be used as the signature public key of the central node to verify the digital signature information center_sig. In addition, the central node responds to the first authentication request and also generates corresponding first remote attestation information, namely, the first attestation information, wherein the format of the first remote attestation information may include: a type field and a data field, wherein the type field is used to indicate the type of hardware TEE environment in the central node, and the data field is the remote attestation report. Remote attestation is one of the core functions of the trusted execution environment hardware platform. The remote attestation report can be used to prove that the verification platform is a real TEE environment and that the service code running in the TEE has not been tampered with. The method provided in the present disclosure adds the job_pk verification information of the task, the result_key verification information of the task, and the public key center_pk_verify verification information to the remote attestation report. These key verification information can prove that the key is generated in the TEE and has not been tampered with, thereby ensuring the security of the key, and can also indicate that the service in the central node is running safely in the TEE of the central node.

[0113] The key verification information may be, but is not limited to, a hash value of the corresponding key.

[0114] Therefore, the first identity information generated by the central node may include: the digital signature information center_sig generated by the central node, the signature public key center_pk_verify, and the first proof information containing the task key verification information and the signature public key verification information. The central node sends the first identity information to the client, so that the client authenticates the central node through the received central node identity information, and the obtained authentication result is used by the client to determine the validity of the task key.

[0115] S505: The central node sends the first identity information to the client. Correspondingly, the client receives the first identity information sent by the central node.

[0116] S506: The client authenticates the central node according to the first identity information to obtain an authentication result, and determines whether the task key is valid based on the authentication result.

[0117] The client can be authenticated through the following aspects:

[0118] 1. Decrypt the digital signature center_sig generated by the central node according to the public key center_pk_verify, and determine whether the digital signature center_sig meets expectations.

[0119] 2. The client determines the TEE hardware type based on the type field, and verifies that the central node is trustworthy through the first certification information received (i.e., the first remote certification report).

[0120] 3. The client determines the correctness of the task's job_pk, the task's result_key, and the public key center_pk_verify based on the verification information of the task's job_pk, the verification information of the task's result_key, and the verification information of the public key center_pk_verify contained in the data field.

[0121] If the verification results of the above aspects are in line with expectations, the client can be sure that the central node is trustworthy and the target service in the TEE of the central node is running securely in the real TEE environment of the central node. In addition, the verification also shows that the task key obtained by the client is correct and valid, and it is safe to use it for the transmission of subsequent task data and the decryption of task processing results.

[0122] S507. The central node performs attribute encryption in the TEE according to the task key, the key access policy and the first communication key to obtain the first task key ciphertext.

[0123] S508: The central node sends the first task key ciphertext to the client.

[0124] S509: When the attribute satisfies the key access policy, the client obtains the task key by decrypting with the first communication key.

[0125] When the client authenticates the central node, it is determined that the decrypted task key is valid.

[0126] In this embodiment, steps S507 to S509 are respectively Figure 3 In the embodiment shown, steps S303 and S305 are similar, and can be referred to as above. Figure 3 For the sake of brevity, the detailed description of the illustrated embodiment will not be repeated here.

[0127] It should be noted that, in other embodiments, the central node may first issue the first task key ciphertext, and then respond to the first authentication request of the client, and the client may determine the validity of the task key based on the authentication result.

[0128] Next, the implementation of the two-way authentication between the central node and the trusted computing node and the distribution of the task key to the trusted computing node will be introduced through steps S510 to S517 of this embodiment.

[0129] S510: The central node determines a trusted computing node that executes a data processing task.

[0130] This step and Figure 3 Step S306 of the illustrated embodiment is similar and will not be described again here.

[0131] S511. The central node sends a second authentication request to the trusted computing node.

[0132] The second authentication request is used to request authentication of the trusted computing node.

[0133] As a possible implementation, the central node can generate a random value center-nonce and send the random value to the trusted computing node in the second authentication request to initiate authentication of the trusted computing node. The random value generated by the central node can also be used for subsequent verification of the identity of the trusted computing node.

[0134] S512. The trusted computing node generates second identity information in response to the second authentication request. The second identity information includes: a digital signature generated by the trusted computing node, a signature public key, and second certification information generated by the trusted computing node in a trusted execution environment and including second communication key verification information and signature public key verification information.

[0135] As a possible implementation manner, after receiving the second authentication request, the trusted computing node may generate two key pairs, namely key pair 1 (woker_pk_encrypt, woker_sk_encrypt) and key pair 2 (woker_pk_verify, woker_sk_verify).

[0136] Among them, key pair 1 (woker_pk_encrypt, woker_sk_encrypt) is the second communication key mentioned above, which is used to encrypt and decrypt the interactive data between the central node and the trusted computing node to protect the security of the interactive data.

[0137] The private key woker_sk_verify in key pair 2 can be used to sign the random value contained in the second authentication request to obtain the digital signature woker_sig generated by the trusted computing node, and the public key woker_pk_verify in key pair 2 can be used as the signature public key of the trusted computing node to verify the digital signature woker_sig. In addition, the trusted computing node responds to the second authentication request and also generates second remote certification information, i.e., second certification information, wherein the format of the second remote certification information generated by the trusted computing node can be similar to the format of the first remote certification information involved in the aforementioned step S504, and the second remote certification information generated in this step may include the verification information of woker_pk_encrypt and the verification information of woker_pk_verify, which is used to prove that woker_pk_encrypt and woker_pk_verify are generated in the TEE of the trusted computing node. Among them, the verification information of woker_pk_encrypt and woker_pk_verify can be, but is not limited to, the hash value of the corresponding key.

[0138] Based on the digital signatures woker_sig, woker_pk_encrypt, woker_pk_verify and the corresponding remote proof information obtained above, the second identity information is generated, and the second identity information is sent to the central node, so that the central node verifies the identity of the trusted computing node and the security of the TEE service in the trusted computing node through the second identity information to obtain the corresponding authentication result.

[0139] Therefore, the second identity information generated by the trusted computing node may include: the digital signatures of the trusted computing node, woker_sig, woker_pk_encrypt, woker_pk_verify, and remote proof information. The trusted computing node sends the second identity information to the central node, so that the central node authenticates the trusted computing node through the second identity information, and sends the task key to the trusted computing node after the authentication is passed.

[0140] S513: The trusted computing node sends the second identity information to the central node. Correspondingly, the central node receives the second identity information sent by the trusted computing node.

[0141] S514: The central node obtains an authentication result of the trusted computing node according to the second identity information.

[0142] Among them, the central node can be authenticated through the following aspects:

[0143] 1. Decrypt the digital signature woker_sig according to the public key woker_pk_verify, and determine whether the digital signature woker_sig meets expectations.

[0144] 2. The central node determines the TEE hardware type based on the type field, and verifies the trustworthiness of the trusted computing node through the second attestation information (i.e., the second remote attestation report).

[0145] 3. The central node determines the correctness of woker_pk_encrypt and woker_pk_verify based on the verification information of the public key woker_pk_encrypt and woker_pk_verify contained in the data field.

[0146] If the verification results of the above aspects are as expected, the central node can determine that the service called by the data processing task is running securely in the TEE environment of the real trusted computing node.

[0147] S515. The central node uses the second communication key to encrypt the task key to obtain a second task key ciphertext.

[0148] S516. The central node sends the second task key ciphertext and the data processing task to the trusted computing node.

[0149] S517. The trusted computing node uses the second communication key to decrypt the second task key ciphertext to obtain the task key, and records the task key and the data processing task, uses the task key to decrypt the task data ciphertext corresponding to the data processing task, and performs access control based on the target cluster service that the client has calling authority to when the decryption is successful.

[0150] In this embodiment, steps S515 to S517 are Figure 3 Steps S307 to S309 in the illustrated embodiment are similar and can be referred to in detail. Figure 3 For the sake of brevity, the detailed description of the illustrated embodiment will not be repeated here.

[0151] It should be noted that the above steps S503 to S509 and steps S510 to S517 can be executed in parallel, that is, the process of the client authenticating the central node and distributing the task key to the client, and the central node authenticating the trusted computing node and distributing the task key to the trusted computing node can be executed in parallel.

[0152] In this embodiment, the central node in the server cluster receives the data processing task sent by the client, generates a task key and a key access policy, and uses attribute encryption to embed the key access policy into the task key to obtain the task key ciphertext and send it to the client, so that the client whose attributes meet the key access policy can decrypt and obtain the task key. The client's access to the task key is controlled by attribute encryption, thereby controlling the client's access to the server cluster; the central node also sends the task key to the corresponding trusted computing node, and the trusted computing node decrypts to obtain the task key and records the task key and the data processing task, and performs access control on the data processing task sent by the client based on the task key and the data processing task. Through the distribution of task keys, efficient access control of the client to the server cluster is achieved. In addition, before distributing the task key, the client authenticates the central node and performs two-way authentication between the central node and the trusted computing node, verifying that the services in the central node and the trusted computing node are safely running in the TEE environment of the real node, which is also equivalent to verifying the correctness and validity of the task key and the second communication key, thereby ensuring the security of the data.

[0153] exist Figure 5 Based on the embodiment shown, the trusted computing node also needs to authenticate the central node to determine the validity of the obtained task key. Optionally, it also includes:

[0154] S517': The central node responds to the third authentication request sent by the trusted computing node and sends the third identity information to the trusted computing node.

[0155] The third authentication request is used to request authentication of the central node. The third authentication request may include a random value generated by the trusted computing node, which may be sent together with the second identity information sent by the trusted computing node to the central node, or may be sent separately, which is not limited in the present disclosure.

[0156] After receiving the third authentication request, the central node generates third identity information, which includes: the digital signature generated by the central node, the signature public key, and the third proof information generated by the central node in the TEE. The third proof information generated in this step is similar to the first and second proof information generated in the aforementioned steps S504 and S512. Among them, the third proof information generated in this step may include: the verification information of the job_sk of the task generated by the central node in the TEE, the verification information of the result_key of the task, and the verification information of the public key center_pk_verify. These key verification information can prove that the key is generated in the TEE and has not been tampered with, thereby ensuring the security of the key, and can also indicate that the service in the central node is running safely in the TEE of the central node.

[0157] The key verification information may be, but is not limited to, a hash value of the relevant key.

[0158] S517″: The trusted computing node authenticates the central node according to the received third identity information to obtain an authentication result, and determines whether the task key is valid based on the authentication result.

[0159] Among them, trusted computing nodes can be authenticated through the following aspects:

[0160] 1. Decrypt the digital signature center_sig of the central node according to the public key center_pk_verify, and determine whether the digital signature center_sig meets expectations.

[0161] 2. The trusted computing node determines the TEE hardware type based on the type field, and verifies the trustworthiness of the central node through the received third attestation information (i.e., the third remote attestation report).

[0162] 3. The client determines the correctness of the task's job_sk, the task's result_key, and the public key center_pk_verify based on the verification information of the task's job_sk, the verification information of the task's result_key, and the verification information of the public key center_pk_verify contained in the data field.

[0163] If the verification results of the above aspects are in line with expectations, the trusted computing node can determine that the central node is trustworthy and that the services in the central node's TEE are running securely in the real central node's TEE environment. In addition, the verification also shows that the task key obtained by the trusted computing node is a valid task key, which is safe for decrypting the subsequent task data ciphertext and encrypting the task processing results.

[0164] Combined with the above introduction, it can be seen that the trusted computing node and the central node actually perform a two-way authentication. Only after the two-way authentication is passed can it be guaranteed that all nodes on the entire data processing task link are safe, and it also indicates that the task key is valid. In some cases, the authentication request initiated by the trusted computing node can be as follows Figure 5 It is implemented in the manner shown in the embodiment, or, the third authentication request can be sent to the central node together with the second identity information, and then the central node sends the third identity information together with the second task key ciphertext and the data processing task to the trusted computing node, thereby reducing the number of interactions between the central node and the trusted computing node and reducing network overhead; or, steps S517' and S517" are executed after step S517, and when the authentication result indicates that the task key is invalid, the task key and data processing task recorded by the trusted computing node are deleted.

[0165] See also Figure 6 As shown, in a specific embodiment, the task key distribution method based on the cluster environment provided by the present disclosure may include the following steps:

[0166] Step a1: The client registers with the central node.

[0167] Before executing a data processing task, the client needs to register in the central node of the server cluster. The central node generates a client key c_key (i.e., the first communication key) based on the client's attribute information (including but not limited to the client's name, executable task types, resource limitations, validity period, etc.) and initialization related parameters (such as the ABE public key) and sends it to the client.

[0168] Step a2: The client sends a data processing task (task information) to the central node.

[0169] Step a3: The client initiates authentication, and the central node returns the central node identity information and the first task key ciphertext to the client.

[0170] Step a4: The central node initiates authentication to the trusted computing node, and the trusted computing node returns the trusted computing node identity information to the central node.

[0171] Step a5: The central node distributes the second task key ciphertext and the data processing task (task information) to the trusted computing node. The implementation scheme of steps a2 to a4 can refer to Figures 2 to 5 For the sake of brevity, the description of the illustrated embodiment will not be repeated here.

[0172] Step a6: The client sends the task data ciphertext and the information of the data processing task to the trusted computing node, and obtains the task execution result ciphertext from the trusted computing node.

[0173] In the task data transmission stage, the client can use job_pk to encrypt the task data to obtain the task data ciphertext and send the task information to the trusted computing node in the server cluster. After receiving the task data ciphertext, the trusted computing node uses job_sk to decrypt the task data. The trusted computing node determines whether the task information sent by the client is consistent with the task information in the previously recorded correspondence. After confirming that the task information is consistent, it records the relevant logs and executes the data processing task. After completion, it uses result_key to encrypt the task processing result to obtain the task processing result ciphertext and returns it to the client.

[0174] It should be noted that the trusted computing node records the job_sk and corresponding task information of the task, and determines whether the task information sent by the client is consistent with the recorded task information, thereby preventing the client from calling other TEE services beyond its authority, thus solving the problem that the client may arbitrarily call cluster services.

[0175] In addition, during the task data transmission phase, the trusted computing node does not need to verify the client identity. The job_pk of the task can be the client's access credential to the server cluster. If the trusted computing node can successfully decrypt the task data ciphertext using the task's job_sk, it means that the client holds the correct job_pk, that is, the client's attributes comply with the access policy of job_pk and is a legitimate client.

[0176] In addition, in scenarios where the amount of task processing result data is large and multiple clients need to obtain the task processing results, the overhead of encrypting the execution results multiple times is avoided. In addition, if there is a situation where different task processing results are returned to each participant, the key used to encrypt the task data of each client can be directly used to encrypt the task processing results returned to each client, thereby protecting the security of the result data and achieving isolation of the result data.

[0177] Figure 7 This is a schematic diagram of the structure of a task key distribution device based on a cluster environment provided by an embodiment of the present disclosure. Figure 7 As shown, the device 700 provided in this embodiment includes:

[0178] The receiving module 701 is used to receive a data processing task sent by a client.

[0179] The processing module 702 is used to generate a task key and a key access policy corresponding to a data processing task in a trusted execution environment; and to encrypt the task key based on the key access policy and a first communication key between the client and the client to obtain a first task key ciphertext.

[0180] The sending module 703 is used to send the first task key ciphertext to the client. The first task key ciphertext supports decryption by the client whose attributes satisfy the key access policy to obtain the task key and is used for task data encryption to obtain the task data ciphertext.

[0181] The processing module 702 is further used to determine a trusted computing node that executes the data processing task from the server cluster; and to encrypt the task key based on a second communication key between the trusted computing node and the trusted computing node to obtain a second task key ciphertext.

[0182] The sending module 703 is also used to send the second task key ciphertext and the data processing task to the trusted computing node, instruct the trusted computing node to decrypt the second task key ciphertext to obtain the task key, and record the task key and the data processing task, use the task key to decrypt the task data ciphertext corresponding to the data processing task, and when the decryption is successful, perform access control based on the target cluster service that the client has the calling authority.

[0183] In some embodiments, the task key includes: an asymmetric key for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; the key access policy includes an asymmetric key access policy and a symmetric key access policy.

[0184] Processing module 702 is specifically used to obtain a public key ciphertext by attribute encryption based on the access policy of the asymmetric key, the public key in the asymmetric key and the first communication key; obtain a symmetric key ciphertext by attribute encryption based on the access policy of the asymmetric key, the symmetric key and the first communication key; the first task key ciphertext includes the public key ciphertext and the symmetric key ciphertext.

[0185] In some possible embodiments, the sending module 703 is also used to respond to a first authentication request sent by the client, and send first identity information to the client, so that the client authenticates the central node according to the first identity information, and determines whether the task key is valid based on the authentication result; wherein the first identity information includes: a digital signature generated by the central node based on the random value in the first authentication request, a signature public key, and first proof information generated by the central node in a trusted execution environment and containing task key verification information and signature public key verification information.

[0186] In some embodiments, the receiving module 701 is also used to receive second identity information sent by the trusted computing node, the second identity information including: a digital signature and a signature public key generated by the trusted computing node based on a random value in the received second authentication request, and second proof information generated by the trusted computing node in a trusted execution environment and containing second communication key verification information and signature public key verification information.

[0187] The processing module 702 is further configured to authenticate the trusted computing node according to the trusted computing node identity information, so as to send the second task key ciphertext after the authentication is passed.

[0188] In some embodiments, the sending module 703 is also used to send third identity information to the trusted computing node in response to a third authentication request sent by the trusted computing node after the trusted computing node is authenticated, and the third identity information is used by the trusted computing node to authenticate the central node and determine whether the task key is valid based on the authentication result; wherein the third identity information includes: a digital signature and a signature public key generated by the central node based on the random value in the third authentication request, and third proof information generated by the central node in a trusted execution environment and containing task key verification information and signature public key verification information.

[0189] In some embodiments, the task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; a processing module 702 is specifically used to use the second communication key envelope to encrypt the private key and the symmetric key in the asymmetric key pair to obtain the second task key ciphertext.

[0190] In some embodiments, the processing module 702 is also used to generate the first communication key in a trusted execution environment based on the attribute information of the client; the sending module 703 is also used to send the first communication key to the client, so that the client can decrypt the received first task key ciphertext based on the first communication key.

[0191] The task key distribution device based on a cluster environment provided in this embodiment can be used to execute the technical solution executed by the central node in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar. Please refer to the detailed description of the aforementioned method embodiments. For the sake of brevity, they will not be repeated here.

[0192] Figure 8 This is a schematic diagram of the structure of a task key distribution device based on a cluster environment provided by an embodiment of the present disclosure. Figure 8 As shown, the device 800 provided in this embodiment includes:

[0193] The sending module 801 is used to send a data processing task to a central node in a server cluster, so that the central node generates a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment.

[0194] The receiving module 802 is used to receive the first task key ciphertext sent by the central node, where the first task key ciphertext is obtained by the central node encrypting the task key by attributes based on the key access policy and the first communication key between the client and the central node.

[0195] The processing module 803 is used to decrypt the first task key ciphertext by using the first communication key to obtain the task key when the attribute satisfies the key access policy.

[0196] The processing module 803 is used to encrypt the task data corresponding to the data processing task according to the task key to obtain the task data ciphertext and send the task data ciphertext and the data processing task to the trusted computing node in the server cluster through the sending module 801, instruct the trusted computing node to use the task key to decrypt the task data ciphertext corresponding to the data processing task, and, when the decryption is successful, perform access control based on the target cluster service that the client has the calling authority.

[0197] In some embodiments, the task key includes an asymmetric key for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; the key access policy includes an asymmetric key access policy and a symmetric key access policy; the processing module 803 is specifically used to decrypt the first task key ciphertext by the first communication key to obtain the public key in the asymmetric key pair when the attribute meets the asymmetric key access policy; and to decrypt the first task key ciphertext by the first communication key to obtain the symmetric key when the attribute meets the symmetric key access policy.

[0198] In some embodiments, the sending module 801 is further used to send a first authentication request to the central node. The receiving module 802 is further used to receive first identity information sent by the central node, wherein the first identity information includes: a digital signature generated by the central node based on a random value in the first authentication request, a signature public key, and first certification information generated by the central node in a trusted execution environment and including task key verification information and signature public key verification information.

[0199] Correspondingly, the processing module 803 is further used to authenticate the central node according to the first identity information to obtain an authentication result, and the authentication result is used to determine whether the task key is valid.

[0200] In some embodiments, the processing module 803 is specifically configured to encrypt the task data corresponding to the data processing task using the public key envelope in the asymmetric key included in the task key to obtain the task data ciphertext.

[0201] The task key distribution device based on a cluster environment provided in this embodiment can be used to execute the technical solution executed by the client in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar. Please refer to the detailed description of the aforementioned method embodiments. For the sake of brevity, they will not be repeated here.

[0202] Fig. 9 This is a schematic diagram of the structure of a task key distribution device based on a cluster environment provided by another embodiment of the present disclosure. Fig. 9 As shown, the device 900 provided in this embodiment includes:

[0203] The receiving module 901 is used to receive the second task key ciphertext sent by the central node of the server cluster and the data processing task sent by the client to the central node.

[0204] The processing module 902 is used to decrypt the second task key ciphertext according to the second communication key between the central node and the central node to obtain the task key, and record the task key and the data processing task.

[0205] The access control module 903 is used to decrypt the task data ciphertext corresponding to the data processing task using the task key; and, when the decryption is successful, perform access control based on the target cluster service that the client has the calling authority.

[0206] In some embodiments, the device 900 also includes: a sending module 904, which is used to respond to a second authentication request sent by the central node and send second identity information to the central node, so that the central node authenticates the trusted computing node according to the second identity information to send the second task key ciphertext after the authentication is passed; the second identity information includes: a digital signature and a signature public key generated by the trusted computing node based on the random value in the second authentication request, and second proof information generated by the trusted computing node in a trusted execution environment containing communication key verification information and signature public key verification information.

[0207] In some embodiments, before sending the second identity information to the central node, the receiving module 901 is further used to receive a second authentication request sent by the central node, where the second authentication request is used to authenticate the trusted computing node.

[0208] In some embodiments, after sending the second identity information to the central node, the sending module 904 is further configured to send a third authentication request to the central node.

[0209] The receiving module 901 is also used to receive the third identity information sent by the central node, and the third identity information includes: the digital signature and signature public key generated by the central node based on the random value in the third authentication request, and the third proof information generated by the central node in a trusted execution environment and containing task key verification information and signature public key verification information.

[0210] The processing module 902 is further used to authenticate the central node according to the third identity information to obtain an authentication result, and the authentication result is used to determine whether the task key is valid.

[0211] The task key distribution device based on a cluster environment provided in this embodiment can be used to execute the technical solution executed by the trusted computing node in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar. Please refer to the detailed description of the aforementioned method embodiments. For the sake of brevity, they will not be repeated here.

[0212] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.10 As shown, the electronic device 1000 provided in this embodiment includes: a memory 1001 and a processor 1002. The memory 1001 may be an independent physical unit, and may be connected to the processor 1002 via a bus 1003. The memory 1001 and the processor 1002 may also be integrated together and implemented by hardware.

[0213] The memory 1001 is used to store program instructions, and the processor 1002 calls the program instructions to execute the task key distribution method based on a cluster environment executed by the client or the central node or the trusted computing node in any of the above method embodiments.

[0214] Optionally, when part or all of the methods of the above embodiments are implemented by software, the above electronic device 1000 may also only include a processor 1002. The memory 1001 for storing programs is located outside the electronic device 1000, and the processor 1002 is connected to the memory through circuits / wires to read and execute the programs stored in the memory.

[0215] The processor 1002 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0216] The processor 1002 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0217] The memory 1001 may include a volatile memory, such as a random-access memory (RAM); the memory may also include a non-volatile memory, such as a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0218] The present disclosure also provides a readable storage medium, including: computer program instructions, which, when executed by at least one processor of an electronic device, enable the electronic device to implement the task key distribution method based on a cluster environment executed by a client or a central node or a trusted computing node in any of the above method embodiments.

[0219] The present disclosure also provides a computer program product, which, when executed on a computer, enables the computer to implement the task key distribution method based on a cluster environment executed by the client or central node or trusted computing node in any of the above method embodiments.

[0220] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0221] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A task key distribution method based on a cluster environment, characterized in that: include: Receive a data processing task sent by a client, and generate a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment; The task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; Based on the key access policy and the first communication key between the client and the task key, attribute encryption is performed on the task key to obtain a first task key ciphertext, and the first task key ciphertext is sent to the client; the first task key ciphertext supports decryption by a client whose attribute satisfies the key access policy to obtain the task key and is used for task data encryption to obtain a task data ciphertext; Determining a trusted computing node that executes the data processing task from a server cluster; The task key is encrypted based on the second communication key between the trusted computing node to obtain a second task key ciphertext, and the second task key ciphertext and the data processing task are sent to the trusted computing node, instructing the trusted computing node to decrypt the second task key ciphertext to obtain the task key, and use the task key to decrypt the task data ciphertext corresponding to the data processing task. When the decryption is successful, access control is performed based on the target cluster service that the client has calling authority.

2. The method according to claim 1, characterized in that The key access policy includes an asymmetric key access policy and a symmetric key access policy; The step of performing attribute encryption based on the key access policy, the task key, and the first communication key between the client and the client to obtain a first task key ciphertext includes: A public key ciphertext obtained by performing attribute encryption based on the access policy of the asymmetric key, the public key in the asymmetric key, and the first communication key; A symmetric key ciphertext obtained by performing attribute encryption based on the access policy of the symmetric key, the symmetric key, and the first communication key; The first task key ciphertext includes the public key ciphertext and the symmetric key ciphertext.

3. The method according to claim 1 or 2, characterized in that: Also includes: In response to a first authentication request sent by the client, first identity information is sent to the client, so that the client authenticates the central node according to the first identity information, and determines whether the task key is valid based on the authentication result; wherein the first identity information includes: a digital signature generated by the central node based on the random value in the first authentication request, a signature public key, and first proof information generated by the central node in a trusted execution environment and containing task key verification information and signature public key verification information.

4. The method according to claim 1 or 2, characterized in that: Before sending the second task key ciphertext to the trusted computing node, the method further includes: Receive second identity information sent by the trusted computing node, the second identity information including: a digital signature and a signature public key generated by the trusted computing node based on a random value in the received second authentication request, and second certification information including second communication key verification information and signature public key verification information generated by the trusted computing node in a trusted execution environment; The trusted computing node is authenticated according to the trusted computing node identity information, so as to send the second task key ciphertext after the authentication is passed.

5. The method according to claim 4, characterized in that Also includes: After the trusted computing node is authenticated, in response to a third authentication request sent by the trusted computing node, third identity information is sent to the trusted computing node, and the third identity information is used by the trusted computing node to authenticate the central node and determine whether the task key is valid based on the authentication result; wherein the third identity information includes: a digital signature and a signature public key generated by the central node based on the random value in the third authentication request, and third proof information generated by the central node in a trusted execution environment and containing task key verification information and signature public key verification information.

6. The method according to claim 1, characterized in that The second task key ciphertext obtained by encrypting the task key based on the second communication key between the trusted computing node and the task key includes: The second communication key envelope is used to encrypt the private key and the symmetric key in the asymmetric key pair to obtain the second task key ciphertext.

7. The method according to claim 1 or 2, characterized in that: Before sending the first task key ciphertext to the client, the method further includes: The first communication key is generated in a trusted execution environment according to the attribute information of the client, and the first communication key is sent to the client, so that the client decrypts the first task key ciphertext according to the first communication key.

8. A task key distribution method based on a cluster environment, characterized in that: include: Sending a data processing task to a central node in a server cluster, so that the central node generates a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment in response to the data processing task; The task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; receiving a first task key ciphertext sent by the central node, where the first task key ciphertext is obtained by the central node performing attribute encryption on the task key based on the key access policy and a first communication key between the central node and the central node; When the attribute satisfies the key access policy, decrypting the first task key ciphertext by using the first communication key to obtain the task key; The task data of the data processing task is encrypted according to the task key to obtain the task data ciphertext, and the task data ciphertext is sent to the trusted computing node in the server cluster, instructing the trusted computing node to decrypt the task data ciphertext based on the task key recorded by it, and when the decryption is successful, access control is performed based on the target cluster service that the client has the right to call.

9. The method according to claim 8, characterized in that The key access policy includes an asymmetric key access policy and a symmetric key access policy; The step of decrypting the first task key ciphertext by using the first communication key to obtain the task key when the attribute satisfies the key access policy includes: When the attribute satisfies the access policy of the asymmetric key, decrypting the first task key ciphertext by using the first communication key to obtain the public key in the asymmetric key pair; When the attribute satisfies the access policy of the symmetric key, the first task key ciphertext is decrypted by using the first communication key to obtain the symmetric key.

10. The method according to claim 8, characterized in that Also includes: Sending a first authentication request to the central node; Receive first identity information sent by the central node, the first identity information including: a digital signature and a signature public key generated by the central node based on the random value in the first authentication request, and first certification information including task key verification information and signature public key verification information generated by the central node in a trusted execution environment; The central node is authenticated according to the first identity information to obtain an authentication result, and the authentication result is used to determine whether the task key is valid.

11. The method according to claim 8, characterized in that The step of encrypting the task data of the data processing task according to the task key to obtain the task data ciphertext includes: The task data corresponding to the data processing task is encrypted using a public key envelope in the asymmetric key included in the task key to obtain the task data ciphertext.

12. A task key distribution method based on a cluster environment, characterized in that: include: Receiving a second task key ciphertext sent by a central node of a server cluster and a data processing task sent by a client to the central node; Decrypting the second task key ciphertext according to the second communication key between the central node and the central node to obtain a task key, and recording the task key and the data processing task; The task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; The task data ciphertext corresponding to the data processing task sent by the client is decrypted using the task key, and when the decryption is successful, access control is performed based on the target cluster service that the client has the calling authority.

13. The method according to claim 12, characterized in that Before receiving the second task key ciphertext sent by the central node of the server cluster and the data processing task sent by the client to the central node, the method further includes: Receive and respond to a second authentication request sent by the central node, and send second identity information to the central node, so that the central node authenticates the trusted computing node according to the second identity information, and sends the second task key ciphertext after the authentication is passed; the second identity information includes: the digital signature and signature public key generated by the trusted computing node based on the random value in the second authentication request, and the second proof information generated by the trusted computing node in a trusted execution environment and containing communication key verification information and signature public key verification information.

14. The method according to claim 13, characterized in that After sending the second identity information to the central node, the method further includes: Sending a third authentication request to the central node; Receive the third identity information sent by the central node in response, the third identity information including: the digital signature and signature public key generated by the central node based on the random value in the third authentication request, and the third certification information including task key verification information and signature public key verification information generated by the central node in a trusted execution environment; The central node is authenticated according to the third identity information to obtain an authentication result, and the authentication result is used to determine whether the task key is valid.

15. A task key distribution device based on a cluster environment, characterized in that: include: A receiving module, used for receiving data processing tasks sent by the client; A processing module, used to generate a task key and a key access policy corresponding to the data processing task in a trusted execution environment; And, based on the key access policy and the first communication key between the client and the task key, attribute encryption is performed on the task key to obtain a first task key ciphertext; The task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; A sending module, used for sending the first task key ciphertext to the client, the first task key ciphertext supports decryption by a client whose attribute satisfies the key access policy to obtain the task key and is used for task data encryption to obtain task data ciphertext; The processing module is further used to determine a trusted computing node that executes the data processing task from the server cluster; and encrypt the task key based on a second communication key between the trusted computing node and the trusted computing node to obtain a second task key ciphertext; The sending module is also used to send the second task key ciphertext and the data processing task to the trusted computing node, instruct the trusted computing node to decrypt the second task key ciphertext to obtain the task key, and use the task key to decrypt the task data ciphertext corresponding to the data processing task, and when the decryption is successful, perform access control based on the target cluster service that the client has the right to call.

16. A task key distribution device based on a cluster environment, characterized in that: include: A sending module, used to send a data processing task to a central node in a server cluster, so that the central node generates a task key corresponding to the data processing task and a key access policy corresponding to the task key in a trusted execution environment; The task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; A receiving module, used for receiving a first task key ciphertext sent by the central node, where the first task key ciphertext is obtained by the central node performing attribute encryption on the task key based on the key access policy and a first communication key between the central node and the central node; a processing module, configured to decrypt the first task key ciphertext by using the first communication key to obtain the task key when the attribute satisfies the key access policy; The processing module is further used to encrypt the task data corresponding to the data processing task according to the task key to obtain the task data ciphertext; The sending module is also used to send the task data ciphertext to the trusted computing node in the server cluster, instructing the trusted computing node to decrypt the task data ciphertext based on the task key recorded by it, and perform access control based on the target cluster service that the client has the right to call when the decryption is successful.

17. A task key distribution device based on a cluster environment, characterized in that: include: A receiving module, used for receiving the second task key ciphertext sent by the central node of the server cluster and the data processing task sent by the client to the central node; a processing module, configured to decrypt the second task key ciphertext according to a second communication key between the central node and the central node to obtain the task key, and record the task key and the data processing task; The task key includes: an asymmetric key pair for protecting the task data corresponding to the data processing task and a symmetric key for protecting the task execution result corresponding to the data processing task; The access control module is used to use the task key to decrypt the task data ciphertext corresponding to the data processing task; when the decryption is successful, access control is performed based on the target cluster service that the client has the calling authority.

18. An electronic device, characterized in that: include: Memory and processor; The memory is configured to store computer program instructions; The processor is configured to execute the computer program instructions so that the electronic device implements the task key distribution method based on a cluster environment as described in any one of claims 1 to 7, or any one of claims 8 to 11, or any one of claims 12 to 14.

19. A readable storage medium, characterized in that: include: Computer program instructions; The processor of the electronic device executes the computer program instructions so that the electronic device implements the task key distribution method based on a cluster environment as described in any one of claims 1 to 7, or any one of claims 8 to 11, or any one of claims 12 to 14.

20. A computer program product, characterized in that The electronic device executes the computer program product so that the electronic device implements the task key distribution method based on a cluster environment as described in any one of claims 1 to 7, or any one of claims 8 to 11, or any one of claims 12 to 14.