Off-chain anonymous payment channel method and system based on Mimblewimble

By adopting the off-chain anonymous payment channel method based on Mimblewimble in the Bitcoin network, the problems of slow transaction speed and privacy information exposure of Bitcoin network are solved, fast and large-scale small payments and transaction anonymity are achieved, and handling fees are reduced. and confirmation time.

CN113743935BActive Publication Date: 2024-11-22BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110956886.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-19
Publication Date
2024-11-22
Estimated Expiration
2041-08-19

AI Technical Summary

Technical Problem

Bitcoin network transaction speed is slow, confirmation time is long, and blockchain transaction throughput is low, resulting in privacy information exposure. Mimblewimble technology has flaws in handling fees and transaction confirmation time.

Method used

The off-chain anonymous payment channel method based on Mimblewimble is adopted to ensure transaction anonymity, reduce the burden on blockchain, and prevent attacks by depositing coins greater than the minimum amount in the payment channel and generating random amounts.

Benefits of technology

Improve the scalability of the Bitcoin network, reduce transaction confirmation time and handling fees, realize fast and large-scale small payments between users, ensure the anonymity and privacy of both parties to the transaction, and prevent broadcast old transaction attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113743935B_ABST
    Figure CN113743935B_ABST
Patent Text Reader

Abstract

The present application discloses a method and system for anonymous payment channels under the chain based on Mimblewimble, including: a channel opening step: determining the minimum amount to be deposited, opening the payment channel by depositing coins greater than the minimum amount into the channel, and when depositing, the portion greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent; a channel status updating step: based on the underlying Mimblewimble transaction method, generating a pre-transaction according to the negotiated transaction amount of this round, and generating a transaction based on the pre-transaction, and performing transaction aggregation, wherein, when performing transaction aggregation, in addition to aggregating the pre-transaction generated by the payee and the transaction generated by the payee, the current balance of the payee is also aggregated; a channel closing step: after the transaction parties refund according to the latest current balance distribution status, the payment channel is closed. This method can improve the scalability of the Bitcoin network and reduce the transaction confirmation time and transaction fees while ensuring anonymity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to an off-chain anonymous payment channel method and system based on Mimblewimble. Background Art

[0002] As a distributed data storage solution, blockchain has the characteristics of being unforgeable, traceable, open, transparent, and collectively maintained. It has been widely used in various industries in recent years. Bitcoin is a decentralized payment system proposed by Satoshi Nakamoto in 2008. As the most successful application of blockchain technology, Bitcoin has been attractive since its birth. However, the Bitcoin system can only process no more than 7 transactions per second, the transaction speed is slow, and the confirmation time is long. There is an urgent need to increase the transaction speed of Bitcoin. At the same time, in order to verify the authenticity and correctness of each transaction, the blockchain stores every transaction between users in the network and adds it to the block, resulting in low transaction throughput and poor scalability of the blockchain. In addition, putting each transaction on the chain may cause some privacy issues. Attackers can analyze user identities and launch attacks through the transaction orders disclosed in the blockchain.

[0003] Mimblewimble is a privacy-enhancing protection technology for the Bitcoin blockchain system proposed by an anonymous scholar in 2016. It combines several cryptographic technologies including confidential transactions, aggregate signatures, and range proofs to achieve good privacy. The Lightning Network is a concept proposed by scholars in recent years to address the problems of long confirmation time and poor scalability of the Bitcoin network. The Lightning Network consists of a peer-to-peer network and is a second-layer technology running on Bitcoin and other blockchains. It realizes a real-time massive transaction network without trusting each other or trusted third parties. Two parties who frequently trade can create a payment channel by depositing a fixed amount in advance into the channel. The payment channel allows all parties to perform transactions off-chain while maintaining the security of on-chain transactions to reduce the burden on the blockchain. However, although the Lightning Network changes most transactions to be conducted off-chain, the operations of opening and closing channels submitted as evidence on the chain can still expose a lot of user privacy information.

[0004] As a blockchain privacy enhancement technology, Mimblewimble has been used by a variety of new digital currencies, such as Grin, because of its ability to hide the identities and transaction amounts of both parties. However, Mimblewimble technology has certain defects in terms of handling fees and transaction confirmation time. Summary of the invention

[0005] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0006] To this end, one purpose of this application is to propose an off-chain anonymous payment channel method based on Mimblewimble, which can improve the scalability of the Bitcoin network and reduce transaction confirmation time and transaction fees while ensuring anonymity, that is, neither the transaction parties nor the transaction amount are disclosed.

[0007] Another purpose of this application is to propose an off-chain anonymous payment channel system based on Mimblewimble.

[0008] To achieve the above-mentioned purpose, an embodiment of the present application proposes an off-chain anonymous payment channel method based on Mimblewimble, comprising the following steps: a channel opening step: determining the minimum deposit amount, opening the payment channel by depositing coins greater than the minimum amount into the channel respectively, and when depositing, the part greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent; a channel status updating step: based on the underlying Mimblewimble transaction method, generating a pre-transaction according to the negotiated transaction amount of this round, and generating a transaction based on the pre-transaction, and performing transaction aggregation, wherein, when performing transaction aggregation, in addition to aggregating the pre-transactions generated by the payer and the transactions generated by the payee, the current balance of the payee is also aggregated; a channel closing step: after the transaction parties have refunded according to the current latest balance distribution status, the payment channel is closed.

[0009] To achieve the above-mentioned purpose, on the other hand, an embodiment of the present application proposes an off-chain anonymous payment channel system based on Mimblewimble, including: an opening module, used to determine the minimum deposit amount, and to open the payment channel by depositing coins greater than the minimum amount into the channel respectively, and when depositing, the part greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent; an update module, used to generate a pre-transaction based on the negotiated transaction amount of this round based on the underlying Mimblewimble transaction method, and to generate a transaction based on the pre-transaction, and to perform transaction aggregation, wherein when performing transaction aggregation, in addition to aggregating the pre-transactions generated by the payer and the transactions generated by the payee, the current balance of the payee is also aggregated; a closing module, used to close the payment channel after the transaction parties have refunded according to the current latest balance distribution status.

[0010] The off-chain anonymous payment channel method and system based on Mimblewimble in the embodiment of the present application can be used to improve the scalability and fast transactions of the blockchain, realize fast and large-scale small payments between users, improve the scalability of the blockchain, and have the following beneficial effects:

[0011] 1) The anonymity of transactions can be achieved. Anonymity is reflected in two aspects: hiding the payment amount and the payees. In terms of the payment amount, in addition to using the blinding factor provided by the Pedersen commitment to ensure that the number of coins deposited is known only to the two parties to the transaction, this scheme also adds a random amount to ensure that only the depositor knows the specific amount of his deposit, and even the partners in the payment channel cannot know it. After the payment channel is opened, the off-chain transaction is transferred to the payment channel established by both parties for execution and will not be uploaded to the blockchain. In the end, only the transaction operations of opening and closing the channel will be displayed on the chain. Since the blockchain system is based on Mimblewimble, the transactions that have been uploaded to the blockchain will continue to aggregate and perform coin mixing operations. This operation of mixing a large number of transactions makes it impossible for attackers to analyze the identities of the two parties to the transaction through a single transaction, which can effectively ensure the anonymity of the user's identity.

[0012] 2) It can prevent coin theft attacks. When both parties deposit a fixed amount agreed upon by the two parties to open a payment channel, they also deposit a random amount. This additional amount is only known to the depositor himself and is kept secret from the other party of the payment channel. It will only be revealed when the refund is made and the channel is closed, so as to prevent the transaction parties from being unable to use the payment channel for off-chain transactions due to transaction reversal after locking the coins.

[0013] 3) It can prevent the attack of broadcasting old transactions. After each channel update operation, the two parties to the transaction need to exchange the blinding factor used in the previous round of transactions with the partners in the channel. This means that if any party wants to do evil by broadcasting old transactions to refuse payment, the other party can recursively construct the malicious party’s commitment transaction through the blinding factor and confiscate the amount in the malicious party’s channel and make it their own.

[0014] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0016] Figure 1 This is a flow chart of an off-chain anonymous payment channel method based on Mimblewimble according to an embodiment of the present application;

[0017] Figure 2 This is a flowchart of an off-chain anonymous payment channel method based on Mimblewimble according to an embodiment of the present application;

[0018] Figure 3This is a schematic diagram of the structure of an off-chain anonymous payment channel system based on Mimblewimble according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0020] This application combines Mimblewimble privacy protection technology with the Lightning Network, which can improve the scalability and transaction speed of the blockchain while protecting the privacy of blockchain users. Any blockchain user using Mimblewimble technology can negotiate with the other party with whom they frequently trade to open an off-chain payment channel between the two parties, and transfer a large number of transactions that originally needed to be conducted on the chain to the off-chain, while only saving two transactions of opening and closing the channel on the chain. This method can greatly reduce the burden on the blockchain while ensuring security. In this solution, when opening a channel, users first negotiate the minimum amount of money that each person deposits into the channel. In addition, each person needs to deposit an additional random amount to prevent malicious attackers from opening the user's commitment with a known amount, thereby enhancing the security of the input commitment. After the channel is opened, the two people use the Mimblewimble confidential transaction transaction form to conduct off-chain transactions and aggregate the transactions after each transaction. When the channel is closed, the channel refunds the two users according to the current amount distribution method of the two parties, and any user can initiate a refund at any time.

[0021] The Mimblewimble system mainly consists of several basic components: the commitment scheme COMM, the aggregate signature SIG and the non-interactive zero-knowledge proof system PI.

[0022] (1) Commitment scheme: Pedersen commitment based on discrete logarithm assumption in cyclic group is selected, C = v*H+k*G.

[0023] Let the commitment scheme be COMM = (Setup, Commit, Vercom), which contains the following algorithms:

[0024] The Setup algorithm is a commitment initialization algorithm that takes the commitment parameter com p As input, output three contents, commitment value range v p , key value range k p and commitment range C p .

[0025] The Commit algorithm will commit to the generation algorithm, which will take a commitment value v∈v p and a random number k∈k p As input, output a commitment C∈C p The value of the commitment is v and the random number is k.

[0026] The Vercom algorithm is a commitment verification algorithm that takes a tuple (C, v, k) as input and outputs 1 if C is a valid commitment, otherwise it outputs 0.

[0027] (2) Aggregate signature: The aggregate signature includes SIG = (KeyGen, Sign, Agg, Versig), and the Schnorr signature used in the Grin project is selected.

[0028] The KeyGen algorithm is a key generation algorithm. p As input, used to generate a private key sk∈sk p and a public key pk∈pk p .

[0029] The Sign algorithm is a signature algorithm. p , private key sk and message m are taken as input, and the output is the signature sig of the message m using the private key sk.

[0030] The Agg algorithm is a signature aggregation algorithm. The algorithm aggregates the signatures sig0 and sig1 generated by the two messages l0 and l1, and generates an aggregate signature sig.

[0031] The Versig algorithm is a signature verification algorithm used to verify the correctness and authenticity of a signature.

[0032] (3) Non-interactive zero-knowledge proof system ∏

[0033] In this application, a non-interactive zero-knowledge proof system is used to verify the commitment and amount in the scheme without revealing any knowledge. On the one hand, the proof system can verify the commitment value without opening the commitment, and on the other hand, the transaction amount in the scheme must be guaranteed to be within a fixed range. The currently popular bulletproof proof is selected, and the proof system includes Π=(Setup, Prv, Ver).

[0034] The Setup algorithm is an initialization algorithm used to generate the parameter crs and provide a valid proof extractor that can be simulated and extracted.

[0035] The Prv algorithm is a proof algorithm used to generate a zero-knowledge proof π.

[0036] Ver algorithm is a verification algorithm used to verify the authenticity of the certificate.

[0037] The off-chain anonymous payment channel solution is used to implement a two-way payment channel, which mainly includes several parts:

[0038] Coins: Each coin C contains a coin amount v and a coin key k. Only a user who has both can spend the coin.

[0039] Transaction: In a payment channel, a transaction allows the two parties who created the channel to freely allocate the deposits in the channel. Generally speaking, a transaction consists of three parts: input coins tx.in, output coins tx.out and a proof P, expressed as tx = (C, C′, P). P is a triple consisting of (KE, sig, π), where sig is the signature of the transaction, KE is the transaction kernel, which is used to verify whether the transaction signature is correct, and π is the output of the range proof.

[0040] Pre-transaction: Pre-transaction allows one party to transfer funds to another party in the payment channel with which he cooperates. Similar to transactions, pre-transactions also include three attributes, input coins ptx.in, output change coins ptx.out, and coins paid to the recipient ptx.pay.

[0041] Off-chain transaction plan: Let p∶=(com p ,sig p ,crs), the off-chain transaction scheme mainly includes the following algorithms:

[0042] (tx,k)←Compose(p,(C1,v1,k1),(C2,v2,k2)): The merging algorithm Compose takes two coins as input and outputs transaction tx, which is used by both parties to open a payment channel for off-chain payment. Both parties call the merging algorithm and deposit a certain amount into the channel.

[0043] (C′,v′,k′),(C″,v″,k″)←Decompose(p,(C,v,k),v′): The decomposition algorithm De-compose takes a coin as input and outputs two coins with amounts v′ and v″ respectively. The sum of the output amounts should be equal to the input coin amount v. It is used to decompose a coin with amount v into two valid coins C′ and C″.

[0044] (ptx,k')←Send(p,(C,v,k),f'): The Send algorithm takes a coin c and a send amount v' as input and outputs a pre-transaction ptx and a coin key k'. When the sender wishes to make a transaction to update the allocated value of the deposit in the channel, the sender first calls the Send algorithm to make the transaction.

[0045] (tx,k″)←Receive(p,ptx,v″,(C,v,k)): The receiving algorithm ←Receive takes the pre-transaction ptx, the transaction amount v″ equal to ptx.pay and a coin C as input, and outputs a final transaction tx and key k″. The receiver uses this algorithm to update the received pre-transaction and convert it into the final valid transaction.

[0046] tx←Agg(p,tx0,tx1): The transaction aggregation algorithm Agg takes two transactions tx0 and tx1 as input, aggregates the two transactions, and outputs the aggregated transaction tx.

[0047] (C f1 ,v f1 ,k f1 ),(C f2 ,v f2 ,k f2 )←Refund(p,(C1,v1,k1),(C2,v2,k2),tx,

[0048] (C′1,v′1,k′1),(C′2,v′ ′ ,k′2)): The refund algorithm Refund takes four coins C1, C2, C′1, C′2 and transaction tx as input and outputs two final coins C f1 and C f2 When a user in a channel wants to close the channel and withdraw the current balance in the channel, both parties in the channel call the refund algorithm to refund and close the channel.

[0049] The following describes the Mimblewimble-based off-chain anonymous payment channel method and system proposed according to the embodiments of the present application with reference to the accompanying drawings.

[0050] First, the off-chain anonymous payment channel method based on Mimblewimble proposed in accordance with an embodiment of the present application will be described with reference to the accompanying drawings.

[0051] Figure 1 The present invention is a flow chart of an off-chain anonymous payment channel method based on Mimblewimble according to an embodiment of the present application.

[0052] like Figure 1 As shown, the off-chain anonymous payment channel method based on Mimblewimble includes the following steps:

[0053] In step S101, the channel opening step: determine the minimum deposit amount, open the payment channel by depositing coins greater than the minimum amount into the channel, and when depositing, the part greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent.

[0054] Optionally, in one embodiment of the present application, the channel opening step specifically includes: determining the minimum amount negotiated by the transaction parties to open the payment channel; selecting an amount greater than the minimum amount from the amounts owned according to a preset selection strategy, and depositing a random amount into the payment channel at the same time; executing a preset construction algorithm to check the validity of the deposited coins, ensuring that the coins deposited in the payment channel are legal and have not been double-spent, and are greater than the agreed value of the two; after the transaction parties deposit the coins into the payment channel, generating a deposit transaction; executing a preset deconstruction algorithm to decompose the deposited coins into a first valid coin and a second valid coin, wherein the amount of the first valid coin is the minimum amount negotiated by the two parties, and the second valid amount is a random amount; after both transaction parties have deposited coins greater than the minimum amount into the payment channel, it is determined that the payment channel is successfully opened, and the current state and the current key of the available coins are determined.

[0055] Specifically, combined Figure 2 As shown, in a specific embodiment, the channel opening step is implemented by six steps:

[0056] Step 1: Both parties negotiate the amount v to open the payment channel init , and plans to transfer a large number of subsequent transactions between the two to off-chain.

[0057] Step 2: Both parties choose the minimum amount v that is greater than the amount negotiated in step 1 from their own money according to a certain selection strategy. init , and deposit a random amount v known only to the depositor a ′ and v ′ b , deposit it into the payment channel. The random amount is only used to protect one's own deposit commitment transaction, which cannot be easily opened and cannot be transferred through transactions within the payment channel.

[0058] Step 3: Execute the construction algorithm (as shown in Table 1), first check the validity of the deposited coins, and ensure that the coins deposited in the payment channel are legal and have not been double-spent, and the amount is greater than the agreed value v of the two. init .

[0059] Table 1 Construction algorithm

[0060]

[0061]

[0062] Step 4: Both parties deposit coins into the channel, generating a deposit transaction tx fund .

[0063] Step 5: Both parties execute the deconstruction algorithm (as shown in Table 2) to decompose the deposited coin into two valid coins (C′, v′, k′) and (C″, v″, k″), one of which has the amount v agreed upon by the two parties. init , and the other one is the random amount deposited. This operation ensures that they agree on the amount in the current channel state and allocates the amount they can currently spend.

[0064] Table 2 Deconstruction algorithm

[0065]

[0066] Step 6: Both parties deposit a fixed amount v into the payment channel init The payment channel is opened successfully, the current state is state0, and the current key of the coin available to both parties is k a,0 and k b,0 .

[0067] In step S102, the channel status step is updated: based on the underlying Mimblewimble transaction method, a pre-transaction is generated according to the negotiated transaction amount of this round, and a transaction is generated based on the pre-transaction, and transaction aggregation is performed. When performing transaction aggregation, in addition to aggregating the pre-transaction generated by the payer and the transaction generated by the payee, the current balance of the payee is also aggregated.

[0068] Optionally, in one embodiment of the present application, the step of updating the channel status further includes: determining the transaction amount of this round corresponding to the current status negotiated by the payer and the payee; when the payer executes the sending algorithm to construct the pre-transaction, obtaining the transaction amount to be paid to the payer and the amount of change for itself, and at the same time, the payer generates a corresponding key for the transaction amount to be paid to the payee; the payer sends the constructed pre-transaction to the payee; when the payee executes the acceptance algorithm, checking the correctness of the pre-transaction received in this round, and generating a new transaction, and the receiver aggregates the transactions generated in this round and the balance coins in its current state, and generates the final transaction of this round; after the payee publishes the final transaction of this round, the payer and the payee exchange the keys used in the previous state.

[0069] Specifically, based on the above embodiment, the channel status update phase is similar to the transaction phase on the chain, and is implemented in six steps:

[0070] Step 7: The payer and the payee negotiate the current state i , the transaction amount of this round is v i .

[0071] Step 8: The payer executes the sending algorithm (as shown in Table 3) to construct a pre-transaction, the output of which contains two parts: the transaction amount v that needs to be paid to the payer i and the amount v′ given to oneself as change, and the payer is v i Generate a key k′ i .

[0072] Table 3 Sending algorithm

[0073]

[0074] Step 9: The payer will construct a pre-transaction ptx i Sent to the recipient.

[0075] Step 10: The payee executes the acceptance algorithm (as shown in Table 4) to first check the correctness of the pre-transaction received in this round and generate a new transaction tx′ i , where the key k of the new transaction i Only the recipient knows. Then, the recipient will know the transaction ptx generated in this round. i , tx′ i And the current balance of coins C b,i-1 Aggregation is performed to ensure that the transaction size is fixed, rather than growing linearly as the transaction progresses and the amount of off-chain allocations changes, and to generate the final transaction tx of this round i .

[0076] Table 4 Receiving algorithm

[0077]

[0078]

[0079] Step 11: The payee publishes the final transaction tx of this round i .

[0080] Step 12: The payer and payee exchange the previous state i-1 The key k used in a,i-1 and k b,i-1 .

[0081] In step S103, the channel closing step: after the transaction parties refund according to the latest balance allocation status, the payment channel is closed.

[0082] Optionally, in one embodiment of the present application, the channel closing step includes: broadcasting a transaction to the blockchain in any transaction direction within the payment channel for a refund, and executing a refund algorithm; determining that both transaction parties reveal coins containing random amounts stored when the channel is opened, merging the random amounts of both parties in the channel and the balance in the current channel, and then returning them to both transaction parties.

[0083] Optionally, in one embodiment of the present application, after executing the refund algorithm, it also includes: checking whether the allocated balances of both parties in the current channel are correct and valid, and checking whether the final transaction of this round is the latest transaction.

[0084] Optionally, in one embodiment of the present application, the channel closing step further includes: if the check is invalid, the honest transaction party can confiscate the coins of the malicious party through the recursive coin key and the transaction amount of each round, and transfer them to themselves.

[0085] Specifically, based on the above embodiment, the channel closing stage is implemented by three steps:

[0086] Step 13: Any direction in the payment channel broadcasts the transaction tx to the blockchain i Make a refund and execute the refund algorithm (as shown in Table 5). Check the current channel allocation balance C of both parties a,i and C b,i Is it correct and valid, and check tx i Whether it is the latest transaction.

[0087] Table 5 Refund algorithm

[0088]

[0089]

[0090] Step 14: Both parties reveal the coin C containing the random amount stored when the channel was opened a ′ and C b ′ If the check is valid, the random amount of both parties in the channel and the balance C in the current channel are added. a,i and C b,i After merging, they are returned to both parties; if the check is invalid, the honest transaction party can use the recursive coin key {k x,0 ,k x,1 ,,…,k x,i-1} and the transaction amount of each round {v0,v1,,…,v i-1} Confiscate the evildoer's coins and transfer them to yourself.

[0091] Step 15: Close the channel.

[0092] In summary, this application includes three parts: opening a channel, updating the channel status, and closing the channel. Opening a channel: The two parties to the transaction first negotiate the minimum deposit amount, and open the payment channel by depositing coins greater than the amount into the channel. When depositing, the part greater than the minimum amount is deconstructed as a random amount and cannot be spent. It is only stored in the two parties to the transaction as a protection factor. After the off-chain payment channel is opened, the two parties can transfer subsequent large-scale transactions to the off-chain, thereby reducing the burden on the blockchain. Update channel status: Similar to the ordinary transaction method of the underlying Mimblewimble, it includes four steps: negotiating the transaction amount of this round, generating pre-transactions, generating transactions, and transaction aggregation. Among them, transaction aggregation aggregates the current balance of the payee in addition to the pre-transactions generated by the payee and the transactions generated by the payee to ensure that the transaction capacity is fixed. Closing a channel: The two parties to the transaction refund according to the current latest balance distribution status and close the channel.

[0093] According to the Mimblewimble-based off-chain anonymous payment channel method proposed in the embodiment of the present application, the anonymity of the transaction can be guaranteed through Mimblewimble's underlying cryptographic technology, thereby ensuring the anonymity between the two parties to the transaction after the off-chain payment channel is opened. The deposited random amount ensures that malicious attackers cannot open the commitment by exhaustive enumeration to steal the user's coins. In addition, after each round of transactions, the two parties to the transaction will exchange the coin keys used in the previous round of transactions to prevent the broadcast of old transactions.

[0094] Next, the Mimblewimble-based off-chain anonymous payment channel system proposed in accordance with an embodiment of the present application is described with reference to the accompanying drawings.

[0095] Figure 3 The present invention is a schematic diagram of the structure of an off-chain anonymous payment channel system based on Mimblewimble according to an embodiment of the application.

[0096] like Figure 3 As shown, the Mimblewimble-based off-chain anonymous payment channel system includes: an opening module 100, an updating module 200 and a closing module 300.

[0097] Among them, the opening module 100 is used to determine the minimum deposit amount, and the payment channel is opened by depositing coins greater than the minimum amount into the channel. When depositing, the part greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent. The updating module 200 is used to update the channel status, and generates a pre-transaction based on the negotiated transaction amount of this round through a transaction method based on the underlying Mimblewimble, and generates a transaction based on the pre-transaction, and performs transaction aggregation. When performing transaction aggregation, in addition to aggregating the pre-transactions generated by the payer and the transactions generated by the payee, the current balance of the payee is also aggregated. The closing module 300 is used to close the payment channel after the transaction parties refund according to the current latest balance distribution status.

[0098] Optionally, in one embodiment of the present application, the opening module is specifically used to determine the minimum amount negotiated by the transaction parties to open a payment channel; select an amount greater than the minimum amount from the amounts owned according to a preset selection strategy, and deposit it into the payment channel together with a random amount; execute a preset construction algorithm to check the validity of the deposited coins, ensure that the coins deposited in the payment channel are legal and have not been double-spent, and are greater than the agreed value of the two; after the transaction parties deposit the coins into the payment channel, generate a deposit transaction; execute a preset deconstruction algorithm to decompose the deposited coins into a first valid coin and a second valid coin, wherein the amount of the first valid coin is the minimum amount negotiated by the two parties, and the second valid amount is a random amount; after both transaction parties have deposited coins greater than the minimum amount into the payment channel, it is determined that the payment channel is successfully opened, and the current state and the current key of the available coins are determined.

[0099] Optionally, in one embodiment of the present application, the update module is specifically used to determine the transaction amount of this round corresponding to the current state negotiated by the payer and the payee; when the payer executes the sending algorithm to construct the pre-transaction, the transaction amount to be paid to the payer and the amount of change given to itself are obtained, and at the same time, the payer generates a corresponding key for the transaction amount to be paid to the payer; the payer sends the constructed pre-transaction to the payee; when the payee executes the acceptance algorithm, the correctness of the pre-transaction received in this round is checked, and a new transaction is generated, and the receiver aggregates the transactions generated in this round and the balance coins in its current state, and generates the final transaction of this round; after the payee publishes the final transaction of this round, the payer and the payee exchange the keys used in the previous state.

[0100] Optionally, in one embodiment of the present application, the closing module is specifically used to broadcast a transaction to the blockchain in any transaction direction within the payment channel for a refund, and execute a refund algorithm; determine that both parties to the transaction reveal the coins containing the random amount stored when the channel is opened, and merge the random amounts of both parties in the channel with the balance in the current channel and return them to both parties to the transaction.

[0101] It should be noted that the aforementioned explanation of the embodiment of the off-chain anonymous payment channel method based on Mimblewimble is also applicable to the off-chain anonymous payment channel system based on Mimblewimble in this embodiment, and will not be repeated here.

[0102] According to the Mimblewimble-based off-chain anonymous payment channel system proposed in the embodiment of the present application, the anonymity of transactions can be guaranteed through Mimblewimble's underlying cryptographic technology, thereby ensuring the anonymity between the two parties to the transaction after the off-chain payment channel is opened. The deposited random amount ensures that malicious attackers cannot open the commitment by exhaustive enumeration to steal the user's coins. In addition, after each round of transactions, the two parties to the transaction will exchange the coin keys used in the previous round of transactions to prevent the broadcast of old transactions.

[0103] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0104] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0105] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A Mimblewimble-based off-chain anonymous payment channel method, characterized in that: The following steps are involved: Channel opening step: determine the minimum deposit amount, and both parties to the transaction deposit coins greater than the minimum amount into the channel to open the payment channel. When depositing, the part greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent; Channel status update step: Based on the underlying Mimblewimble transaction method, generate a pre-transaction according to the negotiated transaction amount of this round, generate a transaction based on the pre-transaction, and perform transaction aggregation. When performing transaction aggregation, in addition to aggregating the pre-transaction generated by the payer and the transaction generated by the payee, the current balance of the payee is also aggregated; as well as Channel closing step: After both parties of the transaction have refunded the funds according to the latest balance allocation status, the payment channel is closed.

2. The method according to claim 1, characterized in that The channel opening step specifically includes: Determine the minimum amount negotiated by the transaction parties to open the payment channel; Select an amount greater than the minimum amount from the amounts owned according to a preset selection strategy, and deposit it into the payment channel together with the random amount; Execute the preset construction algorithm to check the validity of the deposited coins, ensure that the coins deposited in the payment channel are legal and have not been double-spent, and are greater than the agreed value of the two; After the transaction parties deposit coins into the payment channel, a deposit transaction is generated; Execute a preset deconstruction algorithm to decompose the deposited coin into a first valid coin and a second valid coin, wherein the amount of the first valid coin is the minimum amount negotiated by the two persons, and the amount of the second valid coin is the random amount; After both transaction parties have deposited coins greater than the minimum amount into the payment channel, it is determined that the payment channel is opened successfully, and the current state and the current key of the available coins are determined.

3. The method according to claim 2, characterized in that The step of updating the channel status further comprises: Determine the current transaction amount corresponding to the current status negotiated between the payer and the payee; When the payer executes the sending algorithm to construct the pre-transaction, the transaction amount to be paid to the payee and the amount of change to be given to the payee are obtained. At the same time, the payer generates a corresponding key for the transaction amount to be paid to the payee; The payer sends the constructed pre-transaction to the payee; When the payee executes the acceptance algorithm, the correctness of the pre-transaction received in this round is checked, and a new transaction is generated. The payee aggregates the transactions generated in this round and the balance coins in its current state, and generates the final transaction of this round; After the payee publishes the final transaction of this round, the payer and the payee exchange the key used in the previous state.

4. The method according to claim 3, characterized in that The channel closing step comprises: Any transaction direction in the payment channel broadcasts a transaction to the blockchain to refund and executes the refund algorithm; Determine that the transaction parties reveal the coins containing the random amount stored when the channel is opened, combine the random amounts of both parties in the channel and the balance in the current channel, and return them to the transaction parties.

5. The method according to claim 4, characterized in that After executing the refund algorithm, it also includes: Check whether the allocated balances of both parties in the current channel are correct and valid, and check whether the final transaction of this round is the latest transaction.

6. The method according to claim 5, characterized in that The channel closing step further comprises: If the check is invalid, the honest party can confiscate the malicious party's coins and transfer them to themselves through the recursive coin key and the transaction amount of each round.

7. An off-chain anonymous payment channel system based on Mimblewimble, characterized in that: include: An opening module is used to determine the minimum amount to be deposited. The two parties to the transaction open the payment channel by depositing coins greater than the minimum amount into the channel. When depositing, the part greater than the minimum amount is used as a random amount, and the random amount is deconstructed so that it cannot be spent. The update module is used to update the channel status, generate a pre-transaction according to the negotiated transaction amount of this round through a transaction method based on the underlying Mimblewimble, generate a transaction based on the pre-transaction, and perform transaction aggregation. When performing transaction aggregation, in addition to aggregating the pre-transaction generated by the payer and the transaction generated by the payee, the current balance of the payee is also aggregated; as well as The closing module is used to close the payment channel after the transaction parties refund according to the latest balance allocation status.

8. The system according to claim 7, characterized in that The opening module is specifically used to determine the minimum amount negotiated by the transaction parties to open the payment channel; select an amount greater than the minimum amount from the amounts owned according to a preset selection strategy, and deposit the random amount into the payment channel together; execute a preset construction algorithm to check the validity of the deposited coins, ensure that the coins deposited in the payment channel are legal and have not been double-spent, and are greater than the agreed value of the two; After the transaction parties deposit coins into the payment channel, a deposit transaction is generated; a preset deconstruction algorithm is executed to decompose the deposited coins into a first valid coin and a second valid coin, wherein the amount of the first valid coin is the minimum amount negotiated by the two parties, and the amount of the second valid coin is the random amount; After both transaction parties have deposited coins greater than the minimum amount into the payment channel, it is determined that the payment channel is opened successfully, and the current state and the current key of the available coins are determined.

9. The system according to claim 8, characterized in that The update module is specifically used to determine the transaction amount of this round corresponding to the current state negotiated by the payer and the payee; when the payer executes the sending algorithm to construct the pre-transaction, the transaction amount to be paid to the payee and the amount of change for itself are obtained, and at the same time, the payer generates a corresponding key for the transaction amount to be paid to the payee; the payer sends the constructed pre-transaction to the payee; when the payee executes the acceptance algorithm, the correctness of the pre-transaction received in this round is checked, and a new transaction is generated, and the payee aggregates the transactions generated in this round and the balance coins in its current state, and generates the final transaction of this round; after the payee publishes the final transaction of this round, the payer and the payee exchange the keys used in the previous state.

10. The system according to claim 9, characterized in that The closing module is specifically used to broadcast a transaction to the blockchain in any transaction direction within the payment channel for refund and execute a refund algorithm; determine that the transaction parties reveal the coins containing random amounts stored when the channel is opened, and merge the random amounts of both parties in the channel with the balance in the current channel and return them to the transaction parties.