CN116667999A - Block chain-based data interaction method and device and computer equipment - Google Patents

Block chain-based data interaction method and device and computer equipment Download PDF

Info

Publication number
CN116667999A
CN116667999A CN202310635754.3A CN202310635754A CN116667999A CN 116667999 A CN116667999 A CN 116667999A CN 202310635754 A CN202310635754 A CN 202310635754A CN 116667999 A CN116667999 A CN 116667999A
Authority
CN
China
Prior art keywords
transaction
homomorphic ciphertext
redemption
transaction amount
account
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
CN202310635754.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310635754.3A priority Critical patent/CN116667999A/en
Publication of CN116667999A publication Critical patent/CN116667999A/en
Pending legal-status Critical Current

Links

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/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • 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
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the specification discloses a data interaction method, device and computer equipment based on a blockchain. The method comprises the following steps: receiving a deposit transaction of an initiator device; the deposit transaction comprises a first transaction amount homomorphic ciphertext of an initiator account and a second transaction amount homomorphic ciphertext of a escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by calculation according to a first component of a redemption parameter; submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction. According to the embodiment of the specification, privacy protection can be realized on transaction amount, balance and the like through transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like.

Description

Block chain-based data interaction method and device and computer equipment
Technical Field
The embodiment of the specification relates to the technical field of blockchains, in particular to a blockchain-based data interaction method, a blockchain-based data interaction device and computer equipment.
Background
The blockchain technology is a distributed database technology, and the data cannot be tampered and counterfeited by utilizing cryptography and a consensus mechanism. With the development of computer and internet technologies, the blockchain technology is favored by virtue of the advantages of decentralization, transparency, non-tampering, trust and the like, and is widely applied to numerous fields such as intelligent contracts, securities trading, electronic commerce, the internet of things, social communication, file storage, presence evidence, identity verification, stock crowd funding and the like.
Currently, when blockchain technology is applied to a transaction scenario, transaction information is at risk of leakage to third parties unrelated to the present transaction, as the transaction information needs to be sent to the blockchain for verification, implementation, and uplink.
The business needs a technical scheme capable of realizing privacy protection in the transaction process.
Disclosure of Invention
The embodiment of the specification provides a data interaction method, device and computer equipment based on a blockchain so as to realize privacy protection. The technical solutions of the embodiments of the present specification are as follows.
In a first aspect of embodiments of the present disclosure, a data interaction method based on a blockchain is provided, including:
receiving a deposit transaction of an initiator device; the deposit transaction comprises a first transaction amount homomorphic ciphertext of an initiator account and a second transaction amount homomorphic ciphertext of a escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by calculation according to a first component of a redemption parameter;
submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
In a second aspect of embodiments of the present disclosure, a data interaction method based on a blockchain is provided, including:
receiving a redemption transaction for the recipient device; the redemption transaction includes a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the recipient account, the third transaction amount homomorphic ciphertext being escrowed by the issuer in the escrowed account through the deposit transaction;
Submitting redemption transactions to the blockchain; the redemption transaction is used for deducting the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext of the escrow account, and adding the fourth transaction amount homomorphic ciphertext from the fourth balance homomorphic ciphertext of the receiving party account.
In a third aspect of embodiments of the present disclosure, a data interaction method based on a blockchain is provided, including:
calculating a first transaction amount homomorphic ciphertext of the initiator account and a second transaction amount homomorphic ciphertext of the escrow account, wherein the second transaction amount homomorphic ciphertext is calculated according to a first component of the redemption parameter;
sending a deposit transaction to a supervising device; the deposit transaction comprises a first transaction homomorphic ciphertext and a second transaction homomorphic ciphertext, the deposit transaction is used for deducting the first transaction homomorphic ciphertext from a first balance homomorphic ciphertext of an initiator account through a blockchain, generating a third transaction homomorphic ciphertext according to the second transaction homomorphic ciphertext, and adding the third transaction homomorphic ciphertext into the second balance homomorphic ciphertext of a escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
In a fourth aspect of embodiments of the present disclosure, a data interaction method based on a blockchain is provided, including:
Calculating a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext of the receiver account, wherein the third transaction homomorphic ciphertext is hosted in a hosting account by an initiator through deposit transaction;
transmitting the redemption transaction to the supervising device; the redemption transaction comprises a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext, and the redemption transaction is used for deducting the third transaction homomorphic ciphertext from a third balance homomorphic ciphertext of the escrow account through a blockchain and adding the fourth transaction homomorphic ciphertext from a fourth balance homomorphic ciphertext of the receiver account.
In a fifth aspect of embodiments of the present disclosure, there is provided a blockchain-based data interaction device, including:
a receiving unit for receiving a deposit transaction of an initiator device; the deposit transaction comprises a first transaction amount homomorphic ciphertext of an initiator account and a second transaction amount homomorphic ciphertext of a escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by calculation according to a first component of a redemption parameter;
a submitting unit for submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
In a sixth aspect of embodiments of the present disclosure, there is provided a blockchain-based data interaction device, including:
a receiving unit for receiving a redemption transaction of the recipient device; the redemption transaction includes a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the recipient account, the third transaction amount homomorphic ciphertext being escrowed by the issuer in the escrowed account through the deposit transaction;
a submitting unit for submitting redemption transactions to the blockchain; the redemption transaction is used for deducting the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext of the escrow account, and adding the fourth transaction amount homomorphic ciphertext from the fourth balance homomorphic ciphertext of the receiving party account.
In a seventh aspect of embodiments of the present disclosure, there is provided a blockchain-based data interaction device, including:
the computing unit is used for computing a first transaction amount homomorphic ciphertext of the initiator account and a second transaction amount homomorphic ciphertext of the escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by computing according to a first component of the redemption parameter;
a transmitting unit for transmitting the deposit transaction to the supervision device; the deposit transaction comprises a first transaction homomorphic ciphertext and a second transaction homomorphic ciphertext, the deposit transaction is used for deducting the first transaction homomorphic ciphertext from a first balance homomorphic ciphertext of an initiator account through a blockchain, generating a third transaction homomorphic ciphertext according to the second transaction homomorphic ciphertext, and adding the third transaction homomorphic ciphertext into the second balance homomorphic ciphertext of a escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
An eighth aspect of embodiments of the present specification provides a blockchain-based data interaction device, including:
the calculation unit is used for calculating a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext of the receiver account, wherein the third transaction homomorphic ciphertext is hosted in the hosting account by the initiator through deposit transaction;
a transmitting unit for transmitting the redemption transaction to the supervising device; the redemption transaction comprises a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext, and the redemption transaction is used for deducting the third transaction homomorphic ciphertext from a third balance homomorphic ciphertext of the escrow account through a blockchain and adding the fourth transaction homomorphic ciphertext from a fourth balance homomorphic ciphertext of the receiver account.
A ninth aspect of embodiments of the present specification provides a computer device comprising:
a memory for storing computer instructions;
a processor configured to execute computer instructions to implement the methods of the first, second, third, and fourth aspects.
According to the technical scheme provided by the embodiment of the specification, privacy protection can be realized on transaction information such as transaction amount, balance and the like through the transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like, and the balance after transaction can be updated correctly. In addition, through the escrow account, the identity between the initiator and the receiver is conveniently protected, so that the privacy protection of the identity of the transaction party is realized.
Drawings
In order to more clearly illustrate the embodiments of the present description or the solutions in the prior art, the drawings that are required for the embodiments or the description of the prior art will be briefly described, the drawings in the following description are only some embodiments described in the present description, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a blockchain-based data interaction method in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a data interaction method based on a blockchain in an embodiment of the present disclosure;
FIG. 3 is a flowchart of a data interaction method based on a blockchain in an embodiment of the present disclosure;
FIG. 4 is a flowchart of a data interaction method based on a blockchain in an embodiment of the present disclosure;
FIG. 5 is a flowchart of a data interaction method based on a blockchain in an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a block chain based data interaction device according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a block chain based data interaction device according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a block chain based data interaction device according to an embodiment of the present disclosure;
Fig. 9 is a schematic structural diagram of a data interaction device based on a blockchain in the embodiment of the present disclosure.
Detailed Description
The technical solutions of the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present specification, not all embodiments. The specific embodiments described herein are to be considered in an illustrative rather than a restrictive sense. All other embodiments derived by a person of ordinary skill in the art based on the described embodiments of the present disclosure fall within the scope of the present disclosure. In addition, relational terms such as "first" and "second", and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The embodiment of the specification provides a data interaction method based on a block chain.
In some embodiments, the blockchain (blockchain) may be a distributed ledger that organizes a plurality of blockdata in a chained structure according to a chronological order, and ensures security, traceability, and non-tamperability with a cryptographic algorithm. The blockchains may include public blockchains, federated blockchains (also known as federated blockchains), private blockchains, and the like. The blockchain may be implemented based on a blockchain network. The blockchain network may include a P2P network or the like. The blockchain network may include a plurality of blockchain nodes. And the unified blockchain ledgers are commonly maintained among the blockchain nodes.
By deploying a Smart Contract (Smart Contract) in the blockchain, the blockchain can be made to have the functionality of a Smart Contract. The intelligent contract refers to a computer program capable of running on a node device of a blockchain network. Deployment of the smart contract may be accomplished through a transaction. For example, business personnel may write smart contracts using a computer high-level language. Bytecode can be obtained by compiling the composed smart contracts. The node device of the blockchain may construct a transaction to deploy the smart contract from the bytecode. The intelligent contracts may be deployed in the blockchain by submitting transactions to the blockchain network to deploy the intelligent contracts.
In some embodiments, a transfer transaction may be conducted between the initiator and the recipient. The initiator is used for initiating a transfer transaction, and the receiver is used for receiving the transfer transaction. The transaction amount may include an amount of the transfer transaction. The initiator and the recipient may include users and the like. For example, the initiator and the recipient may comprise users of financial institutions.
Wherein a transfer transaction between an initiator and a recipient may be effected via a hosted account. The identity between the initiator and the receiver is conveniently protected through the managed account, so that the privacy protection of the identity of the transaction party is realized. The hosted account may be an account in a blockchain. The escrow account may include a smart contract account. The intelligent contract account is convenient to provide anonymous fund hosting service for users by utilizing the characteristic that the intelligent contract is automatically executed according to rules, so that anonymity of identities of both parties of a transaction is realized. It is worth to say that anonymity is enhanced along with the increase of an anonymity set, the size of the anonymity set is the number of people participating in anonymity escrow in the same period, and transactions of users in the anonymity set are mutually independent, so that the calculation cost and the storage cost of the transactions are independent from the size of the anonymity set, and the method has high transaction efficiency and low transaction cost while providing strong anonymity and is convenient to realize. Of course, the escrow account may also include other accounts, such as an account that may also include a supervisor.
In some embodiments, the initiator may correspond with an initiator account. The initiator account may be an account of the initiator in the blockchain. The initiator account may have a signing key and an encryption key. The signing key may include an associated public signature key and private signature key. The signature private key is used to sign transactions to be submitted to the blockchain. The public signature key may be disclosed to a blockchain link point in a blockchain network for signing the signed transaction. The encryption key includes an associated encryption public key and decryption private key. The encryption public key may be disclosed to blockchain nodes in the blockchain network for encrypting data (e.g., account balances, transaction amounts, etc.). The decryption private key is used for decrypting the encrypted ciphertext.
The initiator account may correspond to a balance homomorphic ciphertext in the blockchain. The balance homomorphic ciphertext can be obtained by calculation through homomorphic encryption algorithm according to the secret key and balance of the initiator account. The homomorphic encryption algorithm may include, for example, an ElGamal algorithm, okamoto-Uchiyama algorithm, boneh-Goh-Nissim algorithm, etc. The homomorphic encryption algorithm has the following characteristics: the homomorphically encrypted data is processed to obtain an output, and the output is decrypted, the result of which is the same as the output result obtained by processing the unencrypted original data by the same method. The balance homomorphic ciphertext may be understood as homomorphic ciphertext about the account balance of the initiator. Specifically, the balance homomorphic ciphertext can be obtained by calculation through homomorphic encryption algorithm according to the encryption public key of the initiator account and the balance. For example, the balance homomorphic ciphertext may be according to equation E PKA (b A )=(r A G,b A G+r A PK A ) And (5) calculating to obtain the product. E (E) PKA (b A ) Homomorphic ciphertext representing balance of initiator account, r A Representing random numbers, b A Representing the balance of the initiator account, G represents the generator of the elliptic curve, PK A Representing the encrypted public key of the initiator account.
In some embodiments, the escrow account may have a signing key and an encryption key. The signing key may include an associated public signature key and private signature key. The signature private key is used to sign transactions to be submitted to the blockchain. The public signature key may be disclosed to a blockchain link point in a blockchain network for signing the signed transaction. The encryption key includes an associated encryption public key and decryption private key. The encryption public key may be disclosed to a blockchain node in the blockchain network for encrypting data. The decryption private key is used for decrypting the encrypted ciphertext. The escrow account may correspond to a balance homomorphic ciphertext in the blockchain. The balance homomorphic ciphertext may be understood as homomorphic ciphertext about the escrow account balance.
In some embodiments, the recipient may correspond to a recipient account. The recipient account may be an account of the recipient in the blockchain. The recipient account may have a signing key and an encryption key. The signing key may include an associated public signature key and private signature key. The signature private key is used to sign transactions to be submitted to the blockchain. The public signature key may be disclosed to a blockchain link point in a blockchain network for signing the signed transaction. The encryption key includes an associated encryption public key and decryption private key. The encryption public key may be disclosed to blockchain nodes in the blockchain network for encrypting data (e.g., account balances, transaction amounts, etc.). The decryption private key is used for decrypting the encrypted ciphertext.
The recipient account may correspond to a balance homomorphic ciphertext in the blockchain. The balance homomorphic ciphertext can be obtained by calculation through homomorphic encryption algorithm according to the key and balance of the account of the receiving party. The balance homomorphic ciphertext can be understood as homomorphic ciphertext about the balance of the account of the receiving party. Specifically, the balance homomorphic ciphertext can be obtained by calculation through homomorphic encryption algorithm according to the encryption public key and balance of the account of the receiving party. For example, the balance homomorphic ciphertext may be according to equation E PKB (b B )=(r B G,b B G+r B PK B ) And (5) calculating to obtain the product. E (E) PKB (b B ) Representing the homomorphic ciphertext of the balance of the account of the receiver, r B Representing random numbers, b B Representing the balance of the account of the receiving party, G represents the generator of the elliptic curve, RK B Representing the encrypted public key of the recipient account.
Please refer to fig. 1. The blockchain-based data interaction method may include the following steps.
Step S11: the initiator device calculates a first transaction amount homomorphic ciphertext and a second transaction amount homomorphic ciphertext.
In some embodiments, the initiator device may comprise a device of the initiator. The initiator device may include a server, a smart phone, or the like. The initiator device may hold a balance of the initiator account, a key of the initiator account, a transaction amount, a first component of a redemption parameter. Wherein the key of the initiator account may comprise a public key and a private key, and the first component of the redemption parameter may comprise a random number. The redemption parameter is used for the recipient to redeem the transaction amount from the escrow account.
In some embodiments, the initiator device may calculate the first transaction amount homomorphic ciphertext from the key of the initiator account and the transaction amount via a homomorphic encryption algorithm. The first transaction amount homomorphic ciphertext is homomorphic ciphertext about a transaction amount.
In some examples of the scenario, the initiator device may calculate the first transaction amount homomorphic ciphertext through a homomorphic encryption algorithm from the encrypted public key of the initiator account, the first component of the redemption parameter, and the transaction amount. For example, the initiator device may be based on
E PKA (v)=(r v G,vG+r v PK A ) A first transaction amount homomorphic ciphertext is calculated. E (E) PKA (v) Representing the homomorphic ciphertext of a first transaction amount, r v Representing the first component of the redemption parameters, PK A Representing the encrypted public key, G representing the generator of the elliptic curve, v representing the transaction amount.
In some embodiments, the initiator device may calculate the second transaction amount homomorphic ciphertext from the first component of the redemption parameter and the transaction amount via a homomorphic encryption algorithm. The second transaction amount homomorphic ciphertext is homomorphic ciphertext about the transaction amount.
In some examples of the scenario, the initiator device may calculate the second transaction amount homomorphic ciphertext from the encrypted public key of the escrow account, the first component of the redemption parameter, and the transaction amount via a homomorphic encryption algorithm. For example, the initiator device may be based on
E PKC (v)=(r v G,vG+r v PK C ) A second transaction amount homomorphic ciphertext is calculated. E (E) PKC (v) Representing the homomorphic ciphertext of the second transaction amount, r v Representing the first component of the redemption parameters, PK C Representing the encrypted public key, G representing the generator of the elliptic curve, v representing the transaction amount.
Step S12: the initiator device sends a deposit transaction to the policing device.
In some embodiments, the supervising device may include a device of a supervisor. The supervisor device may join the blockchain network as a blockchain link point. The supervisor device may comprise a server or the like. The supervisor is used to review and manage transfer transactions. The supervisor may include a government agency or the like. By introducing the supervision party, privacy security of both transaction parties can be ensured, meanwhile, privacy is prevented from being abused, balance between privacy and supervision is realized, and the method has important significance for protecting personal information and fund security, preventing illegal criminal behaviors and building a harmonious transaction environment.
The deposit transaction may include the first transaction amount homomorphic ciphertext, the second transaction amount homomorphic ciphertext, and the like.
Step S13: the supervising device submits a deposit transaction to the blockchain.
In some embodiments, the balance homomorphic ciphertext of the initiator account may be used as the first balance homomorphic ciphertext; the balance homomorphic ciphertext of the escrow account may be used as the second balance homomorphic ciphertext. The supervising device may submit the deposit transaction to the blockchain. The first transaction homomorphic ciphertext can be deducted from the first balance homomorphic ciphertext through the blockchain; generating a third transaction amount homomorphic ciphertext from the second component of the redemption parameter and the second transaction amount homomorphic ciphertext; a third transaction amount homomorphic ciphertext may be added to the second balance homomorphic ciphertext. Specifically, the link points of the common-knowledge blocks in the blockchain can deduct the first transaction amount homomorphic ciphertext from the first balance homomorphic ciphertext by executing an intelligent contract; generating a third transaction amount homomorphic ciphertext from the second component of the redemption parameter and the second transaction amount homomorphic ciphertext; and adding a third transaction homomorphic ciphertext into the second balance homomorphic ciphertext. The common blockchain node may be a blockchain node determined based on a common mechanism of the blockchain.
The consensus blockchain node may subtract the first balance homomorphic ciphertext from the first transaction homomorphic ciphertext. In view of the fact that the first balance homomorphic ciphertext and the first transaction homomorphic ciphertext are homomorphic ciphertexts, the transaction amount can be deducted from the balance of the initiator account by subtracting the first balance homomorphic ciphertext from the first transaction homomorphic ciphertext. For example, the first balance homomorphic ciphertext may be represented as E PKA (b A )=(r A G,b A G+r A PK A ) The first transaction amount homomorphic ciphertext may be represented as E PKA (v)=(r v G,vG+r v PK A ) Then E PKA (b A )-E PKA (v)=E PKA (b A -v)=((r A -r v )G,(b A -v)G+(r A -r v )PK A )。
The consensus blockchain node may generate a second component of the redemption parameter. The second component of the redemption parameter may be a random number. The sum of the first component and the second component of the redemption parameter may be equal to the redemption parameter. Thus, by generating a second component of the redemption parameter for each deposit transaction, a third transaction amount cryptogram is generated based on the second component of the redemption parameter. The privacy of the transaction amount can be enhanced, avoiding leakage of the transaction amount due to leakage of the first component of the redemption parameters.
The common blockchain node may generate a third transaction amount homomorphic ciphertext from the second component of the redemption parameter and the second transaction amount homomorphic ciphertext via a homomorphic encryption algorithm. The third transaction amount homomorphic ciphertext may be used as a deposit for the initiator to be hosted in the hosted account for redemption by the recipient in the hosted account. For example, one can follow the formula E' PKC (v)=E PKC (v)+(r′ v G,r′ v PK C )=((r v +r′ v )g,vG+(r v +r′ v )PK C ) A third transaction amount homomorphic ciphertext is generated. E's' PKC (v) Representing the homomorphic ciphertext of the third transaction amount, E PKC (v) Representing the homomorphic ciphertext of the second transaction amount, r' v A second component representing redemption parameters, r v A first component representing redemption parameters, v representing transaction amount, PK C Representing the encrypted public key of the escrow account, G represents the generator of the elliptic curve.
The consensus blockchain node may add the second balance homomorphic ciphertext to the third transaction amount homomorphic ciphertext. And in view of the fact that the second balance homomorphic ciphertext and the third transaction homomorphic ciphertext are homomorphic ciphertext, the transaction amount can be increased in the balance of the escrow account by adding the second balance homomorphic ciphertext and the third transaction homomorphic ciphertext. For example, the second balance homomorphic ciphertext may be represented as E PKC (b C ) The third transaction amount homomorphic ciphertext may be represented as E' PKC (v) F is then PKC (b C )+E′ PKC (v)=E PKC (b c +v)=((r v +r′ v )G,vG+(r v +r′ v )PK C )。r′ v A second component representing redemption parameters, r v A first component representing redemption parameters, v representing transaction amount, PK C Representing the encrypted public key of the escrow account, G represents the generator of the elliptic curve.
In some embodiments, the supervising device submits the deposit transaction to the blockchain. The third transaction homomorphic ciphertext can also be recorded in the hosting record set through the blockchain. Specifically, after submitting the deposit transaction to the blockchain, the identified blockchain node in the blockchain may record a third transaction homomorphic ciphertext in the hosted record set. At least one transaction amount homomorphic ciphertext may be included in the escrow record. The at least one transaction amount homomorphic ciphertext corresponds to at least one escrow funds.
Step S14: the supervising device feeds back deposit credentials to the initiator device.
In some embodiments, the blockchain may feed back deposit credentials to the supervising device. The credit voucher may be generated based on a second component of the redemption parameter. The deposit vouchers are used to query the blockchain for escrow funds. In particular, the consensus blockchain node may encrypt the second component of the redemption parameter to obtain the credit voucher. Wherein the second component of the redemption parameters may be encrypted with the encrypted public key of the initiator account using a common encryption algorithm to obtain the deposit voucher. The general encryption algorithm may include an encryption algorithm that does not satisfy homomorphic encryption characteristics. For example, the consensus blockchain node may generate a random number k A Can be based on the random number k A Encrypting the second component of the redemption parameters by a common encryption algorithm to obtain the deposit voucher Enc PKA (r′ v )。Enc PKA (r′ v )=(k A G,C A ),C A =r′ v x mod N,k A PK A =(x,y)。r′ v A second component representing redemption parameters, G representing the generator of the elliptic curve, N representing the order of the elliptic curve, PK A An encrypted public key representing an account of the initiator, (x, y) represents an ellipseThe coordinates of a point on the circular curve.
In some embodiments, the policing device may receive and send deposit credentials to the initiator device.
Step S15: the originator device determines redemption parameters based on the deposit vouchers and sends redemption vouchers to the recipient device.
In some embodiments, the initiator device may receive deposit credentials; a second component of the redemption parameter may be determined based on the credit voucher; the redemption parameters may be determined from the first component of the redemption parameters and the second component of the redemption parameters; a redemption voucher can be generated based on the redemption parameters; the redemption voucher can be sent to the recipient device.
The initiator device may decrypt the deposit voucher to obtain a second component of the redemption parameter. Wherein the redemption ticket can be decrypted using a common decryption algorithm with the decryption private key of the initiator account to obtain a second component of the redemption parameter.
For example, enc PKA (r′ v )=(k A G,C A ),k A G·SK A =k A PK A =(x,y),r′ v =C A x -1 mod N。r′ v A second component representing redemption parameters, G representing a generator of an elliptic curve, N representing a step of the elliptic curve, SK A Representing the decryption private key of the initiator account, (x, y) represents the coordinates of a point on the elliptic curve.
The originator device may add the first component of the redemption parameter and the second component of the redemption parameter to obtain the redemption parameter.
The redemption parameters may be encrypted by the initiator device to obtain redemption vouchers. Wherein the redemption parameters can be encrypted by the encrypted public key of the recipient account using a common encryption algorithm to obtain redemption credentials.
For example, the initiator device may generate a random number k B Can be based on the random number k B Encrypting the redemption parameters by a common encryption algorithm to obtain redemption vouchers Enc PKB (r v +r′ v )。Enc PKB (r v +r′ v )=(k B G,C B ),C B =(r v +r′ v )x′mod N,k B PK B =(x′,y′)。r v +r′ v Representing redemption parameters, G representing the generator of the elliptic curve, N representing the order of the elliptic curve, PK B Representing the encrypted public key of the recipient account, (x ', y') represents the coordinates of a point on the elliptic curve.
In some embodiments, the initiator device may calculate the third transaction amount homomorphic ciphertext from the redemption parameters and the transaction amount via a homomorphic encryption algorithm. In some examples of the scenario, the initiator device may calculate the third transaction amount homomorphic ciphertext through a homomorphic encryption algorithm based on the encrypted public key of the escrow account, the redemption parameters, and the transaction amount. For example, the initiator device may be according to E' PKC (v)=((r v +r′ v )G,vG+(r v +r′ v )PK C ) And calculating the homomorphic ciphertext of the third transaction amount. The initiator device may send a first query transaction to the supervising device. The first query transaction may include a third transaction amount homomorphic ciphertext. The supervision equipment can submit a first inquiry transaction to the blockchain so as to inquire a third transaction amount homomorphic ciphertext in the managed record set through the blockchain and obtain an inquiry result of the first inquiry result; the query result of the first query transaction may be fed back to the initiator device. The query result of the first query transaction is used to indicate whether the escrow was successful. In this way, the initiator device can generate redemption vouchers in accordance with the redemption parameters if yes; the redemption voucher can be sent to the recipient device.
Step S16: the receiving device calculates a third transaction amount cryptogram and a fourth transaction amount cryptogram.
In some embodiments, the recipient device may receive redemption vouchers; the redemption parameters may be determined from the redemption credentials; the third transaction amount homomorphic ciphertext can be calculated through a homomorphic encryption algorithm according to the redemption parameters and the transaction amount; the fourth transaction amount homomorphic ciphertext may be calculated by a homomorphic encryption algorithm based on the key of the recipient account and the transaction amount.
The recipient device may decrypt the redemption ticket to obtain the redemption parameters. Wherein the redemption ticket can be decrypted using a common decryption algorithm with the decryption private key of the recipient account to obtain the redemption parameters.
For example, enc PKB (r v +r′ v )=(k B G,C B ),k B G·SK B =k B PK B =(x′,y′),r v +r′ v =C B x′ -1 mod N。r v +r′ v Representing redemption parameters, G representing the generator of the elliptic curve, N representing the order of the elliptic curve, SK B Representing the decryption private key of the recipient account, (x ', y') represents the coordinates of a point on the elliptic curve.
The recipient device may calculate a third transaction amount homomorphic ciphertext from the encrypted public key of the escrow account, the redemption parameters, and the transaction amount via a homomorphic encryption algorithm. For example, the recipient device may be according to E' PKC (v)=((r v +r′ v )G,vG+(r v +r′ v )PK C ) And calculating the homomorphic ciphertext of the third transaction amount. E's' PKC (v) Representing the homomorphic ciphertext of a third transaction amount, r v +r′ v Representing redemption parameters, PK C Representing the encrypted public key, G representing the generator of the elliptic curve, v representing the transaction amount.
The recipient device may calculate a fourth transaction amount homomorphic ciphertext from the encrypted public key of the recipient account, the redemption parameters, and the transaction amount via a homomorphic encryption algorithm. For example, the recipient device may be in accordance with E PKB (v)=((r v +r′ v )G,vG+(r v +r′ v )PK B ) And calculating the homomorphic ciphertext of the fourth transaction amount. E (E) PKB (v) Representing the homomorphic ciphertext of the fourth transaction amount, r v +r′ v Representing redemption parameters, PK B Representing the encrypted public key, G representing the generator of the elliptic curve, v representing the transaction amount.
Step S17: the recipient device sends the redemption transaction to the supervising device.
The redemption transaction may include the third transaction amount homomorphic ciphertext, the fourth transaction amount homomorphic ciphertext, and so on.
In some embodiments, the recipient device may send a second query transaction to the policing device. The second query transaction may include a third transaction amount homomorphic ciphertext. The supervision equipment can submit a second inquiry transaction to the blockchain so as to inquire a third transaction amount homomorphic ciphertext in the managed record set through the blockchain and obtain an inquiry result of the second inquiry result; the query result of the second query transaction may be fed back to the recipient device. The query result of the second query transaction is used to indicate whether the sponsor hosts a transaction amount with the hosted account. In this way, the recipient device can send the redemption transaction to the supervising device if so.
Step S18: the supervising device submits a redemption transaction to the blockchain.
In some embodiments, the second balance homomorphic ciphertext obtained by adding the third transaction amount homomorphic ciphertext in step S13 may be used as the third balance homomorphic ciphertext; the balance homomorphic ciphertext of the account of the receiving party can be used as a fourth balance homomorphic ciphertext. The supervising device may submit redemption transactions to the blockchain. The third transaction homomorphic ciphertext can be deducted from the third balance homomorphic ciphertext through the blockchain, and the fourth transaction homomorphic ciphertext can be added to the fourth balance homomorphic ciphertext. Specifically, the link points of the common-knowledge blocks in the blockchain can deduct the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext by executing the intelligent contract; and adding the fourth transaction homomorphic ciphertext into the fourth balance homomorphic ciphertext.
The consensus blockchain node may subtract the third balance homomorphic ciphertext from the third transaction homomorphic ciphertext. And in view of the fact that the third balance homomorphic ciphertext and the third transaction homomorphic ciphertext are homomorphic ciphertexts, deducting the transaction amount from the balance of the escrow account can be achieved by subtracting the third balance homomorphic ciphertext from the third transaction homomorphic ciphertext. For example, the third balance homomorphic ciphertext added to the third transaction amount homomorphic ciphertext through the deposit transaction at step S13 may be represented as E PKC (b C +v)=((r v +r′ v )G,vG+(r v +r′ v )PK C ) The third transaction amount homomorphic ciphertext may be represented as E' PKC (v)=((r v +r′ v )G,vG+(r v +r′ v )PK C ),Then E PKC (b c +v)-E′ PKC (v)=E PKC (b C +v-v)=E PKC (b C )。
The consensus blockchain node may add the fourth balance homomorphic ciphertext to the fourth transaction amount homomorphic ciphertext. In view of the fact that the fourth balance homomorphic ciphertext and the fourth transaction homomorphic ciphertext are homomorphic ciphertexts, the transaction amount can be increased in the balance of the account of the receiving party by adding the fourth balance homomorphic ciphertext and the fourth transaction homomorphic ciphertext. For example, the fourth balance homomorphic ciphertext may be represented as E PKB (b B ) The fourth transaction amount homomorphic ciphertext may be represented as E PKB (v) Then E PKB (b B )+E PKB (v)=E PKB (b B +v)=((r B +r v +r′ v )G,(b B +v)G+(r B +r v +r′ v )PK B )。
In some embodiments, the initiator device may also generate the first zero-knowledge proof and/or the second zero-knowledge proof based on a zero-knowledge proof technique. The zero knowledge proof technique may be implemented, for example, based on the Bulletproof algorithm or the Schnorr algorithm. Further, the zero knowledge proof technique may include an interval proof technique. The first zero knowledge proof is used for verification: the transaction amount is in a set value interval, and the value of the account balance of the initiator after deducting the transaction amount is in the set value interval. The second zero knowledge proof is used for verification: the initiator device holds a first component of the initiator account balance, the transaction amount, and the redemption parameters.
Accordingly, the first zero-knowledge proof and/or the second zero-knowledge proof may be included in the deposit transaction for verification by the consensus blockchain node through the first zero-knowledge proof: the transaction amount is located in a set value interval, and the value of the account balance of the initiator after deducting the transaction amount is located in the set value interval; and for the consensus blockchain node to verify through a second zero knowledge proof: the initiator device holds a first component of the initiator account balance, the transaction amount, and the redemption parameters.
For example, the initiator device may generate a range proof Rangeproo through a Bulletproof algorithmf, as a first zero knowledge proof. Range proof is used for verification: transaction amount v is in interval [0,2 l -1]The account balance of the initiator is a value b after deducting the transaction amount A V is in interval [0,2 ] l -1]And (3) inner part. For another example, the initiator device may generate a second zero knowledge proof ZKproof by the Schnorr algorithm D . Second zero knowledge proof ZKproof D For verification of: initiator device holds initiator account balance b A First component r of transaction amount v, redemption parameters v
By the zero knowledge proof technology, the validity of the transaction can be verified under the condition of not revealing privacy. The method and the device ensure the validity of the transaction while ensuring the identity privacy and the amount privacy of the transaction.
In some embodiments, the identity of the escrow account and/or the encrypted public key of the initiator account may also be included in the deposit transaction.
In some embodiments, the initiator device may also sign the deposit transaction according to a private signature key of the initiator account, resulting in signature data. Accordingly, the signature data may also be included in the deposit transaction. The signature data is used for signature verification by the consensus blockchain node. For example, the consensus blockchain node may verify the signature data with a signature public key of the initiator account. After verification is successful, the consensus blockchain node can execute an intelligent contract, so that a first transaction amount homomorphic ciphertext is deducted from a first balance homomorphic ciphertext; generating a third transaction amount homomorphic ciphertext from the second component of the redemption parameter and the second transaction amount homomorphic ciphertext; and adding a third transaction homomorphic ciphertext into the second balance homomorphic ciphertext.
In some examples of scenarios, the deposit transaction TX sent by the initiator device DeposiT ={Addr C ,PK A ,E PKA (v),E PKC (v),Rangeproof,ZKprf D ,σ}。Addr C Representing identification, PK, of escrow account A Represents an encrypted public key, E PKA (v) Representing the homomorphic ciphertext of the first transaction amount, E PKC (v) Representing the homomorphic ciphertext of the second transaction, rangroproof representing the first zero knowledge proof, ZKproof D Representing a second zero knowledge proof, σ represents signature data.
In some embodiments, the supervising device, upon receiving the deposit transaction, may detect whether the hosted account is frequently transacted based on the identity of the hosted account; decrypting the homomorphic ciphertext of the second transaction amount according to the decryption private key corresponding to the escrow account to obtain the transaction amount; whether the transaction amount is abnormal or not can be detected; if the escrow account has no frequent transactions and the transaction amount is normal, a deposit transaction can be submitted to the blockchain; otherwise, the prompt information may be fed back to the initiator device. The prompt information is used for prompting deposit transaction abnormality. Wherein transaction amount anomalies include, but are not limited to: the transaction amount is greater than or equal to a set value.
In some embodiments, the recipient device may also generate a third zero-knowledge proof based on a zero-knowledge proof technique. The third zero knowledge proof is used for verification: the recipient device holds the recipient account balance, transaction amount, redemption parameters.
Accordingly, a third zero knowledge proof may be included in the redemption transaction for verification by the consensus blockchain node of the third zero knowledge proof: the recipient device holds the recipient account balance, transaction amount, redemption parameters.
For example, the recipient device may generate a third zero knowledge proof ZKproof by the Schnorr algorithm R
By the zero knowledge proof technology, the validity of the transaction can be verified under the condition of not revealing privacy. The method and the device ensure the validity of the transaction while ensuring the identity privacy and the amount privacy of the transaction.
In some embodiments, the identity of the escrow account and/or the encrypted public key of the recipient account may also be included in the redemption transaction.
In some embodiments, the recipient device may also sign the redemption transaction based on the private signature key of the recipient account to obtain the signature data. Accordingly, the signature data may also be included in the received transaction. The signature data is used for signature verification by the consensus blockchain node. For example, the consensus blockchain node may verify the signature data based on the public signature key of the recipient account. After the verification is successful, the consensus blockchain node can execute an intelligent contract, so that a third transaction homomorphic ciphertext is deducted from a third balance homomorphic ciphertext of the escrow account, and a fourth transaction homomorphic ciphertext is added to a fourth balance homomorphic ciphertext of the receiver account.
In some examples of scenarios, the redemption transaction TX sent by the recipient device Redeem ={Addr C ,PK B ,E PKB (v),E′ PKC (v),ZKproof R ,σ}。Addr C Representing identification, PK, of escrow account B Representing an encrypted public key, E' PKC (v) Representing the homomorphic ciphertext of the third transaction amount, E PKB (v) Representing the homomorphic ciphertext of the fourth transaction R Representing a third zero knowledge proof, σ represents signature data.
In some embodiments, the supervising device, upon receipt of the redemption transaction, may detect whether the escrow account is frequently transacted based on the identity of the escrow account; the homomorphic ciphertext of the third transaction amount can be decrypted according to a decryption private key corresponding to the escrow account to obtain the transaction amount; whether the transaction amount is abnormal or not can be detected; if the escrow account has no frequent transactions and the transaction amount is normal, a redemption transaction may be submitted to the blockchain; otherwise, the prompt information can be fed back to the receiver device. The hint information is used to hint redemption transaction anomalies. Wherein transaction amount anomalies include, but are not limited to: the transaction amount is greater than or equal to a set value.
According to the blockchain-based data interaction method disclosed by the embodiment of the specification, privacy protection can be realized on transaction information such as transaction amount, balance and the like through transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like, and the balance after transaction can be correctly updated. In addition, through the escrow account, the identity between the initiator and the receiver is conveniently protected, so that the privacy protection of the identity of the transaction party is realized.
Please refer to fig. 2. The embodiment of the specification provides a data interaction method based on a block chain. The method may be applied to a supervisor device comprising the following steps.
Step S21: receiving a deposit transaction of an initiator device; the deposit transaction includes a first transaction amount homomorphic ciphertext for the initiator account and a second transaction amount homomorphic ciphertext for the escrow account, the second transaction amount homomorphic ciphertext calculated from a first component of the redemption parameter.
Step S22: submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
In some embodiments, deposit credentials may also be received and fed back to the initiator device. The credit voucher is generated based on a second component of the redemption parameter. The deposit voucher is used by the initiator device to determine a second component of the redemption parameter, determine the redemption parameter based on the first component of the redemption parameter and the second component of the redemption parameter, and send the redemption voucher generated based on the redemption parameter to the recipient device.
In some embodiments, the deposit transaction is further configured to record a third transaction amount homomorphic ciphertext in the escrow record set. The inquiry transaction sent by the initiator device can also be received, and the inquiry transaction comprises a third transaction amount homomorphic ciphertext; a query transaction may be submitted to the blockchain to query the hosted record set for a third transaction amount homomorphic ciphertext; the query result may be received and fed back to the initiator device to send redemption vouchers by the initiator device when the query result is yes.
In some embodiments, the deposit transaction may further include a first zero-knowledge proof and/or a second zero-knowledge proof. The first zero knowledge proof is used for verification: the transaction amount is in a set value interval, and the value of the account balance of the initiator after deducting the transaction amount is in the set value interval. The second zero knowledge proof is used for verification: the initiator device holds a first component of the initiator account balance, the transaction amount, and the redemption parameters.
According to the blockchain-based data interaction method disclosed by the embodiment of the specification, privacy protection can be realized on transaction information such as transaction amount, balance and the like through transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like, and the balance after transaction can be correctly updated. In addition, through the escrow account, the identity between the initiator and the receiver is conveniently protected, so that the privacy protection of the identity of the transaction party is realized.
Please refer to fig. 3. The embodiment of the specification provides a data interaction method based on a block chain. The method may be applied to a supervisor device comprising the following steps.
Step S31: receiving a redemption transaction for the recipient device; the redemption transaction includes a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the recipient account, the third transaction amount homomorphic ciphertext being escrowed by the issuer in the escrowed account via the deposit transaction.
Step S32: submitting redemption transactions to the blockchain; the redemption transaction is used for deducting the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext of the escrow account, and adding the fourth transaction amount homomorphic ciphertext from the fourth balance homomorphic ciphertext of the receiving party account.
In some embodiments, a query transaction sent by a recipient device may be received, the query transaction including a third transaction amount homomorphic ciphertext; a query transaction may be submitted to the blockchain to query the hosted record set for a third transaction amount homomorphic ciphertext; the query result may be received and sent to the recipient device to send a redemption transaction by the recipient device when the query result is yes.
In some embodiments, the redemption transaction is further used to delete the third transaction amount homomorphic ciphertext in the escrow record set.
In some embodiments, the redemption transaction may further include a third zero knowledge proof. The third zero knowledge proof is used for verification: the recipient device holds the recipient account balance, transaction amount, redemption parameters.
According to the blockchain-based data interaction method disclosed by the embodiment of the specification, privacy protection can be realized on transaction information such as transaction amount, balance and the like through transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like, and the balance after transaction can be correctly updated. In addition, through the escrow account, the identity between the initiator and the receiver is conveniently protected, so that the privacy protection of the identity of the transaction party is realized.
Please refer to fig. 4. The embodiment of the specification provides a data interaction method based on a block chain. The method may be applied to an initiator device, comprising the following steps.
Step S41: and calculating a first transaction homomorphic ciphertext of the initiator account and a second transaction homomorphic ciphertext of the escrow account, wherein the second transaction homomorphic ciphertext is calculated according to the first component of the redemption parameter.
Step S42: sending a deposit transaction to a supervising device; the deposit transaction comprises a first transaction homomorphic ciphertext and a second transaction homomorphic ciphertext, the deposit transaction is used for deducting the first transaction homomorphic ciphertext from a first balance homomorphic ciphertext of an initiator account through a blockchain, generating a third transaction homomorphic ciphertext according to the second transaction homomorphic ciphertext, and adding the third transaction homomorphic ciphertext into the second balance homomorphic ciphertext of a escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
In some embodiments, a deposit voucher fed back by the regulating device may be received, the deposit voucher being generated based on a second component of the redemption parameters; a second component of the redemption parameter may be determined based on the credit voucher; the redemption parameters may be determined from the first component of the redemption parameters and the second component of the redemption parameters; calculating a third transaction amount homomorphic ciphertext from the redemption parameters and the transaction amount; a query transaction may be sent to the supervising device, the query transaction including a third transaction amount homomorphic ciphertext, the query transaction for querying the third transaction amount homomorphic ciphertext in the hosted record set through the blockchain; the query result fed back by the supervision equipment can be received; the redemption voucher generated based on the redemption parameters can be sent to the recipient device when the query result is yes.
According to the blockchain-based data interaction method disclosed by the embodiment of the specification, privacy protection can be realized on transaction information such as transaction amount, balance and the like through transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like, and the balance after transaction can be correctly updated. In addition, through the escrow account, the identity between the initiator and the receiver is conveniently protected, so that the privacy protection of the identity of the transaction party is realized.
Please refer to fig. 5. The embodiment of the specification provides a data interaction method based on a block chain. The method may be applied to a receiver device, comprising the following steps.
Step S51: and calculating a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext of the receiver account, wherein the third transaction homomorphic ciphertext is hosted in the hosting account by the initiator through deposit transactions.
Step S52: transmitting the redemption transaction to the supervising device; the redemption transaction comprises a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext, and the redemption transaction is used for deducting the third transaction homomorphic ciphertext from a third balance homomorphic ciphertext of the escrow account through a blockchain and adding the fourth transaction homomorphic ciphertext from a fourth balance homomorphic ciphertext of the receiver account.
In some embodiments, redemption vouchers issued by the initiator device may also be received; the redemption parameters may be determined based on the redemption vouchers. The third transaction homomorphic ciphertext is calculated according to the redemption parameters
Sending a query transaction to the supervising device, the query transaction including a third transaction amount homomorphic ciphertext, the query transaction being for querying the third transaction amount homomorphic ciphertext in the hosted record set through the blockchain; the query result fed back by the supervision equipment can be received; the redemption transaction may be sent to the supervising device when the query results in yes.
According to the blockchain-based data interaction method disclosed by the embodiment of the specification, privacy protection can be realized on transaction information such as transaction amount, balance and the like through transaction amount homomorphic ciphertext, balance homomorphic ciphertext and the like, and the balance after transaction can be correctly updated. In addition, through the escrow account, the identity between the initiator and the receiver is conveniently protected, so that the privacy protection of the identity of the transaction party is realized.
Please refer to fig. 6. The embodiment of the specification provides a data interaction device based on a blockchain, which comprises the following units.
A receiving unit 61 for receiving a deposit transaction of the initiator device; the deposit transaction comprises a first transaction amount homomorphic ciphertext of an initiator account and a second transaction amount homomorphic ciphertext of a escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by calculation according to a first component of a redemption parameter;
a submitting unit 62 for submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
Please refer to fig. 7. The embodiment of the specification provides a data interaction device based on a blockchain, which comprises the following units.
A receiving unit 71 for receiving redemption transactions of the recipient device; the redemption transaction includes a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the recipient account, the third transaction amount homomorphic ciphertext being escrowed by the issuer in the escrowed account through the deposit transaction;
a submitting unit 72 for submitting a redemption transaction to the blockchain; the redemption transaction is used for deducting the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext of the escrow account, and adding the fourth transaction amount homomorphic ciphertext from the fourth balance homomorphic ciphertext of the receiving party account.
Please refer to fig. 8. The embodiment of the specification provides a data interaction device based on a blockchain, which comprises the following units.
A calculating unit 81, configured to calculate a first transaction amount homomorphic ciphertext of the initiator account and a second transaction amount homomorphic ciphertext of the escrow account, where the second transaction amount homomorphic ciphertext is calculated according to a first component of the redemption parameter;
a transmitting unit 82 for transmitting the deposit transaction to the supervising device; the deposit transaction comprises a first transaction homomorphic ciphertext and a second transaction homomorphic ciphertext, the deposit transaction is used for deducting the first transaction homomorphic ciphertext from a first balance homomorphic ciphertext of an initiator account through a blockchain, generating a third transaction homomorphic ciphertext according to the second transaction homomorphic ciphertext, and adding the third transaction homomorphic ciphertext into the second balance homomorphic ciphertext of a escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
Please refer to fig. 9. The embodiment of the specification provides a data interaction device based on a blockchain, which comprises the following units.
A calculating unit 91, configured to calculate a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the receiver account, where the third transaction amount homomorphic ciphertext is hosted in the hosting account by the initiator through a deposit transaction;
a transmitting unit 92 for transmitting the redemption transaction to the supervising device; the redemption transaction comprises a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext, and the redemption transaction is used for deducting the third transaction homomorphic ciphertext from a third balance homomorphic ciphertext of the escrow account through a blockchain and adding the fourth transaction homomorphic ciphertext from a fourth balance homomorphic ciphertext of the receiver account.
The embodiments of the present specification also correspondingly provide a computer device, including: a memory for storing computer instructions; and a processor for executing computer instructions to implement the embodiments corresponding to fig. 2, 3, 4, and 5.
The embodiment of the specification also correspondingly provides a computer storage medium. The computer storage medium itself may be implemented in any suitable manner. In particular, for example, computer storage media include, but are not limited to: magnetic memory, digital memory, ROM/RAM, magnetic disk, optical disk, etc. The computer storage medium stores computer program instructions.
The computer program instructions, when executed, may implement the embodiments corresponding to fig. 2, 3, 4, and 5.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. The computer may be a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Those skilled in the art will appreciate that the descriptions of the various embodiments are each focused on, and that portions of one embodiment that are not described in detail may be referred to as related descriptions of other embodiments. In addition, it will be appreciated that those skilled in the art, upon reading the present specification, may conceive of any combination of some or all of the embodiments set forth herein without any inventive effort, and that such combination is within the scope of the disclosure and protection of the present specification.
Although the present description has been described by way of example, those of ordinary skill in the art will recognize that there are numerous variations and modifications to the description, and it is intended that the appended claims encompass such variations and modifications without departing from the spirit of the present description.

Claims (18)

1. A blockchain-based data interaction method, comprising:
receiving a deposit transaction of an initiator device; the deposit transaction comprises a first transaction amount homomorphic ciphertext of an initiator account and a second transaction amount homomorphic ciphertext of a escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by calculation according to a first component of a redemption parameter;
submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
2. The method according to claim 1, wherein the method further comprises:
receiving and feeding back deposit credentials to the initiator device; the credit voucher is generated from a second component of the redemption parameter;
The deposit voucher is used by the initiator device to determine a second component of the redemption parameter, determine the redemption parameter based on the first component of the redemption parameter and the second component of the redemption parameter, and send the redemption voucher generated based on the redemption parameter to the recipient device.
3. The method of claim 2, wherein the deposit transaction is further used to record a third transaction amount homomorphic ciphertext in the escrow record set; the method further comprises the steps of:
receiving a query transaction sent by an initiator device, wherein the query transaction comprises a third transaction amount homomorphic ciphertext;
submitting a query transaction to the blockchain to query the hosted record set for a third transaction amount homomorphic ciphertext;
the query result is received and fed back to the initiator device to send redemption vouchers by the initiator device when the query result is yes.
4. The method of claim 1, wherein the deposit transaction further comprises a first zero-knowledge proof and/or a second zero-knowledge proof, the first zero-knowledge proof being used to verify: the transaction amount is in a set value interval, the value of the account balance of the initiator after deducting the transaction amount is in the set value interval, and the second zero knowledge proof is used for verifying: the initiator device holds a first component of the initiator account balance, the transaction amount, and the redemption parameters.
5. A blockchain-based data interaction method, comprising:
receiving a redemption transaction for the recipient device; the redemption transaction includes a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the recipient account, the third transaction amount homomorphic ciphertext being escrowed by the issuer in the escrowed account through the deposit transaction;
submitting redemption transactions to the blockchain; the redemption transaction is used for deducting the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext of the escrow account, and adding the fourth transaction amount homomorphic ciphertext from the fourth balance homomorphic ciphertext of the receiving party account.
6. The method of claim 5, wherein the method further comprises:
receiving an inquiry transaction sent by receiver equipment, wherein the inquiry transaction comprises a third transaction amount homomorphic ciphertext;
submitting a query transaction to the blockchain to query the hosted record set for a third transaction amount homomorphic ciphertext;
the query result is received and sent to the recipient device to send a redemption transaction by the recipient device when the query result is yes.
7. The method of claim 6, wherein the redemption transaction is further used to delete a third transaction amount homomorphic ciphertext in the escrow record set.
8. The method of claim 5, wherein the redemption transaction further includes a third zero knowledge proof for verifying: the recipient device holds the recipient account balance, transaction amount, redemption parameters.
9. A blockchain-based data interaction method, comprising:
calculating a first transaction amount homomorphic ciphertext of the initiator account and a second transaction amount homomorphic ciphertext of the escrow account, wherein the second transaction amount homomorphic ciphertext is calculated according to a first component of the redemption parameter;
sending a deposit transaction to a supervising device; the deposit transaction comprises a first transaction homomorphic ciphertext and a second transaction homomorphic ciphertext, the deposit transaction is used for deducting the first transaction homomorphic ciphertext from a first balance homomorphic ciphertext of an initiator account through a blockchain, generating a third transaction homomorphic ciphertext according to the second transaction homomorphic ciphertext, and adding the third transaction homomorphic ciphertext into the second balance homomorphic ciphertext of a escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
10. The method according to claim 9, wherein the method further comprises:
Receiving a deposit voucher fed back by the supervising device, the deposit voucher being generated based on a second component of the redemption parameters;
determining a second component of the redemption parameter based on the credit voucher;
determining a redemption parameter based on the first component of the redemption parameter and the second component of the redemption parameter;
calculating a third transaction amount homomorphic ciphertext according to the redemption parameters and the transaction amount;
sending a query transaction to the supervising device, the query transaction including a third transaction amount homomorphic ciphertext, the query transaction being for querying the third transaction amount homomorphic ciphertext in the hosted record set through the blockchain;
receiving a query result fed back by the supervision equipment;
and when the query result is yes, transmitting a redemption voucher generated according to the redemption parameters to the recipient device.
11. A blockchain-based data interaction method, comprising:
calculating a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext of the receiver account, wherein the third transaction homomorphic ciphertext is hosted in a hosting account by an initiator through deposit transaction;
transmitting the redemption transaction to the supervising device; the redemption transaction comprises a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext, and the redemption transaction is used for deducting the third transaction homomorphic ciphertext from a third balance homomorphic ciphertext of the escrow account through a blockchain and adding the fourth transaction homomorphic ciphertext from a fourth balance homomorphic ciphertext of the receiver account.
12. The method of claim 11, wherein the method further comprises:
receiving redemption credentials issued by the initiator device;
determining redemption parameters based on the redemption credentials;
the third transaction amount homomorphic ciphertext is calculated according to redemption parameters.
13. The method according to claim 11, comprising:
sending a query transaction to the supervising device, the query transaction including a third transaction amount homomorphic ciphertext, the query transaction being for querying the third transaction amount homomorphic ciphertext in the hosted record set through the blockchain;
receiving a query result fed back by the supervision equipment;
the sending of redemption transactions to the supervising device includes:
and when the query result is yes, transmitting the redemption transaction to the supervising device.
14. A blockchain-based data interaction device, comprising:
a receiving unit for receiving a deposit transaction of an initiator device; the deposit transaction comprises a first transaction amount homomorphic ciphertext of an initiator account and a second transaction amount homomorphic ciphertext of a escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by calculation according to a first component of a redemption parameter;
a submitting unit for submitting a deposit transaction to a blockchain; the deposit transaction is used for deducting a first transaction amount homomorphic ciphertext from a first balance homomorphic ciphertext of the initiator account, generating a third transaction amount homomorphic ciphertext according to a second component of the redemption parameter and the second transaction amount homomorphic ciphertext, and adding the third transaction amount homomorphic ciphertext into the second balance homomorphic ciphertext of the escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
15. A blockchain-based data interaction device, comprising:
a receiving unit for receiving a redemption transaction of the recipient device; the redemption transaction includes a third transaction amount homomorphic ciphertext and a fourth transaction amount homomorphic ciphertext of the recipient account, the third transaction amount homomorphic ciphertext being escrowed by the issuer in the escrowed account through the deposit transaction;
a submitting unit for submitting redemption transactions to the blockchain; the redemption transaction is used for deducting the third transaction amount homomorphic ciphertext from the third balance homomorphic ciphertext of the escrow account, and adding the fourth transaction amount homomorphic ciphertext from the fourth balance homomorphic ciphertext of the receiving party account.
16. A blockchain-based data interaction device, comprising:
the computing unit is used for computing a first transaction amount homomorphic ciphertext of the initiator account and a second transaction amount homomorphic ciphertext of the escrow account, wherein the second transaction amount homomorphic ciphertext is obtained by computing according to a first component of the redemption parameter;
a transmitting unit for transmitting the deposit transaction to the supervision device; the deposit transaction comprises a first transaction homomorphic ciphertext and a second transaction homomorphic ciphertext, the deposit transaction is used for deducting the first transaction homomorphic ciphertext from a first balance homomorphic ciphertext of an initiator account through a blockchain, generating a third transaction homomorphic ciphertext according to the second transaction homomorphic ciphertext, and adding the third transaction homomorphic ciphertext into the second balance homomorphic ciphertext of a escrow account; the third transaction amount homomorphic ciphertext is used for redemption by the recipient in the escrow account by redeeming the transaction.
17. A blockchain-based data interaction device, comprising:
the calculation unit is used for calculating a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext of the receiver account, wherein the third transaction homomorphic ciphertext is hosted in the hosting account by the initiator through deposit transaction;
a transmitting unit for transmitting the redemption transaction to the supervising device; the redemption transaction comprises a third transaction homomorphic ciphertext and a fourth transaction homomorphic ciphertext, and the redemption transaction is used for deducting the third transaction homomorphic ciphertext from a third balance homomorphic ciphertext of the escrow account through a blockchain and adding the fourth transaction homomorphic ciphertext from a fourth balance homomorphic ciphertext of the receiver account.
18. A computer device, comprising:
a memory for storing computer instructions;
a processor for executing computer instructions to implement the method of any one of claims 1-13.
CN202310635754.3A 2023-05-31 2023-05-31 Block chain-based data interaction method and device and computer equipment Pending CN116667999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310635754.3A CN116667999A (en) 2023-05-31 2023-05-31 Block chain-based data interaction method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310635754.3A CN116667999A (en) 2023-05-31 2023-05-31 Block chain-based data interaction method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN116667999A true CN116667999A (en) 2023-08-29

Family

ID=87711266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310635754.3A Pending CN116667999A (en) 2023-05-31 2023-05-31 Block chain-based data interaction method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116667999A (en)

Similar Documents

Publication Publication Date Title
CN109359974B (en) Block chain transaction method and device and electronic equipment
CN110832519B (en) Improving integrity of communications between a blockchain network and external data sources
CN111566649B (en) Verifying integrity of data stored in a federated blockchain using public side chains
CN110892434B (en) Transferring digital ticket based on blockchain network
CN110582793B (en) Anonymity and traceability of digital property transactions on a distributed transaction consensus network
CN109359971B (en) Block chain transaction method and device and electronic equipment
EP3073670B1 (en) A system and a method for personal identification and verification
WO2021239104A1 (en) Blockchain-based service processing
CN111418184B (en) Credible insurance letter based on block chain
CN111066019B (en) Processing data elements stored in a blockchain network
CN111373431B (en) Credible insurance letter based on block chain
TW202008207A (en) Method, apparatus and electronic device for blockchain-based asset issuance
Awadallah et al. An integrated architecture for maintaining security in cloud computing based on blockchain
CZ197896A3 (en) Encryption method with safekeeping of a key in a third person and a cryptographic system for making the same
CN111357026B (en) Credible insurance letter based on block chain
CN111417945B (en) Credible insurance letter based on block chain
CN111433799B (en) Credible insurance letter based on block chain
CN113302610B (en) Trusted platform based on blockchain
Biryukov et al. Privacy-preserving KYC on Ethereum
CN111433798B (en) Credible insurance letter based on block chain
CN113826134A (en) Credible insurance letter based on block chain
CN115380303A (en) Trusted platform based on block chain
Abadi et al. Payment with Dispute Resolution: A Protocol for Reimbursing Frauds Victims
CN113491090B (en) Trusted platform based on blockchain
CN116667999A (en) Block chain-based data interaction method and device and computer equipment

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