Blockchain-based data detection method and device, equipment, and program thereof
Patent Information
- Application Number
- JP2023571404
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-07-08
- Filing Date
- 2023-06-21
- Publication Date
- 2025-02-19
- Estimated Expiration
- 2043-06-21
AI Technical Summary
【0013】 本願実施例を実施することにより、次の有益な技術的効果を有する: 本願実施例において、ブロックノードは、オラクルスマートコントラクトを呼び出すことにより、信頼できる実行環境プラットフォームに対する認証要求を開始し、認証要求は、信頼できる実行環境プラットフォームに対応する環境署名を含み、認証要求に基づいて、環境署名を含む環境認証イベントをトリガして、オラクルノードが環境認証イベントを検出したとき、認証サービスノードから環境認証イベントに含まれる認証対象となるデータに対する認証情報を取得するようにし、認証対象となるデータは、環境署名を含み、オラクルノードから認証情報を取得し、認証情報を認証スマートコントラクトにフィードバックする。
Smart Images

Figure 0007631660000006 
Figure 0007631660000007 
Figure 0007631660000008
Abstract
Description
[Technical field]
[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application is filed based on a Chinese patent application bearing application number 202210799019.1, filed with the China Patent Office on July 8, 2022, and claims priority to the Chinese patent application, the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data detection method, an apparatus, a device, a storage medium, and a program thereof. [Background technology]
[0003] Data privacy computing technology based on a trusted execution environment (TEE) is designed to solve the situation where a data provider (DA) cannot prevent a data user (DU) from reselling the received data after the DA provides it to the data user, resulting in data privacy leakage.
[0004] In the related technology, the DA needs to send data directly to the DU in plain text, which is then analyzed and used in the local environment. However, since most confidential data cannot be provided by the DA in plain text, the TEE is introduced to allow the DA and DU to encrypt data and transmit it to the TEE platform, which then decrypts, analyzes and calculates the data and returns the calculation results to the DU, preventing the DU from obtaining the original plain text data and ensuring the security of the data. However, the related technology does not know the reliability and trustworthiness of the TEE platform, so it is not possible to guarantee the security of the data. Summary of the Invention [Problem to be solved by the invention]
[0005] The present embodiment provides a blockchain-based data detection method and an apparatus thereof, a computer device, a computer-readable storage medium, and a computer program product, which can improve the detection efficiency of blockchain-based data detection and improve the security of a trusted execution environment platform. [Means for solving the problem]
[0006] An embodiment of the present application provides a blockchain-based data detection method, the method comprising: Invoking an oracle smart contract based on the authentication smart contract to initiate an authentication request to a trusted execution environment platform, the authentication request including an environment signature corresponding to the trusted execution environment platform; Triggering an environment authentication event including an environment signature based on the authentication request, wherein the environment authentication event is used to trigger an oracle node to obtain authentication information of data to be authenticated from an authentication service node, the data to be authenticated being included in the environment authentication event, and the data to be authenticated includes an environment signature; obtaining authentication information from the oracle node and feeding back the authentication information to the authentication smart contract.
[0007] The present embodiment further provides a blockchain-based data detection method, the method including: When detecting an environment authentication event triggered by an oracle smart contract, acquiring authentication information of data to be authenticated included in the environment authentication event from an authentication service node, the data to be authenticated includes an environment signature corresponding to a trusted execution environment platform, the environment signature is included in an authentication request to the trusted execution environment platform, and the oracle smart contract is invoked by the authentication smart contract; and feeding back authentication information to the authentication smart contract via the oracle smart contract.
[0008] The present embodiment further provides a blockchain-based data detection device, the device comprising: an authentication request initiation module configured to invoke the oracle smart contract based on the authentication smart contract and initiate an authentication request to a trusted execution environment platform, the authentication request including an environment signature corresponding to the trusted execution environment platform; an authentication event generating module configured to trigger an environment authentication event including an environment signature based on an authentication request, where the environment authentication event is used to trigger an oracle node to obtain authentication information of data to be authenticated from an authentication service node, the data to be authenticated being included in the environment authentication event, and the data to be authenticated including the environment signature; and a credential feedback module configured to obtain the credential from the oracle node and feed back the credential to the authentication smart contract.
[0009] An embodiment of the present application provides a blockchain-based data detection device, the device comprising: an event detection module configured to obtain authentication information of data to be authenticated, which is included in the environment authentication event, from an authentication service node when detecting an environment authentication event triggered by an oracle smart contract, the data to be authenticated includes an environment signature corresponding to a trusted execution environment platform, the environment signature is included in an authentication request to the trusted execution environment platform, and the oracle smart contract is invoked by the authentication smart contract; and an information sending module configured to feed back authentication information to the authentication smart contract via the oracle smart contract.
[0010] Embodiments of the present application further provide a computing device comprising a processor, a memory and an input / output interface, The processor is respectively connected to the memory and the input / output interface, where the input / output interface is configured to receive data and output data, the memory stores a computer program, and the processor invokes the computer program to cause a computer device including the processor to execute a blockchain-based data detection method according to an embodiment of the present application.
[0011] The present embodiment further provides a computer-readable storage medium having stored thereon a computer program that, when loaded and executed by a processor, causes a computing device having the processor to execute a blockchain-based data detection method according to the present embodiment.
[0012] An embodiment of the present application further provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium, the computer instructions being read by a processor of the computer device from the computer-readable storage medium and executed to cause the computer device to perform a blockchain-based data detection method according to an embodiment of the present application. Effect of the Invention
[0013] By implementing the present embodiments, the following beneficial technical effects are achieved: In the present embodiment, the block node initiates an authentication request to a trusted execution environment platform by invoking an oracle smart contract, where the authentication request includes an environment signature corresponding to the trusted execution environment platform, and triggers an environment authentication event including the environment signature based on the authentication request. When the oracle node detects the environment authentication event, it obtains authentication information for the data to be authenticated included in the environment authentication event from the authentication service node, where the data to be authenticated includes the environment signature, obtains the authentication information from the oracle node, and feeds back the authentication information to the authentication smart contract.
[0014] Through the above process, the authentication of the trusted execution environment platform is realized, thereby ensuring the safety, reliability and credibility of the trusted execution environment platform, and ensuring the safety of data when the trusted execution environment platform is used in the future. Based on the open transparency and non-tamperable characteristics of the blockchain, the smart contract is used to realize remote authentication of the trusted execution environment platform, and the authentication process can be traced back, etc., thereby improving the reliability of the authentication of the trusted execution environment platform, thereby improving the authentication accuracy of the trusted execution environment platform. At the same time, the communication between the blockchain network and the authentication service node to which the authentication smart contract belongs is directly connected through the oracle smart contract and the oracle node, realizing real-time authentication, and further improving the authentication efficiency of the trusted execution environment platform and reducing maintenance costs. [Brief description of the drawings]
[0015] [Figure 1a] FIG. 1 is an architecture diagram of network interactions for blockchain-based data discovery according to an embodiment of the present invention. [Figure 1b] FIG. 2 is an architecture diagram of data detection according to an embodiment of the present invention. [Diagram 2]FIG. 1 is a schematic diagram of a scenario of blockchain-based data discovery according to an embodiment of the present application. [Diagram 3] 1 is a flowchart of a method for blockchain-based data discovery according to an embodiment of the present disclosure. [Figure 4] 1 is a flowchart of another blockchain-based data discovery method according to an embodiment of the present disclosure. [Diagram 5] FIG. 1 is a schematic diagram of a blockchain-based data discovery interaction according to an embodiment of the present invention. [Figure 6] FIG. 1 is a schematic diagram of a blockchain-based data detection device according to an embodiment of the present invention. [Figure 7] FIG. 1 is a schematic diagram of another blockchain-based data detection device according to an embodiment of the present disclosure. [Figure 8] FIG. 2 is an exemplary structural diagram of a computer device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Hereinafter, the technical solutions of the embodiments of the present application will be described clearly and completely with reference to the drawings of the embodiments of the present application, and obviously, the described embodiments are only a part of the embodiments of the present application, and are not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts shall be included in the protection scope of the present invention.
[0017] Here, the embodiments of the present application can store and transmit data in the blockchain mentioned in the present application (e.g., data related to authentication smart contracts and oracle smart contracts, etc.), data related to a trusted execution environment platform, data associated with authentication service nodes and oracle nodes, etc. based on cloud technology, and can be applied to the field of data transmission in big data.
[0018] Here, cloud technology refers to a hosting technology that integrates a set of resources such as hardware, software, and networks within a wide area network or local area network to realize computing, storage, processing, and sharing of data.
[0019] Here, partial words related to the embodiment of the present application will be introduced.
[0020] 1. Blockchain: In a narrow sense, blockchain is a chained data structure with blocks as the basic unit, and uses digital digests in blocks to verify previous transaction history, which is suitable for the needs of tamper-proofing and scalability in distributed ledger scenarios. In a broad sense, blockchain further refers to distributed ledger technology implemented by the blockchain structure, such as distributed consensus, privacy and security protection, point-to-point communication technology, network protocols, and smart contracts. Blockchain aims to realize a distributed data record ledger, which only allows additions and does not allow deletions. The basic structure of the ledger is a linear linked list. The linked list is composed of individual "blocks" in series, and each subsequent block records the hash value of the previous block, and whether each block (and the transaction in the block) is valid can be quickly verified by the method of calculating the hash value. When a node in the network proposes to add a new block, it needs to confirm the block through a consensus mechanism. Blockchain is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm, and is a serial transaction record (also called a block) that serially connects and protects the content through encryption methods. The distributed ledger serially connected by the blockchain allows multiple parties to effectively record transactions, and this transaction can be permanently verified (immutable).
[0021] 2. Block: Records all transactions and state results that have occurred over a certain period of time, and becomes the consensus on the current ledger state. For example, in the case of blockchain, every time data is written, that is, the above transaction process, a block is created.
[0022] 3. Chain: A chronological sequence of blocks, a log of all state changes in the ledger.
[0023] 4. Smart Contract: A computer protocol intended to propagate, authenticate or execute a contract in an informationized manner. Smart contracts allow the execution of trusted transactions without a third party, and these transactions are traceable and irreversible. Smart contracts in this patent specifically refer to executable code deployed on the blockchain.
[0024] 5. Oracle: An oracle is a mechanism or server that writes external information to the blockchain, realizing data compatibility between the blockchain and the real world, and is the means by which smart contracts can interact with the outside world.
[0025] 6. Data provider (DA): An organization that has a large amount of data of its own and can allow third parties to use it. Data user (DU): An organization that has a need to use data and obtains permission to use data from the DA.
[0026] 7. Trusted Execution Environment (TEE): A software and hardware method is used to create a secure domain in the central processing unit so that the confidentiality and integrity of programs and data loaded within it are protected.
[0027] In the present embodiment, referring to FIG. 1a, FIG. 1a is a network interaction architecture diagram of a blockchain-based data detection according to the present embodiment. As shown in FIG. 1a, it may include a local area network 101 and the Internet 102, where the local area network 101 can be regarded as an internal network, which corresponds to an area network formed in a local region, and refers to a computer group interconnected by multiple computer devices in a certain area, and can realize functions such as file management, application software sharing, printer sharing, etc., and the Internet 102 can be regarded as an external network, which corresponds to a huge network connected in series by networks and networks. Here, a trusted execution environment (TEE) platform 103 and a blockchain network 104 are deployed in the local area network 101, and the blockchain network 104 may include at least one block node. In some embodiments, the local area network 101 may further include a demilitarized zone (DMZ) 1011, or may be deployed between the local area network 101 and the Internet 102, the DMZ 1011 including an oracle node 105, and the oracle node 105 configured to provide an oracle service. In practical applications, the Internet 102 includes an authentication service node.
[0028] Here, the demilitarized zone 1011 is a buffer zone between a non-security system and a security system that is set to solve the problem that an access target (e.g., a user) from an external network cannot access an internal network server after a firewall is installed. The buffer zone is located in a small network area between an internal network and an external network. In this small network area, some server equipment that needs to be made public, such as a corporate Web server, a File Transfer Protocol Server (FTP Server) and a forum, can be placed, for example, in a company. Here, a Web server usually means a website server, which refers to a program that resides on some kind of computer on the Internet, and can process requests from Web clients such as browsers and return corresponding responses. Meanwhile, through such a DMZ, the internal network can be protected more effectively. Compared with a normal firewall solution, a network deployment like a demilitarized zone provides an additional barrier to be overcome for attackers from an external network, which means an additional barrier for the internal network to defend.
[0029] Referring to FIG. 1b, FIG. 1b is an architecture diagram of data detection according to an embodiment of the present application, which is a supplementary explanation of FIG. 1a. As shown in FIG. 1b, the trusted execution environment platform 103 may include a trusted computing application and a trusted environment object, etc., the trusted computing application may be regarded as a software guard extensions (SGX) application and may be regarded as software; the trusted environment object may be regarded as an SGX device and may be a physical server or a virtual machine, etc., not particularly limited here. Here, the trusted execution environment platform 103 may include N (N is a positive integer) trusted environment objects, and in practical application, the N trusted environment objects may be regarded as an SGX device cluster. Here, the blockchain network 104 may include an authentication smart contract and an oracle smart contract, where the authentication smart contract can be used to perform data interaction with the trusted execution environment platform, and can obtain data in the Internet 102 by invoking the oracle smart contract; the oracle smart contract can be used to call the oracle node, provide oracle services in combination with the oracle node, write information outside the blockchain into the blockchain, and perform data interaction with the authentication service node 106 through the oracle node 105. For example, a block node can invoke the oracle smart contract in the authentication smart contract to initiate an authentication request to the trusted execution environment platform; obtain the authentication result for the authentication request from the oracle node 105 based on the oracle smart contract, and feed back the authentication result to the authentication smart contract based on the oracle smart contract.
[0030] Referring to FIG. 2, FIG. 2 is a schematic diagram of a scenario of blockchain-based data detection according to an embodiment of the present application. As shown in FIG. 2, the trusted execution environment platform 201 can send an environment signature to the blockchain network 202, and when any one of the block nodes in the blockchain network 202 receives the environment signature, it can perform an authentication process for the trusted execution environment platform 201. Assuming that the block node 2021 receives the environment signature, the block node 2021 can call the oracle smart contract 204 based on the authentication smart contract 203, initiate an authentication request to the trusted execution environment platform 201, and trigger an environment authentication event including the environment signature based on the authentication request by calling the oracle smart contract 204. When the oracle node 205 detects the environment authentication event, it can obtain authentication information for the data to be authenticated included in the environment authentication event from the authentication service node 206, and the data to be authenticated includes the environment signature. The oracle node 205 can invoke the oracle smart contract 204 and return the authentication information to the blockchain network 202, i.e., feed back the authentication information to the oracle smart contract 204, and the block node 2021 can invoke the authentication smart contract 203 via the oracle smart contract 204 and feed back the authentication information to the authentication smart contract 203, thereby allowing the trusted execution environment platform 201 or other business equipment to obtain the authentication information from the blockchain network 202.Through the oracle smart contract and the oracle node, external data of the blockchain network can be written to the blockchain network, and data compatibility between the blockchain network and the real world can be realized. Thus, based on the oracle smart contract and the oracle node, data compatibility between the local area network and the Internet can be realized. Based on the open, transparent and tamper-proof characteristics of the blockchain network, the security of the data compatibility between the local area network and the Internet can be guaranteed, and the security reliability of the authentication of the trusted execution environment platform can be further improved.
[0031] As can be understood, the block node, oracle node or authentication service node mentioned in the present embodiment may all be computer devices, and the computer devices in the present embodiment include, but are not limited to, terminal devices or servers. In other words, the computer device may be a server or terminal device, or a system composed of a server and a terminal device. Here, the terminal devices mentioned above may be electronic devices including, but are not limited to, mobile phones, tablet computers, desktop computers, notebook computers, palmtop computers, in-vehicle devices, Augmented Reality / Virtual Reality (AR / VR) devices, helmet displays, wearable devices, smart speakers, digital cameras, cameras, other mobile internet devices (MIDs) with network access capabilities, etc. Here, the servers mentioned above may be independent physical servers, server clusters or distributed systems consisting of multiple physical servers, or cloud servers providing fundamental cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, safety services, vehicle road coordination, content delivery networks (CDNs), big data and artificial intelligence platforms.
[0032] 3 is a flowchart of a method for detecting data based on a blockchain according to an embodiment of the present application. As shown in FIG. 3, a block node is used as an execution entity, and the block node may be a computer device. The block node-based data detection process includes the following steps:
[0033] In step S301, the block node invokes the oracle smart contract based on the authentication smart contract to initiate an authentication request to the trusted execution environment platform.
[0034] In the present embodiment, the block node can call the oracle smart contract based on the authentication smart contract to initiate an authentication request to the trusted execution environment platform, and the authentication request is used to authenticate the credibility of the trusted execution environment platform, i.e., whether the authentication trusted execution environment platform is trustworthy. Here, the block node can be any node in the blockchain network, and the block node can execute the authentication smart contract and the oracle smart contract, etc. In practical application, the block node may receive a use request for the trusted execution environment platform sent by a business device (the use request is used to request the use of the trusted execution environment platform), execute an authentication smart contract based on the use request, and trigger an oracle smart contract based on the authentication smart contract to generate an authentication request for the trusted execution environment platform, which is used to request authentication of the environment signature of the service node based on the trusted execution environment platform, and can authenticate the credibility of the trusted execution environment platform, and the authentication smart contract sends the authentication request to the oracle smart contract and initiates an authentication request for the trusted execution environment platform; or the trusted execution environment platform can send data to be authenticated to the blockchain network, and the block node in the blockchain network can execute an authentication smart contract based on the data to be authenticated, and trigger an oracle smart contract based on the authentication smart contract and initiate an authentication request for the trusted execution environment platform. That is, the authentication process of the trusted execution environment platform can be triggered by the trusted execution environment platform, or can be triggered by a business device using the trusted execution environment platform.Here, the business device may be a data provider, a data user, etc., and is not particularly limited here. Here, the authentication request includes an environment signature corresponding to a trusted execution environment platform, and in practical application, the environment signature may be a digital signature executed by the trusted execution environment platform using a private key on its own platform information (e.g., an identifier, a serial number, etc., of the trusted execution environment platform), and the data to be authenticated mentioned above may include the environment signature.
[0035] For example, when a business device uses the trusted execution environment platform, it can send a usage request for the trusted execution environment platform to the block node, and the block node can directly execute an authentication smart contract based on the usage request, obtain an environment signature of the trusted execution environment platform from the trusted execution environment platform based on the authentication smart contract, and invoke an oracle smart contract based on the authentication smart contract to initiate an authentication request to the trusted execution environment platform, where data to be authenticated of the trusted execution environment platform may be obtained, and the data to be authenticated includes the environment signature. Or in actual application, the block node receives a use request sent from a business device to a trusted execution environment platform, where the use request may include a target credential of a trusted environment object in the trusted execution environment platform, and in some embodiments, the use request may further include a platform identifier of the trusted execution environment platform, where the target credential may be regarded as a credential of a trusted environment object triggered and used when the business device uses the trusted execution environment platform, and the credential may be used to prove that the business device has the authority to use the trusted environment object; the block node may authenticate the target credential, and if the target credential passes authentication, invoke an oracle smart contract based on the authentication smart contract to initiate an authentication request to the trusted execution environment platform; if the target credential fails authentication, send a use failure message to the business device, and in actual application, the use failure message may further include a failure cause, etc.
[0036] Alternatively, the block node can receive data to be authenticated sent from a trusted execution environment platform, where the data to be authenticated includes an environment signature corresponding to the trusted execution environment platform, and the block node executes an authentication smart contract based on the data to be authenticated, triggers an oracle smart contract based on the authentication smart contract, and initiates an authentication request to the trusted execution environment platform.
[0037] Here, the authentication request includes an environment signature (i.e., a digital signature) of the trusted execution environment platform, and in practical applications, the block node can obtain data to be authenticated by the trusted execution environment platform from the trusted execution environment platform based on the authentication smart contract, and the data to be authenticated includes the environment signature. Here, the data to be authenticated may further include source data, and the trusted execution environment platform can obtain a platform private key and use the platform private key to sign the source data to obtain an environment signature for the source data. In practical applications, the source data may be executable code in the trusted execution environment platform, or may be dedicated executable code for authentication, or may be other random data, etc., and are not particularly limited here. Here, the trusted execution environment platform may include N (N is a positive integer) trusted environment objects, the trusted environment objects may be regarded as SGX devices, the trusted environment objects may include SGX chips, and the platform private keys of the trusted environment objects may be regarded as being written to the SGX chips included in the trusted environment objects, or may be dynamically assigned by the authentication service node. For example, the authentication service node can generate a pair of platform public key and private key, i.e., a platform public key and a platform private key, for each trusted environment object, and write (store) the platform private key in an SGX chip included in the trusted environment object; at the same time, the authentication service node can provide public key certificate authentication for the trusted execution environment platform, which is used to associate each trusted environment object with the platform public key of the trusted environment object, allowing any business device, etc. to determine the belonging information of the platform public key, etc.Alternatively, the authentication service node can periodically assign a pair of platform public keys and platform private keys to the N trusted environment objects, thereby dynamically changing the platform public keys and platform private keys of the trusted environment objects, thereby improving the security of the trusted execution environment platform to a certain extent. Here, the authentication service node refers to an authoritative node having a degree of trust, such as an Intel Attestation Server node that performs remote authentication for the trusted execution environment platform in this application, and the security of the trusted execution environment platform can be improved by managing the platform public key associated with the trusted execution environment platform through the authentication service node. In practical application, the data to be authenticated may further include other auxiliary information for performing remote authentication for the trusted execution environment platform, and the auxiliary information is specifically determined by the authentication service node, that is, the authentication service node can obtain authentication parameters required for performing remote authentication for the trusted execution environment platform, and obtain the auxiliary information based on the authentication parameters.
[0038] In practical application, a communication channel between the above-mentioned block node and the trusted execution environment platform can be established, and data to be authenticated can be obtained from the trusted execution environment platform through the communication channel, and the communication channel can be regarded as an encrypted communication channel. The block node can adopt the following method to create a communication channel between the trusted execution environment platform, and the block node can adopt a channel encryption algorithm to create a communication channel with the trusted execution environment platform. Or, a symmetric encryption private key can be exchanged between the block node and the trusted execution environment platform, and a communication channel can be created between the block node and the trusted execution environment platform based on the symmetric encryption private key. Or, a first public parameter and a second public parameter can be obtained, a block private parameter can be obtained, and a block public private key can be generated based on the first public parameter, the second public parameter, and the block private parameter. An environment public private key corresponding to the trusted execution environment platform is obtained, and a communication channel with the trusted execution environment platform is established based on the block public private key and the environment public private key.
[0039] The environment public private key is generated by the trusted execution environment platform based on the first public parameter, the second public parameter and the environment private parameter. An environment signature corresponding to the trusted execution environment platform is obtained through a communication channel, for example, data to be authenticated corresponding to the trusted execution environment platform is obtained, and the data to be authenticated includes the environment signature. In practical application, the first public parameter p and the second public parameter g can be obtained in the trusted execution environment platform, where the first public parameter can be regarded as a prime number, and the second public parameter can be regarded as a primitive root, and the trusted execution environment platform can obtain one random number a, which is the environment private parameter of the trusted execution environment platform. The trusted execution environment platform generates the environment public private key A based on the first public parameter p, the second public parameter g and the environment private parameter a. key and send the environment public private key to the blockchain network. Any one block node can obtain the first public parameter p and the second public parameter g, obtain a random number b which is a block private parameter of the blockchain network, and generate a block public private key B according to the first public parameter p, the second public parameter g, and the block private parameter b. keyand send the block public private key to the trusted execution environment platform. Based on the block public private key and the environment public private key, a communication channel is established between the block node and the trusted execution environment platform, for example, the block node can generate a shared private key based on the environment public private key, the block private parameters, and the first public parameters, and the trusted execution environment platform can generate the shared private key based on the block public private key, the environment private parameters, and the first public parameters, in this manner, the shared private keys generated by the block node and the trusted execution environment platform are the same, and when generating the shared private key, the block node has a private block private parameter, and the trusted execution environment platform has a private environment private parameter, thereby realizing encrypted transmission of data between the block chain network and the trusted execution environment platform and improving the security of data transmission.
[0040] For example, in practical application, an environment public private key A is generated based on the first public parameter p, the second public parameter g, and the environment private parameter a. key The process of generating can be described by the following formula (1).
[0041]
number
[0042]
number
[0043]
number
[0044]
number
[0045] In practical application, an environment signature corresponding to the trusted execution environment platform can be obtained through the communication channel. For example, the trusted execution environment platform can perform an encryption process on the data to be authenticated, which includes the environment signature corresponding to the trusted execution environment platform, to obtain the data to be transmitted, and send the data to be transmitted to the blockchain network; the block node in the blockchain network can receive the data to be transmitted, perform a decryption process on the data to be transmitted, and obtain the environment signature included in the data to be authenticated. For example, the trusted execution environment platform can adopt a symmetric encryption private key to perform an encryption process on the data to be authenticated, to obtain the data to be transmitted, and send the data to be transmitted to the blockchain network; the block node in the blockchain network can adopt a symmetric encryption private key to perform a decryption process on the data to be transmitted, to obtain the data to be authenticated. Or, the trusted execution environment platform can adopt a shared private key to perform an encryption process on the data to be authenticated, to obtain the data to be transmitted, and send the data to be transmitted to the blockchain network. A block node in the blockchain network can receive the data to be transmitted, use a shared secret key to perform a decryption process on the data to be transmitted, obtain an environment signature contained in the data to be authenticated, and further perform credit authentication on a trusted execution environment platform based on the environment signature.
[0046] In practical application, the trusted execution environment platform can sign the data or environment signature to be authenticated, including the environment signature, to obtain signature information for the environment signature, and send the signature information to the blockchain network; the block node in the blockchain network can perform signature verification on the signature information, and if the signature verification is passed, it can determine that the environment signature is normal, and obtain the data or environment signature to be authenticated. In some embodiments, signature verification can be performed on the signature information based on the platform private key and the corresponding platform public key, for example, the trusted execution environment platform can adopt the platform private key to sign the data or environment signature to be authenticated, to obtain signature information for the environment signature, and send the data and signature information to be authenticated to the blockchain network; the block node in the blockchain network can adopt the platform public key corresponding to the platform private key to perform signature verification on the signature information, and if the signature verification is passed, it can determine that the environment signature is normal, and obtain the data or environment signature to be authenticated. In some embodiments, signature verification can be further performed on the signature information based on the environment public key of the trusted execution environment platform. For example, the trusted execution environment platform generates an environment public key based on the environment private key and the third public parameter, and the block node obtains the environment public key of the trusted execution environment platform and obtains the signature information and the third public parameter for the environment signature; and uses the environment public key, the signature information and the third public parameter to determine the signature to be authenticated, and if the signature to be authenticated matches the environment signature, determines that the environment signature is normal.For example, the trusted execution environment platform can obtain a third public parameter, the third public parameter can include a prime parameter q and a primitive root parameter, where the primitive root parameter can be a primitive root of the prime parameter q, and randomly select an environment private key based on the prime parameter, for example, randomly select a number from [1,q-1] as the environment private key, and generate an environment public key of the trusted execution environment platform based on the environment private key and the third public parameter. The trusted execution environment platform can perform a hash process on the data to be authenticated or the environment signature to obtain a signature hash, the signature hash can be a value that satisfies a hash range (for example, [0,q-1]) indicated by the prime parameter q, determine a random number based on the third public parameter, and generate a first signature based on the random number and the third public parameter; employ the environment private key, the signature hash, the first signature, and the third public parameter to generate a second signature, and the selective generation manner of the second signature can refer to formula (5).
[0047]
number
[0048] In some embodiments, the first signature and the second signature can be used to construct signature information for the environmental signature, and the data to be authenticated (or the environmental signature) and the signature information can be sent to the blockchain network. A block node in the blockchain network can perform a hash process on the data to be authenticated or the environmental signature to obtain a signature hash, and generate signature conversion data according to the third public parameter and the signature hash; can determine the signature to be authenticated according to the environment public key, the signature information, and the third public parameter; and if the signature to be authenticated is the same as the signature conversion data, the signature to be authenticated can be considered to match the environmental signature.
[0049] In step S302, an environment authentication event including an environment signature is triggered based on the authentication request.
[0050] Here, after initiating the authentication request, the oracle smart contract can trigger an environment authentication event after obtaining the authentication request, for example, the oracle smart contract analyzes the authentication request to obtain an environment signature included in the authentication request, and generates an environment authentication event including an environment signature of the trusted execution environment platform, and the environment authentication event can be used by the authentication service node to authenticate the credibility of the trusted execution environment platform based on the environment signature; or, after obtaining the authentication request, the oracle smart contract generates an environment authentication event including the authentication request, thereby causing the authentication service node to authenticate the credibility of the trusted execution environment platform based on the authentication request.
[0051] In practical application, the oracle smart contract can send an environmental authentication event to the oracle node, or the oracle node can periodically detect the environmental authentication event; when the oracle node obtains the environmental authentication event, it analyzes the environmental authentication event to obtain data to be authenticated including an environmental signature (the data to be authenticated may be obtained by encrypting the environmental signature) and target information for authenticating the credibility of the trusted execution environment platform, the target information may be an equipment identifier (e.g., a node identifier of the authentication service node) for authenticating the credibility of the trusted execution environment platform, and the oracle node sends the data to be authenticated including the environmental signature to the authentication service node based on the target information, and the authentication service node authenticates the credibility of the trusted execution environment platform based on the environmental signature included in the data to be authenticated and obtains authentication information.
[0052] In practical applications, when an oracle node detects an environmental authentication event, the environmental authentication event is used to obtain authentication information of the data to be authenticated from an authentication service node, and the authentication information of the data to be authenticated is included in the environmental authentication event.
[0053] In the present embodiment, in the process of executing the oracle smart contract, the block node determines an event name and a processing object for the authentication request according to the authentication request; the processing object is used to indicate an authentication service node that responds to the authentication request, that is, the processing object is used to indicate an equipment that can process the authentication request, and here refers to an authentication service node for responding to the authentication request. By triggering an environment authentication event according to the event name, the environment signature corresponding to the trusted execution environment platform, and the processing object, the oracle node determines an authentication service node according to the environment authentication event, and obtains authentication information of the data to be authenticated included in the environment authentication event from the authentication service node. For example, a block node can trigger an environmental authentication event including an environmental signature through an oracle smart contract; in practical application, the environmental authentication event can include data to be authenticated, and the data to be authenticated includes an environmental signature; an oracle node can detect an oracle smart contract in a blockchain network; and when an event is generated in the oracle smart contract, the oracle node can obtain the event generated in the oracle smart contract; for example, when an oracle node detects an environmental authentication event generated in an oracle smart contract in a blockchain network, the oracle node can analyze the environmental authentication event to obtain data to be authenticated and a processing object, where the processing object is used to indicate a device that can respond to an authentication request, here referring to an authentication service node; the oracle node can send the data to be authenticated to the authentication service node based on the processing object; the authentication service node can authenticate the data to be authenticated to obtain an authentication result of the data to be authenticated, and generate an authentication signature for the authentication result; the authentication service node can generate authentication information based on the authentication result and the authentication signature, and send the authentication information to the oracle node.
[0054] In step S303, obtain authentication information from the oracle node, and feed back the authentication information to the authentication smart contract.
[0055] Here, it can be seen that during the execution of the oracle smart contract, after the block node triggers an environment authentication event including the environment signature, the authentication information including the environment signature is stored in the oracle node, and further, the authentication information can be continuously obtained from the oracle node based on the oracle smart contract.
[0056] In the present embodiment, the oracle node can call the oracle smart contract and send authentication information to the oracle smart contract, and the block node can obtain the authentication information according to the oracle smart contract, call the authentication smart contract, and feed back the authentication information to the authentication smart contract, where the authentication smart contract can be called or detected by business equipment, a trusted execution environment platform, etc., to obtain authentication information for data to be authenticated from the block chain network.
[0057] In some embodiments, the authentication information includes an authentication result for the data to be authenticated and an authentication signature of the authentication service node for the authentication result, where the authentication result includes an authentication result for the environment signature used to indicate the credibility of the trusted execution environment platform, and the authentication signature is obtained by signing the authentication result. The block node can obtain an authentication public key of the authentication service node based on the authentication smart contract, and adopt the authentication public key to perform signature verification on the authentication signature. If the signature verification on the authentication signature is passed, generate a target authentication block based on the authentication result and the authentication signature, and add the target authentication block to the blockchain; if the signature verification on the authentication signature is unsuccessful, invoke an oracle smart contract and re-trigger the environment authentication event through the oracle smart contract, thereby causing the oracle node to obtain new authentication information for the re-triggered environment authentication event based on the re-triggered environment authentication event, that is, re-execute the above steps S301 to S303.or when the signature verification for the authentication signature fails, invoke an oracle smart contract according to the authentication smart contract, and generate a signature abnormality event according to the oracle smart contract, where the signature abnormality event can indicate a failure of signature verification for the authentication signature or an authentication signature abnormality; when the signature abnormality event is detected, the oracle node obtains the authentication information, and sends a signature abnormality message to the authentication service node according to the authentication information, where the signature abnormality message is used to indicate a failure of signature verification for the authentication signature or an authentication signature abnormality; the authentication service node can check the authentication information according to the signature abnormality message, and update the result indicated by the authentication information to obtain updated authentication information, where the updated authentication information is used to check the authentication information and then send a signature abnormality message to the authentication service node after checking the authentication information. For example, if it is determined by checking the authentication information that the signature verification of the authentication signature is indeed unsuccessful, the updated authentication information still indicates a failure of signature verification for the authentication signature, and sends the updated authentication information to the oracle node, thereby causing the oracle node to feed back the updated authentication information to the blockchain network. In actual application, the authentication service node can encrypt the updated authentication information and send the encrypted updated authentication information to the oracle node, thereby causing the oracle node to feed back the encrypted updated authentication information to the blockchain network. The block node can perform a decryption process on the encrypted updated authentication information to obtain the updated authentication information, thereby improving the security of data transmission.
[0058] In some embodiments, the block node can trigger an authentication on-chain event based on the authentication smart contract, the trusted execution environment platform can obtain the authentication information based on the authentication on-chain event, and the business device can obtain the authentication information based on the authentication on-chain event. Or, the trusted execution environment platform or the business device can obtain a target authentication block from the blockchain and obtain an authentication result from the target authentication block when necessary. For example, when the block node detects an authentication on-chain event by triggering an authentication on-chain event based on the authentication smart contract, the business device can obtain a target authentication block from the blockchain, and if the authentication result in the target authentication block is a passed authentication result, the business device can send business data to the target device via the trusted execution environment platform; or, when the block node detects an authentication on-chain event by triggering an authentication on-chain event based on the authentication smart contract, the trusted execution environment platform can obtain a target authentication block from the blockchain, and if the authentication result in the target authentication block is a passed authentication result, the business device can output the authentication result.
[0059] In some embodiments, refer to FIG. 4, which is a flowchart of another blockchain-based data discovery method according to an embodiment of the present application. As shown in FIG. 4, an oracle node is an execution entity, and the oracle node may be a computer device, and the blockchain-based data discovery process includes the following steps: In step S401, when an environmental authentication event triggered by an oracle smart contract is detected, authentication information for the data to be authenticated is obtained from an authentication service node.
[0060] Here, the authentication information of the data to be authenticated is included in the environment authentication event.
[0061] In the present embodiment, the oracle node can detect an event generated by an oracle smart contract, analyze the detected event to determine an event processing process for the event, and obtain an event processing result for the event according to the event processing process. Here, the event can refer to an environment authentication event, the oracle node detects an environment authentication event generated by an oracle smart contract, analyzes the environment authentication event to determine an event processing process for the event, and the event processing process is used to indicate that the authentication service node authenticates the data to be authenticated. In some embodiments, the oracle node transmits the data to be authenticated to the authentication service node, so that the authentication service node authenticates the data to be authenticated, obtains an authentication result of the data to be authenticated, and generates an authentication signature of the authentication result; the oracle node obtains authentication information from the authentication service node, the authentication information including the authentication result and the authentication signature, and reference can be made to the related description in step S302 in FIG. 3.
[0062] In step S402, the authentication information is sent to the oracle smart contract, causing the oracle smart contract to feed back the authentication information to the authentication smart contract.
[0063] In this embodiment, the oracle node sends authentication information to the oracle smart contract, which then feeds the authentication information back to the authentication smart contract, which can then put the authentication information on-chain.
[0064] Referring to Figure 5, Figure 5 is a schematic diagram of the interaction of blockchain-based data discovery according to an embodiment of the present application. As shown in Figure 5, the process may include the following steps: In step S501, the trusted execution environment platform sends the public key information of the trusted execution environment platform to the block node.
[0065] In the present embodiment, the trusted execution environment platform can send the public key information of the trusted execution environment platform to the blockchain network. Here, the public key information can include a platform public key of a trusted environment object in the trusted execution environment platform. In practical application, the public key information can further include a first communication parameter, and the first communication parameter and the blockchain network can be adopted to perform encrypted data transmission. For example, the first communication parameter can include the symmetric encryption private key, and the symmetric encryption private key can be used to realize the encrypted transmission of data, for example, the symmetric encryption private key can be adopted to encrypt the platform public key to obtain a public key ciphertext, and the public key ciphertext and the symmetric encryption private key can be sent to the blockchain network; or the first communication parameter can include a first public parameter, a second public parameter, and an environment public private key, and the first public parameter, the second public parameter, the environment public private key, and the symmetric encryption private key can be used to realize the encrypted transmission of data, for example, the first public parameter, the second public parameter, and the environment public private key can be adopted to encrypt the platform public key to obtain a public key ciphertext, and the public key ciphertext and the symmetric encryption private key can be sent to the blockchain network.
[0066] Here, the first public parameter may be a prime number, and the second public parameter may be a primitive root.
[0067] In step S502, the block node initiates a signature anomaly acquisition request to the trusted execution environment platform.
[0068] In the present embodiment, the block node can obtain the public key information sent from the trusted execution environment platform according to the authentication smart contract, and can call the oracle smart contract according to the authentication smart contract to initiate a signature anomaly acquisition request to the trusted execution environment platform, where the signature anomaly acquisition request may include the public key information sent from the trusted execution environment platform, and the signature anomaly acquisition request can request to obtain an environment signature associated with the platform private key of the trusted environment object that has a leakage risk. In the oracle smart contract, a signature anomaly acquisition event is triggered according to the signature anomaly acquisition request, thereby causing the oracle node to perform step S503.
[0069] In step S503, the oracle node detects a signature abnormal acquisition event triggered by a signature abnormal acquisition request.
[0070] In this embodiment, when detecting a signature abnormality acquisition event, the oracle node acquires signature abnormality information associated with the trusted execution environment platform from the authentication service node, and refers to step S504 and step S505.
[0071] In step S504, the oracle node transmits an acquisition request for signature anomaly information to the authentication service node.
[0072] In an embodiment of the present application, when a signature abnormal acquisition event is detected, the oracle node can analyze the signature abnormal acquisition event to obtain an abnormal event association parameter, which may include public key information, etc., and send an acquisition request for signature abnormality information to the authentication service node, where the acquisition request may include the abnormal event association parameter.
[0073] In step S505, the authentication service node returns the signature abnormality information to the oracle node.
[0074] In the present embodiment, after receiving an acquisition request for signature anomaly information sent from an oracle node, the authentication service node analyzes the acquisition request to acquire an abnormal event association parameter contained in the acquisition request, acquires signature anomaly information according to the abnormal event association parameter, and returns the signature anomaly information to the oracle node. In practical application, the authentication service node can acquire a platform public key in the abnormal event association parameter, and acquire signature anomaly information associated with the platform public key, and the signature anomaly information can be regarded as including Signature Revocation List (SigRL) information, and the SigRL list can be regarded as a signature list associated with a platform private key of a trusted environment object with a leakage risk.
[0075] In step S506, the oracle node invokes the oracle smart contract and returns the signature anomaly information to the block node.
[0076] In this embodiment, the oracle node can call the oracle smart contract and feed back signature anomaly information to the oracle smart contract. For example, the block node can obtain signature anomaly information from the oracle node according to the oracle smart contract to perform step S507.
[0077] In step S507, the block node invokes the authentication smart contract and feeds back the signature anomaly information.
[0078] In this embodiment, the block node can call the authentication smart contract and feedback the signature anomaly information to the authentication smart contract. In practical application, the block node can execute the authentication smart contract and trigger a signature anomaly feedback event according to the signature anomaly information to cause the trusted execution environment platform to execute step S508. When detecting the signature anomaly feedback event, the block node obtains the signature anomaly information and transmits the environment signature to the authentication smart contract according to the signature anomaly information. In practical application, the block node can obtain the second communication parameters in the authentication smart contract, adopt the second communication parameters to perform encryption processing on the signature anomaly information to obtain the abnormal signature ciphertext, and trigger a signature anomaly feedback event according to the abnormal signature ciphertext and the second communication parameters, where the second communication parameters can refer to the first communication parameters, and the symmetric encryption private key in the second communication parameters can be the same as or different from the symmetric encryption private key in the first communication parameters; or the first public parameters, the second public parameters, and the environment public private key in the second communication parameters can be the same as or different from the first public parameters, the second public parameters, and the environment public private key in the first communication parameters.
[0079] In step S508, when the trusted execution environment platform detects a signature anomaly feedback event triggered based on the signature anomaly information, it obtains the signature anomaly information.
[0080] In the present embodiment, when the trusted execution environment platform detects a signature anomaly feedback event, it can obtain signature anomaly information, and transmit an environment signature to the authentication smart contract based on the signature anomaly information. In practical application, the trusted execution environment platform can obtain the abnormal signature ciphertext and the second communication parameters, and perform a decryption process on the abnormal signature ciphertext based on the second communication parameters to obtain the signature anomaly information. In practical application, when the signature anomaly information is used to indicate that the trusted execution environment platform is a normal platform, it can execute steps S509 to S516 based on the signature anomaly information, invoke the oracle smart contract based on the authentication smart contract, and initiate an authentication request to the trusted execution environment platform. Here, it can obtain an abnormal trusted environment object corresponding to the signature anomaly information, and obtain a detection target environment object corresponding to the environment signature; if the detection target environment object does not belong to the abnormal trusted environment object, it is determined that the signature anomaly information is used to indicate that the trusted execution environment platform is a normal platform. Alternatively, the signature anomaly information can be detected based on the signature detection conditions provided by the authentication service node, and the detection result of the trusted execution environment platform can be determined based on the detection result, and the detection result can be used to indicate that the trusted execution environment platform is a normal platform or an abnormal platform.
[0081] In step S509, the trusted execution environment platform sends the data to be authenticated to the block node.
[0082] In this embodiment, the trusted execution environment platform can send data to be authenticated to the blockchain network, and the data to be authenticated can include an environment signature, etc., and reference can be made to the related description shown in step S301 in Figure 3.
[0083] In step S510, the block node initiates an authentication request based on the data to be authenticated.
[0084] In this embodiment, the block node can invoke the oracle smart contract based on the authentication smart contract to initiate an authentication request to the trusted execution environment platform, and the authentication request is used to request authentication of the trustworthiness of the trusted execution environment platform. See the related description shown in step S301 in FIG. 3.
[0085] In step S511, the oracle node detects an environmental authentication event triggered by an authentication request.
[0086] In this embodiment, the block node can trigger an environment authentication event including an environment signature in the oracle smart contract based on an authentication request. When the oracle node detects the environment authentication event, it can execute step S512 and refer to the related description shown in step S301 in FIG. 3.
[0087] In step S512, the oracle node starts authenticating the data to be authenticated.
[0088] In the present embodiment, the oracle node can initiate an authentication request to the authentication service node for the data to be authenticated based on an environmental authentication event.
[0089] In step S513, the authentication service node returns the authentication information to the oracle node.
[0090] In an embodiment of the present application, the authentication service node authenticates data to be authenticated in an environmental authentication event, obtains an authentication result for the data to be authenticated, signs the authentication result to obtain an authentication signature, constructs authentication information using the authentication result for the data to be authenticated and the authentication service node's authentication signature for the authentication result, and returns the authentication information to the oracle node.
[0091] In step S514, the oracle node invokes the oracle smart contract and returns the authentication information to the block node.
[0092] In this embodiment, the oracle node can call the oracle smart contract and return authentication information to the oracle smart contract, and can refer to the related description shown in step S302 in FIG. 3.
[0093] In step S515, the block node invokes the authentication smart contract and triggers an authentication on-chain event for the authentication information.
[0094] In this embodiment, the block node can use the oracle smart contract to call the authentication smart contract and feed back the authentication information to the authentication smart contract. Please refer to the related description in step S303 in FIG. 3.
[0095] In the present embodiment, the block node can perform signature verification on the authentication signature, and if the signature verification on the authentication signature is passed, the block node can generate a target authentication block based on the authentication result and the authentication signature, and add the target authentication block to the blockchain. In practical application, the block node can also use the authentication smart contract to trigger a block processing event, and generate a target authentication block based on the block processing event. In some embodiments, an authentication on-chain event can be triggered.
[0096] In practical applications, when the business device detects an authentication on-chain event, it can obtain the authentication result for the data to be authenticated from the blockchain. When the trusted execution environment platform detects an authentication on-chain event, it can obtain the authentication result for the data to be authenticated from the blockchain. In practical applications, the business device or the trusted execution environment platform can directly obtain the authentication result for the data to be authenticated from the blockchain as necessary. In practical applications, the trusted execution environment platform can output the authentication result.
[0097] In some embodiments, when a business device needs to use a trusted execution environment platform, it can access the trusted execution environment platform, obtain an authentication result for the trusted execution environment platform from the trusted execution environment platform, and access the trusted execution environment platform if the authentication result is a passed authentication result. In practical applications, when a business device needs to use a trusted execution environment platform, it can obtain an authentication result for the trusted execution environment platform from the blockchain, and access the trusted execution environment platform if the authentication result is a passed authentication result. In practical applications, a business device can obtain the validity of the authentication result, and if the authentication result is valid, access the trusted execution environment platform if the authentication result is a passed authentication result, and if the authentication result is invalid, perform the steps shown in FIG. 3 above to obtain the authentication result of the trusted execution environment platform. In practical applications, if the authentication result for the trusted execution environment platform has not been obtained, it can perform the steps shown in FIG. 3 above to obtain the authentication result of the trusted execution environment platform.
[0098] For example, assuming that business devices include a first business device and a second business device, the first business device and the second business device can obtain an authentication result of a trusted execution environment platform, and if the authentication result is a passed authentication result, the first business device can send business data to the trusted execution environment platform, and the second business device can send a data analysis model to the trusted execution environment platform, and the trusted execution environment platform can employ the data analysis model to perform a conversion process on the business data to obtain service conversion data, and send the service conversion data to the second business device.
[0099] In the present embodiment, the block node calls the oracle smart contract based on the authentication smart contract to initiate an authentication request to the trusted execution environment platform, the authentication request includes an environment signature corresponding to the trusted execution environment platform, and the oracle smart contract triggers an environment authentication event including an environment signature based on the authentication request, so that when the oracle node detects the environment authentication event, it obtains authentication information for the data to be authenticated included in the environment authentication event from the authentication service node, the data to be authenticated includes the environment signature, and based on the oracle smart contract, it obtains the authentication information from the oracle node and feeds back the authentication information to the authentication smart contract. Through the above process, the authentication of the trusted execution environment platform is realized, thereby ensuring the safety, reliability and credibility of the trusted execution environment platform, and ensuring the safety of data when the trusted execution environment platform is used subsequently. And based on the public transparency and non-tamperable characteristics of the blockchain, the smart contract is used to realize remote authentication of the trusted execution environment platform, and the authentication process can be traced back, etc., thereby improving the reliability of the authentication of the trusted execution environment platform, thereby improving the accuracy of the authentication of the trusted execution environment platform. At the same time, through the oracle smart contract and the oracle node, the communication between the blockchain network and the authentication service node can be directly connected, realizing real-time authentication, and further improving authentication efficiency and reducing maintenance costs.
[0100] In some embodiments, refer to FIG. 6, which is a schematic diagram of a blockchain-based data detection device according to an embodiment of the present application. The blockchain-based data detection device may be a computer program (including program code, etc.) executed on a computer device, for example, the blockchain-based data detection device may be an application software, and the device may be configured to perform corresponding steps in the method according to the embodiment of the present application. As shown in FIG. 6, the blockchain-based data detection device 600 may be used in a computer device in an embodiment corresponding to FIG. 3, for example, the device may include an authentication request initiation module 11, an authentication event generation module 12, and an authentication information feedback module 13.
[0101] The authentication request initiation module 11 is configured to call the oracle smart contract based on the authentication smart contract and initiate an authentication request to the trusted execution environment platform, where the authentication request includes an environment signature corresponding to the trusted execution environment platform; The authentication event generating module 12 is configured to trigger an environment authentication event including an environment signature based on the authentication request, and the environment authentication event is used to trigger an oracle node to obtain authentication information for data to be authenticated from an authentication service node, the data to be authenticated being included in the environment authentication event, and the data to be authenticated includes the environment signature; The credential feedback module 13 is configured to obtain the credential from the oracle node and feed back the credential to the authentication smart contract.
[0102] Here, the device 600 further comprises: A usage request module 14 configured to receive a usage request sent from a business device to a trusted execution environment platform, the usage request including a target credential of a trusted environment target in the trusted execution environment platform; a credential authentication module 15 configured to authenticate a target credential; an authentication trigger module 16 configured to execute a process of invoking an oracle smart contract based on the authentication smart contract and initiating an authentication request to a trusted execution environment platform if the target credential passes authentication; and a failure feedback module 17 configured to send a usage failure message to the business device if the target credential fails to be authenticated.
[0103] Here, the device 600 further comprises: a private key generation module 18 configured to obtain first and second public parameters, obtain block private parameters, and generate a block public private key based on the first public parameters, the second public parameters, and the block private parameters; A channel construction module 19 configured to obtain an environment public private key corresponding to a trusted execution environment platform, and construct a communication channel between the trusted execution environment platform and the channel construction module 19 based on the block public private key and the environment public private key, where the environment public private key is generated by the trusted execution environment platform based on the first public parameter, the second public parameter, and the environment private parameter; and a signature acquisition module 20 configured to acquire, via a communication channel, an environment signature corresponding to the trusted execution environment platform.
[0104] Here, the device 600 further comprises: A parameter acquisition module 21 configured to acquire an environment public key of a trusted execution environment platform, acquire signature information for an environment signature, and acquire a third public parameter, where the environment public key is generated according to an environment private key of the trusted execution environment platform and the third public parameter; and a signature generation module 22 configured to employ the environment public key, the signature information and a third public parameter to determine a signature to be authenticated, and which determines that the environment signature is correct if the signature to be authenticated matches the environment signature.
[0105] Here, the authentication event generating module 12: In the oracle smart contract, a data obtaining unit 121 is configured to determine, based on an authentication request, an event name and a processing object for the authentication request, where the processing object is used to indicate an authentication service node that responds to the authentication request; and an event trigger unit 122 configured to trigger an environment authentication event based on an event name, an environment signature corresponding to the trusted execution environment platform, and a processing target, thereby causing the oracle node to determine an authentication service node based on the environment authentication event, and to obtain authentication information of the data to be authenticated that is included in the environment authentication event from the authentication service node.
[0106] Here, the authentication information includes an authentication result for the data to be authenticated and an authentication signature of the authentication service node for the authentication result. A signature verification module 23 configured to obtain an authentication public key of the authentication service node based on the authentication smart contract, and perform signature verification on the authentication signature by adopting the authentication public key; a block on-chain module 24 configured to generate a target authentication block based on the authentication result and the authentication signature if the signature verification on the authentication signature is passed, and add the target authentication block to the blockchain; and a re-authentication module 25 configured to, if signature verification for the authentication signature fails, invoke the oracle smart contract and re-trigger the environment authentication event via the oracle smart contract, thereby causing the oracle node to obtain new authentication information for the re-triggered environment authentication event based on the re-triggered environment authentication event.
[0107] Here, the device 600 further comprises an on-chain event trigger module 26, The on-chain event trigger module 26 is configured to trigger an authentication on-chain event according to the authentication smart contract, so as to cause the business device to obtain a target authentication block from the blockchain when detecting the authentication on-chain event, and send business data to the target device through the trusted execution environment platform when the authentication result in the target authentication block is a passed authentication result; or The on-chain event trigger module 26 is configured to trigger an authentication on-chain event based on the authentication smart contract, so that when an authentication on-chain event is detected, the on-chain event trigger module 26 causes the trusted execution environment platform to obtain a target authentication block from the blockchain, and output the authentication result if the authentication result in the target authentication block is a passed authentication result.
[0108] Here, the device 600 further comprises: an anomaly request initiation module 27 configured to invoke the oracle smart contract based on the authentication smart contract and initiate a signature anomaly acquisition request to the trusted execution environment platform; and an anomaly event trigger module 28 configured to trigger a signature anomaly acquisition event based on a signature anomaly acquisition request, and to acquire signature anomaly information associated with the trusted execution environment platform from the authentication service node when the signature anomaly acquisition event is detected in the oracle node; The authentication trigger module 16 is further configured to execute a process of invoking an oracle smart contract based on the authentication smart contract and initiating an authentication request to the trusted execution environment platform based on the signature anomaly information when the signature anomaly information is used to indicate that the trusted execution environment platform is a normal platform.
[0109] Here, the device 600 further comprises: an anomaly feedback module 29 configured to obtain signature anomaly information from the oracle node according to the oracle smart contract, invoke the authentication smart contract, and feed back the signature anomaly information to the authentication smart contract; The trusted execution environment platform includes a feedback event trigger module 30 configured to trigger a signature anomaly feedback event based on the signature anomaly information, and when a signature anomaly feedback event is detected, to obtain the signature anomaly information and transmit an environment signature to the authentication smart contract based on the signature anomaly information.
[0110] Here, the device 600 further comprises: an object acquisition module 31 configured to acquire an abnormal reliable environmental object corresponding to the signature anomaly information, and acquire an environmental object to be detected corresponding to the environmental signature; The device further includes an object matching module 32 configured to determine that if the environmental object to be detected does not belong to the abnormal trusted environmental objects, the signature anomaly information is used to indicate that the trusted execution environment platform is a normal platform.
[0111] The present embodiment provides a blockchain-based data detection device, which can be executed in a block node, and calls an oracle smart contract based on an authentication smart contract to initiate an authentication request to a trusted execution environment platform, the authentication request includes an environment signature corresponding to the trusted execution environment platform, and the oracle smart contract triggers an environment authentication event including an environment signature based on the authentication request, so that when the oracle node detects the environment authentication event, it obtains authentication information for the data to be authenticated included in the environment authentication event from the authentication service node, the data to be authenticated includes the environment signature, and obtains the authentication information from the oracle node based on the oracle smart contract, and feeds back the authentication information to the authentication smart contract. Through the above process, the authentication of the trusted execution environment platform is realized, thereby ensuring the safety, reliability and credibility of the trusted execution environment platform, and ensuring the safety of data when the trusted execution environment platform is subsequently used. Based on the open transparency and non-tamperable characteristics of the blockchain, the smart contract is used to realize remote authentication of the trusted execution environment platform, and the authentication process can be traced back, thereby improving the reliability of the authentication of the trusted execution environment platform, thereby improving the authentication accuracy of the trusted execution environment platform. At the same time, the communication between the blockchain network and the authentication service node is directly connected through the oracle smart contract and the oracle node, realizing real-time authentication, further improving authentication efficiency and reducing maintenance costs.
[0112] In some embodiments, refer to FIG. 7, which is a schematic diagram of another blockchain-based data detection device according to an embodiment of the present application. The blockchain-based data detection device may be a computer program (including program code, etc.) executed on a block node, for example, the blockchain-based data detection device may be an application software, and the device may be configured to perform corresponding steps in the method according to the embodiment of the present application. As shown in FIG. 7, the blockchain-based data detection device 700 may be used in a computer device in an embodiment corresponding to FIG. 4, for example, the device may include an event detection module 41 and an information transmission module 42.
[0113] The event detection module 41 is configured to obtain authentication information of data to be authenticated included in the environment authentication event from the authentication service node when it detects an environment authentication event triggered by the oracle smart contract, where the data to be authenticated includes an environment signature corresponding to a trusted execution environment platform, the environment signature is included in an authentication request of the trusted execution environment platform, and the oracle smart contract is invoked by the authentication smart contract.
[0114] The information sending module 42 is configured to send the authentication information to the oracle smart contract via the oracle smart contract, thereby causing the oracle smart contract to feed the authentication information back to the authentication smart contract.
[0115] An embodiment of the present application provides a blockchain-based data detection device, which can be executed on an oracle node, and directly connects communication between a blockchain network and an authentication service node through an oracle smart contract and the oracle node, realizes real-time authentication, improves the authentication efficiency of a trusted execution environment platform, and further reduces maintenance costs.
[0116] Referring to FIG. 8, FIG. 8 is an exemplary structural diagram of a computer device according to an embodiment of the present application. As shown in FIG. 8, the computer device in the embodiment of the present application may include one or more processors 801, a memory 802, and an input / output interface 803. The processor 801, the memory 802, and the input / output interface 803 are connected by a bus 804. The memory 802 is configured to store a computer program, the computer program includes program instructions, the input / output interface 803 is configured to receive data and output data, for example, configured to perform data interaction between a block node and a trusted execution environment platform, or configured to perform data interaction between a block node and a business device, or configured to perform data interaction between a block node and an oracle node, and the processor 801 is configured to execute the program instructions stored in the memory 802.
[0117] Here, the processor 801 is deployed to block nodes, Invoking an oracle smart contract based on the authentication smart contract to initiate an authentication request to a trusted execution environment platform, the authentication request including an environment signature corresponding to the trusted execution environment platform; In the oracle smart contract, a step of triggering an environment authentication event including an environment signature based on an authentication request, and having an oracle node obtain authentication information for data to be authenticated, which is included in the environment authentication event, from an authentication service node when the oracle node detects the environment authentication event, the data to be authenticated including the environment signature; Based on the oracle smart contract, an operation can be performed that includes obtaining authentication information from the oracle node and feeding back the authentication information to the authentication smart contract.
[0118] Here, the processor 801 is deployed in an oracle node, When detecting an environment authentication event triggered by the oracle smart contract, obtaining authentication information of data to be authenticated included in the environment authentication event from the authentication service node, the data to be authenticated includes an environment signature corresponding to a trusted execution environment platform, the environment signature being provided by an authentication request to the trusted execution environment platform initiated from the oracle smart contract, the oracle smart contract being invoked by the authentication smart contract; sending the authentication information to an oracle smart contract, thereby causing the oracle smart contract to feed the authentication information back to the authentication smart contract.
[0119] In some possible embodiments, the processor 801 may be a central processing unit (CPU), which may also be other general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware devices, etc. A general purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.
[0120] The memory 802 may include read-only memory and random access memory, and provides instructions and data to the processor 801 and the input / output interface 803. A portion of the memory 802 may further include non-volatile random access memory. For example, the memory 802 may further store device type information.
[0121] In a specific implementation, the computer device can use each implemented functional module to execute an embodiment according to each step in FIG. 3 or FIG. 4, and specifically, reference can be made to the embodiment according to each step in FIG. 3 or FIG. 4, which will not be described repeatedly here.
[0122] The present embodiment provides a computer device including a processor, an input / output interface, and a memory, and the processor retrieves a computer program in the memory, and executes the steps of the method shown in FIG. 3 or FIG. 4 to perform a blockchain-based data detection operation. In the present embodiment, an oracle smart contract is invoked based on the authentication smart contract to initiate an authentication request to a trusted execution environment platform, the authentication request includes an environment signature corresponding to the trusted execution environment platform, and the oracle smart contract triggers an environment authentication event including the environment signature based on the authentication request, so that when the oracle node detects the environment authentication event, it obtains authentication information for the data to be authenticated included in the environment authentication event from the authentication service node, the data to be authenticated includes the environment signature, and the authentication information is obtained from the oracle node based on the oracle smart contract, and the authentication information is fed back to the authentication smart contract. Through the above process, the authentication of the trusted execution environment platform is realized, thereby ensuring the safety, reliability and credibility of the trusted execution environment platform, and ensuring the safety of data when the trusted execution environment platform is subsequently used. Based on the open transparency and non-tamperable characteristics of the blockchain, the smart contract is used to realize remote authentication of the trusted execution environment platform, and the authentication process can be traced back, thereby improving the reliability of the authentication of the trusted execution environment platform, thereby improving the authentication accuracy of the trusted execution environment platform. At the same time, the communication between the blockchain network and the authentication service node is directly connected through the oracle smart contract and the oracle node, realizing real-time authentication, further improving authentication efficiency and reducing maintenance costs.
[0123] The present embodiment further provides a computer-readable storage medium having a computer program stored therein, the computer program being loaded and executed by the processor to execute the blockchain-based data detection method according to each step in FIG. 3 or FIG. 4. Specifically, reference may be made to the embodiment according to each step in FIG. 3 or FIG. 4, and the description will not be repeated here. Furthermore, the beneficial effects of adopting the same method will not be repeated here. For technical details not disclosed in the embodiment of the computer-readable storage medium of the present application, please refer to the description of the embodiment of the method of the present application. As an example, the computer program may be deployed to be executed on one computer device, or may be deployed to be executed on multiple computer devices in the same location, or may be deployed to be executed on multiple computer devices distributed in multiple locations and interconnected by a communication network.
[0124] The computer-readable storage medium may be an internal storage unit of the blockchain-based data detection device or the computer device according to any of the above embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk mounted on the computer device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. In some embodiments, the computer-readable storage medium may further include both an internal storage unit and an external storage device of the computer device. The computer-readable storage medium is configured to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may further be configured to temporarily store data that has been output or is to be output.
[0125] The embodiment of the present application further provides a computer program product or computer program, including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, executes the computer instructions in the processor, and causes the computer device to execute the method according to the various selective manners in FIG. 3 or FIG. 4, thereby realizing the authentication of the trusted execution environment platform, thereby ensuring the safety, reliability and credibility of the trusted execution environment platform, and ensuring the safety of data when the trusted execution environment platform is used subsequently. And based on the open transparency and tamper-proof characteristics of the blockchain, a smart contract is used to realize remote authentication of the trusted execution environment platform, and the authentication process can be traced back, etc., thereby improving the reliability of the authentication of the trusted execution environment platform, thereby improving the accuracy of the authentication of the trusted execution environment platform. At the same time, the communication between the blockchain network and the authentication service node is directly connected through the oracle smart contract and the oracle node, realizing real-time authentication, further improving authentication efficiency and reducing maintenance costs.
[0126] The terms "first", "second" and "third" in the specification and claims of the present application and the accompanying drawings are not intended to limit a particular order but to distinguish between different objects. Also, "comprises" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or device that includes a series of steps or units is not limited to the recited steps or modules, and further illustratively includes unrecited steps or modules, or illustratively includes other step units inherent to the process, method, apparatus, product or device.
[0127] It is obvious to those skilled in the art that the units and algorithm steps of each embodiment described with reference to the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both, and in order to clearly describe the interchangeability of hardware and software, the description describes the configurations and steps of each example in general terms according to their functions. Whether these functions are implemented in the form of hardware or software depends on the specific application and design constraints of the technical solution. Professional engineers can use different methods to realize the described functions according to each specific application, but such realization should not be considered as exceeding the protection scope of the present application.
[0128] What has been disclosed above is merely the preferred embodiment of the present application, which cannot limit the scope of the claims of the present application, so that equivalent changes made according to the claims of the present application still fall within the scope of the present application.
Claims
1. 1. A blockchain-based data discovery method implemented by a computing device, comprising: Invoking an oracle smart contract based on an authentication smart contract to initiate an authentication request to a trusted execution environment platform, the authentication request including an environment signature of the trusted execution environment platform; triggering an environment authentication event including the environment signature based on the authentication request, the environment authentication event being used to trigger an oracle node to obtain authentication information for data to be authenticated from an authentication service node, the data to be authenticated being included in the environment authentication event, and the data to be authenticated including the environment signature; obtaining the authentication information from the oracle node and feeding back the authentication information to the authentication smart contract; A blockchain-based data discovery method, comprising:
2. Prior to initiating an authentication request to a trusted execution environment platform, the blockchain-based data discovery method includes: receiving a usage request to the trusted execution environment platform, the usage request being sent by a business device, the usage request including a subject credential of a trusted environment subject in the trusted execution environment platform; authenticating the target credential, and if the target credential passes authentication, executing a process of invoking the oracle smart contract and initiating an authentication request to a trusted execution environment platform; If the target credential fails to be authenticated, sending a usage failure message to the business device; Further comprising:
2. The blockchain-based data discovery method of claim 1.
3. Prior to initiating an authentication request to a trusted execution environment platform, the blockchain-based data discovery method includes: establishing a communication channel between said trusted execution environment platform; obtaining, via the communication channel, an environment signature corresponding to the trusted execution environment platform; Further comprising:
3. The blockchain-based data discovery method according to claim 1 or 2.
4. The step of establishing a communication channel between the trusted execution environment platform and the trusted execution environment platform comprises: obtaining first public parameters, second public parameters, and block private parameters; and generating a block public private key based on the first public parameters, the second public parameters, and the block private parameters; Obtaining an environment public-private key corresponding to the trusted execution environment platform, and establishing a communication channel with the trusted execution environment platform based on the block public-private key and the environment public-private key; the environment public private key is generated by the trusted execution environment platform based on the first public parameters, the second public parameters and an environment private parameter; The blockchain-based data discovery method of claim 3.
5. The blockchain-based data detection method includes: obtaining an environment public key of the trusted execution environment platform, signature information of the environment signature, and a third public parameter, the environment public key being generated based on an environment private key of the trusted execution environment platform and the third public parameter; employing the environment public key, the signature information and the third public parameter to determine a signature to be authenticated; matching the signature to be authenticated with the environmental signature, and determining that the environmental signature is valid if the signature to be authenticated matches the environmental signature; Further comprising:
3. A blockchain-based data discovery method according to claim 1 or 2.
6. Triggering an environment authentication event including the environment signature based on the authentication request includes: determining an event name and a processing object for the authentication request based on the authentication request, the processing object being used to indicate the authentication service node that will respond to the authentication request; triggering an environment authentication event based on the event name, the environment signature, and the processing target; The environment authentication event is used by the oracle node to determine the authentication service node and obtain authentication information of the data to be authenticated from the authentication service node, the authentication information being included in the environment authentication event.
3. A blockchain-based data discovery method according to claim 1 or 2.
7. The authentication information includes an authentication result for the data to be authenticated, and an authentication signature of the authentication service node for the authentication result, and the blockchain-based data detection method includes: Obtaining an authentication public key of the authentication service node according to the authentication smart contract, and performing signature verification on the authentication signature by employing the authentication public key; If the signature verification of the authentication signature is successful, generating a target authentication block corresponding to the authentication information based on the authentication result and the authentication signature, and adding the target authentication block to a blockchain; Further comprising:
3. A blockchain-based data discovery method according to claim 1 or 2.
8. The blockchain-based data detection method includes: If signature verification of the authentication signature fails, calling the oracle smart contract to re-trigger an environment authentication event; The re-triggered environmental authentication event is used by the oracle node to obtain new authentication information.
8. The blockchain-based data discovery method of claim 7.
9. The blockchain-based data detection method includes: Triggering an authentication on-chain event based on the authentication smart contract; The authentication on-chain event is used for a business device to obtain the target authentication block from the blockchain, and when the authentication result in the target authentication block is a passed authentication result, to send business data to a target device or output the authentication result through the trusted execution environment platform; 8. The blockchain-based data discovery method of claim 7.
10. The blockchain-based data detection method includes: Invoking the oracle smart contract to initiate a signature anomaly acquisition request to the trusted execution environment platform; Triggering a signature anomaly acquisition event based on the signature anomaly acquisition request, the signature anomaly acquisition event being used by the oracle node to acquire signature anomaly information associated with the trusted execution environment platform from the authentication service node; When the signature anomaly information indicates that the trusted execution environment platform is a normal platform, executing a process of invoking an oracle smart contract and initiating an authentication request to the trusted execution environment platform according to the signature anomaly information; Further comprising:
3. A blockchain-based data discovery method according to claim 1 or 2.
11. The blockchain-based data detection method includes: Obtaining the signature anomaly information from the oracle node according to the oracle smart contract; Invoking the authentication smart contract and triggering a signature anomaly feedback event based on the signature anomaly information, the signature anomaly feedback event being used by the trusted execution environment platform to obtain the signature anomaly information and to propagate the environment signature based on the signature anomaly information; 11. The blockchain-based data discovery method of claim 10.
12. The blockchain-based data detection method includes: obtaining an abnormal reliable environmental object corresponding to the signature abnormality information, and an environmental object to be detected corresponding to the environmental signature; determining that the signature anomaly information indicates that the trusted execution environment platform is a normal platform when the detected environmental object does not belong to the abnormal trusted environmental object; Further comprising:
11. The blockchain-based data discovery method of claim 10.
13. 1. A blockchain-based data discovery method implemented by a computing device, comprising: When detecting an environment authentication event triggered by an oracle smart contract, acquiring authentication information of data to be authenticated included in the environment authentication event from an authentication service node, the data to be authenticated includes an environment signature corresponding to a trusted execution environment platform, the environment signature is included in an authentication request to the trusted execution environment platform, and the oracle smart contract is invoked by an authentication smart contract; feeding back the authentication information to the authentication smart contract via the oracle smart contract; A blockchain-based data discovery method, comprising:
14. 1. A blockchain-based data detection device, comprising: an authentication request initiation module configured to invoke an oracle smart contract based on an authentication smart contract to initiate an authentication request to a trusted execution environment platform, the authentication request including an environment signature corresponding to the trusted execution environment platform; an authentication event generating module configured to trigger an environment authentication event including the environment signature based on the authentication request, the environment authentication event being used to trigger an oracle node to obtain authentication information of data to be authenticated from an authentication service node, the authentication information being included in the environment authentication event, and the data to be authenticated including the environment signature; a credential feedback module configured to obtain the credential from the oracle node and feed back the credential to the authentication smart contract; A blockchain-based data detection device comprising:
15. 1. A blockchain-based data detection device, comprising: an event detection module configured to, when detecting an environment authentication event triggered by an oracle smart contract, obtain authentication information of data to be authenticated that is included in the environment authentication event from an authentication service node, wherein the data to be authenticated includes an environment signature corresponding to a trusted execution environment platform, the environment signature is included in an authentication request to the trusted execution environment platform, and the oracle smart contract is invoked by an authentication smart contract; an information sending module configured to feed back the authentication information to the authentication smart contract via the oracle smart contract; A blockchain-based data detection device comprising:
16. A computing device comprising a processor, a memory and an input / output interface, A computer device, the processor being connected to the memory and the input / output interface respectively, the input / output interface being configured to receive data and output data, the memory being configured to store a computer program, and the processor invoking the computer program to cause the computer device to execute the blockchain-based data detection method of any one of claims 1 to 2.
17. A computer program product causing a computer to execute the blockchain-based data detection method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Data processing method, related device and computer readable storage medium
CN111460458A
System and method for loyalty points distribution
JP2020537229A
Self auditing blockchain
US20220173885A1