CN110796448A - Intelligent contract verification method based on block chain, participating node and medium - Google Patents

Intelligent contract verification method based on block chain, participating node and medium Download PDF

Info

Publication number
CN110796448A
CN110796448A CN201911010114.3A CN201911010114A CN110796448A CN 110796448 A CN110796448 A CN 110796448A CN 201911010114 A CN201911010114 A CN 201911010114A CN 110796448 A CN110796448 A CN 110796448A
Authority
CN
China
Prior art keywords
participating node
contract
block chain
encrypted data
key
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911010114.3A
Other languages
Chinese (zh)
Inventor
路成业
王凌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Iallchain Co Ltd
Original Assignee
Iallchain Co Ltd
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 Iallchain Co Ltd filed Critical Iallchain Co Ltd
Priority to CN201911010114.3A priority Critical patent/CN110796448A/en
Publication of CN110796448A publication Critical patent/CN110796448A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • 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/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • 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/0825Key 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 asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates

Abstract

The embodiment of the invention provides an intelligent contract verification method based on a block chain, a participating node and a medium, wherein the method comprises the following steps: the first participating node receives contract content broadcast by the second participating node, decrypts data encrypted by adopting a homomorphic encryption algorithm in the contract content, verifies key data obtained by decryption and other contents of the contract based on a contract to be verified obtained in advance, signs the contract content if the verification is passed, and broadcasts the signed contract to the block chain so that other nodes in the block chain supervise the contract. In the embodiment of the invention, the homomorphic encryption public key is adopted to encrypt the key data in the contract, and only the node with the corresponding homomorphic decryption private key can decrypt the key data, so that the confidentiality of the key data in the contract is ensured.

Description

Intelligent contract verification method based on block chain, participating node and medium
Technical Field
The embodiment of the invention relates to the technical field of block chains, in particular to an intelligent contract verification method based on a block chain, a participating node and a medium.
Background
The intelligent contract is an important component of a block chain technology, at present, the verification and the execution of the intelligent contract depend on the supervision and the automatic execution of other party nodes in a block chain, but for a contracting party, some sensitive information in the intelligent contract is not expected to be known by a third party, so that a contradiction is formed, and how to solve the contradiction is a problem which is urgently needed to be solved at present.
Disclosure of Invention
The embodiment of the invention provides an intelligent contract verification method based on a block chain, a participating node and a medium, which are used for improving the confidentiality of intelligent contract contents while realizing the verification of an intelligent contract.
The first aspect of the embodiments of the present invention provides an intelligent contract verification method based on a block chain, where the method includes:
a first participating node receives a first signature message broadcast by a second participating node, wherein the first signature message comprises contract content of the intelligent contract, the contract content comprises first encrypted data, and the first encrypted data is obtained by homomorphically encrypting key data in the contract content by adopting a homomorphic encryption public key of the first participating node;
the first participating node decrypts the first encrypted data based on a homomorphic decryption private key of the first participating node, and verifies key data obtained by decryption and other contents of the intelligent contract based on a contract to be verified, which is obtained in advance under a block chain;
if the verification is passed, the first participating node signs the first signature message by using a private key of the first participating node, and broadcasts a second signature message obtained by signature to the block chain, so that other nodes in the block chain supervise the intelligent contract based on the second signature message.
Optionally, before the first participating node receives the first signed message broadcast by the second participating node, the method further includes:
the first participating node sends the homomorphic encryption public key of the first participating node to the second participating node in a block chain broadcasting mode, and
and receiving the homomorphic encryption public key of the second participating node sent by the second participating node in a block chain broadcasting mode.
Optionally, the first signature message further includes second encrypted data, and the second encrypted data is obtained by homomorphically encrypting the key data by using a homomorphic encryption public key of the second participating node.
Optionally, after verifying the decrypted key data and other contents of the intelligent contract based on the contract to be verified obtained in advance under the blockchain, the method further includes:
and performing homomorphic encryption on key data obtained by decryption from the first encrypted data by adopting a homomorphic encryption public key of the second participating node, comparing third encrypted data obtained by encryption with the second encrypted data, and judging that the contract passes verification when the third encrypted data is consistent with the second encrypted data and the key data obtained by decryption and other contents of the intelligent contract are consistent with corresponding contents in the contract to be verified.
Optionally, before the first participating node receives the first signed message broadcast by the second participating node, the method further includes:
the first participating node receives a third signature message sent by the second participating node in a block chain mode, wherein the third signature message is obtained by signing the contract to be verified by using a private key of the second participating node;
and the first participating node verifies the terms of the contract to be verified, if the contract to be verified passes the verification, the third signature message is signed by using a private key of the first participating node, and a fourth signature message obtained by signature is broadcasted to the block chain, so that the second participating node broadcasts the first signature message in the block chain after receiving the fourth signature message.
A second aspect of the embodiments of the present invention provides a participating node, where the participating node and a second participating node are both parties of signing an intelligent contract, and the participating node includes: a processor and a memory, the memory having instructions stored therein that when executed by the processor perform the following:
receiving a first signature message broadcast by a second participating node, wherein the first signature message comprises contract content of the intelligent contract, the contract content comprises first encrypted data, and the first encrypted data is obtained by homomorphically encrypting key data in the contract content by adopting a homomorphic encryption public key of the participating node;
decrypting the first encrypted data based on the homomorphic decryption private key of the participating node, and verifying key data obtained by decryption and other contents of the intelligent contract based on a contract to be verified, which is obtained in advance under a block chain;
and if the verification is passed, performing signature processing on the first signature message by using the private key of the participating node, and broadcasting a second signature message obtained by signature to the block chain so as to enable other nodes in the block chain to supervise the intelligent contract based on the second signature message.
Optionally, before receiving the first signature message broadcast by the second participating node, the processor is further configured to:
sending the homomorphic encryption public key of the participating node to the second participating node in a block chain broadcast manner, and
and receiving the homomorphic encryption public key of the second participating node sent by the second participating node in a block chain broadcasting mode.
Optionally, the first signature message further includes second encrypted data, and the second encrypted data is obtained by homomorphically encrypting the key data by using a homomorphic encryption public key of the second participating node.
Optionally, the processor is further configured to:
and performing homomorphic encryption on key data obtained by decryption from the first encrypted data by adopting a homomorphic encryption public key of the second participating node, comparing third encrypted data obtained by encryption with the second encrypted data, and judging that the contract passes verification when the third encrypted data is consistent with the second encrypted data and the key data obtained by decryption and other contents of the intelligent contract are consistent with corresponding contents in the contract to be verified.
A third aspect of embodiments of the present invention provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method of the first aspect.
In the embodiment of the invention, the first participating node receives the contract content broadcast by the second participating node, decrypts the data encrypted by adopting a homomorphic encryption algorithm in the contract content, verifies the key data obtained by decryption and other contents of the contract based on the pre-obtained contract to be verified, signs the contract content if the verification is passed, and broadcasts the signed contract to the block chain so as to enable other nodes in the block chain to supervise the contract. In the embodiment of the invention, the homomorphic encryption public key is adopted to encrypt the key data (such as data related to currency amount) in the contract, and only the node with the corresponding homomorphic decryption private key can decrypt the key data, so that the confidentiality of the key data in the contract is ensured. At the same time, the blockchain can still realize supervision and execution of the contract according to the unencrypted content in the contract and on the basis of the homomorphic encrypted key data.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
FIG. 2 is a flowchart of a block chain-based intelligent contract verification method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another block chain-based intelligent contract verification method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a participating node according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention, are intended to cover non-exclusive inclusions, e.g., a process or an apparatus that comprises a list of steps is not necessarily limited to those structures or steps expressly listed but may include other steps or structures not expressly listed or inherent to such process or apparatus.
The intelligent contract verification method based on the block chain provided by the embodiment of the invention aims to solve the problems in the prior art, and the method can be applied to the communication system shown in fig. 1. As shown in fig. 1, the communication system includes: the participating nodes 11, the participating nodes 12, the supervising nodes 13 and the supervising nodes 14, wherein the participating nodes 11, the participating nodes 12, the supervising nodes 13 and the supervising nodes 14 belong to the same block chain network, the participating nodes 11 and the participating nodes 12 may be specifically terminal devices, servers and other devices, the participating nodes 11 and the participating nodes 12 may be signatures of intelligent contracts, and the supervising nodes 13 and the supervising nodes 14 may be specifically authentication devices with contract supervising authority. The supervision nodes 13 and 14 supervise and execute the contracts signed by the participating nodes 11 and 12 in the blockchain network. Here, the description is only illustrative, and the configuration of the block chain network and the number of nodes in the block chain network are not limited.
The following describes the technical solution of the present invention and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of an intelligent contract verification method based on a blockchain according to an embodiment of the present invention, where the method is applied to the scenario shown in fig. 1. Specifically, as shown in fig. 2, the method includes the following steps:
step 101, a first participating node receives a first signature message broadcasted by a second participating node, wherein the first signature message includes contract content of the intelligent contract, the contract content includes first encrypted data, and the first encrypted data is obtained by performing homomorphic encryption on key data in the contract content by using a homomorphic encryption public key of the first participating node.
In the present embodiment, the first participating node may be exemplarily understood as the participating node 11 or the participating node 12 in the scenario of fig. 1, and when the first participating node is specifically the participating node 11, the second participating node may be exemplarily understood as the participating node 12, and similarly, when the first participating node is specifically the participating node 12, the second participating node may be exemplarily understood as the participating node 11.
In this embodiment, the first participating node and the second participating node may be understood as both parties to the signing of the intelligent contract.
Optionally, before the first participating node and the second participating node negotiate and sign the intelligent contract, the first participating node may send its own homomorphic encryption public key to the second participating node in a block chain broadcast manner, and the second participating node may also send its own homomorphic encryption public key to the first participating node in a block chain broadcast manner.
Further, after the first participating node and the second participating node broadcast their own homomorphic cryptographic public keys in the blockchain, the first participating node and the second participating node may negotiate the content of the smart contract under the blockchain, wherein the content related to the monetary amount, such as the transaction amount, the default payment amount, and the like, involved in the contract content may be exemplarily understood as key data of the contract. The intelligent contract can be drafted by any one of two parties of the contract, in this embodiment, it is assumed that the intelligent contract is drafted by a second participating node, the second participating node drafts the contract to be verified, signs the contract to be verified by using its own private key, and sends a third signature message obtained after signing to the first participating node in a block chain-down manner, after receiving the third signature message, the first participating node verifies the third signature message based on the public key of the second participating node, and verifies the terms in the contract to be verified after passing the verification, if the verification is not wrong, the first participating node signs the third signature message by using its own private key, and broadcasts a fourth signature message including the signature of the first participating node and the signature of the second participating node into the block chain, so that the second participating node receives fourth signature data, and homomorphic encryption is carried out on key data in the intelligent contract by adopting a homomorphic encryption public key of the first participating node, the encrypted intelligent contract of the key data is signed by adopting a private key of the second participating node, and a first signature message obtained by signature is sent to the first participating node. If the first participating node disagrees with the contract terms, the modified contract is sent to the second participating node until the two parties do not disagree with the contract.
And 102, the first participating node decrypts the first encrypted data based on a homomorphic decryption private key of the first participating node, and verifies key data obtained by decryption and other contents of the intelligent contract based on a contract to be verified, which is obtained in advance under a block chain.
After the first participating node receives the first signature message, the signature of the first signature message is verified by adopting the public key of the second participating node, if the signature passes the verification, the first encrypted data in the intelligent contract is further decrypted by adopting a homomorphic decryption private key corresponding to the homomorphic encryption public key of the first participating node, key data are obtained, and then the key data obtained by decryption and other unencrypted contents in the intelligent contract are verified based on the contract to be verified which is obtained in advance.
For example, assuming that the first encrypted data is encb (Info), where the Info represents key data, after verifying that the signature of the first signature message is correct, the first participating node decrypts the first encrypted data by using its own homomorphic decryption private key to obtain the Info, compares the Info and other contents in the intelligent contract with corresponding contents in the contract to be verified, determines whether the Info and other contents are consistent, and if so, determines that the verification is passed, otherwise, does not pass.
And 103, if the verification is passed, the first participating node signs the first signature message by using a private key of the first participating node, and broadcasts a second signature message obtained by signature to the block chain, so that other nodes in the block chain supervise the intelligent contract based on the second signature message.
In this embodiment, after the second signature message is broadcast to the blockchain, the blockchain automatically executes the contract after the execution condition of the intelligent contract is satisfied. If the calculation of the key data (for example, the Token transaction between the first participating node and the second participating node) is involved, verification in a homomorphic mode needs to be used, for example, due to default of the first participating node, the key data describes the number of tokens to be transferred to the second participating node in the case of default, the block chain directly subtracts homomorphic encrypted data of the number of tokens to be transferred in the case recorded in the contract from homomorphic encrypted data of the number of tokens of the first participating node recorded in the block chain, and adds homomorphic encrypted data of the number of tokens to be transferred in the case recorded in the contract to homomorphic encrypted data of the number of tokens of the second participating node recorded in the block chain. The block chain not only realizes the supervision and execution of the intelligent contract, but also ensures the confidentiality of key data in the intelligent contract.
In this embodiment, the first participating node receives the contract content broadcast by the second participating node, decrypts the data encrypted by using the homomorphic encryption algorithm in the contract content, verifies the key data obtained by decryption and other contents of the contract based on the pre-obtained contract to be verified, signs the contract content if the verification is passed, and broadcasts the signed contract to the block chain, so that other nodes in the block chain supervise the contract. In the embodiment, the homomorphic encryption public key is adopted to encrypt the key data (such as data related to currency amount) in the contract, and only the node with the corresponding homomorphic decryption private key can decrypt the key data, so that the confidentiality of the key data in the contract is ensured. At the same time, the blockchain can still realize supervision and execution of the contract according to the unencrypted content in the contract and on the basis of the homomorphic encrypted key data.
Fig. 3 is a flowchart of another block chain-based intelligent contract verification method according to an embodiment of the present invention, where the method includes the following steps based on the embodiment of fig. 2:
step 201, a first participating node receives a first signature message broadcasted by a second participating node, the first signature message includes contract content of the intelligent contract, the contract content includes first encrypted data and second encrypted data, the first encrypted data is obtained by homomorphic encryption of key data in the contract content by using a homomorphic encryption public key of the first participating node, and the second encrypted data is obtained by homomorphic encryption of the key data by using a homomorphic encryption public key of the second participating node.
For example, assuming that key data in the contract content is Info, encrypting the Info with the homomorphic encryption public key of the first participating node to obtain first encrypted data encb (Info), encrypting the Info with the homomorphic encryption public key of the second participating node to obtain second encrypted data enca (Info), and SIGa is the private key signature of the second participating node, the first signature message M is M ═ (unencrypted content, enca (Info), encb (Info)) SIGa. It is of course only illustrative and not exclusive here.
Step 202, the first participating node decrypts the first encrypted data based on its own homomorphic decryption private key, and verifies the key data obtained by decryption and other contents of the intelligent contract based on the contract to be verified obtained in advance under the block chain.
After receiving the first signature message, the first participating node decrypts encb (Info) based on its own homomorphic decryption private key to obtain Info, and verifies the Info and unencrypted content in the first signature message based on a pre-obtained contract to be verified.
And 203, performing homomorphic encryption on key data obtained by decrypting the first encrypted data by using the homomorphic encryption public key of the second participating node, comparing third encrypted data obtained by encryption with the second encrypted data, and judging that the verification is passed when the third encrypted data is consistent with the second encrypted data and the key data obtained by decryption and other contents of the intelligent contract are consistent with corresponding contents in the contract to be verified.
In the above example, the first participating node performs homomorphic encryption on the Info by using a homomorphic encryption public key of the second participating node obtained in advance, and compares third encrypted data obtained by encryption with enca (Info), and if the third encrypted data is consistent with enca (Info) and the Info and the unencrypted part in the first signature message are consistent with the corresponding part in the contract to be verified, the verification is confirmed to be passed.
It is understood that this is by way of illustration and not by way of limitation.
And 204, if the verification is passed, the first participating node signs the first signature message by using a private key of the first participating node, and broadcasts a second signature message obtained by signature to the block chain, so that other nodes in the block chain supervise the intelligent contract based on the second signature message.
In the embodiment, homomorphic encryption public keys of the first participating node and the second participating node are respectively adopted to homomorphic encrypt the key data, and the two encrypted data are verified at the first participating node side, so that the reliability of contract data can be ensured.
Fig. 4 is a schematic structural diagram of a participating node provided in the embodiment of the present invention, where the participating node and a second participating node are both parties of signing an intelligent contract, and as shown in fig. 4, a participating node 40 includes:
a processor 41 and a memory 42, the memory 42 having instructions stored therein that when executed by the processor 41 perform the following:
receiving a first signature message broadcast by a second participating node, wherein the first signature message comprises contract content of the intelligent contract, the contract content comprises first encrypted data, and the first encrypted data is obtained by homomorphically encrypting key data in the contract content by adopting a homomorphic encryption public key of the participating node;
decrypting the first encrypted data based on the homomorphic decryption private key of the participating node, and verifying key data obtained by decryption and other contents of the intelligent contract based on a contract to be verified, which is obtained in advance under a block chain;
and if the verification is passed, performing signature processing on the first signature message by using the private key of the participating node, and broadcasting a second signature message obtained by signature to the block chain so as to enable other nodes in the block chain to supervise the intelligent contract based on the second signature message.
Optionally, before receiving the first signature message broadcast by the second participating node, the processor is further configured to:
sending the homomorphic encryption public key of the participating node to the second participating node in a block chain broadcast manner, and
and receiving the homomorphic encryption public key of the second participating node sent by the second participating node in a block chain broadcasting mode.
Optionally, the first signature message further includes second encrypted data, and the second encrypted data is obtained by homomorphically encrypting the key data by using a homomorphic encryption public key of the second participating node.
Optionally, the processor is further configured to:
and performing homomorphic encryption on key data obtained by decryption from the first encrypted data by adopting a homomorphic encryption public key of the second participating node, comparing third encrypted data obtained by encryption with the second encrypted data, and judging that the contract passes verification when the third encrypted data is consistent with the second encrypted data and the key data obtained by decryption and other contents of the intelligent contract are consistent with corresponding contents in the contract to be verified.
The participating node provided in this embodiment can execute the method in the embodiment of fig. 2 or fig. 3, and the executing party and the beneficial effect are similar, and are not described herein again.
Embodiments of the present invention also provide a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method provided in fig. 2 or fig. 3.
Finally, it should be noted that, as one of ordinary skill in the art will appreciate, all or part of the processes of the methods of the embodiments described above may be implemented by hardware related to instructions of a computer program, where the computer program may be stored in a computer-readable storage medium, and when executed, the computer program may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Each functional unit in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An intelligent contract verification method based on a block chain is characterized by comprising the following steps:
a first participating node receives a first signature message broadcast by a second participating node, wherein the first signature message comprises contract content of the intelligent contract, the contract content comprises first encrypted data, and the first encrypted data is obtained by homomorphically encrypting key data in the contract content by adopting a homomorphic encryption public key of the first participating node;
the first participating node decrypts the first encrypted data based on a homomorphic decryption private key of the first participating node, and verifies key data obtained by decryption and other contents of the intelligent contract based on a contract to be verified, which is obtained in advance under a block chain;
if the verification is passed, the first participating node signs the first signature message by using a private key of the first participating node, and broadcasts a second signature message obtained by signature to the block chain, so that other nodes in the block chain supervise the intelligent contract based on the second signature message.
2. The method of claim 1, wherein prior to the first participating node receiving the first signed message broadcast by the second participating node, the method further comprises:
the first participating node sends the homomorphic encryption public key of the first participating node to the second participating node in a block chain broadcasting mode, and
and receiving the homomorphic encryption public key of the second participating node sent by the second participating node in a block chain broadcasting mode.
3. The method according to claim 1, wherein the first signature message further comprises second encrypted data, and the second encrypted data is obtained by homomorphically encrypting the key data by using a homomorphic public encryption key of the second participating node.
4. The method according to claim 3, wherein after verifying the decrypted key data and other contents of the intelligent contract based on the contract to be verified previously obtained under the blockchain, the method further comprises:
and performing homomorphic encryption on key data obtained by decryption from the first encrypted data by adopting a homomorphic encryption public key of the second participating node, comparing third encrypted data obtained by encryption with the second encrypted data, and judging that the contract passes verification when the third encrypted data is consistent with the second encrypted data and the key data obtained by decryption and other contents of the intelligent contract are consistent with corresponding contents in the contract to be verified.
5. The method of claim 1, wherein prior to the first participating node receiving the first signed message broadcast by the second participating node, the method further comprises:
the first participating node receives a third signature message sent by the second participating node in a block chain mode, wherein the third signature message is obtained by signing the contract to be verified by using a private key of the second participating node;
and the first participating node verifies the terms of the contract to be verified, if the contract to be verified passes the verification, the third signature message is signed by using a private key of the first participating node, and a fourth signature message obtained by signature is broadcasted to the block chain, so that the second participating node broadcasts the first signature message in the block chain after receiving the fourth signature message.
6. A participating node, the participating node and a second participating node being both parties to a signing of an intelligent contract, the participating node comprising: a processor and a memory, the memory having instructions stored therein that when executed by the processor perform the following:
receiving a first signature message broadcast by a second participating node, wherein the first signature message comprises contract content of the intelligent contract, the contract content comprises first encrypted data, and the first encrypted data is obtained by homomorphically encrypting key data in the contract content by adopting a homomorphic encryption public key of the participating node;
decrypting the first encrypted data based on the homomorphic decryption private key of the participating node, and verifying key data obtained by decryption and other contents of the intelligent contract based on a contract to be verified, which is obtained in advance under a block chain;
and if the verification is passed, performing signature processing on the first signature message by using the private key of the participating node, and broadcasting a second signature message obtained by signature to the block chain so as to enable other nodes in the block chain to supervise the intelligent contract based on the second signature message.
7. The participant node of claim 6, wherein the processor, prior to receiving the first signed message broadcast by the second participant node, is further configured to:
sending the homomorphic encryption public key of the participating node to the second participating node in a block chain broadcast manner, and
and receiving the homomorphic encryption public key of the second participating node sent by the second participating node in a block chain broadcasting mode.
8. The participant node of claim 6, wherein the first signed message further comprises second encrypted data obtained by homomorphically encrypting the critical data using a homomorphic public encryption key of the second participant node.
9. The participating node of claim 8, wherein the processor is further configured to:
and performing homomorphic encryption on key data obtained by decryption from the first encrypted data by adopting a homomorphic encryption public key of the second participating node, comparing third encrypted data obtained by encryption with the second encrypted data, and judging that the contract passes verification when the third encrypted data is consistent with the second encrypted data and the key data obtained by decryption and other contents of the intelligent contract are consistent with corresponding contents in the contract to be verified.
10. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-5.
CN201911010114.3A 2019-10-22 2019-10-22 Intelligent contract verification method based on block chain, participating node and medium Pending CN110796448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911010114.3A CN110796448A (en) 2019-10-22 2019-10-22 Intelligent contract verification method based on block chain, participating node and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911010114.3A CN110796448A (en) 2019-10-22 2019-10-22 Intelligent contract verification method based on block chain, participating node and medium

Publications (1)

Publication Number Publication Date
CN110796448A true CN110796448A (en) 2020-02-14

Family

ID=69440959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911010114.3A Pending CN110796448A (en) 2019-10-22 2019-10-22 Intelligent contract verification method based on block chain, participating node and medium

Country Status (1)

Country Link
CN (1) CN110796448A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629000A (en) * 2020-05-27 2020-09-04 北京东方通科技股份有限公司 Block chain-based data secure transmission method
CN111858754A (en) * 2020-06-30 2020-10-30 全链通有限公司 Artificial intelligence training method based on block chain, block chain node and medium
CN112989390A (en) * 2021-04-15 2021-06-18 深圳前海移联科技有限公司 Block chain homogeneous data sharing method based on pluggable homomorphic encryption

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548330A (en) * 2016-10-27 2017-03-29 上海亿账通区块链科技有限公司 Transaction verification method and system based on block chain
CN106845960A (en) * 2017-01-24 2017-06-13 上海亿账通区块链科技有限公司 Method for secure transactions and system based on block chain
CN107623572A (en) * 2017-09-27 2018-01-23 济南浪潮高新科技投资发展有限公司 A kind of method of digital certificate granting on block chain
CN107862215A (en) * 2017-09-29 2018-03-30 阿里巴巴集团控股有限公司 A kind of date storage method, data query method and device
CN108711105A (en) * 2018-05-16 2018-10-26 四川吉鼎科技有限公司 A kind of Secure Transaction verification method and system based on block chain
CN109635572A (en) * 2018-11-05 2019-04-16 深圳变设龙信息科技有限公司 A kind of contract signing method, apparatus and terminal device based on block chain
CN109754267A (en) * 2018-12-29 2019-05-14 百度在线网络技术(北京)有限公司 Brand authorization method, device, equipment and medium based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548330A (en) * 2016-10-27 2017-03-29 上海亿账通区块链科技有限公司 Transaction verification method and system based on block chain
CN106845960A (en) * 2017-01-24 2017-06-13 上海亿账通区块链科技有限公司 Method for secure transactions and system based on block chain
CN107623572A (en) * 2017-09-27 2018-01-23 济南浪潮高新科技投资发展有限公司 A kind of method of digital certificate granting on block chain
CN107862215A (en) * 2017-09-29 2018-03-30 阿里巴巴集团控股有限公司 A kind of date storage method, data query method and device
CN108711105A (en) * 2018-05-16 2018-10-26 四川吉鼎科技有限公司 A kind of Secure Transaction verification method and system based on block chain
CN109635572A (en) * 2018-11-05 2019-04-16 深圳变设龙信息科技有限公司 A kind of contract signing method, apparatus and terminal device based on block chain
CN109754267A (en) * 2018-12-29 2019-05-14 百度在线网络技术(北京)有限公司 Brand authorization method, device, equipment and medium based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629000A (en) * 2020-05-27 2020-09-04 北京东方通科技股份有限公司 Block chain-based data secure transmission method
CN111858754A (en) * 2020-06-30 2020-10-30 全链通有限公司 Artificial intelligence training method based on block chain, block chain node and medium
CN112989390A (en) * 2021-04-15 2021-06-18 深圳前海移联科技有限公司 Block chain homogeneous data sharing method based on pluggable homomorphic encryption

Similar Documents

Publication Publication Date Title
CN106548330B (en) Transaction verification method and system based on block chain
CN110796448A (en) Intelligent contract verification method based on block chain, participating node and medium
CN111859446A (en) Agricultural product traceability information sharing-privacy protection method and system
CN112766962A (en) Method for receiving and sending certificate, transaction system, storage medium and electronic device
CN111914293A (en) Data access authority verification method and device, computer equipment and storage medium
CN115242553B (en) Data exchange method and system supporting safe multi-party calculation
CN113438205B (en) Block chain data access control method, node and system
CN113191863A (en) Bidding method, third party device, sponsor device and bidder device
CN114143117B (en) Data processing method and device
CN113726733B (en) Encryption intelligent contract privacy protection method based on trusted execution environment
CN113709734A (en) Unmanned aerial vehicle distributed identity authentication method based on block chain
CN111080300A (en) Asset transfer method and device based on block chain and hardware equipment
CN110782347B (en) Intelligent contract signing method, device and medium based on block chain
CN110766400B (en) Transaction record processing method based on block chain, accounting node and medium
CN112910641B (en) Verification method and device for cross-link transaction supervision, relay link node and medium
US20230188330A1 (en) System and method for identity-based key agreement for secure communication
CN114331648A (en) Bid file processing method, device, equipment and storage medium
CN113132109B (en) Electronic deposit certificate management method and device based on block chain and electronic equipment
CN114584347A (en) Verification short message receiving and sending method, server, terminal and storage medium
CN115935379A (en) Service processing method, device, equipment and computer readable storage medium
CN114374548A (en) Block chain system, communication method thereof, storage medium and program product
CN115344882A (en) Multi-party computing method, device and storage medium based on trusted computing environment
CN109104393B (en) Identity authentication method, device and system
CN109698815B (en) Embedded chip card, card application server and application data transmission system and method
Tan et al. A secure cloud-assisted certificateless group authentication scheme for VANETs in big data environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200214