System and method for distributing data records using blockchain
By using hidden addresses and coin mixed transactions in blockchain technology, disconnecting the input and output, and adopting a random public key generation mechanism, the privacy and security issues in the distribution process of blockchain data records are solved, and a more complete system is achieved. Efficient cryptocurrency payments and data record transfers.
Patent Information
- Application Number
- CN202410878298.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2017-04-11
- Filing Date
- 2018-04-10
- Publication Date
- 2024-09-20
Smart Images

Figure CN118674539A
Abstract
Description
[0001] This application is a divisional application of the invention patent application with Chinese application number 2018800247104 (corresponding to PCT international application number PCT / IB2018 / 052488), application date April 10, 2018, and invention name “System and method for distributing data records using blockchain”. Technical Field
[0002] The present invention relates generally to blockchain transactions, and more particularly to methods and apparatus for generating and executing data record distribution transactions. Background Art
[0003] In this document, the term "blockchain" is used to include all forms of electronic, computer-based distributed ledgers. These include, but are not limited to, blockchain and transaction chain technologies, permissioned and unpermissioned ledgers, shared ledgers, and their variations.
[0004] A blockchain is a consensus-based electronic ledger implemented as a decentralized, distributed computer-based system consisting of blocks, which in turn consist of transactions. Each transaction is a data structure that encodes the transfer of control of a digital asset between participants in the blockchain system and includes at least one input and at least one output. Each block contains a hash of the previous block, allowing the blocks to be linked together to build a permanent, unchangeable record of all transactions that have been written to the blockchain since its inception. Transactions contain small programs called scripts embedded in their inputs and outputs that specify how and by whom the outputs of the transaction can be accessed.
[0005] One clear advantage of blockchain technology is its anonymity and security. That is, the ledger does not contain any personal information about the people involved in the transaction, the ledger only contains public address information. However, through the use of external data and analysis, it is possible to successfully associate specific transactions and addresses with individuals.
[0006] One of the drawbacks of some digital currencies is that it can lead to situations where privacy is compromised. For example, if someone has a wallet that contains a large unspent transaction output UTXO, such as a biweekly paycheck, and that unspent transaction output is used as an input to pay another person a smaller amount, then the other person and anyone viewing that transaction will gain information about the wealth and possibly the salary of the person making the payment based in part on the change returned in that transaction. Other situations can arise where large input and / or large change transactions compromise a user's privacy.
[0007] It would therefore be desirable to provide improved methods and apparatus that provide increased security and more robust cryptography through improved input-to-output untraceability and unlinkability, while still resulting in an efficient and effective cryptocurrency payment mechanism.
[0008] Although blockchain technology is most widely known for its implementation using cryptocurrency, digital entrepreneurs have begun to explore the use of both cryptographic security systems and data that can be stored on blockchains to implement new systems. It would be very advantageous if blockchains could be used for automated tasks and processing that are not limited to the field of cryptocurrency. Such solutions would be able to take advantage of the benefits of blockchains (e.g., permanent tamper-proof records of events, distributed processing, etc.), while being more versatile in the application of blockchains. Therefore, this application may refer to recorded "data records" about blockchains. Data records may include, for example, documents, measurements of processing power or time, encrypted amounts, security or other tokens indicating asset ownership, or other such things that may be controlled by an entity that possesses cryptographic materials, wherein the cryptographic materials allow the entity to use or move the data record.
[0009] The potential traceability of records in blockchains reveals implementation flaws that could compromise certain applications. Example applications include submitting an exam or essay for marking, submitting anonymous crime reports, submitting anonymous survey or census responses, or other such applications where a group of participating nodes need to securely and privately transfer data records to one or more other nodes where the data cannot be altered after submission. As with cryptocurrencies, the movement of other types of data records can be tracked based on the characteristics of the records themselves, thereby enabling the tracking of submissions back to a specific node, which can compromise the privacy or security of the node users or undermine the integrity of the anonymity of the distribution or submission process. In addition, if nodes in the network are able to identify one node as the source of a transfer of a document to another node, it increases the ability of those observer nodes to compromise the security of the network through attacks such as spoofing and other computer security attacks.
[0010] The public nature of blockchain presents technical challenges in constructing a data record distribution process, whether for cryptocurrency or any other type of data record, that more effectively ensures the security and integrity of the distribution process while minimizing the opportunity to track the transfer of data records between specific nodes. Summary of the invention
[0011] Such an improved solution has now been devised.
[0012] Thus, according to the present invention, there is provided a method and apparatus as defined in the appended claims.
[0013] Advantageously, the present application provides improved methods, devices, and systems for blockchain-based data record distribution that increase the privacy and security of transactions. Using stealth addresses, record distribution, and deconstructing records into unique combinations of specified data record characteristics, all data records are transferred while disconnecting inputs from outputs to protect information related to input or output nodes from being disclosed and to hinder tracking activities.
[0014] The present invention may provide a computer-implemented method and corresponding system. The method / system may be described as a blockchain-implemented method / system. The present invention may be described as a security method or an encryption method / system. The present invention may provide a secure transfer of a digital asset or data record such as a portion or amount of cryptocurrency. Additionally or alternatively, the present invention may provide a control mechanism to control the transfer of a digital asset such as a portion or amount of cryptocurrency.
[0015] Additionally or alternatively, the present application may describe a computer-implemented method for transferring a total data record between an input node and an output node using a blockchain. The method implemented at the input node may include: obtaining public key material associated with the output node; determining one or more inputs selected from available data records and multiple outputs based on the total data record and the available data records controlled by the input node, wherein the cumulative sum of the one or more inputs is equal to or greater than the total data record, each output is for a corresponding data record characteristic selected from a series of prescribed data record characteristics, and the sum of the multiple outputs matches the total data record; selecting a random number for each of the outputs and generating an output address based on the public key material and the random number, inserting the output address into a record distribution transaction to be distributed for a data record having the corresponding data record characteristic of the output, generating a random public key based on the random number, and sharing the random public key with the output node; and signing the one or more inputs.
[0016] Additionally or alternatively, the present application may describe a computer-implemented method for transferring a total data record between an input node and an output node using a blockchain. The method implemented at the output node may include providing the input node with public key material associated with the output node; obtaining a random public key from the input node; searching the blockchain for a data record distribution transaction, the data record distribution transaction having a plurality of input addresses and a plurality of output addresses, each output address being assigned a data record having a corresponding data record characteristic from a series of specified data record characteristics; determining a public key-private key pair based on the random public key and the public key material; matching a public key from the public key-private key pair with one of the output addresses in the data record distribution transaction, and adding the data record assigned to the output address to a temporary data record set based on the match; and determining whether the temporary data record set is less than the total data record, and if so, continuing to search, determine, and match until the temporary data record set matches the total data record.
[0017] Additionally or alternatively, the present application may describe a computer-implemented method for transferring a total value between an input node and an output node using a blockchain. The method implemented at the input node may include: obtaining public key material associated with the output node; determining one or more inputs and multiple outputs selected from unspent output transactions based on the total value and available unspent output transactions owned by the input node, wherein the cumulative value of the one or more inputs is equal to or greater than the total value, each output is for a corresponding denomination selected from a series of specified denominations, and the sum of the multiple outputs matches the total value. The method also includes selecting a random number for each of the outputs, generating an output address based on the public key material and the random number, inserting the output address into a coin mixing transaction to be distributed for the corresponding denomination of the output, generating a random public key based on the random number, and sharing the random public key with the output node. The input node signs the one or more inputs.
[0018] In some embodiments, determining the one or more inputs and the plurality of outputs is based in part on available coin mixing transactions. The available coin mixing transactions each involve mixing specific denominations. Determining the one or more inputs and the plurality of outputs is based in part on matching the value of each of the one or more inputs and the plurality of outputs with a corresponding denomination in the specific denominations.
[0019] In some embodiments, inserting the output addresses for the plurality of outputs comprises inserting all of the output addresses as outputs into a single coin-mixing transaction configured to mix a plurality of different denominations. In some other embodiments, inserting the output addresses for the plurality of outputs comprises inserting at least one output address in a first coin-mixing transaction and inserting at least another output address in a second coin-mixing transaction, and the first coin-mixing transaction is used to mix denominations different from denominations mixed in the second coin-mixing transaction.
[0020] In some embodiments, the denomination series is defined based on the maximum coin value and the denominations of the maximum coin value. A series defined as , where n is a positive integer. Other series may be used in other embodiments.
[0021] In some embodiments, the public key material includes two public keys, namely, BPub x and BPub y , and the output address of output i is given by:
[0022] BPub i =H(r i BPub x )G+BPub y
[0023] Where G is the elliptic curve base point, H() is the hash function, and r i is a random number chosen for output i. The random public key R i Can be generated as R i =r i G.
[0024] In some embodiments, sharing the random public key includes inserting the random public key into a non-transaction data field in a coin-mixing transaction; inserting the random public key into a non-transaction data field in a separate transaction from the coin-mixing transaction; or sending the random public key to the output node using non-blockchain communication.
[0025] Additionally or alternatively, the present application may describe a method implemented at an output node, the method comprising providing a public key material associated with the output node to an input node; obtaining a random public key from the input node; and searching a blockchain for a coin mixing transaction having a plurality of input addresses and a plurality of output addresses, each output address being assigned a value corresponding to a denomination in a series of specified denominations. The method also includes determining a public key-private key pair based on the random public key and the public key material; matching a public key from the public key-private key pair with one of the output addresses in the coin mixing transaction, and adding the value assigned to the output address to a payment amount based on the match; and determining whether the amount paid is less than the total value, and if so, continuing to search, determine, and match until the amount paid matches the total value.
[0026] In some embodiments, the public key material includes two public keys, namely, BPub x and BPub y , these two public keys have their own corresponding private keys, namely, BPriv x and BPriv y . Determining the ith public-private key pair may include determining:
[0027] BPriv i =H(BPriv x R i )+BPriv y
[0028] Among them, BPriv i includes the private key of the public-private key pair, H() is a hash function, and R i is a random public key, where the public key in the ith public-private key pair is determined as BPub i =BPriv i G, where G is the elliptic curve base point.
[0029] In some embodiments, searching the blockchain includes identifying a coin-mixing transaction that includes the non-transaction code, and obtaining the random public key includes extracting the random public key from a non-transaction data field of the coin-mixing transaction. In some other embodiments, obtaining the random public key includes searching the blockchain for a transaction that includes the non-transaction code and extracting the random public key from a non-transaction data field in the transaction when the transaction is identified.
[0030] Other embodiments described herein include a computing device having a memory, a processor, and executable instructions that, when executed, cause the processor to perform the operations of one or more of the methods described herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Any features described with respect to one aspect or embodiment of the invention may also be used by one or more other aspects / embodiments. These and other aspects of the invention will become apparent from and be elucidated with reference to the embodiments described herein. Embodiments of the invention will now be described by way of example only and with reference to the accompanying drawings, in which:
[0032] Figure 1 An example blockchain network of nodes is shown;
[0033] Figure 2 One embodiment of the data record distribution process is diagrammatically shown;
[0034] Figure 3 An example process for data record distribution in a blockchain transaction is shown in flowchart form;
[0035] Figure 4 An example process of participating in a data record distribution operation as an input node according to an embodiment of the present application is shown in the form of a flowchart;
[0036] Figure 5An example process of participating in a data record distribution operation as an input node according to an embodiment of the present application is shown in the form of a flowchart; and
[0037] Figure 6 A simplified block diagram of participating nodes is shown. DETAILED DESCRIPTION
[0038] In the present application, the term “and / or” is intended to cover all possible combinations and sub-combinations of the listed elements, including any one element, any sub-combination or all of the elements listed individually, and does not necessarily exclude additional elements.
[0039] In the present application, the phrase “at least one of… or…” is intended to cover any one or more of the listed elements, including any one of the elements listed individually, any subcombination, or all elements, without necessarily excluding any additional elements and without necessarily requiring all elements.
[0040] In the following description, reference will sometimes be made to a data record, which may include a data field containing a value. In some cases, a total data record may be formed by the sum of the values of multiple data records. In some instances, a value may represent a digital asset or an amount thereof, such as a cryptocurrency, but a value may also represent some other asset such as computing resources, time, etc. References to data record characteristics may refer to attributes of a data record. In some examples, this may include a value indicated in a data record, and a series of specified data record characteristics may include a series of specified values. In some cases, a value may be an integer or a decimal value. In some instances, these values represent an amount of cryptocurrency and may be referred to as a denomination.
[0041] First refer to Figure 1 , Figure 1 An example blockchain network 100 associated with a blockchain is shown in block diagram form. The blockchain network is a peer-to-peer open membership network that can be joined by anyone without invitation or consent from other members. Distributed electronic devices running an instance of a blockchain protocol can participate in the blockchain network 100, where the blockchain network 100 operates under the blockchain protocol. Such distributed electronic devices can be referred to as nodes 102.
[0042] The electronic devices that run the blockchain protocol and form the nodes 102 of the blockchain network 100 may be of various types, including, for example, computers such as desktop computers, laptop computers, tablet computers, servers, mobile devices such as smart phones, wearable computers such as smart watches, or other electronic devices.
[0043] The nodes 102 of the blockchain network 100 are coupled to each other using suitable communication technologies, which may include wired communication technologies and wireless communication technologies. In many cases, the blockchain network 100 is implemented at least in part on the Internet, and some individual nodes 102 may be located in geographically dispersed locations.
[0044] Nodes 102 maintain a global ledger of all transactions on the blockchain. The global ledger is a distributed ledger, and each node 102 may store a complete or partial copy of the global ledger. Transactions performed by nodes 102 that affect the global ledger are verified by other nodes 102, so that the validity of the global ledger is maintained. Those of ordinary skill in the art can understand the details of implementing and operating a blockchain network.
[0045] Each transaction typically has one or more inputs and one or more outputs. Scripts embedded in the inputs and outputs specify how and by whom the outputs of the transaction can be accessed. The outputs of a transaction include the address to which the value is transferred as a result of the transaction. This value is then associated with that output address as an unspent transaction output (UTXO). Subsequent transactions can then reference this address as an input to spend or reallocate ownership of that value.
[0046] Although transactions are pseudo-anonymous because no personal information is included in transactions on the blockchain ledger, the transfer of data records in the transaction chain can be tracked, and in some cases external data can be used to link data records to individual or specific nodes. To improve security, data record distribution transactions such as coin mixing transactions can be used to aggregate inputs from various sources and then divide and assign the aggregated data records to outputs. If all inputs and outputs are data records with the same characteristics, it is difficult to link a specific input with a specific output. However, in such a transaction, at least one participating node knows the link between the input address and the output address specified by another participating node. In a coin mixing transaction, a single transaction with multiple inputs and multiple outputs is used to mix the values.
[0047] Some other techniques are used to try to avoid revealing links between inputs and outputs with different validity, such as stealth addresses. Stealth addresses attempt to delink the output address to which the data record was sent from the specific output node in order to destroy traceability.
[0048] According to the present application, a method and apparatus are described that facilitate the transfer of a total data record from an input node to an output node in a manner that increases the privacy and security of the distribution and provides barriers to linking the distribution to a specific input and / or output and tracking the distribution or revealing relevant information about the input node. Doing so within the structure of the blockchain protocol while ensuring security presents significant technical implementation challenges. The following description provides at least one embodiment of a solution to these technical implementation challenges.
[0049] In the description of this article, the terms "input node", "output node", "participating node", "input address" and "output address" may be used. Reference to the "address" of a node is not meant to refer to the network address of a physical node. Instead, an "address" is an address with an unspent value specified in a transaction on the blockchain, and a physical node can claim ownership of the unspent value by having a key corresponding to a signature on the transaction. In this sense, an "output address" is not an address of a participating node, but a blockchain transaction output address owned by or associated with a participating output node. Similarly, an "input address" is the address of an unspent transaction output (UTXO) owned by or associated with a participating input node.
[0050] Elliptic Curve Digital Signature
[0051] Some blockchain technologies use the Elliptic Curve Digital Signature Algorithm (ECDSA) as a mathematical scheme for digital signatures. ECDSA is a cryptographic digital signature used to ensure that the value associated with a UTXO can only be spent by its legitimate owner. The parameters required for an ECDSA signature include:
[0052] E - Elliptic Curve Function
[0053] G - base point on the elliptic curve, order n: n×G=O
[0054] n - large prime number
[0055] q-subgroup order
[0056] The key pair is generated from a random number x, where 0 < x < n. The number x is used as the private key, and the public key P is generated as P = x x G.
[0057] Given a message m, a random number k, and a private key x, a signature is generated using the pair (r, s). The random number k is chosen so that 0 < k < q. Then, r = k × G is calculated, and s = k-1 (m + xr) mod n is calculated, where k-1 is k mod n: k -1 The multiplicative inverse of k ≡ 1 mod n. This gives the signature (r, s).
[0058] Given a signature (r, s), a message m, and a public key P, the signature can be verified. To verify the signature, calculate v = s -1 m×G+s -1 r×y. In this expression, s -1 is the multiplicative inverse of s mod q, such that s -1 s≡1mod n. If v=r, then the signature is valid. Remember that G has order n, so when the EC point is multiplied by G, s -1 The mod n part disappears.
[0059] Aggregated decomposition data records
[0060] Now refer to Figure 2 , which diagrammatically illustrates one embodiment of a data record distribution process 200. In this example, the data record involves cryptocurrency, and the total data record is a payment of total value. Input node 202 is designated as "Wallet A". Input node 202 may be a lightweight node designed to make and receive payments, but is not a complete node that stores a copy of the blockchain. In some cases, input node 202 may be a full node, but in this example, input node 202 is a lightweight node, which may be referred to as a "wallet" in many cases. Such a node may be referred to as a simplified payment verification (SPV) node. Output node 204 is designated as "Wallet B". Like input node 202, in this example, output node 204 is a lightweight node. Nodes 202 and 204 may be referred to as participants or participating nodes here.
[0061] Input node 202 "owns" (controls) several UTXOs with different values, indicated by reference numeral 206. Input node 202 owns them in the sense that input node 202 holds a private key corresponding to each UTXO 206, which enables input node 202 to sign a script "spend" of that UTXO 206 as an input to a blockchain transaction. Each UTXO 206 is an unspent output of a previous transaction sent or returned to input node 202. UTXO 206 can be used to change the amount of value of the applicable cryptocurrency.
[0062] Output node 204 has two public-private key pairs, designated as (BPub x , BPriv x ) and (BPub y , BPriv y ), where BPub=BPrivG. Output node 204 shares public key BPub with input node 202 and possibly other nodes x and BPub y .
[0063] In this case, the owner of input node 202 intends to transfer a total value to the owner of output node 204. In some embodiments, the total value may reflect a payment for a good or service.
[0064] According to aspects of the present application, input node 202 selects one or more UTXOs 206 to use as inputs to a transaction to effectuate a payment. The cumulative value of the one or more UTXOs 206 is equal to or greater than the total value of the payment to be made to output node 204. The selection of UTXOs 206 may be based in part on using multiple smaller denomination UTXOs 206 to make up the total value, rather than using one large UTXO 206 that would result in change, or at least a larger amount of change that would result in a return to input node 202.
[0065] In some embodiments, the input node 202 may determine the optimal or advantageous plurality of UTXOs 206 using a greedy algorithm that produces a sum of inputs equal to or greater than the total value of the payment while minimizing the number of UTXOs 206. Additional factors in the analysis may include minimizing the generated change, i.e., ensuring that the cumulative value of the selected UTXOs 206 exceeds the total value by the minimum possible amount given the available UTXOs 206. In some embodiments, the UTXOs 206 may be prioritized based on their value; that is, as will be further described below, UTXOs 206 that correspond in value to one of a range of specified denominations may be preferred.
[0066] In some embodiments, the optimal set of UTXOs 206 may be selected based on total value (or total value plus fees, since input node 202 may need to ensure that the submitted inputs are sufficient to cover the fees of the transaction(s)) and a rule to avoid using large UTXOs 206 for small payments. That is, input node 202 may prioritize using UTXOs 206 that are less than the total payment. Input node 202 may implement the UTXO selection process using dynamic programming, greedy algorithms, or any other suitable computer programming technique for finding a locally optimal or at least suitable selection of UTXOs 206.
[0067] According to another aspect of the present application, the transfer of value will be carried out through one or more coin mixing transactions. That is, the selected UTXO206 is an input to one or more coin mixing transactions.
[0068] The input node 202 also determines a number of outputs to make up the total payment. The cumulative value of the outputs matches the total value of the payments made to the output node 204. Each output is determined to be a corresponding denomination selected from a range of specified denominations. In one example, the denomination can be a specified series of fractions of the applicable cryptocurrency. In one example, the denomination can be the base unit of the cryptocurrency multiplied by to give, where n = 0, 1, 2, 3, etc.
[0069] Other example denominations are not necessarily related to base 10.
[0070] In some embodiments, all inputs except at least one have corresponding outputs of the same value (since, if the cumulative value of the inputs exceeds the total payment, one of the inputs may result in change redeemable to the input node and / or an excess amount attributable to redeemable fees in the transaction). Inputs that match in value to corresponding outputs may be included in the same coin-mixing transaction, where the transaction is designed to mix multiple inputs and outputs, all of which have the same value.
[0071] Once the input node 202 determines one or more UTXOs 206 to use as inputs, and determines a number of outputs and their respective values, the input node 202 joins one or more coin mixing transactions by inserting the UTXOs 206 as inputs and inserting the respective output addresses corresponding to each of the outputs.
[0072] In another aspect of the present application, input node 202 does not use the public address of the output node as the output address, and does not aggregate outputs at the public address of output node 204. Instead, input node 202 generates a new secret output address for each output. Each new secret output address is based on the public key BPub provided by the output node. x and BPub y And the random number ri is generated. The random number r i It may be referred to as a random number. In this regard, the two public keys from output node 204 together act as a “stealth address” in that the two public keys from output node 204 will be used as seeds to generate the secret address, but the link between output node 204 and the new secret address is only known to input node 202. This masks the identity of the payee in the transaction in that the actual output address is not known to be associated with output node 204, whereas if a payment is made to the published public key address of output node 204, it will be identifiably associated with output node 204.
[0073] In this example, input node 202 specifically generates a new secret output address BPub based on i :
[0074] BPub i =H(r i BPub x )G+BPub y
[0075] Where G is the elliptic curve base point, and H() is the hash function. The input node 202 is also based on R i =r i G is derived from the random number r i Calculate the random public key R i .
[0076] Input node 202 generates a new secret output address BPub for each output i The input node 202 also shares with the output node 204 a random public key R for each output. i Then, the output node 204 uses the random public key R i And the private key BPriv x and BPriv y Use the following equation to attempt to generate a private key corresponding to one of the output addresses in the transaction:
[0077] BPriv i =H(BPriv x R i )+BPriv y
[0078] If the generated private key can be used to obtain the public key BPub i , then output node 204 has the correct private key to unlock the transaction output pointing to that output address.
[0079] Used to share a random public key R i The mechanism of R can take different forms depending on the implementation. In one embodiment, the random public key R i The output node 204 searches the blockchain for a coin-mixing transaction that has data in the non-transaction field. For example, the OP_RETURN code is a script opcode used to mark an invalid transaction output. Thus, in one embodiment, a coin-mixing transaction includes an output with an OP_RETURN code or a functional equivalent, followed by the public nonce R i In general terms, a code indicating that non-transaction data or information is included in a transaction may be referred to herein as a "non-transaction code."
[0080] However, some protocols may restrict the ability to use this type of non-transaction data field in a transaction. Although in some cases it is possible to concatenate R in a single non-transaction data field i A secret key is possible, but in some implementations, restrictions on the field length and size of the secret key may make it impractical. Therefore, another mechanism can be used to share a random public key R for multiple outputs in a coin mixing transaction. i .
[0081] In one example implementation, input node 202 generates additional transactions 212, each of which has a non-transaction data field to contain R i One of the random public keys. The number of additional transactions may match the number of outputs. Output node 204 then searches or monitors the blockchain for the presence of transactions containing non-transaction data such as OP_RETURN codes. If output node 204 finds such a transaction, output node 204 extracts the non-transaction data based on what may be a random public key and uses the data and its public key material to generate a possible output address. Output node 204 then evaluates whether the generated possible output address appears as an output of a coin mixing transaction on the blockchain.
[0082] In another example embodiment, input node 202 transmits the random public key R to the i Transfer to the output node 204 outside the blockchain itself. Then, the output node 204 generates the corresponding public key BPub i And the blockchain is searched for coin-mixing transactions that transfer value to those addresses.
[0083] The output node 204 is not directly given the random public key R i Instead, where the blockchain is searched for transactions containing non-transaction data and attempting to identify corresponding outputs in a coin-mixing transaction, output node 204 may continue the search until it finds a set of outputs that cumulatively add up to the total value to be transferred by input node 202.
[0084] Figure 2 An example is shown in which an input node 202 transfers 0.49 coins. The coin can be any cryptocurrency. In this illustrative example, a coin mixing transaction 210 can be used for an input node 202 to join and in which multiple denominations (in fixed specified denominations) are mixed. That is, the transaction includes multiple 1 coin inputs and outputs, multiple 0.1 coin inputs and outputs, multiple 0.01 coin inputs and outputs, and multiple 0.001 coin inputs and outputs, etc. Other denominations can be included, including denominations that are not base 10 in other examples.
[0085] In this example, input node 202 uses five available UTXO206 to make up 0.49 coins, each of which is 0.1 coins. If input node 202 does not happen to have enough UTXO206 of 0.1 coin denomination, it will choose UTXO of different denominations to make up the payment. In this example, where input node 202 enters 0.5 coins to make a 0.49 coin payment, input node 202 will be entitled to 0.01 coin change, but the transaction may involve fees, as in this example. 9×0.001 coin amount of change is returned to input node 202, which means a transaction fee of 0.001 coin.
[0086] Each of the five inputs comes from a different UTXO 206 owned by input node 202. The outputs include 4×0.1 coins and 9×0.01 coins. In this example, input node 202 generates BPub1, BPub2, …, BPub 13 13 output addresses.
[0087] Thirteen random public keys R i , i=1, 2, ... 13 are shared by output nodes 204. As described above, in some protocols, the key may be inserted into a corresponding non-transactional data field within a coin mixing transaction. A non-transactional data field is a data field of a certain type that does not negatively impact a transaction. A data field may be a designated field for comments, text, or any such data not related to a transaction. In some cases, a data field may be marked or designated by a specific code or flag to indicate that the field contains non-transactional data.
[0088] In the random public key R i In the event that they cannot be shared within a non-transaction field in the coin mixing transaction itself, the input node 202 shares them in another way. In one example, the input node 202 sends them to the output node 204 via a separate encrypted channel or communication. In another example, the input node 202 shares them by placing each random public key R i They are shared via the blockchain by placing them into the non-transactional data field of the corresponding transaction.
[0089] Output node 204 scans the blockchain for transactions that may include payments from input node 202. The search may be based on identifying transactions that contain a specific flag or code indicating the presence of non-transactional data, which may be a random public key. In one embodiment, the detected flag is a non-transactional code that indicates that the data following the code is non-transactional.
[0090] In this example, there are at least thirteen empty outputs containing non-transaction data, either in the coin-mixing transaction 210 itself or in a set of thirteen additional transactions 212. For each field, the output node 204 extracts the data (which is assumed to be a random public key R i ), based on its BPriv X and BPriv y And the following formula to calculate BPriv i and the corresponding BPub i :
[0091] BPriv i =H(BPriv x R i )+BPriv y
[0092] If the extracted data is a random public key R used by input node 202 to generate a secret output address i If one of the output addresses in transaction 210 is equal to 0, then output node 204 will successfully generate a BPub that matches one of the output addresses in transaction 210. i The calculated BPub can be simply i Compare with the output address of transaction 210 to verify that one of the payments to it has been correctly identified. Since it has the corresponding private key BPriv i , then output node 204 owns the UTXO.
[0093] Understandably, Figure 2 The example in relates to a transaction 210 that mixes a sufficient number of multiple base-10 denominations so that an input node 202 can find a combination of UTXOs 206 that cumulatively constitutes a payment and can be included in transaction 210. In some cases, such a coin-mixing transaction may not be included or may not be successfully completed.
[0094] It is also understandable that Figure 2 While the examples described and the examples discussed below are specific to the distribution of cryptocurrencies and payments, the processes and systems described may also be applied to the distribution of data records (one example of which is a cryptocurrency value) based on data record characteristics that match specified data record characteristics (one example of which is a value that matches a specified denomination).
[0095] Figure 3 Another example payment process 300 is shown in which a plurality of coin mixing transactions 302, 304 are used.
[0096] In this example, the input node 202 is limited to selecting an available UTXO 206 based on the available coin mixing transactions 302, 304. In this illustrative example, it is assumed that one coin mixing transaction 302 is used to mix 0.1 coin denominations, and another coin mixing transaction 304 is used to mix 0.01 coin denominations. Participation in each of the transactions 302, 304 is subject to the payment of a transaction fee, in this example 0.00001 coins, which is entered into the transaction by the input node 202 using this number of discrete UTXO 206 rather than relying on overpayments and change.
[0097] Input node 202 cannot use 5×0.1 coins as in the previous example, since coin mixing transaction 302 is not necessarily designed to return change of 0.01 and the output payment to output node 204 will result in an overpayment of 0.01 coins. Therefore, input node 202 can use 4×0.1 coins mixed in transaction 302 and 9×0.01 coins mixed in transaction 304 to form the payment. The output is also 4×0.1 coins from transaction 302 and 9×0.01 coins from transaction 304. If multiple non-transaction data fields are allowed in the specific implementation / protocol used, the random public keys R1, R2, R3, R4 will be placed in the non-transaction data fields in transaction 302, and the remaining random public keys R5 to R6 will be placed in the non-transaction data fields in transaction 302. 13 will be placed in the non-transaction data field in transaction 304. Alternatively, the random public key R i Shared by output nodes 204 via a separate communication channel, or shared via separate blockchain transactions, each of which contains a random public key R in a non-transaction data field i one.
[0098] Those skilled in the art will appreciate that there are other example processes that may use other denominations and coin mixing transactions to effectuate payments.
[0099] It is also understood that in order to participate in the above-mentioned processes 200 and 300, the input node 202 has enough available UTXO206 of suitable denominations. There may be a situation where the UTXO206 owned by the input node 202 is not of suitable denomination but participates in the mixing of coins of specified denominations. In one embodiment, the input node 202 can be used to indicate to the payer that it wishes to receive a payment of a specified denomination so that it will have a UTXO available for the payment it intends to make later. In some cases, the input node 202 can be used to actively disperse or decompose its UTXO206 into multiple UTXO206 with specified denominations. If such a transaction can be implemented with negligible or zero transaction fees, such a function can be embedded in the wallet software, which can actively generate transactions to decompose the UTXO206 into specified denominations. In some instances, the wallet software can be used to enable or disable this function. If enabled, the wallet software can generate and execute these transactions in the background. In some embodiments, the software can display the proposed decomposition transaction for user approval before executing the transaction, especially if any fees need to be paid for the decomposition transaction.
[0100] Now refer to Figure 4 , Figure 4 An example method 400 for making a blockchain-based payment from an input node to an output node according to aspects of the present application is shown in flowchart form. The method 400 includes obtaining public key material from the output node in operation 402. In this example, the public key material includes BPriv x and BPriv y , although in some other embodiments the output node public key material may take a different form.
[0101] Then, in operation 404, the input node selects a UTXO from its available UTXO resources to constitute a payment to the output node. The selected UTXO can be based on the denomination of the available coin mixing transaction. The selected UTXO can also be based on minimizing the number of UTXO involved. The selected UTXO can also be based on minimizing the change returned to the input node. Other factors can also be used in the selection process to identify the UTXO that will constitute the payment. Although in many cases, the payment can be composed of multiple UTXOs, in some cases, a single UTXO can be selected. The cumulative value of the UTXO is equal to or greater than the total payment amount.
[0102] The input node also determines the number and denomination of outputs that will constitute a payment to the output node in operation 404. The denomination of the output is selected from the specified denominations and may be selected based on the denominations of available coin mixing transactions.
[0103] In operation 406, after determining the number of outputs, the input node selects a random number r for each of the outputs i , and based on its associated random number r i and the public key material from the output nodes to generate BPub for each output i Output address.
[0104] Then, in operation 408, the input node inserts the inputs and outputs into one or more coin-mixing transactions.
[0105] In operation 410, the input node shares a random public key R with the output node. i . Each random public key R i Corresponding to generating the corresponding output address BPub i The random number r used i In some embodiments, the random public key R i Inserted into one or more non-transaction data fields in the coin mixing transaction. In some embodiments, the random public key R i Inserted into the non-transaction data field in a separate additional transaction, for each random public key R i In other embodiments, the input node shares the random public key R with the output node via a separate communication channel outside the blockchain protocol. i .
[0106] Then, at operation 412, the input node signs each of the inputs that it has inserted into one or more transactions.
[0107] Figure 5 An example method 500 for receiving payments at an output node using blockchain technology is shown in the form of a flow chart. At operation 502, the output node first publishes or makes its public key material available. In this example method 500, the public key material is two public keys: BPub x and BPub y . It may provide this material to an input node that wants to make a payment to an output node. In this example, it is assumed that the output node knows about the upcoming payment and the payment amount. However, there may be situations where the output node has generally published its public key material and may receive payments from any number of possible sources in amounts not known in advance. In such situations, the output node intermittently scans the blockchain for non-transactional data and tests any such data found, as described below.
[0108] In operation 504, the output node begins searching the blockchain for transactions that may be related to payments from the input node. In particular, the output node searches for transactions that contain a non-transactional flag or code indicating the presence of non-transactional data. In some embodiments, the output node may limit its search to coin mixing transactions that contain non-transactional data. It will be appreciated that this example assumes that the non-transactional data is included in the coin mixing transaction itself. As described above, in some embodiments that may not be possible, the random public key material may be shared with the output node in another manner, such as through an additional transaction containing a non-transactional data field or through a separate non-blockchain communication channel. For example, if the random public keys are each in a separate transaction, the output node may search for transactions that contain one P2PKH output and one empty data output.
[0109] In operation 506, after identifying a candidate transaction containing non-transaction data, the output node extracts the non-transaction data and tests whether the data can be used to generate one of the output addresses in the transaction. As described above, if the non-transaction data is a random public key R i , then the output node will be able to use its public key material to generate a public-private key pair BPriv i and BPub i , and the generated public key BPub i will match one of the output addresses. In operation 508, the output node evaluates whether the generated key matches the output address in the transaction. If not, it discards the non-transaction data and returns to search the blockchain, or tests the additional non-transaction data if there is additional non-transaction data in the current candidate transaction.
[0110] If the output node is determined in operation 508 by BPriv i and BPub i Determining that it has successfully identified one of the payments, it proceeds to assign the BPub i The payment of is added to the total amount paid by the input node, as indicated by operation 510. In operation 512, the output node can evaluate whether the cumulative value of the payments from the input nodes has completed the total payment. If not, the search continues.
[0111] It is understandable that some of the operations described in the above exemplary embodiments may occur simultaneously or in a different order without substantially affecting the process. The present application includes these variations and improvements.
[0112] In some embodiments, the coin mixing transaction can be run from a central server. However, the coin mixing transaction can also be fully distributed, where all input nodes act as blind signing servers. JoinMarket is an example of a decentralized implementation of coin mixing that encourages participation and increases liquidity.
[0113] Now refer to Figure 6 , Figure 6 A simplified example of a participating node 600 is shown in block diagram form. Node 600 can be an input node or an output node. Node 600 includes a processor 602, which can include one or more microprocessors, application specific integrated circuits (ASICs), microcontrollers, or similar computer processing devices. Node 600 also includes a memory 604 and a network interface 606, wherein the memory 604 can include permanent and non-permanent memory to store values, variables, and in some instances to store processor executable program instructions, and the network interface 606 is used to provide a network connection on a wired or wireless network.
[0114] The node 600 includes a processor-executable blockchain application 608 containing processor-executable instructions that, when executed, cause the processor 602 to perform one or more of the functions or operations described herein.
[0115] It is understood that the devices and processes described herein and any modules, routines, processes, threads, applications, or other software components that implement the methods / processes for configuring nodes can be implemented using standard computer programming techniques and languages. The application is not limited to a specific processor, computer language, computer programming convention, data structure, or other such implementation details.
[0116] It should be noted that the above embodiments illustrate rather than limit the present invention, and that a person skilled in the art will be able to design many alternative embodiments without departing from the scope of the present invention as defined by the appended claims. In the claims, any reference numerals placed in brackets shall not be interpreted as limiting the claims. The terms "comprises" and "comprises" etc. do not exclude the presence of elements or steps other than those listed as a whole in any claim or specification. In this specification, "comprises" means "includes or consists of", and "comprises" means "includes or consists of". The singular reference of an element does not exclude the plural reference of these elements, and vice versa. The present invention may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a device claim that lists several devices, several of these devices may be implemented by the same hardware item. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Claims
1. A computer-implemented method for transferring a master data record between an input node and an output node using a blockchain, the method being implemented at the output node, the method comprising: providing the input node with public key material associated with the output node; obtaining a random public key from the input node, wherein the input node is configured to generate a secret output address based at least in part on two public keys and the random public key; searching the blockchain for a data record distribution transaction having a plurality of input addresses and a plurality of output addresses, each output address being assigned a data record having a corresponding data record characteristic from a set of specified data record characteristics; determining a public-private key pair based on the random public key and the public key material; matching a public key from the public-private key pair to one of the output addresses in the data record distribution transaction, and based on the match, adding the data record assigned to the output address to a temporary set of data records; and It is determined whether the temporary data record set is smaller than the total data record, and if so, the searching, determining and matching are continued until the temporary data record set matches the total data record.
2. The method according to claim 1, wherein: The public key material includes two public keys, namely, BPub x and BPub y , the two public keys have their own corresponding private keys, namely, BPriv x and BPriv y .
3. The method according to claim 2, wherein: Determining the ith public-private key pair includes determining: BPriv i =H(BPriv x R i )+BPriv y Among them, BPriv i includes the private key of the public-private key pair, H() is a hash function, and R i is a random public key, and the public key in the i-th public key-private key pair is determined as BPub i =BPriv i G, where G is the elliptic curve base point.
4. The method according to claim 3, wherein: The random public key R i Generated as R i =r i G.
5. The method according to any one of claims 1 to 4, wherein: Searching the blockchain includes identifying a data record distribution transaction containing a non-transaction code, and obtaining the random public key includes extracting the random public key from a non-transaction data field of the data record distribution transaction.
6. The method according to any one of claims 1 to 4, wherein: Obtaining the random public key includes searching the blockchain for transactions containing a non-transaction code and extracting the random public key from a non-transaction data field in the transaction when a transaction is identified.
7. The method according to any one of claims 1 to 6, wherein: The data record characteristic is a value specified in the data record, and the series of specified data record characteristics is based on a maximum value and is determined by the maximum value. A series of values defined by multiples of a series, where n is a positive integer.
8. A method according to any one of the preceding claims, wherein: Searching the blockchain includes identifying a coin-mixing transaction containing a non-transaction code, and obtaining the random public key includes extracting the random public key from a non-transaction data field of the coin-mixing transaction.
9. A computing device for transferring a total data record between an input node and an output node using a blockchain, the computing device being the output node, the computing device comprising: processor; Memory; A network interface for providing network connection; A blockchain application comprising computer executable instructions which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 8.
10. A non-transitory processor-readable medium storing processor-executable instructions for transferring aggregate data records between an input node and an output node using a blockchain, wherein: The processor-executable instructions, when executed by a processor in the output node, cause the processor to perform the method according to any one of claims 1 to 8.
