Data processing method for a trusted execution environment using smart contracts and computer-readable recording medium containing commands for carrying out the data processing method

The data processing method using smart contracts and trusted execution environments addresses the challenge of data leakage and privacy protection by encrypting and processing data within a self-deleting trusted environment, ensuring secure and independent execution of multiple contracts.

JP7652999B2Active Publication Date: 2025-03-28EB CHAIN INK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2023569834
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-05-10
Filing Date
2022-05-10
Publication Date
2025-03-28
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

Existing data processing methods in trusted execution environments lack effective mechanisms to prevent data leakage and ensure privacy protection for data subjects.

Method used

A data processing method using smart contracts that generates a trusted execution environment with document processing code and encryption keys, encrypts and processes data within this environment, and self-deletes upon contract completion, ensuring data privacy and security.

Benefits of technology

The method effectively prevents data leakage and protects privacy by ensuring data is processed and deleted within a secure trusted execution environment, while allowing multiple smart contracts to be executed independently without data exposure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007652999000001
    Figure 0007652999000001
  • Figure 0007652999000002
    Figure 0007652999000002
  • Figure 0007652999000003
    Figure 0007652999000003
Patent Text Reader

Abstract

Provided is a data processing method in a trusted execution environment using a smart contract that can block data viewing by a data processing subject, prevent data from leaking to the outside, and safely protect the privacy of a subject that provides data. [Solution] The data processing method of the present invention includes a step of generating a trusted execution environment including a material processing code and an encryption key in a data processing platform server in response to a material processing request from a client terminal in accordance with a distributed smart contract, a step of the trusted execution environment obtaining encrypted first data from a data owning terminal, a step of the trusted execution environment decrypting the first data, a step of the trusted execution environment processing the decrypted first data according to the material processing code to generate a material processing result, a step of the trusted execution environment providing the material processing result to the client terminal, and a step of the trusted execution environment self-deleting according to the smart contract.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a method for processing data in a trusted execution environment using smart contracts. [Background technology]

[0002] Blockchain is a decentralized distributed system. Decentralization means that there is no central authority to perform functions, but rather multiple participants work together to perform them. Basically, a blockchain network is made up of a P2P network and uses a consensus algorithm to generate blocks through a common process. The use of hashing is central to blockchain, and the fact that multiple participants use the same data to perform the same process combined with hashing prevents data falsification.

[0003] A smart contract is a set of programming codes that helps to automatically execute contracts based on the blockchain that handles assets and trust. The code created by the developer exists in one block of the blockchain, and the user can execute the code by accessing the smart contract address.

[0004] The reason it is called a smart contract is that, like general transaction contents, the code contents of the smart contract are included in the block information and cannot be manipulated, and since the program operates according to the coded contents, it is suitable for working with fixed contents like contracts.

[0005] Smart contracts created in Ethereum use the Solidity language and run on the EVM. A virtual machine for specially executing Ethereum smart contracts is called the Ethereum Virtual Machine (EVM), and Ethereum smart contracts are created in languages ​​such as Solidity and Viper, and are widely used and applied in the blockchain field.

[0006] There are various monitoring web applications that provide information on smart contracts on the Ethereum network. The most representative ones are EtheRESCan provided by Ethereum, Alvio that provides information in a visual form, and Remix, a Solidity IDE. Summary of the Invention [Problem to be solved by the invention]

[0007] The technical problem to be solved by the present invention is to provide a data processing method in a trusted execution environment using a smart contract that can block data processing subjects from viewing data, prevent data from leaking to the outside, and safely protect the privacy of subjects who provide data. [Means for solving the problem]

[0008] A data processing method of a trusted execution environment using a smart contract according to an embodiment of the present invention includes a step of generating a trusted execution environment including a data processing code and an encryption key in a data processing platform server in response to a data processing request received from a client terminal according to a smart contract distributed on a blockchain, a step of the trusted execution environment obtaining first data encrypted with the encryption key from a data owning terminal, a step of the trusted execution environment decrypting the first data, a step of the trusted execution environment processing the decrypted first data according to the data processing code to generate a data processing result, a step of the trusted execution environment providing the data processing result to the client terminal, and a step of the trusted execution environment self-deleting according to the smart contract.

[0009] According to an embodiment, the step of generating the trusted execution environment may include a step of generating an original trusted execution environment in which no arbitrary material processing code and encryption key are generated, and a step of generating the trusted execution environment including the material processing code and the encryption key corresponding to the material processing request based on the original trusted execution environment.

[0010] According to an embodiment, the step of generating the primitive trusted execution environment may include generating a first image executable file of the primitive trusted execution environment, generating a first hash value for the first image executable file, and generating and recording a transaction including the first hash value in the blockchain.

[0011] According to an embodiment, the step of generating the trusted execution environment including the material processing code and the encryption key corresponding to the material processing request may include generating a second image executable file of the trusted execution environment, generating a second hash value for the second image executable file, and generating a transaction including the second hash value and recording it on the blockchain.

[0012] According to an embodiment, the data processing method of a trusted execution environment using a smart contract may further include, after the step of providing the data processing result to the client terminal, a step of the trusted execution environment confirming that the performance of the smart contract has been completed.

[0013] According to an embodiment, the trusted execution environment may remain valid only for the duration of the smart contract.

[0014] Depending on the embodiment, the trusted execution environment may be a virtual execution environment.

[0015] According to an embodiment, at least one of the trusted execution environments may be generated on the data processing platform server for the execution of the smart contract.

[0016] In some embodiments, the encryption key may be an asymmetric key consisting of a private key and a public key pair of the trusted execution environment.

[0017] According to an embodiment, the encrypted first data may be encrypted by the public key of the trusted execution environment.

[0018] According to an embodiment, the step of providing to the client terminal may include encrypting the data processing result using a public key of the client terminal and returning it to the blockchain, thereby providing the data processing result to the client terminal.

[0019] According to an embodiment, the step of self-deleting according to the smart contract may include a step of executing a self-deletion command and a step of deleting a trusted execution environment including the document processing code and the decrypted first data.

[0020] According to an embodiment, the step of executing the self-deletion command may include executing the self-deletion command, generating a flag indicating the execution of the self-deletion command, and then generating a transaction including the flag and recording it in the blockchain. Effect of the Invention

[0021] According to the data processing method of a trusted execution environment using a smart contract according to an embodiment of the present invention, when the smart contract is terminated, the trusted execution environment is self-deleted and the stored data is also erased, thereby preventing collected data from leaking to the outside, and basically blocking the operator of the data processing platform server from viewing the data, thereby protecting the privacy of the data subject.

[0022] In addition, according to the data processing method of a trusted execution environment using a smart contract according to an embodiment of the present invention, multiple smart contracts can be executed simultaneously using a trusted execution environment that is executed independently for each smart contract.

[0023] In addition, according to the data processing method of a trusted execution environment using a smart contract according to an embodiment of the present invention, by recording a self-deletion command flag in the blockchain, it is possible to ensure that the trusted execution environment that received the data is stably removed and that the data is safely erased without leaking to the outside.

[0024] In addition, according to the data processing method in a trusted execution environment using a smart contract according to an embodiment of the present invention, the client terminal can obtain the desired data processing result without directly collecting or processing the data required for data processing, and since the data required for data processing is not exposed to the client terminal, the privacy of the subject who provided the data can be safely protected. [Brief description of the drawings]

[0025] [Figure 1] 1 is a schematic block diagram of a data processing system according to an embodiment of the present invention; [Diagram 2] 1 is a diagram illustrating a data processing method in a trusted execution environment using a smart contract according to an embodiment of the present invention. [Diagram 3] 13 is a diagram illustrating a data processing method in a trusted execution environment using a smart contract according to another embodiment of the present invention. [Figure 4] 1 is a diagram illustrating a smart contract according to an embodiment of the present invention. [Diagram 5] 1 is a flow chart illustrating a data processing method in a trusted execution environment using a smart contract according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0026] The advantages and features of the present invention, as well as the methods for achieving them, will become apparent from the following detailed description of the embodiments in conjunction with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, and may be embodied in various different forms. The embodiments are provided to fully disclose the present invention and to fully teach the scope of the present invention to those skilled in the art to which the present invention pertains. The present invention is defined by the scope of the claims.

[0027] The terms used in the present specification are for the purpose of describing the embodiments and are not intended to limit the present invention. In the present specification, the singular includes the plural unless otherwise specified in the phrase. The terms "comprises" and / or "comprising" used in the specification do not exclude the presence or addition of one or more other elements in addition to the elements mentioned. The same reference numerals refer to the same elements throughout the specification, and "and / or" includes each and every combination of one or more of the elements mentioned. For example, "first", "second", etc. are used to describe various elements, but these elements are not limited by these terms. These terms are used to distinguish one element from another element. Therefore, the first element mentioned below may be the second element within the technical spirit of the present invention.

[0028] Unless otherwise defined, all terms (including technical and scientific terms) used herein may be used in the sense commonly understood by those of ordinary skill in the art to which the present invention belongs. Furthermore, commonly used and predefined terms will not be interpreted ideally or excessively unless expressly and specifically defined.

[0029] FIG. 1 is a schematic block diagram of a data processing system according to an embodiment of the present invention.

[0030] Referring to FIG. 1, a data processing system according to an embodiment of the present invention includes a data processing platform server (100), a data owning terminal (200), and a client terminal (300).

[0031] The data processing platform server (100) can host an online network and is a network addressable device, and can provide a data processing platform where data is shared online to the data owning terminal (200) and the client terminal (300). The data processing platform server (100) can perform a series of processes such as the creation, distribution, execution, and termination of smart contracts on the blockchain through the data processing platform.

[0032] The data processing platform server (100) can generate a smart contract for data processing and distribute it to the blockchain. A smart contract for data processing is an electronic contract that is automatically concluded when pre-set conditions are met on the blockchain, and the data processing platform server (100) can generate a smart contract that records a series of contract contents necessary for data processing, such as data collection, analysis, and result derivation, and distribute it to the blockchain.

[0033] Smart contracts are recorded in the blocks of the blockchain, and smart contracts can be executed on the blockchain. For example, the blockchain is embodied in the Ethereum blockchain, and smart contracts created in Solidity, Viper, etc. can be distributed to the blockchain through the Ethereum Virtual Machine (EVM). In addition, all transactions in the blockchain can be hashed with SHA-256 and the hash value can be stored, and the hash value can be stored in the blocks of the blockchain to protect personal privacy and prevent overload.

[0034] The smart contract distributed by the data processing platform server (100) is automatically concluded when a data processing request conforming to the preset terms is received from the client terminal (300), and the contract can be terminated when the data processing result is returned in response to the data processing request.

[0035] Here, the data processing request is a data processing request that can be processed by the data processing platform server (100), and the data processing code required for data processing can be provided from the client terminal (300) or generated by the data processing platform server (100).

[0036] For example, when a smart contract is concluded between the data processing platform server (100) and the client terminal (300), the data processing platform server (100) can obtain the data processing code provided by the client terminal (300) to the blockchain and use it for data processing.

[0037] For example, when a smart contract is concluded between the data processing platform server (100) and the client terminal (300), the data processing platform server (100) can determine the processing model required for a data processing request by itself, and then use the determined processing model for data processing.

[0038] When a smart contract is concluded, the data processing platform operated by the data processing platform server (100) creates a trusted execution environment (TEE) for data processing. That is, when the data processing platform server (100) receives a data processing request from the client terminal (300), it creates a trusted execution environment including a data processing code and an encryption key in response to the data processing request.

[0039] Specifically, the data processing platform server 100 can generate a primitive trusted execution environment, which is the source of the generation of a trusted execution environment. The primitive trusted execution environment means a virtual execution environment in which no data processing code and encryption key are generated.

[0040] According to the embodiment, when a primitive trusted execution environment embodied in an image execution file is generated, the data processing platform server 100 generates a hash value for the image execution file, generates a transaction including the hash value, and records the transaction in the block chain. Thus, the data processing platform server 100 can externally disclose that a primitive trusted execution environment for generating a trusted execution environment has been generated.

[0041] The primitive trusted execution environment is a safe execution environment provided by an independent secure area, and can be generated as an image executable file to realize a virtual execution environment. However, the primitive trusted execution environment is not limited to this, and can be realized as either a hardware-based solution or a hardware / software-based solution.

[0042] The data processing platform server 100 can generate a trusted execution environment including a data processing code and an encryption key corresponding to a data processing request based on the original trusted execution environment. The trusted execution environment is a secure execution environment provided by an independent secure area like the original execution environment, and can be generated as an image execution file for implementing a virtual execution environment.

[0043] The encryption key of the Trusted Execution Environment is an Eternally Owned Address (EOA) and can use a mechanism based on a public key / private key pair to indicate the uniqueness of the blockchain participant. When the Trusted Execution Environment generates an account address, it generates a 256-bit random number, sets it as a private key, and applies it to the private key through an elliptic curve cryptography algorithm to extract a unique public key. The public key of the Trusted Execution Environment generated through this process is made public through the blockchain, and data encrypted with the public key is set so that it can only be restored with the private key of the Trusted Execution Environment.

[0044] According to the embodiment, when a trusted execution environment embodied in an image execution file is generated, the data processing platform server 100 generates a hash value for the image execution file, generates a transaction including the hash value, and records the transaction in the blockchain. As a result, the data processing platform server 100 can externally disclose that the trusted execution environment corresponding to the smart contract has not been tampered with or forged and has been safely executed.

[0045] The trusted execution environment can request data collection from the data-owning terminal (200) to perform data processing corresponding to the data processing code. To this end, the trusted execution environment can generate a transaction requesting data from the data-owning terminal (200) and record it in the blockchain. At this time, the trusted execution environment can distribute a separate smart contract for data collection to the blockchain, but can only generate a transaction to notify data collection and record it in the blockchain.

[0046] According to an embodiment, when a data collection target is designated by the client terminal (300) when a smart contract is concluded, the trusted execution environment can request data transmission from the data collection target. That is, the trusted execution environment can designate an account of a specific data-owning terminal (200) and record a transaction requesting data transmission to the designated data-owning terminal (200) in the blockchain.

[0047] In another embodiment, the trusted execution environment can record a transaction including the type and content of data required for data processing in the blockchain and request data transmission from any data-owning terminal (200). That is, the trusted execution environment can collect data from all data-owning terminals (200) that hold data that meets the data collection conditions by publishing the data collection conditions without specifying a data collector.

[0048] The trusted execution environment can process data based on the data collected from the data-owning terminal 200. The trusted execution environment has inbound and outbound rules, so it only receives data in a format that corresponds to the data processing code, and returns the data processing results to the outside in a certain format.

[0049] The trusted execution environment can process data if the data collected from the data-owning terminal (200) meets the criteria required for data processing. Since the data collected from the data-owning terminal (200) is encrypted with the public key of the trusted execution environment, the trusted execution environment can decrypt the data with the private key and then process the data according to the data processing code.

[0050] Once the data processing is completed, the trusted execution environment can provide the data processing results to the client terminal (300). The trusted execution environment can obtain the public key provided by the client terminal (300) when the smart contract is concluded, and can encrypt the data processing results using the public key of the client terminal (300) and return them to the blockchain.

[0051] The smart contract between the data processing platform server (100) and the client terminal (300) is automatically concluded when a data processing request that meets the preset conditions is input, and the contract can be terminated when the data processing result corresponding to the data processing request is returned. Therefore, it means that the performance of the smart contract is completed when the trusted execution environment encrypts the data processing result, generates a transaction including the encrypted data processing result, and records it in a block of the blockchain.

[0052] Meanwhile, the trusted execution environment has a temporary status that maintains its validity only during the existence of the smart contract. That is, the trusted execution environment is generated only when the smart contract distributed to the blockchain is established and a data processing request is received from the client terminal (300), and is automatically deleted when data processing corresponding to the contents of the smart contract is completed or the smart contract is terminated for other reasons.

[0053] The self-deletion of the trusted execution environment means that the environment constituting the trusted execution environment itself is initialized, and a series of data related to the trusted execution environment is deleted. Therefore, the data received by the trusted execution environment from the data possessing terminal 200 for data processing is also deleted when the trusted execution environment is self-deleted.

[0054] If the data processing platform server (100) stores the data even after the data processing is completed, the data may be leaked due to an external malicious attack, and may also be accessed by the operator of the data processing platform server (100).

[0055] However, the data processing platform server (100) according to the embodiment of the present invention stores the data received from the data possessing terminal (200) only for the period during which the smart contract is maintained, and when the smart contract is terminated, it self-deletes the trusted execution environment and simultaneously erases the stored data. As a result, the data processing platform server (100) can prevent data from leaking to the outside and basically block the data viewing by the operator of the data processing platform server (100), thereby protecting the privacy of the subject providing the data.

[0056] According to an embodiment, the trusted execution environment may record a flag indicating that a self-deletion command has been executed in the blockchain. When the self-deletion command is executed, a flag that cannot be arbitrarily altered is generated. When the self-deletion command is executed, the trusted execution environment may generate a transaction including the flag, record it in the blockchain, and then enter into the self-deletion process.

[0057] The trusted execution environment generated for data processing is a virtual execution environment, and at least one is generated for the execution of a smart contract in the data processing platform server (100), and can be generated independently depending on whether a contract is established and executed, and can be self-deleted and initialized. In this way, the data processing platform server (100) can execute multiple smart contracts simultaneously using a trusted execution environment that is executed independently for each smart contract.

[0058] The data-containing terminal (200) is a communication device that can be connected to a data processing platform, and can store data required for data processing and execute applications required for managing the stored data.

[0059] For example, when the data processing platform server (100) requests a user's medical records for data processing, the data-owning terminal (200) can provide data regarding the user's medical records, health condition, etc. to the data processing platform server (100) through a health management application.

[0060] The data-containing terminal 200 may mean a personal terminal, but may also mean a data storage device that stores data of multiple subjects. For example, the data-containing terminal 200 may be at least one of a personal computer (PC), a smart phone, a tablet PC, a mobile internet device (MID), an internet tablet, an internet of things (IoT) device, an internet of everything (IoE) device, a desktop computer, a laptop computer, a workstation computer, a wireless broadband internet (Wibro) terminal, and a personal digital assistant (PDA), but is not limited thereto, and may also be a database that stores data of multiple subjects.

[0061] The data possessing terminal (200) executes an application for scanning the blockchain, and can check the transactions recorded in the blockchain to confirm the data request of the trusted execution environment. For example, the data possessing terminal (200) can check the data request of the trusted execution environment recorded in the blockchain using applications such as EtherScan and Remix.

[0062] The data-owning terminal (200) can obtain the encryption key recorded together with the data request of the trusted execution environment from the blockchain and encrypt the stored data using the encryption key. That is, the data-owning terminal (200) can generate a hash value having 256 bits for the data using the public key of the trusted execution environment.

[0063] The data possessing terminal (200) can provide data encrypted with a hash value to a trusted execution environment executed in the data processing platform server (100). The data possessing terminal (200) can transmit encrypted data to the trusted execution environment through the data processing platform, but can also generate a transaction including a hash value of the encrypted data to ensure reliability and record it in the blockchain.

[0064] The data-owning terminal (200) can earn blockchain coins as a reward for providing data to the data processing platform server (100), and the amount of coins that can be earned can be set by the trusted execution environment.

[0065] The subject of the data-owning terminal (200) may feel anxious about personal information leakage since the subject provides information related to the user's privacy, such as medical records and health condition information, to the data processing platform server (100). To solve this problem, the data-owning terminal (200) can scan the blockchain through an application and check the self-deletion command flag recorded in the blockchain.

[0066] When the data-owning terminal 200 scans the flag of the self-deletion command for the trusted execution environment, it can be guaranteed that the trusted execution environment and data have been safely deleted.

[0067] The client terminal 300 is a terminal that generates a data processing request corresponding to a smart contract, provides a transaction including the data processing request to the blockchain, and concludes a smart contract with the data processing platform server 100. For example, the client terminal 300 may be at least one of a personal computer (PC), a smart phone, a tablet PC, a mobile internet device (MID), an internet tablet, an internet of things (IoT) device, an internet of everything (IoE) device, a desktop computer, a laptop computer, a workstation computer, a wireless broadband internet (Wibro) terminal, and a personal digital assistant (PDA).

[0068] The client terminal (300) can provide a data processing code required for data processing to the transaction together with a data processing request when a smart contract is concluded, and can provide a specific data owner terminal (200) account to the transaction in order to specify the data collector. Also, the client terminal (300) can provide a public key of the client terminal (300) to the transaction together with a data processing request when a smart contract is concluded in order to receive encrypted data processing results.

[0069] The client terminal (300) can obtain the data processing result from the blockchain by executing the smart contract, and can obtain the data processing result that matches the data processing request by decrypting the encrypted data processing result with the private key.

[0070] In this way, the client terminal (300) can obtain the desired result without directly collecting or processing the data required for data processing. Also, since the data required for data processing is not exposed to the subject of the client terminal (300), the privacy of the subject who provided the data can be safely protected.

[0071] FIG. 2 is a diagram illustrating a data processing method in a trusted execution environment using a smart contract according to an embodiment of the present invention.

[0072] 2, the data processing platform server (100) can generate a smart contract (SC) for data processing and distribute it to the blockchain (BC), and the smart contract (SC) can be recorded in a block of the blockchain (BC) and executed on the blockchain (BC). Here, the smart contract (SC) automatically concludes a contract when a transaction including a data processing request (QUE1) conforming to the preset terms is provided to the blockchain (BC) from the client terminal (300), and ends when a data processing result conforming to the data processing request (QUE1) is returned.

[0073] The client terminal (300) can provide a data processing request (QUE1) corresponding to the smart contract (SC) to the blockchain (BC) to obtain data processing results.

[0074] When the smart contract (SC) between the data processing platform server (100) and the client terminal (300) is concluded, the data processing platform server (100) generates a trusted execution environment including a data processing code and an encryption key in response to a data processing request (QUE1). Here, the data processing code may mean a data processing model that the client terminal (300) provides to the blockchain.

[0075] The trusted execution environment can generate a transaction including a data request (QUE2) to the data owner terminal (200) to perform data processing corresponding to the data processing code and record it in the blockchain (BC).

[0076] The data possessing terminal (200) can obtain the encryption key recorded together with the data request (QUE2) of the trusted execution environment from the block chain (BC) and encrypt the stored data using the encryption key. In order to provide the data encrypted with the hash value to the trusted execution environment, the data possessing terminal (200) can generate a transaction including the hash value (DAT) of the encrypted data and record it in the block chain (BC).

[0077] The trusted execution environment can process data if the data collected from the data-owning terminal (200) meets the criteria required for data processing. Since the data acquired from the block chain (BC) is encrypted with the public key of the trusted execution environment, the trusted execution environment can decrypt the hash value (DAT) of the encrypted data with the private key and then process the data using the data processing code.

[0078] Once the data processing is completed, the trusted execution environment can encrypt the data processing result using the public key of the client terminal (300) and return the encrypted data processing result (RES) to the blockchain.

[0079] The smart contract between the data processing platform server (100) and the client terminal (300) is terminated when the data processing result corresponding to the data processing request (QUE1) is returned. The trusted execution environment can confirm that the performance of the smart contract is completed by checking whether the data processing result is recorded in the blockchain.

[0080] When the data processing result is returned and the smart contract is terminated, the trusted execution environment executed in the data processing platform server (100) enters a self-deletion mode. As the trusted execution environment self-deletes, the data received from the data possessing terminal (200) for data processing is also deleted in the data processing platform server (100).

[0081] The client terminal (300) can obtain the encrypted data processing result (RES) recorded in the block chain (BC) and obtain the data processing result corresponding to the data processing request by decrypting the encrypted data processing result (RES) with a private key.

[0082] FIG. 3 is a diagram illustrating a data processing method in a trusted execution environment using a smart contract according to another embodiment of the present invention.

[0083] 3, the data processing platform server (100) can generate a smart contract (SC) for data processing and distribute it to the blockchain (BC), and the smart contract (SC) can be recorded in a block of the blockchain (BC) and executed on the blockchain (BC). Here, the smart contract (SC) is automatically concluded when a transaction including a data processing request (QUE1) conforming to the preset terms is provided to the blockchain (BC) from the client terminal (300), and is terminated when a data processing result conforming to the data processing request (QUE1) is returned.

[0084] The client terminal (300) can provide a data processing request (QUE1) corresponding to the smart contract (SC) to the blockchain (BC) to obtain data processing results.

[0085] When the smart contract (SC) between the data processing platform server (100) and the client terminal (300) is concluded, the data processing platform server (100) generates a trusted execution environment including a data processing code and an encryption key in response to a data processing request (QUE1). Here, the data processing code may mean a data processing model that the client terminal (300) provides to the blockchain (BC).

[0086] The trusted execution environment can perform a data request (QUE2') to the data possessing terminal (200) through the data processing platform in order to perform data processing corresponding to the data processing code. That is, the trusted execution environment can openly perform a data request (QUE2') for data collection through the data processing platform.

[0087] The data-owning terminal (200) can provide the stored data (DAT') to the data processing platform server (100) through the data processing platform in response to the data request (QUE2'). At this time, the data-owning terminal (200) can encrypt the data (DAT') with an encryption key of the trusted execution environment and provide only a hash value.

[0088] The trusted execution environment can process data if the data (DAT') collected from the data-owning terminal (200) meets the criteria required for data processing. The trusted execution environment can process the data (DAT') collected from the data-owning terminal (200) using the data processing code.

[0089] If the data (DAT') collected from the data-owning terminal (200) is encrypted with the public key of the trusted execution environment, the trusted execution environment can decrypt the collected data (DAT') with a private key and then process the data using the data processing code.

[0090] Once the data processing is completed, the trusted execution environment can encrypt the data processing result using the public key of the client terminal (300) and return the encrypted data processing result (RES) to the blockchain.

[0091] The smart contract between the data processing platform server (100) and the client terminal (300) is terminated when the data processing result corresponding to the data processing request (QUE1) is returned. Therefore, when the smart contract is terminated by returning the data processing result, the trusted execution environment executed in the data processing platform server (100) is self-deleted. As the trusted execution environment is self-deleted, the data received from the data possessing terminal (200) for data processing is also deleted in the data processing platform server (100).

[0092] The client terminal (300) can obtain the encrypted data processing result (RES) recorded in the block chain (BC) and obtain the data processing result corresponding to the data processing request by decrypting the encrypted data processing result (RES) with a private key.

[0093] FIG. 4 is a diagram illustrating a smart contract according to an embodiment of the present invention.

[0094] Referring to FIG. 4, the data processing platform server (100) can generate a smart contract for data processing and distribute it through the blockchain, and when a smart contract is concluded with the client terminal (300), a reliable execution environment for data processing can be generated.

[0095] The data processing platform server (100) can generate multiple smart contracts and distribute them to the blockchain, and if multiple different data processing operations are required for one smart contract, multiple different trusted execution environments can be generated.

[0096] The trusted execution environment generated for data processing is a virtual execution environment, and at least one can be generated for the execution of a smart contract in the data processing platform server 100. That is, even if 10 smart contracts are distributed on the blockchain, if only two smart contracts are concluded, the data processing platform server 100 can execute two trusted execution environments to execute the contracts.

[0097] In addition, each smart contract can be set to have different specifications, such as whether or not performance is completed successfully, the performance period, and the performance method, so each smart contract is created and self-deleted depending on whether or not the contract is established and performed, and a series of processes are performed independently.

[0098] For example, the data processing platform server (100) can conclude a first smart contract (SC1) with the first client terminal (300A) and conclude a second smart contract (SC2) with the second client terminal (300B). The data processing platform server (100) can generate a first trusted execution environment (VM1) corresponding to the conclusion of the first smart contract (SC1) and generate a second trusted execution environment (VM2) corresponding to the conclusion of the second smart contract (SC2). Even if there are distributed smart contracts other than the first and second smart contracts (SC1 and SC2) on the blockchain (BC), the data processing platform server (100) executes the trusted execution environment only for the concluded smart contract.

[0099] The first trusted execution environment (VM1) and the second trusted execution environment (VM2) are virtual machines created based on different contract contents and run independently of each other, so one trusted execution environment cannot affect the other. Therefore, even if the first trusted execution environment (VM1) is self-deleted due to the execution of the contract, the second trusted execution environment (VM2) is not affected and can continue to carry out the data processing process according to the contents of the second smart contract (SC2).

[0100] In addition, the data processing platform server (100) can execute multiple smart contracts simultaneously by using a trusted execution environment in which each smart contract is executed independently, and can prevent the risk of data leakage or mixing by using an independent data processing space that cannot be invaded.

[0101] FIG. 5 is a flow chart illustrating a data processing method in a trusted execution environment using a smart contract according to an embodiment of the present invention.

[0102] Referring to FIG. 5, the trusted execution environment executed in the data processing platform server (100) can be generated in response to a data processing request received from a client terminal (300) according to a smart contract distributed on the blockchain (BC), and can include a data processing code and an encryption key (S100).

[0103] The trusted execution environment can obtain the first data encrypted using the encryption key from the data-owning terminal (200), and can obtain the hash value recorded in the block chain (BC) as the first data or receive it directly from the data-owning terminal (200) through the data processing platform (S110).

[0104] Then, the trusted execution environment can decrypt the first data with the private key of the trusted execution environment (S120).

[0105] The trusted execution environment can then process the decrypted first data according to the data processing code to generate a data processing result (S130).

[0106] The trusted execution environment can provide the encrypted data processing result to the client terminal (300) by encrypting the data processing result and returning it to the blockchain using the public key of the client terminal (300) (S140).

[0107] Then, the trusted execution environment can be self-deleted by executing a self-deletion command when the performance of the smart contract is completed (S150).

[0108] The steps of a method or algorithm described in connection with the embodiments of the present invention may be embodied directly in hardware, in a software module executed by hardware, or in a combination thereof. The software module may reside in a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable ROM (EPROM), an Electrically Erasable Programmable ROM (EEPROM), a Flash Memory, a hard disk, a removable disk, a CD-ROM, or any other form of computer readable recording medium well known in the art to which the present invention pertains.

[0109] Although the embodiments of the present invention have been described above, those skilled in the art will recognize that the present invention can be modified in various ways without departing from the scope of the claims. [Industrial Applicability]

[0110] According to the present invention, collected data can be prevented from leaking to the outside, and data viewing by the management entity can basically be blocked, thereby protecting the privacy of the data subject.

[0111] In addition, according to the present invention, multiple smart contracts can be executed simultaneously, and it is possible to ensure that collected data is not leaked to the outside and is safely deleted. Furthermore, since data required for data processing is not directly provided to the data processing requester, the privacy of the data providing subject can be safely protected. [Explanation of symbols]

[0112] 100 Data Processing Platform Servers 200 Data-owning devices 300 Client terminals

Claims

1. In response to a data processing request received from a client terminal according to a smart contract, which is a series of programming codes that help automatically perform contract execution based on a blockchain, a trusted execution environment including a data processing code, which is a data processing model provided by the client terminal to the blockchain, and an encryption key is generated in a data processing platform server; the trusted execution environment obtains first data encrypted with the encryption key from a data owning terminal; the trusted execution environment decrypts the first data with a private key of the trusted execution environment; the trusted execution environment processes the decrypted first data according to the data processing code to generate a data processing result; the trusted execution environment provides the data processing result to the client terminal; and the trusted execution environment is self-deleted according to the smart contract; The self-deletion of the trusted execution environment means that the environment constituting the trusted execution environment is initialized, a series of data related to the trusted execution environment is deleted, and data received by the trusted execution environment from the data-owning terminal for data processing is deleted together with the self-deletion of the trusted execution environment, The method for processing data in a trusted execution environment using a smart contract, wherein the step of generating a trusted execution environment includes: generating a primitive trusted execution environment in which no arbitrary material processing code and encryption key are generated; and generating the trusted execution environment including the material processing code and the encryption key corresponding to the material processing request based on the primitive trusted execution environment.

2. 2. The method of claim 1, wherein the step of generating the primitive trusted execution environment includes generating a first image executable file of the primitive trusted execution environment, generating a first hash value for the first image executable file, and generating and recording a transaction including the first hash value in the blockchain.

3. 2. The method of claim 1, wherein the step of generating the trusted execution environment including the material processing code and the encryption key corresponding to the material processing request includes generating a second image execution file of the trusted execution environment, generating a second hash value for the second image execution file, and generating a transaction including the second hash value and recording the transaction in the blockchain.

4. 2. The data processing method of claim 1, further comprising a step of the trusted execution environment confirming that the performance of the smart contract has been completed after the step of providing the document processing result to the client terminal.

5. The data processing method of claim 1, wherein the trusted execution environment maintains validity only for the duration of the smart contract.

6. The data processing method for a trusted execution environment using a smart contract according to claim 1, wherein the trusted execution environment is a virtual execution environment.

7. The data processing method of claim 1, wherein the trusted execution environment is generated in the data processing platform server for the execution of the smart contract.

8. 2. The data processing method of claim 1, wherein the encryption key is an asymmetric key consisting of a pair of a private key and a public key of the trusted execution environment.

9. 9. The data processing method of a trusted execution environment using a smart contract according to claim 8, wherein the encrypted first data is encrypted by the public key of the trusted execution environment.

10. 2. The method for processing data in a trusted execution environment using a smart contract as claimed in claim 1, wherein the step of providing to the client terminal includes providing the data processing result to the client terminal by encrypting the data processing result using a public key of the client terminal and returning it to the blockchain.

11. The method for processing data in a trusted execution environment using a smart contract according to claim 1, wherein the step of self-deleting by the smart contract includes the steps of: executing a self-deletion command; and deleting the trusted execution environment including the material processing code and the decrypted first data.

12. The data processing method for a trusted execution environment using a smart contract according to claim 11, characterized in that the step of executing the self-deletion command includes executing the self-deletion command to generate a flag indicating the execution of the self-deletion command, and then generating a transaction including the flag and recording it in the blockchain.

13. A computer-readable storage medium storing one or more programs, the one or more programs being configured to be executed by one or more processors of an electronic device, the one or more programs including instructions for performing the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Backup system and backup method

    JP2011170707A

  • Software-based switch for providing products and / or services to users without compromising their privacy - Patent Application 20070122963

    JP2019533852A

  • JPP6638024B

  • Managing a smart contract on a blockchain

    US20210064784A1

  • Decentralized marketplace and ecosystem powered by blockchain-based document delivery, collaboration, and dissemination

    WO2020123464A1