WO2019007396A1 - 基于智能合约进行加密交易的方法和装置以及区块链 - Google Patents

基于智能合约进行加密交易的方法和装置以及区块链 Download PDF

Info

Publication number
WO2019007396A1
WO2019007396A1 PCT/CN2018/094659 CN2018094659W WO2019007396A1 WO 2019007396 A1 WO2019007396 A1 WO 2019007396A1 CN 2018094659 W CN2018094659 W CN 2018094659W WO 2019007396 A1 WO2019007396 A1 WO 2019007396A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
smart contract
state
node
encrypted
Prior art date
Application number
PCT/CN2018/094659
Other languages
English (en)
French (fr)
Inventor
马环宇
吴小川
李雪峰
Original Assignee
众安信息技术服务有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 众安信息技术服务有限公司 filed Critical 众安信息技术服务有限公司
Publication of WO2019007396A1 publication Critical patent/WO2019007396A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6263Protecting personal data, e.g. for financial or medical purposes during internet communication, e.g. revealing personal data from cookies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Definitions

  • the invention relates to a data encryption method and a blockchain technology, in particular to a method, a device and a blockchain for performing an encrypted transaction based on a smart contract.
  • the blockchain in the broad sense is a new distributed infrastructure and computational paradigm that uses blockchain data structures to validate and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography. Guarantee the security of data transmission and access. Blockchain technology collectively maintains a reliable database through decentralization and trustworthiness to solve transaction trust and security issues.
  • Blockchain technology is not a single technology, but the result of the integration of multiple technologies. These technologies are combined with new structures to form a new way of recording, storing and expressing data, mainly involving distributed Accounting, asymmetric encryption and authorization technologies, and consensus mechanisms.
  • Distributed ledgers refer to the fact that transaction accounting is done by multiple nodes distributed in different places, and each node records the complete accounts, so they can all participate in supervising the legality of transactions, and can also jointly testify for them. Unlike traditional centralized accounting schemes, no single node can record accounts separately, thus avoiding the possibility of a single biller being controlled or being bribed to account for false accounts. On the other hand, since there are enough billing nodes, in theory, unless all the nodes are destroyed, the accounts will not be lost, thus ensuring the security of the account data.
  • Asymmetric encryption and authorization technology means that transaction information stored on the blockchain is public, but the account identity information is highly encrypted and can only be accessed if authorized by the data owner, thus ensuring data security and Personal privacy.
  • the consensus mechanism refers to how to reach a consensus among all accounting nodes to determine the validity of a record. This is both a means of identification and a means of preventing tampering.
  • blockchains can use smart contracts consisting of automated script code to program and trade data. Smart contracts are based on trusted, non-tamperable data that can be automated to execute pre-defined rules and terms.
  • a method for performing an encrypted transaction based on a smart contract which can ensure that all participating nodes reach a consensus on the change of the smart contract state, and encrypt the smart contract data to Meet the requirements for protecting private data.
  • the present invention provides a method of encrypting a transaction based on a smart contract, comprising: a first node on a blockchain executing a transaction based on a smart contract, wherein the smart contract is in a state prior to executing the first transaction a first state, the state of the smart contract after performing the first transaction is a second state; the first node changes a state of the smart contract after performing the first transaction and the first Transmitting a transaction to other related nodes that follow the smart contract; the first node receives a first signature returned by each of the related nodes; wherein the first signature is used to characterize that the related node has verified the smart contract State change; the first node sends a state change of the smart contract after performing the first transaction and the signature to other nodes on the blockchain.
  • the method for realizing intelligent contract data encryption divides all nodes participating in the consensus into related nodes related to the smart contract and other non-related nodes unrelated to the smart contract, and only verifies within the range of each relevant node. Whether the change of the status of the smart contract conforms to the corresponding transaction, so that the opinion of the change of the state of the smart contract is first expressed in the scope of each relevant node. This opinion has a veto power to prevent the majority from premeditating to jointly damage the interests of the minority.
  • the smart contract status generally refers to a hash value of the smart contract.
  • the method for performing an encrypted transaction based on a smart contract further includes: receiving, by the first node, a state change of a smart contract sent by a second node on the blockchain and performing a second based on the smart contract At the time of transaction, verifying a state change of the smart contract after performing the second transaction, wherein the state of the smart contract before executing the second transaction is a third state, and the state after executing the second transaction a fourth state; the first node returns a second signature to the second node for characterizing that the second node has verified a state change of the smart contract.
  • the method for performing an encrypted transaction based on a smart contract further includes: the first node placing a change of a state of the smart contract from the third state to the fourth state into the blockchain In the trading pool.
  • the method for performing an encrypted transaction based on a smart contract further includes: the first node placing the transaction into a transaction pool in the blockchain.
  • the second transaction is an encrypted private transaction
  • the verifying the state change of the smart contract after performing the second transaction comprises: the first node decrypting the privacy transaction to obtain Determining a second transaction; the first node performing the privacy transaction based on the smart contract and the second transaction; and the first node verifying a status of the smart contract after performing the privacy transaction from the The third state changes to the fourth state.
  • the first transaction is an encrypted private transaction
  • the first node executing the first transaction based on the smart contract comprises: the first node decrypting the encrypted private transaction to obtain the first transaction Transaction; and the first node executes the first transaction based on the smart contract.
  • the method for performing an encrypted transaction based on a smart contract wherein the smart contract is a smart contract whose content is encrypted; wherein the first node executes the first transaction based on the smart contract: the first node Decrypting the smart contract with the content encrypted; the first node executing the first transaction based on the decrypted smart contract; and the smart node after the first node passes the first transaction Encrypt.
  • the content of the smart contract is encrypted.
  • Each node that follows a smart contract needs to have a key to encrypt or decrypt the smart contract.
  • the first transaction is a privacy transaction
  • the first node performing the first transaction based on the decrypted smart contract comprises: the first node decrypting the encrypted private transaction, acquiring the a privacy transaction; the first node performs the privacy transaction based on the decrypted smart contract; and the first node encrypts the content after the decrypted private transaction.
  • the state of the smart contract is represented by an application performing a hash operation calculation hash value; wherein the smart contract performs a hash of the first state before the first transaction is a first hash a value, the hash value of the second state after the smart contract executes the first transaction is a second hash value.
  • an embodiment of the present invention provides a blockchain including a plurality of nodes, the node performing a method of performing an encrypted transaction based on a smart contract as described above.
  • the blockchain can ensure that all participating nodes reach a consensus on the change of the smart contract status, and encrypt the smart contract data to meet the requirements of protecting the privacy data.
  • the blockchain of the present invention by adopting the above-mentioned method for encrypting transactions based on smart contracts, can also ensure that all participating nodes reach a consensus on the change of the smart contract state, and simultaneously perform smart contract data. Encryption to meet the requirements for protecting private data.
  • the principle of the above method has been described in detail, and will not be described herein.
  • the block chain provided by the other side of the present invention also has the above advantages and advantageous effects.
  • an embodiment of the present invention provides an apparatus for performing an encrypted transaction based on a smart contract, including:
  • An execution module configured to perform a corresponding operation according to the smart contract, wherein the state of the smart contract before performing the operation is a first state, and the state of the smart contract after performing the operation is a second state;
  • a sending module configured to send a status change of the smart contract after performing the transaction and content of the operation to each blockchain related node that follows the smart contract;
  • the sending module is further configured to send a signature of each of the blockchain related nodes to all other nodes of the blockchain on the blockchain, wherein the signature is verified by the blockchain related node. Returns when the state of the smart contract changes.
  • the sending module is further configured to verify, according to the state change of the smart contract, that the state of the smart contract after performing the transaction is changed from the first state to the second state, and returning the verification through verification signature.
  • the sending module is further configured to verify that all the blockchain related nodes provide the signature according to the signature of the blockchain related node, and return verification pass information.
  • the sending module is further configured to: put the state of the smart contract from the first state to the second state according to the verification pass information of all nodes of all blockchains on the blockchain Enter the transaction pool of the blockchain.
  • the sending module is further configured to package the transaction in the transaction pool as a block.
  • the apparatus for performing an encrypted transaction based on a smart contract further includes:
  • the first encryption module is configured to encrypt the information data of the transaction.
  • the apparatus for performing an encrypted transaction based on a smart contract further includes:
  • a second encryption module configured to encrypt a random value of the information data of the smart contract by using a signature technology, and send the encrypted random value and the information data of the smart contract to the sending module.
  • the random value is a hash value
  • the device for performing an encrypted transaction based on the smart contract further includes:
  • the hash value calculation means is configured to acquire the target file data, and generate a hash value corresponding to the target file data by a hash algorithm.
  • the transaction is a privacy transaction encrypted by the first encryption module
  • the sending module is further configured to:
  • Verifying that the state of the smart contract after performing the privacy transaction changes from the first state to the second state.
  • the smart contract is a smart contract whose content is encrypted by the second encryption module, wherein the sending module is further configured to:
  • the content of the smart contract after the transaction is encrypted by using the second encryption module.
  • the transaction is a privacy transaction encrypted by the first encryption module
  • the sending module is further configured to:
  • the decrypted content of the privacy transaction is encrypted by the first encryption module.
  • the transaction is a private transaction encrypted by the first encryption module, and the sending module is further configured to: decrypt the private transaction, and acquire the transaction content;
  • the decrypted content of the privacy transaction is encrypted by the first encryption module.
  • an embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executed by the processor, wherein the processor executes
  • the computer program implements the steps of the method of encrypting transactions based on smart contracts as described above.
  • an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the foregoing smart contract-based implementation.
  • the steps of the method of encrypting a transaction are not limited to a processor, a processor, or a processor, or a processor, or a processor.
  • FIG. 1 is a schematic flowchart diagram of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart diagram of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart diagram of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for performing an encrypted transaction based on a smart contract according to the present invention, which is displayed from a user perspective according to an embodiment of the present invention.
  • Figure 6 is a schematic diagram of a smart contract before performing pre-transaction encryption.
  • Figure 7 is a schematic diagram of a smart contract after encryption is performed.
  • Figure 8 is a schematic diagram of the smart contract before encryption after execution of the transaction.
  • Figure 9 is a schematic diagram of a smart contract after encryption is performed.
  • FIG. 10 is a schematic structural diagram of an apparatus for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an apparatus for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of an apparatus for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of an apparatus for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention. As shown in FIG. 1 , an embodiment of the present invention provides a method for performing an encrypted transaction based on a smart contract, including the following. content:
  • Step 101 The first node on the blockchain executes the first transaction based on the smart contract, wherein the state of the smart contract before the execution of the first transaction is the first state, and the state of the smart contract after the execution of the first transaction is the second state ;
  • the first transaction is an encrypted private transaction, which is temporarily decrypted only when the execution needs to be invoked, and follows the smart contract. All nodes that need to perform this private transaction hold a key that encrypts or decrypts the private transaction. Therefore, in step 101, in the process of performing a privacy transaction based on the smart contract, the encrypted private transaction is first decrypted using the key to obtain the transaction content; and then the corresponding transaction is executed according to the transaction content based on the smart contract.
  • an embodiment of the present invention encrypts the content of the smart contract, and all relevant nodes following the smart contract need to have a key for encrypting or decrypting the smart contract. Therefore, In step 101, in the process of executing a transaction based on the smart contract, it is first necessary to decrypt the content through the encrypted smart contract using the key, and then execute the corresponding transaction based on the smart contract.
  • step 101 the process of executing the transaction based on the smart contract may specifically include content:
  • the node in the blockchain that performs this step ends the step of executing the transaction based on the smart contract, and the state of the smart contract changes from the first state to the second state.
  • Step 102 The first node sends the state change of the smart contract after executing the first transaction and the first transaction to other related nodes that follow the smart contract.
  • Step 103 The first node receives a first signature returned by each related node, where the first signature is used to represent a state change of the related node verified smart contract.
  • Step 104 The first node sends the state change and the first signature of the smart contract after executing the first transaction to other nodes on the blockchain.
  • step 104 when executing a transaction based on a smart contract, all participating nodes in the blockchain need to reach a consensus, so in step 104, when the first node sends the smart contract after the first transaction, the state change and the first signature are sent. When giving other nodes on the blockchain, the other nodes will inevitably verify the state change of the first signature and the smart contract after executing the first transaction, and return the verified information to the first node.
  • the method for encrypting transactions based on the smart contract provided by the embodiment of the present invention only needs to verify the change process of the smart contract and the transaction content to be verified by the relevant nodes of the smart contract, and the other nodes in the smart contract verify whether all relevant nodes are average.
  • the verification is passed, which not only ensures that all the participating nodes in the smart contract reach a consensus on the state change of the smart contract, because the other nodes do not directly participate in the verification of the state change for the smart contract, and thus the original data of the smart contract and the transaction cannot be obtained.
  • This enables encryption of smart contracts to protect the requirements for data privacy.
  • the first node receives the first signature returned by each relevant point, where the first signature is used to represent the state change of the verified smart contract of the relevant node, which means that the method for encrypting the transaction based on the smart contract needs
  • the related node verifies the state change of the smart contract sent by the first node before and after the execution of the first transaction. Therefore, in an embodiment of the present invention, the method for performing the encrypted transaction based on the smart contract as shown in FIG. 2 further includes:
  • the first node verifies the state change of the smart contract after executing the second transaction when receiving the state change of the smart contract sent by the second node on the blockchain and executing the second transaction based on the smart contract, wherein the smart contract is in execution
  • the state before the second transaction is the third state, and the state after the execution of the second transaction is the fourth state;
  • the first node returns to the second node a second signature characterizing a state change of the first node verified smart contract.
  • the first node is the relevant node of the second transaction of the smart contract
  • the second node is the transaction originator node of the second transaction of the smart contract
  • the second signature is the signature of the verified pass.
  • the relevant node verifies the state change of the smart contract before and after the execution of the transaction, the verified signature is returned to the transaction party node, wherein the signature may be the name of the user of the relevant node, the company name, or the word “pass”,
  • the identification number, the picture, and the like are not limited in the present invention.
  • other manners such as a cross mark identification, a "fail” word, etc., and by verifying different description manners may be used, which is not limited by the present invention. .
  • an encrypted transaction is performed based on the smart contract.
  • the method further includes: when receiving the verification pass information returned by all other nodes on the blockchain, placing the change of the state of the smart contract from the first state to the second state into the transaction pool of the blockchain, further This includes packaging transactions in the trading pool as blocks.
  • FIG. 3 is a schematic flowchart diagram of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • the blockchain node involved in the method for trading based on the smart contract includes: a transaction initiator node, a related node following the smart contract, and other non-related nodes not directly related to the smart contract, based on
  • a smart contract for a cryptographic transaction includes the following steps:
  • the transaction originator node on the blockchain performs a transaction on the smart contract locally, the state of the smart contract before executing the transaction is S1, and the state of the smart contract after executing the transaction is S2;
  • the transaction initiator node sends the change of the state of the smart contract from S1 to S2 and the transaction content to the relevant nodes of the blockchain that follow the smart contract;
  • Each of the relevant nodes respectively verifies whether the state of the smart contract changes from S1 to S2 after executing the transaction, and if so, the relevant node returns a signature indicating the verification by the relevant node to the transaction initiator node;
  • the transaction is an encrypted private transaction, which is temporarily decrypted only when the execution needs to be invoked, and all the requirements of the smart contract are executed.
  • the nodes of this private transaction hold the key for encrypting or decrypting the private transaction, so when the transaction is a private transaction, in step (1), the transaction initiator node first decrypts the encrypted private transaction to obtain the transaction content. Then perform a privacy transaction based on the smart contract.
  • the transaction originator node sends the changes in the status of the smart contract from S1 to S2 and the encrypted private transaction to the respective nodes following the smart contract on the blockchain.
  • each of the relevant nodes respectively verifies whether the state of the smart contract changes from S1 to S2 after performing the privacy transaction may include: the relevant node decrypts the encrypted private transaction; the relevant node performs a private transaction on the smart contract The relevant node determines whether the state of the smart contract changes from S1 to S2 after performing the privacy transaction.
  • the encrypted transaction is performed based on the smart contract, and further includes the step (5): all nodes check whether all relevant nodes provide the signature, and if so, put the state of the smart contract from S1 to S2.
  • the trading pool of the blockchain if not, refuses to put the state of the smart contract from S1 to S2 into the trading pool of the blockchain.
  • the method of encrypting transactions based on smart contracts may further comprise the step (6): the transactions in the transaction pool are packaged as blocks.
  • the smart contract is a smart contract in which the content is encrypted.
  • FIG. 4 is a schematic flowchart diagram of a method for performing an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • an encryption transaction based on a smart contract provided by the embodiment implements the following steps on a blockchain:
  • Step (1) The transaction originator node on the blockchain performs a transaction on the smart contract locally, the state of the smart contract before executing the transaction is S1, and the state of the smart contract after executing the transaction is S2. Among them, the transaction is an encrypted private transaction Enc (Tx).
  • a smart contract is a smart contract with encrypted content.
  • the smart contract Before executing the transaction: the smart contract is shown in Figure 7. In this embodiment, it is a smart contract encrypted by the function Enckey(), and its hash value is the smart contract state S1;
  • the transaction initiator node first decrypts the smart contract as shown in FIG. 7 to obtain the decrypted smart contract as shown in FIG. 6, and then performs the private transaction Tx on the smart contract locally.
  • the smart contract after the execution of the transaction is shown in Figure 8, where the value of X is changed from 10 before the execution of the transaction to 20 after the execution of the transaction.
  • the privacy transaction Tx and the smart contract are encrypted again: the smart contract of FIG. 8 is encrypted by the function Enckey(), and the encrypted smart contract is as shown in FIG. 9, and the hash value is the smart contract state S2.
  • Step (2) The transaction initiator node sends the change of the state of the smart contract from S1 to S2 [S1 ⁇ S2] and the encrypted private transaction Enc(Tx) to each relevant node related to the smart contract on the blockchain. .
  • the steps for the node to verify whether the smart contract changes its state from S1 to S2 after performing the privacy transaction respectively include:
  • Enckey() is used to encrypt the smart contract at this time, and calculate the hash value S2' of the smart contract at this time;
  • Step (4) When the transaction initiator node collects the signatures of all relevant nodes, the transaction initiator sends the change of the state of the smart contract from S1 to S2 [S1 ⁇ S2] and the signature of each relevant node to the blockchain. All nodes.
  • Step (5) All nodes check whether all relevant nodes provide the signature, and if so, put the change of the status of the smart contract from S1 to S2 into the transaction pool of the blockchain, and if not, reject the smart contract. The state changes from S1 to S2 into the trading pool of the blockchain.
  • Step (6) The transaction initiator node packages the transactions in the transaction pool into blocks.
  • FIG. 5 is a schematic diagram showing a flow of an encrypted transaction based on a smart contract according to an embodiment of the present invention.
  • step (2), step (3), and step (4) are as follows:
  • Step (2) User A sends the change of the state of the smart contract from S1 to S2 [S1 ⁇ S2] and the encrypted private transaction Enc(Tx) to the smart contract-compliant block on the blockchain through the transaction initiator node.
  • Step (3) Each of the relevant nodes respectively verifies whether the state of the smart contract changes from S1 to S2 after executing the transaction, and if so, the relevant node returns a signature characterizing the verification by the relevant node to the transaction originator node.
  • Step (4) When the transaction initiator node collects the signatures of all relevant nodes, the transaction initiator node transmits the state of the smart contract from S1 to S2 [S1 ⁇ S2] and the signature of each relevant node is broadcasted through the entire network.
  • S1 to S2 [S1 ⁇ S2] the state of the smart contract from S1 to S2 [S1 ⁇ S2]
  • the signature of each relevant node is broadcasted through the entire network.
  • Each of the related nodes V0 to V2 related to the smart contract on the blockchain and other non-correlated nodes V3 to Vn unrelated to the smart contract are given.
  • an embodiment of the present invention provides a blockchain including a plurality of nodes, wherein the node performs a method of performing an encrypted transaction based on a smart contract as described in the preamble.
  • FIG. 10 provides an apparatus for performing encrypted transactions based on a smart contract. As shown in FIG. 10, the apparatus includes:
  • Executing module 1 configured to execute a corresponding transaction according to the smart contract, wherein the state of the smart contract before executing the transaction is a first state, and the state of the smart contract after performing the transaction is a second state;
  • the sending module 2 is configured to send the status change of the smart contract and the content of the transaction to other blockchain related nodes that follow the smart contract;
  • the sending module 2 is further configured to send the signatures of the relevant nodes of the blockchain to all the nodes of the blockchain on the blockchain, wherein the signature is returned by the relevant node of the blockchain when the state of the verified smart contract changes.
  • An apparatus for performing encrypted transactions based on a smart contract includes an execution module and a blockchain node, wherein the blockchain node is a transaction node, and the smart contract is executed before and after the transaction is executed based on the smart contract.
  • the state change is directly verified by the other relevant nodes of the blockchain related to the smart contract whether the smart link state changes before and after the execution of the transaction by the blockchain node conform to the corresponding transaction, and other nodes of the blockchain not related to the smart contract are Instead of directly participating in the verification, it is verified whether the relevant nodes all verify the state change through the smart contract, trust the verification result of the relevant node, and the original data of the smart contract and the transaction cannot be obtained because the other nodes are not directly involved in verifying the state change of the smart contract.
  • This embodies the secrecy of smart contracts and transactions to other nodes, further protecting data privacy.
  • the sending module 2 in the device assumes different nodes when performing different transactions based on different smart contracts in the blockchain, for example, may cause a smart contract to be in a pre- and post-transaction state.
  • the initiating node of the change can also be used as a related node to directly verify the change of state of another smart contract before and after another transaction, or as an indirectly related other node that indirectly verifies the state change of the third smart contract before and after the third transaction.
  • the sending module 2 is further configured as a related node, configured to verify, according to the state change of the smart contract, that the state of the smart contract after the transaction is executed changes from the first state to the second state, and returns a signature that is verified by the verification. .
  • the sending module 2 can also be used as another node for verifying that all relevant nodes provide signatures according to the signature of the relevant nodes of the blockchain, and returning the verification pass information.
  • the sending module 2 can also be used as an initiating node that causes the smart contract to change state before and after the transaction, and is used to verify the status of the smart contract according to the verification information of other nodes in all the blockchains on the blockchain.
  • the change from the first state to the second state is placed in the transaction pool of the blockchain.
  • an apparatus for performing encrypted transactions based on a smart contract further includes: a first encryption module 3 for encrypting information data of the transaction.
  • the transaction is a private transaction, and then the sending module 2 is also used to: when causing the smart contract to change the state of the state before and after the transaction;
  • the state of the smart contract after the execution of the privacy transaction is changed from the first state to the second state.
  • an apparatus for performing an encrypted transaction based on a smart contract further includes: a second encryption module 4, configured to encrypt a random value of information data of the smart contract by using a signature technology And sending the encrypted random value and the information data of the smart contract to the blockchain node.
  • the smart contract is also a smart contract in which the content is encrypted, and the sending module 2 is also used to: decrypt the smart contract whose content is encrypted, as the originating node that causes the smart contract to change state before and after the transaction; execute based on the smart contract Transaction; and encrypting the smart contract after the transaction.
  • the sending module 2 is further configured to: decrypt the private transaction, obtain the content of the private transaction; execute the private transaction based on the smart contract and the transaction content; and adopt the first encryption
  • the module encrypts the decrypted private transaction.
  • the random value in the manner in which the second encryption module 4 encrypts the smart contract is a hash value; at this time, the device for performing the encrypted transaction based on the smart contract further includes: the hash value computing device 5 As shown in FIG. 13, the hash value calculation device 5 is configured to acquire target file data, and generate a hash value corresponding to the target file data by a hash algorithm. In an embodiment of the present invention, the hash value calculation device 5 Encrypted smart contracts with Enckey().
  • the smart contract when the transaction is a private transaction encrypted by the first encryption module 3, the smart contract is a smart contract that encrypts the content of the smart contract through the second encryption module 4, wherein the state of the smart contract changes to a hash.
  • the value indicates that the hash value of the first state is the first hash value, and the hash value of the second state is the second hash value.
  • the sending module 2 is used as a related node, and is also used to: determine the smart contract.
  • the state is the first state; decrypting the private transaction, obtaining the transaction content; decrypting the encrypted smart contract; performing the privacy transaction based on the smart contract and the transaction content; encrypting the content of the smart contract after the transaction, calculating the smart contract at this time
  • a hash value, this hash value is recorded as a third hash value; the third hash value is verified to be consistent with the second hash value, and the verification pass information is returned.
  • the sending module 2 when used as a relevant node to verify the state change of the smart contract before and after the transaction, the first state of the smart contract before the transaction, the second state after the transaction, and the third generated during the verification process
  • the state is calculated by the function Enckey(), where the hash value of the first state is S1, the hash value of the second state is S2, and the hash value of the third state is S2', the block chain node
  • the blockchain related node verifies the state change of the smart contract before and after the transaction, the following are made:
  • Enckey() is used to encrypt the smart contract at this time, and calculate the hash value S2' of the smart contract at this time;
  • module may be software and/or software hardware that implements a predetermined function.
  • the modules described in the embodiments are preferably implemented in software, hardware or a combination of hardware and software is also possible and conceivable.
  • a plurality of unit modules of the apparatus are mentioned in the foregoing description, but such division is not mandatory, and according to a specific embodiment, the features and functions of the two or more units described above may be in one The features and functions of a unit described above may be further divided into a plurality of units, which is not limited by the present invention.
  • An embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executed by the processor, wherein the processor executes the computer program, such as The aforementioned steps of the method for encrypting transactions based on smart contracts.
  • An embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the steps of a method for performing an encrypted transaction based on a smart contract as described above. .

Abstract

本发明实施例公开了一种基于智能合约进行加密交易的方法,包括基于智能合约执行交易,其中智能合约在执行交易之前、之后的状态分别为第一状态、第二状态;各相关节点对智能合约的状态从第一状态到第二状态的变化进行验证,验证通过返回签名;其他节点将验证各相关节点的签名,验证通过,返回验证通过信息。本发明实施例将参与共识的所有节点分为与智能合约相关的相关节点和与智能合约无关的其他非相关节点,仅在各相关节点范围内验证智能合约状态的变更是否符合相应的交易,而其他非相关节通过检查各相关节点的签名来间接验证智能合约状态的变更是否符合相应的交易,不仅在所有节点范围内对智能合约状态的变更达成共识,而且保护隐私数据。

Description

基于智能合约进行加密交易的方法和装置以及区块链
本申请要求2017年07月07日提交的申请号为No.201710551033.9的中国申请的优先权,通过引用将其全部内容并入本文。
技术领域
本发明涉及一种数据加密方法和区块链技术,具体涉及一种基于智能合约进行加密交易的方法、装置以及区块链。
发明背景
广义上的区块链是一种全新的分布式基础架构与计算范式,其利用块链式数据结构来验证与存储数据,利用分布式节点共识算法来生成和更新数据,并且利用密码学的方式保证数据传输和访问的安全的。区块链技术通过去中心化、去信任的方式集体维护一个可靠数据库,解决交易的信任和安全问题。
区块链技术并不是一种单一的技术,而是多种技术整合的结果,这些技术以新的结构组合在一起,形成了一种新的数据记录、存储和表达的方式,主要涉及分布式账本、非对称加密和授权技术、共识机制等技术。
分布式账本是指交易记账由分布在不同地方的多个节点共同完成,而且每一个节点都记录的是完整的账目,因此它们都可以参与监督交易合法性,同时也可以共同为其作证。不同于传统的中心化记账方案,没有任何一个节点可以单独记录账目,从而避免了单一记账人被控制或者被贿赂而记假账的可能性。另一方面,由于记账节点足够多,理论上讲除非所有的节点被破坏,否则账目就不会丢失,从而保证了账目数据的安全性。
非对称加密和授权技术是指存储在区块链上的交易信息是公开的,但是账户身份信息是高度加密的,只有在数据拥有者授权的情况下才能访问到,从而保证了数据的安全和个人的隐私。
共识机制是指所有记账节点之间如何达成共识,去认定一个记录的有效性,这既是认定的手段,也是防止篡改的手段。
此外,区块链还可以利用由自动化脚本代码组成的智能合约来编程和交易数据。智能合约是基于可信的不可篡改的数据,可以自动化地执行一些预先定义好的规则和条款。
隐私性一直是区块链领域一个重要的话题。区块链作为一门新兴的技术,必要的隐私保护是推广的关键。绝大部分的应用场景,比如交易,都需要有弹性的隐私保护。如何更好地在区块链中加入隐私的元素一直是被不断探索的问题。
在当前的区块链系统中,所有参与共识的节点必须拥有交易和智能合约的真实数据,才能完成计算,并对状态达成共识。然而在实际应用当中,企业所发出的交易随时可能会包含了对其自身而言重要的商业机密,所以如果交易的隐私得不到应有的保护,区块链的实用性将大打折扣。因此,需要提出一种方法,其能保证所有参与共识的节点对智能合约状态的变更达成共识,同时对智能合约数据进行加密,以达到保护隐私数据的要求。
发明内容
针对上述问题,根据本发明的一方面,提供一种基于智能合约进行加密交易的方法,该方法能保证所有参与共识的节点对智能合约状态的变更达成共识,同时对智能合约数据进行加密,以达到保护隐私数据的要求。
根据上述目的,本发明提供了一种基于智能合约进行加密交易的方法,包括:区块链上的第一节点基于智能合约执行交易,其中所述智能合约在执行所述第一交易之前的状态为第一状态,所述智能合约在执行所述第一交易之后的状态为第二状态;所述第一节点将所述智能合约在执行所述第一交易之后的状态变化以及所述第一交易发送给其他遵循所述智能合约的各相关节点;所述第一节点接收各所述相关节点返回的第一签名;其中所述第一签名用于表征所述相关节点已验证所述智能合约的状态变化;所述第一节点将所述智能合约在执行所述第一交易之后的状态变化和所述签名发送给所述区块链上的其他节点。
本发明所述的实现智能合约数据加密的方法,其将参与共识的所有节点分为与智能合约相关的各相关节点和与智能合约无关的其他非相关节点,并且仅在各相关节点范围内验证智能合约状态的变更是否符合相应的交易,这样就首先在各相关节点范围内对智能合约状态的变更发表意见,这种意见具有一票否决权,以防止多数方预谋联手损坏少数方利益。由于其他非相关节点与智能合约无关,因此不必直接验证智能合约状态的变更是否符合相应的交易,而是可以信任各相关节点的验证结果,即通过检查各相关节点验证产生的签名来间接验证智能合约状态的变更是否符合相应的交易,这样就可以在所有节点范围内对智能合约状态的变更达成共识。其他非相关节点由于没有参与直接验证,无法获得智能合约和交易的原始数据,从而实现了对智能合约的加密,主要体现在对其他非相关节点的智能合约和交易的保密,达到了保护隐私数据的要求。
其中,所述智能合约状态通常是指所述智能合约的哈希值。
进一步,所述基于智能合约进行加密交易的方法,还包括:所述第一节点在接收到所述区块链上的第二节点发送的智能合约的状态变化以及基于所述智能合约执行第二交易时,验证所述智能合约在执行所述第二交易后的状态变化,其中 所述智能合约在执行所述第二交易之前的状态为第三状态,在执行所述第二交易之后的状态为第四状态;所述第一节点向所述第二节点返回用于表征所述第二节点已验证所述智能合约的状态变化的第二签名。
进一步,所述基于智能合约进行加密交易的方法,还包括:所述第一节点将所述智能合约的状态从所述第三状态到所述第四状态的变化放入所述区块链的交易池中。
进一步,所述基于智能合约进行加密交易的方法,还包括:所述第一节点将所述交易放入所述区块链中的交易池中。
优选的,所述第二交易为经过加密的隐私交易;所述验证所述智能合约在执行所述第二交易后的状态变化,包括:所述第一节点将所述隐私交易解密以获取所述第二交易;所述第一节点基于所述智能合约和所述第二交易执行所述隐私交易;以及所述第一节点验证所述智能合约在执行所述隐私交易后的状态从所述第三状态变为所述第四状态。
进一步,所述第一交易为经过加密的隐私交易,其中,所述第一节点基于智能合约执行第一交易包括:所述第一节点将经过加密的所述隐私交易解密以获取所述第一交易;以及所述第一节点基于所述智能合约执行所述第一交易。
进一步地,本发明所述的基于智能合约进行加密交易的方法,所述智能合约为内容经过加密的智能合约;其中,所述第一节点基于智能合约执行第一交易包括:所述第一节点将内容经过加密的所述智能合约解密;所述第一节点基于解密后的所述智能合约执行所述第一交易;以及所述第一节点将经过所述第一交易后的所述智能合约进行加密。
上述方案中,为了更好地保护隐私,避免智能合约数据泄漏导致损失,将智能合约的内容进行加密。遵循智能合约的各节点需要有加密或解密所述智能合约的密钥。
进一步,所述第一交易为隐私交易,所述第一节点基于解密后的所述智能合约执行所述第一交易包括:所述第一节点将经过加密的所述隐私交易解密,获取所述隐私交易;所述第一节点基于所述解密后的所述智能合约执行所述隐私交易;以及所述第一节点将内容经过解密后的所述隐私交易进行加密。
优选的,所述智能合约的状态通过应用程序进行哈希运算计算哈希值进行表示;其中所述智能合约执行所述第一交易前的所述第一状态的哈希值为第一哈希值,所述智能合约执行所述第一交易后的所述第二状态的哈希值为第二哈希值。
本发明的第二方面,本发明一实施例提供一种区块链,包括多个节点,所述节点执行如前述所述的基于智能合约进行加密交易的方法。
所述区块链能保证所有参与共识的节点对智能合约状态的变更达成共识,同时对智能合约数据进行加密,以达到保护隐私数据的要求。
本发明所述的区块链,由于采用了前述所述的的基于智能合约进行加密交易的方法,因此同样能保证所有参与共识的节点对智能合约状态的变更达成共识,同时对智能合约数据进行加密,以达到保护隐私数据的要求。其原理上述方法相应部分已详述,在此不再赘述。
本发明所述的基于智能合约进行加密交易的方法,具有以下优点和有益效果:
(1)能保证所有参与共识的节点对智能合约状态的变更达成共识,同时对智能合约数据进行加密,以达到保护隐私数据的要求。
(2)为区块链的应用场景提供弹性的隐私保护,提高区块链的实用性。
(3)可以有效保护企业的商业机密和交易隐私。
本发明另一面提供的所述的区块链,同样具有上述优点和有益效果。
作为本发明的第三方面,本发明一实施例提供了一种基于智能合约进行加密交易的装置,包括:
执行模块,用于根据智能合约,执行相应的操作,其中所述智能合约在执行所述操作之前的状态为第一状态,所述智能合约在执行所述操作之后的状态为第二状态;
发送模块,用于将所述智能合约在执行所述交易之后的状态变化以及所述操作的内容发送给其他遵循所述智能合约的各区块链相关节点;
其中所述发送模块还用于将各所述区块链相关节点的签名发送给区块链上的所有区块链其他节点,其中所述签名由所述区块链相关节点在已验证所述智能合约的状态变化时返回。
进一步,所述发送模块还用于根据所述智能合约的状态变化验证所述智能合约在执行所述交易后的状态由所述第一状态变为所述第二状态,并返回表征通过验证的签名。
进一步,所述发送模块还用于根据所述区块链相关节点的所述签名验证所有所述区块链相关节点均提供所述签名,并返回验证通过信息。
进一步,所述发送模块还用于根据区块链上的所有区块链其他节点的所述验证通过信息,将所述智能合约的状态从所述第一状态到所述第二状态的变化放入所述区块链的交易池中。
进一步,所述发送模块还用于将所述交易池中的所述交易打包为区块。
进一步,所述一种基于智能合约进行加密交易的装置,还包括:
第一加密模块,用于将所述交易的信息数据进行加密。
进一步,所述一种基于智能合约进行加密交易的装置,还包括:
第二加密模块,用于采用签名技术,将所述智能合约的信息数据的随机数值进行加密,并将加密后的随机数值和所述智能合约的信息数据发送至所述发送模块。
优选的,所述随机数值为哈希值;所述一种基于智能合约进行加密交易的装置还包括:
哈希值计算装置,用于获取目标文件数据,通过哈希运算法生成与所述目标文件数据对应的哈希值。
优选的,所述交易为经过所述第一加密模块加密的隐私交易,所述发送模块还用于:
解密所述隐私交易,获取所述交易内容;
基于所述智能合约和所述交易内容执行所述隐私交易;以及
验证所述智能合约在执行所述隐私交易后的状态从所述第一状态变化为第二状态。
优选的,所述智能合约为内容经过所述第二加密模块加密的智能合约,其中所述发送模块还用于:
解密内容经过加密的所述智能合约;
基于所述智能合约执行所述交易;以及
采用所述第二加密模块对经过所述交易之后的所述智能合约的内容进行加密。
优选的,所述交易为经过所述第一加密模块加密的隐私交易,所述发送模块还用于:
解密所述隐私交易,获取所述交易内容;
基于所述智能合约和所述交易内容执行所述隐私交易;以及
采用所述第一加密模块加密内容经过解密后的所述隐私交易。
优选的,所述交易为经过所述第一加密模块加密的隐私交易,所述发送模块还用于:解密所述隐私交易,获取所述交易内容;
基于所述智能合约和所述交易内容执行所述隐私交易;以及,
采用所述第一加密模块加密内容经过解密后的所述隐私交易。
作为本发明的第四方面,本发明实施例提供了一种计算机设备,包括存储器、处理器以及存储在所述存储器上被所述处理器执行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如前述所述基于智能合约进行加密交易的方法的步骤。
作为本发明的第五方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现前述所述基于智能合约进行加密交易的方法的步骤。
附图简要说明
图1为本发明一实施例所述的基于智能合约进行加密交易的方法的流程示意图。
图2为本发明一实施例所述的基于智能合约进行加密交易的方法的流程示意图。
图3为本发明一实施例所述的基于智能合约进行加密交易的方法的流程示意图。
图4为本发明一实施例所述的基于智能合约进行加密交易的方法的流程示意图。
图5为本发明一实施例从用户角度显示的本发明所述的基于智能合约进行加密交易的方法的流程图。
图6为执行交易前加密前的智能合约示意图。
图7为执行交易前加密后的智能合约示意图。
图8为执行交易后加密前的智能合约示意图。
图9为执行交易后加密后的智能合约示意图。
图10为本发明一实施例所述的一种基于智能合约进行加密交易的装置的结构示意图。
图11为本发明一实施例所述的一种基于智能合约进行加密交易的装置的结构示意图。
图12为本发明一实施例所述的一种基于智能合约进行加密交易的装置的结构示意图。
图13为本发明一实施例所述的一种基于智能合约进行加密交易的装置的结构示意图。
实施本发明的方式
为使本发明的目的、技术手段和优点更加清楚明白,以下结合附图对本发明作进一步详细说明。
图1为本发明一实施例提供的一种基于智能合约进行加密交易的方法的流程示意图,如图1所示,本发明一实施例提供的一种基于智能合约进行加密交易的方法,包括以下内容:
步骤101:区块链上的第一节点基于智能合约执行第一交易,其中,智能合约在执行第一交易之前的状态为第一状态,智能合约在执行第一交易之后的状态为第二状态;
为了更好地保护隐私,避免在交易过程中,交易数据泄漏导致损失,本发明 一实施例中,第一交易为经过加密的隐私交易,仅在需要调用执行时被临时解密,而遵循智能合约的所有需要执行此隐私交易的节点均持有加密或者解密该隐私交易的密钥。因此,步骤101中,在基于智能合约执行隐私交易的过程中,首先使用密钥,将经过加密的隐私交易解密以获取交易内容;然后再基于智能合约根据交易内容执行相应的交易。
为了进一步地保护隐私,避免智能合约的数据泄漏导致损失,本发明一实施例将智能合约的内容进行加密,遵循智能合约的所有相关节点需要有加密或解密所述智能合约的密钥,因此,步骤101中,基于智能合约执行交易的过程中,需要首先使用密钥将内容经过加密的智能合约进行解密,然后再基于智能合约执行相应的交易。
应当理解,当交易和智能合约均经过加密时,给智能合约的内容以及交易内容以双重隐私保护,更加能够保护隐私,因此,步骤101中,基于智能合约执行交易的过程中,具体可以包括一下内容:
1011:将经过加密的智能合约进行解密;
1012:将智能合约解密后,获取隐私交易,然后将隐私交易解密,获取相应的交易内容;
1013:基于解密后的智能合约,根据交易内容执行相应的交易;
1014:相应的交易执行结束后,将解密过后的交易进行加密;
1015:将经过交易之后的智能合约的内容再进行加密;
至此,执行此步骤的区块链中的节点,基于智能合约执行交易的步骤结束,智能合约的状态从第一状态变为第二状态。
步骤102:第一节点将智能合约在执行第一交易之后的状态变化以及第一交易发送给其他遵循智能合约的各相关节点。
步骤103:第一节点接收各相关节点返回的第一签名,其中第一签名用于表征所述相关节点已验证智能合约的状态变化。
步骤104:第一节点将智能合约在执行第一交易之后的状态变化和第一签名发送给区块链上的其他节点。
应当理解,在基于智能合约执行交易时,需要区块链中的所有参与的节点达成共识,因此步骤104中,当第一节点将智能合约在执行第一交易之后的状态变化和第一签名发送给区块链上的其他节点时,其他节点必然会对第一签名和智能合约在执行第一交易之后的状态变化进行验证,并且将验证通过的信息返回第一节点。
本发明实施例提供的一种基于智能合约进行加密交易的方法,只需要把智能合约的变化过程以及交易内容发送遵循智能合约的相关节点进行验证,智能合约中的其他节点验证所有相关节点是否均验证通过,这样不仅能够保证智能合约中 的所有参与共识的节点对智能合约的状态变更达到共识,由于其他节点对智能合约没有直接参与状态变更的验证,从而无法获得智能合约和交易的原始数据,从而实现了对智能合约的加密,达到保护用于数据隐私的要求。
上述实施例中,第一节点接收各相关点返回的第一签名,其中第一签名用于表征相关节点已验证智能合约的状态变化,也就意味着在基于智能合约进行加密交易的方法中需要相关节点对第一节点发送的智能合约在执行第一交易前后的状态变化进行验证,因此在本发明一实施例中,如图2所示基于智能合约进行加密交易的方法还包括:
第一节点在接收到区块链上的第二节点发送的智能合约的状态变化以及基于智能合约执行第二交易时,验证智能合约在执行第二交易后的状态变化,其中智能合约在执行第二交易之前的状态为第三状态,在执行第二交易之后的状态为第四状态;
第一节点向第二节点返回表征第一节点已验证智能合约的状态变化的第二签名。
其中,第一节点作为智能合约第二交易的相关节点,第二节点作为智能合约第二交易的交易发起方节点,而第二签名则是验证通过的签名。
应当理解,相关节点对执行交易前后智能合约的状态变化验证通过时,向交易方节点返回验证通过的签名,其中签名可以为相关节点的使用者的人物姓名,公司名称,或者“通过”字眼、对号标识、图片等,本发明对此不作限定。还应当理解,当验证不通过时,除了拒绝返回验证通过的签名,还可以其他方式,例如叉号标识、“不通过”字眼等和通过验证不同的描述方式即可,本发明对此不作限定。
应当理解,当智能合约中的交易经过区块链中的所有节点达成共识时,需要进行保存,然后等待进入下一个交易,因此,本发明一实施例中,一种基于智能合约进行加密交易的方法,还包括:当收到区块链上的所有其他节点返回的验证通过信息时,将智能合约的状态从第一状态到第二状态的变化放入区块链的交易池中,进一步还包括将交易池中的交易打包为区块。
图3所示为本发明一实施例所述的基于智能合约进行加密交易的方法的流程示意图。如图3所示,基于该智能合约进行交易的方法涉及的区块链节点包括:交易发起方节点,遵循该智能合约的相关节点和与该智能合约无直接关系的其他非相关节点,该基于智能合约进行加密交易的方法包括以下步骤:
(1)区块链上的交易发起方节点在本地对智能合约执行交易,智能合约在执行该交易之前的状态为S1,智能合约在执行该交易之后的状态为S2;
(2)交易发起方节点将智能合约的状态从S1到S2的变化以及交易内容发送给区块链上的遵循该智能合约的各相关节点;
(3)各相关节点分别验证智能合约在执行交易后其状态是否从S1变为S2,如果是,则相关节点向交易发起方节点返回表征通过该相关节点验证的签名;
(4)当交易发起方节点收集到所有相关节点的签名时,交易发起方将智能合约的状态从S1到S2的变化以及各相关节点的签名发送给区块链上与智能合约无关的其他非相关节点。
为了更好的保护隐私,避免在交易过程,交易数据泄露导致损失,本发明一实施例中,交易为经过加密的隐私交易,仅在需要调用执行时被临时解密,遵循智能合约的所有需要执行此隐私交易的节点均持有加密或者解密该隐私交易的密钥,因此当交易为隐私交易时,在步骤(1)中,交易发起方节点首先先将经过加密的隐私交易解密获取交易内容,然后再基于智能合约执行隐私交易。在步骤(2)中,交易发起方节点将智能合约的状态从S1到S2的变化以及经过加密的隐私交易发送给区块链上的遵循智能合约的各相关节点。在步骤(3)中,各相关节点分别验证智能合约在执行隐私交易后其状态是否从S1变为S2的步骤可以包括:相关节点将经过加密的隐私交易解密;相关节点对智能合约执行隐私交易;相关节点判断智能合约在执行隐私交易后其状态是否从S1变为S2。
在其他实施方式中,基于智能合约进行加密交易,还包括步骤(5):所有节点检查是否所有的相关节点均提供了签名,如果是,则将智能合约的状态从S1到S2的变化放入区块链的交易池,如果否,则拒绝将智能合约的状态从S1到S2的变化放入区块链的交易池。在本发明其他实施例中,基于智能合约进行加密交易的方法还可以进一步地包括步骤(6):交易池中的交易被打包为区块。
在本发明其他实施方式中,智能合约为内容经过加密的智能合约。图4显示了本发明一实施例提供的一种基于智能合约进行加密交易的方法的流程示意图。
如图4所示,本实施例提供的一种基于智能合约进行加密交易在一区块链上实现下述步骤:
步骤(1):区块链上的交易发起方节点在本地对智能合约执行交易,智能合约在执行该交易之前的状态为S1,智能合约在执行该交易之后的状态为S2。其中,交易为经过加密的隐私交易Enc(Tx)。智能合约为内容经过加密的智能合约。
执行交易前:智能合约如图7所示,在本实施例中,其是通过函数Enckey()加密过的智能合约,其哈希值为智能合约状态S1;
执行交易:交易发起方节点先将如图7所示的智能合约解密,得到如图6所示的经过解密的智能合约,再在本地对智能合约执行隐私交易Tx。执行交易后的智能合约如图8所示,其中X的值由执行交易前的10变为了执行交易后的20。
最后对隐私交易Tx和智能合约再进行加密:通过函数Enckey()对如图8的智能合约加密,加密后的智能合约如图9所示,其哈希值为智能合约状态S2。
步骤(2):交易发起方节点将智能合约的状态从S1到S2的变化[S1→S2]以 及经过加密的隐私交易Enc(Tx)发送给区块链上的与智能合约相关的各相关节点。
步骤(3):各相关节点分别验证智能合约在执行交易后其状态是否从S1变为S2,如果是,则相关节点向交易发起方节点返回表征通过该相关节点验证的签名;其中,各相关节点分别验证智能合约在执行隐私交易后其状态是否从S1变为S2的步骤包括:
1.判断当前智能合约状态是否为S1,若是,解密经过加密的隐私交易Enc(Tx),否则拒绝签名;
2.基于函数Enckey()解密当前智能合约中的加密内容;
3.对解密后的智能合约执行隐私交易Tx;
4.再用Enckey()对此时的智能合约进行加密,计算此时智能合约的哈希值S2’;
5.观察S2’是否等于S2,若是,则验证通过,返回签名。
步骤(4):当交易发起方节点收集到所有相关节点的签名时,交易发起方将智能合约的状态从S1到S2的变化[S1→S2]以及各相关节点的签名发送给区块链上所有节点。
步骤(5):所有节点检查是否所有的相关节点均提供了签名,如果是,则将智能合约的状态从S1到S2的变化放入区块链的交易池,如果否,则拒绝将智能合约的状态从S1到S2的变化放入区块链的交易池。
步骤(6):交易发起方节点将交易池中的交易打包为区块。
图5从用户角度示意性地显示了本发明一实施例提供的一种基于智能合约进行加密交易的流程示意图。
如图5所示,本发明实施例中当交易发起方节点收集所有签名之后进行全网广播,即同时把智能合约的状态从S1到S2的变化[S1→S2]以及各相关节点的签名发送给所有节点,此时步骤(2)、步骤(3)、步骤(4)分别简略如下:
步骤(2):用户A通过交易发起方节点将智能合约的状态从S1到S2的变化[S1→S2]以及经过加密的隐私交易Enc(Tx)发送给区块链上的遵循智能合约的各相关节点V0~V2。
步骤(3):各相关节点分别验证智能合约在执行交易后其状态是否从S1变为S2,如果是,则相关节点向交易发起方节点返回表征通过该相关节点验证的签名。
步骤(4):当交易发起方节点收集到所有相关节点的签名时,交易发起方节点将智能合约的状态从S1到S2的变化[S1→S2]以及各相关节点的签名通过全网广播发送给区块链上与智能合约相关的各相关节点V0~V2和与智能合约无关的其他非相关节点V3~Vn。
作为本发明的另一面,本发明一实施例提供了一种区块链,包括多个节点,其中节点执行如前序所述的基于智能合约进行加密交易的方法。
图10提供了一种基于智能合约进行加密交易的装置,如图10所示,该装置,包括:
执行模块1,用于根据智能合约,执行相应的交易,其中所述智能合约在执行所述交易之前的状态为第一状态,所述智能合约在执行所述交易之后的状态为第二状态;
发送模块2,用于将智能合约的状态变化以及交易的内容发送给其他遵循智能合约的各区块链相关节点;
其中发送模块2还用于将各区块链相关节点的签名发送给区块链上的所有区块链其他节点,其中签名由区块链相关节点在已验证智能合约的状态变化时返回。
本发明实施例提供的一种基于智能合约进行加密交易的装置,包括执行模块和区块链节点,其中区块链节点作为交易方节点,在基于智能合约执行交易时,智能合约在执行交易前后的状态变化,由与智能合约相关的区块链其他相关节点进行直接验证区块链节点在执行交易前后的智能合约状态变化是否符合相应的交易,而与智能合约无关的区块链其他节点则不直接参与验证,而是验证相关节点是否均验证通过智能合约的状态变化,信任相关节点的验证结果,由于其他节点没有直接参与验证智能合约的状态变更,因此无法获得智能合约和交易的原始数据,从而体现了对其他节点的智能合约和交易的保密,进一步保护了数据隐私。
应当理解,在基于智能合约进行交易时,该装置中的发送模块2在区块链中基于不同的智能合约执行不同的交易时承担的节点也不同,例如可以为一个引起智能合约在交易前后状态变化的发起节点,也可以作为直接验证另一个智能合约在另一个交易前后状态变化的相关节点,也可以作为间接验证第三个智能合约在第三个交易前后状态变化的非相关的其他节点。
本发明一实施例中,发送模块2还可以作为相关节点,用于根据智能合约的状态变化验证智能合约在执行交易后的状态由第一状态变为第二状态,并返回表征通过验证的签名。
本发明一实施例中,发送模块2还可以作为其他节点,用于根据区块链相关节点的签名验证所有相关节点均提供签名,并返回验证通过信息。
本发明一实施例中,发送模块2还可以作为引起智能合约在交易前后状态变化的发起节点,用于根据区块链上的所有区块链其他节点的验证通过信息,将智能合约的状态从第一状态到第二状态的变化放入区块链的交易池中。
本发明一实施例中,为了更加保护隐私,一种基于智能合约进行加密交易的装置,如图11所示,还包括:第一加密模块3,用于将交易的信息数据进行加密。此时,交易为隐私交易,那么发送模块2在引起智能合约在交易前后状态变化的发起节点时,还用于:
解密该隐私交易,获取交易内容;
基于智能合约和交易内容执行该隐私交易;以及
验证智能合约在执行该隐私交易后的状态从第一状态变化为第二状态。
本发明一实施例中,一种基于智能合约进行加密交易的装置,如图12所示,还包括:第二加密模块4,用于采用签名技术,将智能合约的信息数据的随机数值进行加密,并将加密后的随机数值和智能合约的信息数据发送至区块链节点。此时,智能合约也为内容经过加密的智能合约,发送模块2在作为引起智能合约在交易前后状态变化的发起节点时,还用于:解密内容经过加密的所述智能合约;基于智能合约执行交易;以及将经过交易之后的智能合约进行加密。
本发明一实施例中,当交易为隐私交易时,发送模块2还用于:解密所述隐私交易,获取隐私交易的内容;基于智能合约和交易内容执行该隐私交易;以及,采用第一加密模块对经过解密的隐私交易加密。
在本发明一实施例中,第二加密模块4对智能合约实现加密的方式中的随机数值为哈希值;此时一种基于智能合约进行加密交易的装置还包括:哈希值计算装置5,如图13所示,该哈希值计算装置5用于获取目标文件数据,通过哈希运算法生成与目标文件数据对应的哈希值,本发明一实施例中,哈希值计算装置5采用Enckey()对智能合约进行加密。
本发明一实施例中,当交易为经过第一加密模块3加密的隐私交易,智能合约为经过第二加密模块4对智能合约的内容进行加密的智能合约,其中智能合约的状态变化以哈希值来表示,第一状态的哈希值为第一哈希值,第二状态的哈希值为第二哈希值,此时,发送模块2作为相关节点,还用于:判断智能合约的状态为第一状态;解密隐私交易,获取交易内容;解密内容经过加密的智能合约;基于智能合约和交易内容执行隐私交易;将经过交易之后的智能合约的内容进行加密,计算此时智能合约的哈希值,此哈希值记为第三哈希值;验证第三哈希值与第二哈希值一致,返回验证通过信息。
本发明一实施例中,发送模块2作为相关节点对智能合约在交易前后的状态变化进行验证时,智能合约在交易之前的第一状态、交易之后的第二状态以及验证过程中产生的第三状态,均通过函数Enckey()进行哈希值计算,其中第一状态的哈希值为S1,第二状态的哈希值为S2,第三状态的哈希值为S2’,区块链节点作为区块链相关节点对智能合约在交易前后的状态变化进行验证时,做出以下容:
1.判断当前智能合约状态是否为S1,若是,解密经过加密的隐私交易Enc(Tx),否则拒绝签名;
2.基于函数Enckey()解密当前智能合约中的加密内容;
3.对解密后的智能合约执行隐私交易Tx;
4.再用Enckey()对此时的智能合约进行加密,计算此时智能合约的哈希值S2’;
5.观察S2’是否等于S2,若是,则验证通过,返回签名,否则不返回签名。
应当理解,前述描述的术语“模块”可以是实现预定功能的软件和/或软件硬件。尽管实施例中所描述的模块较佳的以软件来实现,但是硬件或者软硬件相结合也是可能并被构想的。还应当理解,前述的描述中提及了装置多个若干个单元模块,但是这种划分并非强制的,根据具体的实施方式,上文描述的两个或者多个单元的特征和功能可以在一个单元中具体化,同样,上文描述的一个单元的特征和功能也可以进一步的划分为由多个单元来具体化,本发明对此不作限定。
本发明一实施例提供了一种计算机设备,包括存储器、处理器以及存储在所述存储器上被所述处理器执行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如前述所述基于智能合约进行加密交易的方法的步骤。
本发明一实施例提供了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如前述所述基于智能合约进行加密交易的方法的步骤。
依照本发明的实施例如上文所述,这些实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施例。显然,根据以上描述,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本发明的原理和实际应用,从而使所属技术领域技术人员能很好地利用本发明以及在本发明基础上的修改使用。本发明仅受权利要求书及其全部范围和等效物的限制。
以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (23)

  1. 一种基于智能合约进行加密交易的方法,其特征在于,包括:
    区块链上的第一节点基于智能合约执行交易,其中所述智能合约在执行所述第一交易之前的状态为第一状态,所述智能合约在执行所述第一交易之后的状态为第二状态;
    所述第一节点将所述智能合约在执行所述第一交易之后的状态变化以及所述第一交易发送给其他遵循所述智能合约的各相关节点;所述第一节点接收各所述相关节点返回的第一签名;其中所述第一签名用于表征所述相关节点已验证所述智能合约的状态变化;
    所述第一节点将所述智能合约在执行所述第一交易之后的状态变化和所述签名发送给所述区块链上的其他节点。
  2. 如权利要求1所述的方法,其特征在于,还包括:
    所述第一节点在接收到所述区块链上的第二节点发送的智能合约的状态变化以及基于所述智能合约执行第二交易时,验证所述智能合约在执行所述第二交易后的状态变化,其中所述智能合约在执行所述第二交易之前的状态为第三状态,在执行所述第二交易之后的状态为第四状态;
    所述第一节点向所述第二节点返回用于表征所述第一节点已验证所述智能合约的状态变化的第二签名。
  3. 如权利要求2所述的方法,其特征在于,所述第一节点将所述智能合约的状态从所述第三状态到所述第四状态的变化放入所述区块链的交易池中。
  4. 如权利要求3所述的方法,其特征在于,还包括:所述第一节点将所述交易池中的交易打包为区块。
  5. 如权利要求2所述的方法,其特征在于,所述第二交易为经过加密的隐私交易;所述验证所述智能合约在执行所述第二交易后的状态变化,包括:
    所述第一节点将所述隐私交易解密以获取所述第二交易;
    所述第一节点基于所述智能合约和所述第二交易执行所述隐私交易;以及
    所述第一节点验证所述智能合约在执行所述隐私交易后的状态从所述第三状态变为所述第四状态。
  6. 如权利要求1至5中的任一项所述的方法,其特征在于,所述第一交易为经过加密的隐私交易,
    其中,所述第一节点基于智能合约执行第一交易包括:
    所述第一节点将经过加密的所述隐私交易解密以获取所述第一交易;以及
    所述第一节点基于所述智能合约执行所述第一交易。
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述智能合约为内容经过加密的智能合约,
    其中,所述第一节点基于智能合约执行第一交易包括:
    所述第一节点将内容经过加密的所述智能合约解密;
    所述第一节点基于解密后的所述智能合约执行所述第一交易;以及
    所述第一节点将经过所述第一交易后的所述智能合约进行加密。
  8. 如权利要求7所述的基于智能合约进行加密交易的方法,其特征在于,所述第一交易为隐私交易,所述第一节点基于解密后的所述智能合约执行所述第一交易包括:
    所述第一节点将经过加密的所述隐私交易解密,获取所述隐私交易;
    所述第一节点基于所述解密后的所述智能合约执行所述隐私交易;以及
    所述第一节点将内容经过解密后的所述隐私交易进行加密。
  9. 如权利要求7或8所述的方法,其特征在于,所述智能合约的状态通过应用程序进行哈希运算计算哈希值进行表示;
    其中所述智能合约执行所述第一交易前的所述第一状态的哈希值为第一哈希值,所述智能合约执行所述第一交易后的所述第二状态的哈希值为第二哈希值。
  10. 一种区块链,其特征在于,包括多个节点,所述节点执行如权利要求1至9中任意一项所述的基于智能合约进行加密交易的方法。
  11. 一种基于智能合约进行加密交易的装置,其特征在于,包括:
    执行模块,用于根据智能合约,执行相应的交易,其中所述智能合约在执行所述交易之前的状态为第一状态,所述智能合约在执行所述交易之后的状态为第二状态;
    发送模块,用于将所述智能合约在执行所述交易之后的状态变化以及所述交易发送给其他遵循所述智能合约的各相关节点;
    其中所述发送模块还用于接收各所述相关节点返回的第一签名,并将所述智能合约在执行所述第一交易之后的状态变化和所述第一签名发送给所述区块链上的其他节点,其中所述第一签名用于表征所述相关节点已验证所述智能合约的状态变化。
  12. 如权利要求11所述的一种基于智能合约进行加密交易的装置,其特征在于,所述发送模块还用于根据所述智能合约的状态变化验证所述智能合约在执行所述交易后的状态由所述第一状态变为所述第二状态,并返回表征通过验证的签名。
  13. 如权利要求12所述的一种基于智能合约进行加密交易的装置,其特征在于,所述发送模块还用于根据所述区块链相关节点的所述签名验证所有所述区块链相关节点均提供所述签名,并返回验证通过信息。
  14. 如权利要求13所述的一种基于智能合约进行加密交易的装置,其特征在于,所述发送模块点还用于根据区块链上的所有区块链其他节点的所述验证通过信息,将所述智能合约的状态从所述第一状态到所述第二状态的变化放入所述区块链的交易池中。
  15. 如权利要求14所述的一种基于智能合约进行加密交易的装置,其特征在于,所述发送模块还用于将所述交易池中的所述交易打包为区块。
  16. 如11至15任一权利要求所述的一种基于智能合约进行加密交易的装置,其特征在于,还包括:
    第一加密模块,用于将所述交易的信息数据进行加密。
  17. 如11至16任一权利要求所述的一种基于智能合约进行加密交易的装置,其特征在于,还包括:
    第二加密模块,用于采用签名技术,将所述智能合约的信息数据的随机数值进行加密,并将加密后的随机数值和所述智能合约的信息数据发送至所述发送模块。
  18. 根据权利要求17所述的一种基于智能合约进行加密交易的装置,其特征在于,所述随机数值为哈希值;所述装置还包括:
    哈希值计算装置,用于获取目标文件数据,通过哈希运算法生成与所述目标文件数据对应的哈希值。
  19. 如权利要求18所述的一种基于智能合约进行加密交易的装置,其特征在于,所述交易为经过所述第一加密模块加密的隐私交易,所述发送模块还用于:
    解密所述隐私交易,获取所述交易内容;
    基于所述智能合约和所述交易内容执行所述隐私交易;以及
    验证所述智能合约在执行所述隐私交易后的状态从所述第一状态变化为第二状态。
  20. 如权利要求19所述的一种基于智能合约进行加密交易的装置,其特征在于,所述智能合约为内容经过所述第二加密模块加密的智能合约,其中所述发送模块还用于:
    解密内容经过加密的所述智能合约;
    基于所述智能合约执行所述交易;以及
    采用所述第二加密模块对内容经过所述交易后的所述智能合约的内容进行加密。
  21. 如权利要求20所述的一种基于智能合约进行加密交易的装置,其特征在于,所述交易为经过所述第一加密模块加密的隐私交易,所述发送模块还用于:
    解密所述隐私交易,获取所述交易内容;
    基于所述智能合约和所述交易内容执行所述隐私交易;以及
    采用所述第一加密模块加密内容经过解密后的所述隐私交易。
  22. 一种计算机设备,包括存储器、处理器以及存储在所述存储器上被所述处理器执行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至9中任一项所述基于智能合约进行加密交易的方法的步骤。
  23. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9中任一项所述基于智能合约进行加密交易的方法的步骤。
PCT/CN2018/094659 2017-07-07 2018-07-05 基于智能合约进行加密交易的方法和装置以及区块链 WO2019007396A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710551033.9A CN107425982B (zh) 2017-07-07 2017-07-07 一种实现智能合约数据加密的方法和区块链
CN201710551033.9 2017-07-07

Publications (1)

Publication Number Publication Date
WO2019007396A1 true WO2019007396A1 (zh) 2019-01-10

Family

ID=60427844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/094659 WO2019007396A1 (zh) 2017-07-07 2018-07-05 基于智能合约进行加密交易的方法和装置以及区块链

Country Status (2)

Country Link
CN (1) CN107425982B (zh)
WO (1) WO2019007396A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263091A (zh) * 2019-05-20 2019-09-20 阿里巴巴集团控股有限公司 结合代码标注与用户、事件类型的收据存储方法和节点
GB2584517A (en) * 2019-01-15 2020-12-09 Fisher Rosemount Systems Inc Blockchain-Based Automation Architecture cybersecurity
US10962965B2 (en) 2019-01-15 2021-03-30 Fisher-Rosemount Systems, Inc. Maintaining quality control, regulatory, and parameter measurement data using distributed ledgers in process control systems
US11009859B2 (en) 2019-05-06 2021-05-18 Fisher-Rosemount Systems, Inc. Framework for privacy-preserving big-data sharing using distributed ledger
US11042147B2 (en) 2019-01-15 2021-06-22 Fisher-Rosemount Systems, Inc. Machine-to-machine transactions using distributed ledgers in process control systems
US11115218B2 (en) 2019-01-15 2021-09-07 Fisher-Rosemount Systems, Inc. System for secure metering from systems of untrusted data derived from common sources
US11960473B2 (en) 2019-01-15 2024-04-16 Fisher-Rosemount Systems, Inc. Distributed ledgers in process control systems

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10698675B2 (en) * 2016-12-19 2020-06-30 International Business Machines Corporation Decentralized automated software updates via blockchain
CN107425982B (zh) * 2017-07-07 2020-05-12 众安信息技术服务有限公司 一种实现智能合约数据加密的方法和区块链
CN108600163B (zh) * 2018-03-13 2020-12-15 南京邮电大学 一种云环境分布式哈希链架构及云数据完整性验证方法
CN110322345B (zh) * 2018-03-31 2024-04-23 华为技术有限公司 一种区块链背书方法及装置
CN110377239B (zh) * 2018-04-27 2021-02-12 腾讯科技(深圳)有限公司 数据签名方法、装置、服务器、系统及存储介质
CN108647968A (zh) 2018-05-10 2018-10-12 阿里巴巴集团控股有限公司 一种区块链数据处理方法、装置、处理设备及系统
CN108632045A (zh) 2018-05-10 2018-10-09 阿里巴巴集团控股有限公司 一种区块链数据处理方法、装置、处理设备及系统
CN109003078B (zh) 2018-06-27 2021-08-24 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN113095822A (zh) 2018-06-27 2021-07-09 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN109241055A (zh) * 2018-08-09 2019-01-18 上海常仁信息科技有限公司 一种区块链数据存储系统
CN109144961B (zh) * 2018-08-22 2021-09-17 矩阵元技术(深圳)有限公司 授权文件共享方法及装置
US20200090795A1 (en) * 2018-09-14 2020-03-19 Htc Corporation Method and system for sharing privacy data based on smart contracts
CN109255210A (zh) * 2018-09-27 2019-01-22 上海点融信息科技有限责任公司 在区块链网络中提供智能合约的方法、装置及存储介质
CN109493072B (zh) * 2018-10-24 2021-09-03 杭州趣链科技有限公司 一种基于联盟区块链的隐私合约保护的方法
CN110046517B (zh) * 2018-11-07 2020-05-05 阿里巴巴集团控股有限公司 一种对写入区块链的交易进行隐匿的方法及装置
CN109711174A (zh) * 2018-11-30 2019-05-03 深圳灵图慧视科技有限公司 数据获取方法、装置、设备及存储介质
CN111767556A (zh) * 2019-01-31 2020-10-13 阿里巴巴集团控股有限公司 区块链中实现隐私保护的方法及节点、存储介质
CN110032884B (zh) * 2019-01-31 2020-04-17 阿里巴巴集团控股有限公司 区块链中实现隐私保护的方法及节点、存储介质
CN110263547B (zh) * 2019-05-31 2021-07-20 创新先进技术有限公司 基于合约状态的修改次序实现动态加密的方法及装置
CN113438068B (zh) * 2019-05-31 2024-01-09 创新先进技术有限公司 基于区块高度实现动态加密的方法及装置
CN110276610B (zh) * 2019-05-31 2021-04-06 创新先进技术有限公司 基于交易偏移量实现动态加密的方法及装置
WO2019170167A2 (en) * 2019-05-31 2019-09-12 Alibaba Group Holding Limited System and method for providing privacy and security protection in blockchain-based private transactions
CN110569654B (zh) * 2019-08-30 2020-05-12 广州奇化有限公司 供应链快速响应模式的区块链可信数据处理方法及装置
CN112069252A (zh) * 2020-07-14 2020-12-11 贵州省广播电视信息网络股份有限公司 一种生成区块链的方法
CN112541764B (zh) * 2020-12-17 2023-11-28 成都知道创宇信息技术有限公司 基于智能合约的资产管理方法、装置和系统
CN113592645B (zh) * 2021-07-02 2023-11-14 中国人民银行数字货币研究所 数据验证的方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976231A (zh) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 基于区块链智能合约的资产管理方法及节点
CN106408299A (zh) * 2016-08-31 2017-02-15 江苏买卖网电子商务有限公司 一种基于区块链技术的电子智能签约支付方法
CN106603698A (zh) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 基于dpos的区块链共识方法和节点
CN106656974A (zh) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 区块链的分组共识方法及系统
CN106874393A (zh) * 2017-01-13 2017-06-20 北京众享比特科技有限公司 基于区块链的业务数据同步方法及系统、数据库系统
CN107425982A (zh) * 2017-07-07 2017-12-01 众安信息技术服务有限公司 一种实现智能合约数据加密的方法和区块链

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559211B (zh) * 2016-11-22 2019-12-13 中国电子科技集团公司第三十研究所 一种区块链中隐私保护智能合约方法
CN106778329B (zh) * 2016-11-28 2020-12-04 中国银行股份有限公司 一种区块链智能合约模板动态更新方法、装置及系统
CN106845960B (zh) * 2017-01-24 2018-03-20 上海壹账通区块链科技有限公司 基于区块链的安全交易方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976231A (zh) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 基于区块链智能合约的资产管理方法及节点
CN106408299A (zh) * 2016-08-31 2017-02-15 江苏买卖网电子商务有限公司 一种基于区块链技术的电子智能签约支付方法
CN106656974A (zh) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 区块链的分组共识方法及系统
CN106603698A (zh) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 基于dpos的区块链共识方法和节点
CN106874393A (zh) * 2017-01-13 2017-06-20 北京众享比特科技有限公司 基于区块链的业务数据同步方法及系统、数据库系统
CN107425982A (zh) * 2017-07-07 2017-12-01 众安信息技术服务有限公司 一种实现智能合约数据加密的方法和区块链

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2584517A (en) * 2019-01-15 2020-12-09 Fisher Rosemount Systems Inc Blockchain-Based Automation Architecture cybersecurity
US10962965B2 (en) 2019-01-15 2021-03-30 Fisher-Rosemount Systems, Inc. Maintaining quality control, regulatory, and parameter measurement data using distributed ledgers in process control systems
US11042147B2 (en) 2019-01-15 2021-06-22 Fisher-Rosemount Systems, Inc. Machine-to-machine transactions using distributed ledgers in process control systems
US11115218B2 (en) 2019-01-15 2021-09-07 Fisher-Rosemount Systems, Inc. System for secure metering from systems of untrusted data derived from common sources
GB2584517B (en) * 2019-01-15 2022-02-16 Fisher Rosemount Systems Inc Blockchain-Based Automation Architecture cybersecurity
US11405180B2 (en) 2019-01-15 2022-08-02 Fisher-Rosemount Systems, Inc. Blockchain-based automation architecture cybersecurity
US11960473B2 (en) 2019-01-15 2024-04-16 Fisher-Rosemount Systems, Inc. Distributed ledgers in process control systems
US11009859B2 (en) 2019-05-06 2021-05-18 Fisher-Rosemount Systems, Inc. Framework for privacy-preserving big-data sharing using distributed ledger
US11782421B2 (en) 2019-05-06 2023-10-10 Fisher-Rosemount Systems, Inc. Framework for privacy-preserving big-data sharing using distributed ledgers
CN110263091A (zh) * 2019-05-20 2019-09-20 阿里巴巴集团控股有限公司 结合代码标注与用户、事件类型的收据存储方法和节点

Also Published As

Publication number Publication date
CN107425982B (zh) 2020-05-12
CN107425982A (zh) 2017-12-01

Similar Documents

Publication Publication Date Title
WO2019007396A1 (zh) 基于智能合约进行加密交易的方法和装置以及区块链
EP3685334B1 (en) Improving integrity of communications between blockchain networks and external data sources
US11082240B2 (en) Retrieving public data for blockchain networks using highly available trusted execution environments
WO2021184975A1 (zh) 链上数据的链下隐私计算方法及装置
CN109409122B (zh) 文件存储方法及其电子设备、存储介质
CN111475849B (zh) 基于区块链账户的隐私数据查询方法及装置
EP3961455B1 (en) Data verification methods, apparatuses, and devices
WO2021088549A1 (zh) 基于链代码的权限查询配置方法及装置
CN111444273B (zh) 一种基于区块链的数据授权方法以及装置
JP2023502346A (ja) 量子安全ネットワーキング
CN111475850B (zh) 基于智能合约的隐私数据查询方法及装置
CN110246039B (zh) 基于联盟链的交易监测方法、装置及电子设备
CN111476573B (zh) 一种账户数据处理方法、装置、设备及存储介质
TW202011712A (zh) 密碼運算、創建工作密鑰的方法、密碼服務平台及設備
CN111859446A (zh) 一种农产品溯源信息共享-隐私保护的方法及系统
EP4092984A1 (en) Data processing method and apparatus, device and medium
CN114357492A (zh) 一种基于区块链的医疗数据隐私融合方法及装置
CN117155549A (zh) 密钥分发方法、装置、计算机设备和存储介质
US20230074475A1 (en) Systems And Methods For Implementing Privacy Layer In CBDC Networks
Meenakshi et al. Cloud Security Analysis using Blockchain Technology
CN110086627A (zh) 基于非对称密钥池对和时间戳的量子通信服务站密钥协商方法和系统
CN114553557B (zh) 密钥调用方法、装置、计算机设备和存储介质
CN115688124A (zh) 一种传输交集数据的方法、装置及电子设备
CN116132185A (zh) 数据调用方法、系统、装置、设备和介质
CN114666064A (zh) 基于区块链的数字资产管理方法、装置、存储介质及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18827874

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 12/05/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18827874

Country of ref document: EP

Kind code of ref document: A1