A secure data transaction method based on trusted execution environment

By using a trusted execution environment and smart contracts on the blockchain, combined with asymmetric key encryption, the security and privacy of data transactions are achieved, and the problem of data owners being unable to control the secondary dissemination and processing complexity of data is solved , improving the efficiency and security of data transactions.

CN114896332BActive Publication Date: 2024-08-23TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210366744.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2024-08-23
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

In the existing data transaction methods based on blockchain, data owners cannot effectively control the secondary dissemination and privacy of data, and the data processing process is complicated, which affects the willingness of data transactions.

Method used

Using a secure data transaction method based on a trusted execution environment, through smart contracts and asymmetric key encryption, the data provider uploads the encrypted original data to cloud storage, the data consumer writes the data processing program and uploads it encrypted, and the calculation process is performed in a trusted Conducted in an execution environment to ensure data privacy and security.

Benefits of technology

The data provider retains control over the original data to avoid leakage, and the data consumer can quickly mine the value of the data, reducing the computational complexity and avoiding the performance overhead of cryptography solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114896332B
    Figure CN114896332B
Patent Text Reader

Abstract

A secure data transaction method based on a trusted execution environment. It includes the steps of initializing the blockchain, uploading shared data encryption, initiating a data transaction request, auditing the data processing program, running the data processing program in the trusted execution environment and calculating, obtaining the calculation results and settling the fees. Effects of the present invention: 1. Data providers do not need to provide original data to complete data sharing, while retaining control over the original data while mining data benefits, avoiding privacy leakage caused by directly sharing data. 2. The data processing program written by the data consumer runs directly in the trusted execution environment and will not be limited by the computational complexity of the cryptographic scheme, so that more complex data mining methods can be used to mine the value of data faster and more. 3. The trusted execution environment provider does not directly contact the original data and the data processing program, but only performs calculations. Avoid malicious data attacks from honest but curious trusted execution environment providers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data transaction, and in particular relates to a secure data transaction method based on a trusted execution environment. Background Art

[0002] Blockchain is a distributed ledger technology that consists of a series of nodes connected through a p2p network. The nodes run the same consensus protocol to reach a consensus on the current state of the blockchain network and the changes in the blockchain network state caused by transactions with digital signatures sent by users through the nodes. These transactions are packaged into blocks according to time periods, and cryptography technology is used to connect them before and after, and the consensus is verified by nodes across the network. Blockchain has the characteristics of being tamper-proof and decentralized. These characteristics bring new solutions to problems such as single point failure, centralized storage, opaque operations, and excessive third-party permissions in traditional data storage and trading. And with the development of blockchain technology, its performance and scale have reached new heights. In addition, its inherent financial attributes are very consistent with data transactions, so its application in the field of data transactions has gradually attracted everyone's attention.

[0003] At present, the data transaction methods based on blockchain can be divided into the following two types according to whether the original data is transmitted:

[0004] 1. Data owners and data consumers communicate and negotiate through blockchain. Then the data owner transmits the data required by the data consumer through other channels and platforms. In this method, blockchain only serves as a channel for communication between the two parties and records data transaction behaviors for future tracing. However, this method exposes the original data. Once the data owner sells the data to a data consumer, he loses the ownership of the data. Because the data owner cannot restrict the secondary dissemination or resale of the data by the data consumer, it means that the data owner can only sell the data once, which is unacceptable for high-value data and privacy data.

[0005] 2. Compared with the first data transaction method mentioned above, the data owner and the data buyer still reach a data transaction intention through blockchain negotiation to ensure that the transaction behavior is recorded by the blockchain. However, the data owner does not provide the original data. Instead, the data buyer proposes a method to use the data and pays the fee. After the data owner completes the data utilization, the result is returned to the data buyer. This idea of ​​not exposing the original data and only providing the data processing results is also the core idea of ​​privacy computing, which is often said that data is "available but invisible". However, this transaction method adds additional data processing tasks to the data owner, which may affect the data owner's willingness to trade. In addition, the data owner needs to identify whether the data buyer's data processing method has the possibility of obtaining the original data. For the data buyer, he must believe that the data owner has indeed calculated according to the data utilization method provided by him, and the result is correct. These are the main difficulties that hinder this data sharing method.

[0006] Although the technology is difficult, it can be seen that the second data trading method is applicable to more scenarios than the first data trading method. There are currently several solutions to the problems in the second data trading method:

[0007] Introduce a trusted third party to complete the calculation and return the result. This method is simple and efficient, but it is not easy to find a third party that both parties trust, which also limits the scope of data transactions, so it is not widely used in real scenarios.

[0008] Cryptographic techniques such as homomorphic encryption, multi-party secure computing, and zero-knowledge proof are used to implement ciphertext computing or proof of correctness of computing processes. This method usually has a huge performance overhead and is only applicable to some specific simple data processing scenarios, so it is not very practical.

[0009] A trusted execution environment (TEE) is used to load data and complete calculations. In essence, a trusted execution environment is a black box that is opaque to both the computer itself and the outside world. It can complete solutions with computational complexity far higher than pure cryptographic methods, so it is widely used in reality. Summary of the invention

[0010] In order to solve the above problems, the object of the present invention is to provide a secure data transaction method based on a trusted execution environment.

[0011] In order to achieve the above object, the secure data transaction method based on a trusted execution environment provided by the present invention comprises the following steps performed in sequence:

[0012] 1) Initialize the blockchain:

[0013] Cloud resource providers write smart contracts market, and deploy it to the blockchain network; the trusted execution environment provider obtains integrity proof through remote attestation and calls the smart contract Contract market The CalculatorRegister function in the chain is used to complete the registration;

[0014] 2) Encrypted upload of shared data:

[0015] The data provider selects a small amount of raw data as a data sample, then encrypts the raw data with an asymmetric public key Pc, uploads it to the cloud storage provided by the cloud resource provider, obtains the data location Dataaddress, and then calls the DataRegister function to complete the raw data upload, waiting for the data consumer to select and purchase;

[0016] 3) Initiate a data transaction request:

[0017] The data consumer determines the data to be purchased based on the data samples provided by the data provider, and then writes the data processing method into a data processing program. After that, it encrypts the data using the asymmetric public key of the data provider, uploads it to the cloud storage, and calls the Buying function.

[0018] 4) Data processing procedures audit:

[0019] The data provider obtains the data processing program provided by the data consumer from the cloud storage and audits it to verify the security of the program to ensure that it cannot obtain the original data; if the verification passes, the Calculation function is called and the calculation task is issued to the corresponding computing node;

[0020] 5) The trusted execution environment runs the data processing program and calculates:

[0021] The trusted execution environment provider obtains the encrypted original data and data processing program from the cloud storage according to the computing task assigned by the data provider. The entire computing process is completed in the trusted execution environment, so the original data and data processing program are completely invisible to the trusted execution environment provider. After the calculation is completed, the Result function is called to return the calculation result encrypted by the asymmetric public key of the data consumer.

[0022] 6) Obtain calculation results and settle fees:

[0023] The data consumer obtains the calculation results, and if he agrees, he calls the Dealfinished function, and the data transaction is completed; finally, the smart contract completes the fund transfer.

[0024] In step 1), the trusted execution environment provider obtains the integrity certificate through the remote attestation method and calls the smart contract Contractmarket The specific method to complete the on-chain registration is as follows:

[0025] 101) The trusted execution environment provider calls the relevant interface to initialize the trusted execution environment;

[0026] 102) The trusted execution environment provider writes the account address of the trusted execution environment provider in the blockchain network into the above-mentioned trusted execution environment, and calls the built-in program of the trusted execution environment to generate an asymmetric public key Pc;

[0027] 103) The trusted execution environment provider calls the remote authentication program to allow the trusted execution environment to initiate an authentication request to the CPU manufacturer;

[0028] 104) The CPU manufacturer signs and returns the integrity certificate of the trusted execution environment;

[0029] 105) The trusted execution environment provider uses the integrity proof of the trusted execution environment and the asymmetric public key Pc generated in the above steps as parameters to call the smart contract Contract market The CalculatorRegister function in , thus completing the on-chain registration.

[0030] In step 2), the specific method of encrypting and uploading the shared data is as follows:

[0031] 201) Data providers publish detailed descriptions of original data and provide a small amount of original data as data samples;

[0032] 202) The data provider uses the asymmetric public key Pc called by the trusted execution environment provider in step 102) to encrypt the original data, and then uploads it to the cloud storage. The returned data location Dataaddress is the address identifier for obtaining the encrypted original data;

[0033] 203) Data provider calls smart contract Contract market The DataRegister function in the blockchain uploads the data location Dataaddress and the data sample to the blockchain, sets the purchase price, and publishes the asymmetric public key Pa.

[0034] In step 3), the specific method of initiating a data transaction request is as follows:

[0035] 301) Data consumers browse smart contracts market The data samples in the table determine the required data;

[0036] 302) The data consumer writes the data processing method to be performed after purchasing the data into a data processing program;

[0037] 303) The data consumer uses the asymmetric public key Pa provided by the data provider to encrypt the data processing program and upload it to the cloud storage;

[0038] 304) The data consumer calls the smart contract according to the purchase price set by the data provider market The Buying function in the smart contract transfers the purchase funds to the smart contract market The asymmetric key public key Pb is hosted in the central repository and published.

[0039] In step 4), the specific method of the data processing program audit is as follows:

[0040] 401) The data provider obtains the address of the data processing program stored by the data consumer through the event triggered by step 304);

[0041] 402) Audit the data processing procedures provided by data consumers to ensure that data consumers cannot obtain the original data;

[0042] 403) Use the asymmetric public key Pc to re-encrypt the data processing program provided by the data consumer and upload it to the cloud storage to obtain the address of the re-encrypted data processing program;

[0043] 404) Then call the smart contract Contract market The Calculation function in the Calculation function initiates a calculation task to the computing node.

[0044] In step 5), the specific method of the trusted execution environment running the data processing program and calculating is as follows:

[0045] 501) The trusted execution environment provider obtains the address of the encrypted original data and the address of the data processing program required for calculation through the event triggered by step 404);

[0046] 502) The trusted execution environment provider initializes the trusted execution environment and loads the data processing program;

[0047] 503) The trusted execution environment provider calls the remote authentication program to allow the trusted execution environment to initiate an authentication request to the CPU manufacturer;

[0048] 504) The CPU manufacturer signs and returns the integrity certificate of the trusted execution environment to prove that the data processing program is running in an undamaged trusted execution environment;

[0049] 505) The trusted execution environment provider loads the encrypted original data, performs calculations, and obtains calculation results;

[0050] 506) The trusted execution environment provider uses the asymmetric public key Pb to encrypt the integrity proof and calculation results of the trusted execution environment and use them together with the integrity proof returned by the remote authentication as parameters to call the smart contract Contract market The Result function in returns the calculation result.

[0051] In step 6), the specific method of obtaining the calculation result is as follows:

[0052] 601) The data provider obtains the final calculation result through the event triggered by step 506);

[0053] 602) The data provider verifies the calculation results and calls the smart contract after verification. market The Dealfinished function in indicates that the calculation result is accepted and the data transaction is completed.

[0054] The beneficial effects of the secure data transaction method based on a trusted execution environment provided by the present invention are:

[0055] 1. Data providers do not need to provide original data to complete data sharing. They can obtain benefits while retaining control over the original data, thus avoiding leakage caused by direct data sharing.

[0056] 2. The data processing programs written by data consumers run directly in the trusted execution environment and are not limited by the computational complexity of cryptographic schemes, so that the value of data can be mined faster and more.

[0057] 3. The trusted execution environment provider does not directly access the original data and data processing programs, but only performs calculations. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A flow chart of a secure data transaction method based on a trusted execution environment provided by the present invention. DETAILED DESCRIPTION

[0059] The main roles involved in this invention are as follows:

[0060] Data providers, as data owners, are willing to sell data usage rights to obtain revenue, but do not expose the original data. They have the right to set data prices and the ownership of original data. Their public parameters include the asymmetric public key Pa and the blockchain network account address Accountprovider.

[0061] Data consumers, as data buyers, browse the data samples provided by data providers and select the data they want to purchase. Their public parameters include the asymmetric public key Pb and the blockchain network account address Accountconsumer.

[0062] As a trusted computing resource provider, the trusted execution environment provider obtains the required parameters for calculation from the smart contract and calculates, and returns the calculation results in the form of transactions. Its public parameters include the asymmetric public key Pc and the blockchain network account address Accountcalculator.

[0063] Cloud resource providers act as intermediaries for storing and exchanging data between parties in the blockchain network and provide smart contracts.

[0064] The smart contract involved in this invention market There are mainly the following functions:

[0065] CalculatorRegister function (Account, remoteproof, Pc), which is called by the trusted execution environment provider, submits the remote proof of its trusted execution environment to the regional chain to prove that its trusted computing environment has not been tampered with or destroyed. This function triggers the event NewCalculator (Account, Pc), where the asymmetric public key Pc is generated in the trusted execution environment, and its private key only exists in the trusted execution environment. This means that any data encrypted with the asymmetric public key Pc can only be decrypted in the corresponding trusted execution environment.

[0066] DataRegister function (Account, Dataexample, Dataaddress, Price, Pa), which is called by the data provider to provide the data sample, the location of the encrypted data in the cloud storage, and the asymmetric key public key Pa used for encrypted message transmission. This function triggers the event NewData (Account, Dataexample, Price, Pa).

[0067] DataBuying function (Dataprovideraccount, Dataaddress, Processprograme, Pb), which is called by data consumers to purchase corresponding data and transfer the fees to the smart contract for escrow at the corresponding price. In the present invention, data consumers need to write the processing method they want to perform on the data into a data processing program and submit it to the data owner for verification to ensure that the data consumer cannot obtain the original data from it. This program is encrypted with the public key of the data provider and stored in the cloud storage. The parameter Processprograme is the location of the encrypted program in the cloud storage. The other three parameters are the account address Dataprovideraccount of the data provider, the location of the data in the cloud storage Dataaddress, and the asymmetric key public key Pb used for encrypted message transmission. This function triggers the event Buying (Consumeraccount, Dataaddress, Processprograme).

[0068] Calculation function (Processprograme, Dataaddress, Pb), which is called by the data provider. The data provider verifies the data processing program provided by the data consumer according to the parameters in the event Buying, and calls this function after agreeing to the transaction. This function triggers the event Processing (Account, Processprograme, Dataaddress, Pb), where the parameter Account represents the blockchain account address of the data provider.

[0069] Result function (result), which is called by the trusted execution environment provider, indicates that the calculation has been completed and returns the calculation result encrypted by the data consumer's key. This function triggers the event Finished(Account,Account,result). The first parameter Account represents the data consumer, and the second parameter Account represents the trusted execution environment provider itself.

[0070] Dealfinished function (Account, Account, Account), which is called by the data consumer, indicating that the entire data transaction process has been completed. The three parameters are the data consumer itself, the data provider, and the trusted execution environment provider. This function triggers payment and transfers the funds held by the data consumer in the smart contract to the data provider and the trusted execution environment provider. Trigger event Dealfinished (Account, Account, Account).

[0071] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0072] like Figure 1 As shown, the secure data transaction method based on a trusted execution environment provided by the present invention includes the following steps performed in sequence:

[0073] 1) Initialize the blockchain:

[0074] Cloud resource providers write smart contracts market , and deploy it to the blockchain network; the trusted execution environment provider obtains integrity proof through remote attestation and calls the smart contract Contract market The CalculatorRegister function in the chain is used to complete the registration;

[0075] The trusted execution environment provider obtains integrity proof through remote attestation method and calls the smart contract Contract market The specific method to complete the on-chain registration is as follows:

[0076] 101) The trusted execution environment provider calls the relevant interface to initialize the trusted execution environment;

[0077] 102) The trusted execution environment provider writes the account address of the trusted execution environment provider in the blockchain network into the above-mentioned trusted execution environment, and calls the built-in program of the trusted execution environment to generate an asymmetric public key Pc;

[0078] 103) The trusted execution environment provider calls the remote authentication program to allow the trusted execution environment to initiate an authentication request to the CPU manufacturer;

[0079] 104) The CPU manufacturer signs and returns the integrity certificate of the trusted execution environment;

[0080] 105) The trusted execution environment provider uses the integrity proof of the trusted execution environment and the asymmetric public key Pc generated in the above steps as parameters to call the smart contract Contract market The CalculatorRegister function in , thus completing the on-chain registration.

[0081] 2) Encrypted upload of shared data:

[0082] The data provider selects a small amount of raw data as a data sample, then encrypts the raw data with an asymmetric public key Pc, uploads it to the cloud storage provided by the cloud resource provider, obtains the data location Dataaddress, and then calls the DataRegister function to complete the raw data upload, waiting for the data consumer to select and purchase;

[0083] The specific method is as follows:

[0084] 201) Data providers publish detailed descriptions of original data and provide a small amount of original data as data samples;

[0085] 202) The data provider uses the asymmetric public key Pc called by the trusted execution environment provider in step 102) to encrypt the original data, and then uploads it to the cloud storage. The returned data location Dataaddress is the address identifier for obtaining the encrypted original data;

[0086] 203) Data provider calls smart contract Contract market The DataRegister function in the blockchain uploads the data location Dataaddress and the data sample to the blockchain, sets the purchase price, and publishes the asymmetric public key Pa.

[0087] 3) Initiate a data transaction request:

[0088] The data consumer determines the data to be purchased based on the data samples provided by the data provider, and then writes the data processing method into a data processing program. After that, it encrypts the data using the asymmetric public key of the data provider, uploads it to the cloud storage, and calls the Buying function.

[0089] The specific method is as follows:

[0090] 301) Data consumers browse smart contracts market The data samples in the table determine the required data;

[0091] 302) The data consumer writes the data processing method to be performed after purchasing the data into a data processing program;

[0092] 303) The data consumer uses the asymmetric public key Pa provided by the data provider to encrypt the data processing program and upload it to the cloud storage;

[0093] 304) The data consumer calls the smart contract according to the purchase price set by the data provider market The Buying function in the smart contract transfers the purchase funds to the smart contract market The asymmetric key public key Pb is hosted in the central repository and published.

[0094] 4) Data processing procedures audit:

[0095] The data provider obtains the data processing program provided by the data consumer from the cloud storage and audits it to verify the security of the program to ensure that it cannot obtain the original data; if the verification passes, the Calculation function is called and the calculation task is issued to the corresponding computing node;

[0096] The specific method is as follows:

[0097] 401) The data provider obtains the address of the data processing program stored by the data consumer through the event triggered by step 304);

[0098] 402) Audit the data processing procedures provided by data consumers to ensure that data consumers cannot obtain the original data;

[0099] 403) Use the asymmetric public key Pc to re-encrypt the data processing program provided by the data consumer and upload it to the cloud storage to obtain the address of the re-encrypted data processing program;

[0100] 404) Then call the smart contract Contract market The Calculation function in the Calculation function initiates a calculation task to the computing node.

[0101] 5) The trusted execution environment runs the data processing program and calculates:

[0102] The trusted execution environment provider obtains the encrypted original data and data processing program from the cloud storage according to the computing task assigned by the data provider. The entire computing process is completed in the trusted execution environment, so the original data and data processing program are completely invisible to the trusted execution environment provider. After the calculation is completed, the Result function is called to return the calculation result encrypted by the asymmetric public key of the data consumer.

[0103] The specific method is as follows:

[0104] 501) The trusted execution environment provider obtains the address of the encrypted original data and the address of the data processing program required for calculation through the event triggered by step 404);

[0105] 502) The trusted execution environment provider initializes the trusted execution environment and loads the data processing program;

[0106] 503) The trusted execution environment provider calls the remote authentication program to allow the trusted execution environment to initiate an authentication request to the CPU manufacturer;

[0107] 504) The CPU manufacturer signs and returns the integrity certificate of the trusted execution environment to prove that the data processing program is running in an undamaged trusted execution environment;

[0108] 505) The trusted execution environment provider loads the encrypted original data, performs calculations, and obtains calculation results;

[0109] 506) The trusted execution environment provider uses the asymmetric public key Pb to encrypt the integrity proof and calculation results of the trusted execution environment and use them together with the integrity proof returned by the remote authentication as parameters to call the smart contract Contract market The Result function in returns the calculation result.

[0110] 6) Obtain calculation results and settle fees:

[0111] The data consumer obtains the calculation results, and if he agrees, he calls the Dealfinished function, and the data transaction is completed; finally, the smart contract completes the fund transfer.

[0112] The specific method for obtaining the calculation results is as follows:

[0113] 601) The data provider obtains the final calculation result through the event triggered by step 506);

[0114] 602) The data provider verifies the calculation results and calls the smart contract after verification. market The Dealfinished function in indicates that the calculation result is accepted and the data transaction is completed.

Claims

1. A secure data transaction method based on a trusted execution environment, characterized in that: The secure data transaction method based on a trusted execution environment comprises the following steps performed in sequence: 1) Initialize the blockchain: Cloud resource providers write smart contracts market , and deploy it to the blockchain network; The trusted execution environment provider obtains integrity proof through remote attestation and calls the smart contract Contract market The CalculatorRegister function in the chain is used to complete the registration; 2) Encrypted upload of shared data: The data provider selects a small amount of raw data as a data sample, then encrypts the raw data with an asymmetric public key Pc, uploads it to the cloud storage provided by the cloud resource provider, obtains the data location Dataaddress, and then calls the DataRegister function to complete the raw data upload, waiting for the data consumer to select and purchase; 3) Initiate a data transaction request: The data consumer determines the data to be purchased based on the data samples provided by the data provider, and then writes the data processing method into a data processing program. After that, it encrypts the data using the asymmetric public key of the data provider, uploads it to the cloud storage, and calls the Buying function. 4) Data processing procedures audit: The data provider obtains the data processing program provided by the data consumer from the cloud storage and audits it to verify the security of the program to ensure that it cannot obtain the original data; if the verification passes, the Calculation function is called and the calculation task is issued to the corresponding computing node; 5) The trusted execution environment runs the data processing program and calculates: The trusted execution environment provider obtains the encrypted original data and data processing program from the cloud storage according to the computing task assigned by the data provider. The entire computing process is completed in the trusted execution environment, so the original data and data processing program are completely invisible to the trusted execution environment provider. After the calculation is completed, the Result function is called to return the calculation result encrypted by the asymmetric public key of the data consumer. 6) Obtain calculation results and settle fees: The data consumer obtains the calculation results, and if he agrees, he calls the Dealfinished function, and the data transaction is completed; finally, the smart contract completes the fund transfer.

2. The secure data transaction method based on a trusted execution environment according to claim 1, characterized in that: In step 1), the trusted execution environment provider obtains the integrity certificate through the remote attestation method and calls the smart contract Contract market The specific method to complete the on-chain registration is as follows: 101) The trusted execution environment provider calls the relevant interface to initialize the trusted execution environment; 102) The trusted execution environment provider writes the account address of the trusted execution environment provider in the blockchain network into the above-mentioned trusted execution environment, and calls the built-in program of the trusted execution environment to generate an asymmetric public key Pc; 103) The trusted execution environment provider calls the remote authentication program to allow the trusted execution environment to initiate an authentication request to the CPU manufacturer; 104) The CPU manufacturer signs and returns the integrity certificate of the trusted execution environment; 105) The trusted execution environment provider uses the integrity proof of the trusted execution environment and the asymmetric public key Pc generated in the above steps as parameters to call the smart contract Contract market The CalculatorRegister function in , thus completing the on-chain registration.

3. The secure data transaction method based on a trusted execution environment according to claim 1, characterized in that: In step 2), the specific method of encrypting and uploading the shared data is as follows: 201) Data providers publish detailed descriptions of original data and provide a small amount of original data as data samples; 202) The data provider uses the asymmetric public key Pc called by the trusted execution environment provider in step 102) to encrypt the original data, and then uploads it to the cloud storage. The returned data location Dataaddress is the address identifier for obtaining the encrypted original data; 203) Data provider calls smart contract Contract market The DataRegister function in the blockchain uploads the data location Dataaddress and the data sample to the blockchain, sets the purchase price, and publishes the asymmetric public key Pa.

4. The secure data transaction method based on a trusted execution environment according to claim 1, characterized in that: In step 3), the specific method of initiating a data transaction request is as follows: 301) Data consumers browse smart contracts market The data samples in the table determine the required data; 302) The data consumer writes the data processing method to be performed after purchasing the data into a data processing program; 303) The data consumer uses the asymmetric public key Pa provided by the data provider to encrypt the data processing program and upload it to the cloud storage; 304) The data consumer calls the smart contract according to the purchase price set by the data provider market The Buying function in the smart contract transfers the purchase funds to the smart contract market The asymmetric public key Pb is hosted in the central repository and published.

5. The secure data transaction method based on a trusted execution environment according to claim 4, characterized in that: In step 4), the specific method of the data processing program audit is as follows: 401) The data provider obtains the address of the data processing program stored by the data consumer through the event triggered by step 304); 402) Audit the data processing procedures provided by data consumers to ensure that data consumers cannot obtain the original data; 403) Use the asymmetric public key Pc to re-encrypt the data processing program provided by the data consumer and upload it to the cloud storage to obtain the address of the re-encrypted data processing program; 404) Then call the smart contract Contract market The Calculation function in the Calculation function initiates a calculation task to the computing node.

6. The secure data transaction method based on a trusted execution environment according to claim 5, characterized in that: In step 5), the specific method of the trusted execution environment running the data processing program and calculating is as follows: 501) The trusted execution environment provider obtains the address of the encrypted original data and the address of the data processing program required for calculation through the event triggered by step 404); 502) The trusted execution environment provider initializes the trusted execution environment and loads the data processing program; 503) The trusted execution environment provider calls the remote authentication program to allow the trusted execution environment to initiate an authentication request to the CPU manufacturer; 504) The CPU manufacturer signs and returns the integrity certificate of the trusted execution environment to prove that the data processing program is running in an undamaged trusted execution environment; 505) The trusted execution environment provider loads the encrypted original data, performs calculations, and obtains calculation results; 506) The trusted execution environment provider uses the asymmetric public key Pb to encrypt the integrity proof and calculation results of the trusted execution environment and use them together with the integrity proof returned by the remote authentication as parameters to call the smart contract Contract market The Result function in returns the calculation result.

7. The secure data transaction method based on a trusted execution environment according to claim 6, characterized in that: In step 6), the specific method of obtaining the calculation result is as follows: 601) The data provider obtains the final calculation result through the event triggered by step 506); 602) The data provider verifies the calculation results and calls the smart contract after verification. market The Dealfinished function in indicates that the calculation result is accepted and the data transaction is completed.