Statement attestation and verification

By combining the elliptic curve public-private key relationship and arithmetic circuit in the batch commitment, the problem of bilinear pair-friendly elliptic curves in existing systems is solved, and efficient zero-knowledge verification is achieved, suitable for the Bitcoin secp256k1 standard.

CN119072899APending Publication Date: 2024-12-03NCHAIN LICENSING AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380032934.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-04-08
Filing Date
2023-03-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When using elliptic curves, existing zero-knowledge proof systems require bilinear pairing friendly elliptic curves, resulting in inability to compatible with standard encrypted elliptic curve parameter sets, such as Bitcoin secp256k1, and explicit elliptic curve multiplication increases the proof key size and Generation time.

Method used

By using the combination of elliptic curve public-private key relationship and arithmetic circuit in batch commitment, zero-knowledge proof is achieved, the requirement of explicit elliptic curve multiplication is avoided, and the zk-SNARK method based on discrete logarithm is adopted, which is suitable for A protocol that does not require bilinear pairing.

Benefits of technology

It realizes efficient zero-knowledge verification, reduces proof size and calculation fees, is compatible with the Bitcoin secp256k1 standard, and is suitable for trustless exchange applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119072899A_ABST
    Figure CN119072899A_ABST
Patent Text Reader

Abstract

A method for proving that a secret submitted in a commitment is a discrete logarithm of a common element in a limited set of data elements, comprising: obtaining a first vector for generating the commitment, the first vector comprising n components wherein one of the n components of the first vector is located at a location corresponding to the secret; generating a second vector including n components, a component of the second vector at a predetermined position corresponding to the position in the first component being set to zero; generating another commitment for the second vector; transmitting the other commitment to a verification device; receiving a random challenge from the verification device; generating a response using the first vector, the second vector, and the random challenge; and transmitting the response to the verification device to prove that the secret is the discrete logarithm of the common element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to statement proof and verification. In particular, embodiments relate to proving (and verifying) that a secret committed in a batched commitment is a discrete logarithm of common elements in a finite group of data elements. Background Art

[0002] Blockchain refers to a distributed data structure in which a copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (hereinafter referred to as a "blockchain network") and is widely disclosed. The blockchain includes a series of data blocks, each of which includes one or more transactions. Except for the so-called "coinbase transaction", each transaction points to a previous transaction in a sequence, which can span one or more blocks back to one or more coinbase transactions. The coinbase transaction will be discussed further below. Transactions submitted to the blockchain network are included in new blocks. The process of creating a new block is generally referred to as "mining", which involves each of a plurality of nodes competing to perform "proof of work", i.e., solving a cryptographic puzzle based on a representation of a defined set of ordered and verified valid pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain can be pruned at some nodes, and the publication of blocks can be achieved by publishing only the block header.

[0003] Transactions in a blockchain can be used for one or more of the following purposes: transferring digital assets (i.e., a certain number of digital tokens); sorting a set of entries in a virtualized ledger or registry; receiving and processing time-stamped entries; and / or sorting index pointers by time. Blockchains can also be used to implement hierarchical additional functions on blockchains. For example, a blockchain protocol may allow additional user data or data indexes to be stored in a transaction. There is no pre-specified limit on the maximum data capacity that can be stored in a single transaction, so increasingly complex data can be incorporated. For example, this can be used to store electronic documents, audio, or video data in a blockchain.

[0004] The nodes of the blockchain network (commonly referred to as "miners") perform a distributed transaction registration and verification process, which will be described in more detail later. In summary, in this process, nodes verify transactions and insert them into block templates, which attempt to identify a valid proof-of-work solution for the block template. Once a valid solution is found, the new block is propagated to other nodes of the network, so that each node can record the new block on the blockchain. In order to record a transaction in the blockchain, a user (e.g., a blockchain client application) sends the transaction to one of the nodes in the network for propagation. The nodes receiving the transaction can compete to find a proof-of-work solution that incorporates the verified valid transaction into the new block. Each node is configured to execute the same node protocol, which will include one or more conditions for confirming that the transaction is valid. Invalid transactions will not be propagated or incorporated into the block. Assuming that the transaction has been verified to be valid and thus accepted on the blockchain, the transaction (including any user data) will therefore be registered and indexed as an immutable public record on each node in the blockchain network.

[0005] The node that successfully solves the proof-of-work puzzle to create the latest block is usually rewarded with a new transaction called a "coinbase transaction" that distributes the amount of digital assets, i.e. the number of tokens. The detection and rejection of invalid transactions is performed by the actions of competing nodes, which act as agents of the network and are incentivized to report and prevent improper behavior. The widespread publication of information allows users to continuously audit the performance of nodes. Publishing only block headers allows participants to ensure the continued integrity of the blockchain.

[0006] In the "output-based" model (sometimes referred to as the UTXO-based model), the data structure of a given transaction includes one or more inputs and one or more outputs. Any spendable output includes an element that specifies the amount of a digital asset, which can be derived from the ongoing sequence of transactions. Spendable outputs are sometimes called UTXOs ("unspent transaction outputs"). Outputs may also include a locking script that specifies future redemption conditions for the output. A locking script is a predicate that defines the conditions necessary to verify and transfer a digital token or asset. Each input of a transaction (except for a coinbase transaction) includes a pointer (i.e., a reference) to such an output in a previous transaction, and may also include an unlocking script for unlocking the locking script pointing to the output. Thus, consider a pair of transactions, referred to as a first transaction and a second transaction (or "target" transaction). The first transaction includes at least one output that specifies the amount of a digital asset, and includes a locking script that defines one or more conditions for unlocking the output. The second (target) transaction includes at least one input and an unlocking script, the at least one input including a pointer to the output of the first transaction; the unlocking script is used to unlock the output of the first transaction.

[0007] In such a model, when the second (target) transaction is sent to the blockchain network to be propagated and recorded in the blockchain, one of the validity conditions applied at each node will be that the unlocking script satisfies all of the one or more conditions defined in the locking script of the first transaction. Another condition will be that the output of the first transaction has not been redeemed by another earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate the transaction (as a valid transaction, but may register an invalid transaction) nor include the transaction in a new block to be recorded in the blockchain.

[0008] Another transaction model is the account-based model. In this case, each transaction is defined not by reference to the UTXO of the previous transaction in the past transaction sequence, but by reference to the absolute account balance. The current state of all accounts is stored individually by the node in the blockchain and is constantly updated.

[0009] Blockchain provides a decentralized, permissionless, global mechanism that can solve the problem of fair exchange between two mutually untrusting parties without the need for third-party arbitration or escrow. The fair exchange of data or information for financial rewards or in exchange for information such as digital goods is embodied in transaction protocols called Zero-Knowledge Contingent Payments (ZKCP). In ZKCP, the specified data will only be transferred from the seller to the buyer if the payment is confirmed; the payment from the buyer to the seller will only be completed if the specified data meets the conditions of sale. The details of such protocols are known, but it is essentially based on the combination of Hashed Time Locked Contracts (HTLCs) and Zero-Knowledge Proofs, which can simultaneously verify that certain encrypted information ("digital goods") is valid / correct and that the "password" used to decrypt this information is the data that must be revealed on the blockchain to claim the payment.

[0010] The core component of the ZKCP protocol is a zero-knowledge proof for a series of dependent statements about the validity or correctness of data / information, the validity of a key, and its corresponding hash value. Such complex compound statements require an efficient zero-knowledge proof system for general computation: essentially, this enables one party to run an arbitrary program with secret inputs, and then prove to another party that the program is valid and executes correctly with those inputs, without revealing any information about the secret inputs or the execution of the program.

[0011] Zero-knowledge SNARKs (zkSNARKs) provide a way to prove the validity of arbitrary computations that can be expressed as arithmetic circuits with zero knowledge. The two main distinguishing properties of zkSNARKs are: non-interactive (the prover can send the proof to the verifier in just one step); succinct (the proof is small and easy to verify). Summary of the invention

[0012] The known zero-knowledge succinct non-interactive argument of knowledge (zk-SNARK) is an implementation of a general proof system for the satisfiability of arithmetic circuits. In the SNARK framework, statements encoded as arithmetic circuits are converted into a structure called a quadratic arithmetic program (QAP), which consists of a set of polynomial equations. The statement can then be proved by proving the validity of the set of equations at a single point. The main advantage of the SNARK method is that the verifier only needs to perform a few elliptic curve (pairing) operations (which takes a few milliseconds), and the proof is very small (288 bytes) and is independent of the circuit size.

[0013] The SNARK method ensures very short proof and verification times at the expense of trusted establishment, non-standard cryptographic assumptions, and a heavier computational burden on the prover. The SNARK method also requires the use of elliptic curve bilinear pairing. However, the use of computationally feasible bilinear pairing requires the use of special "pairing-friendly" elliptic curves. This makes it impossible to use many standard cryptographic elliptic curve parameter sets, including Bitcoin secp256k1. Statements involving general elliptic curve point multiplication must then employ explicit circuits (which may be very large).

[0014] Furthermore, incorporating explicit elliptic curve multiplication (key statements) into the circuit increases the proof key size and proof generation time by at least an order of magnitude.

[0015] The present invention enables zero-knowledge proofs of statements involving both elliptic curve public-private key relationships and general arithmetic circuit satisfiability. This can be accomplished with negligible computational cost, other than proving the satisfiability of the arithmetic circuit, and avoids the requirement to create explicit arithmetic circuits for elliptic curve point multiplication operations, which would significantly increase the computational cost of the proof.

[0016] According to one aspect of the disclosure, there is provided a computer-implemented method for proving that a secret committed in a batch commitment is a discrete logarithm of common elements in a finite group of data elements, the method being executed on a computing device and comprising:

[0017] Obtaining a first vector for generating the batch commitment, the first vector comprising n components, wherein one component of the n components of the first vector is located at a position corresponding to the secret;

[0018] generating a second vector, the second vector comprising n components, wherein components of the second vector at predetermined positions corresponding to the positions in the first components are set to zero;

[0019] generating another batch commitment for the second vector;

[0020] transmitting the another batch processing commitment to a verification computing device;

[0021] receiving a random challenge from the verification computing device;

[0022] generating a response to the random challenge using the first vector, the second vector, and the random challenge; and,

[0023] The response is transmitted to the verification computing device to prove that the secret is the discrete logarithm of the public element.

[0024] According to another aspect disclosed herein, there is provided a computer-implemented method for verifying that a secret submitted in a batch commitment is a discrete logarithm of a common element in a finite group of data elements, the method being executed on a computing device and comprising:

[0025] Obtaining the batch commitment, wherein the batch commitment is a commitment to a first vector including n components, and one of the n components of the first vector is located at a position corresponding to the secret;

[0026] receiving another batch of commitments from the attestation computing device, wherein the another batch of commitments is a commitment to a second vector comprising n components, wherein components of the second vector at predetermined positions corresponding to the positions in the first vector are set to zero;

[0027] in response to receiving the another batch processing commitment, generating a random challenge and transmitting the random challenge to the attestation computing device;

[0028] receiving a response to the random challenge from the attesting computing device; and,

[0029] The secret is verified to be the discrete logarithm of the public element using the response, the batch commitment, the other batch commitment, and the random challenge. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] To facilitate an understanding of the embodiments of the present disclosure and to show how such embodiments may be implemented, reference will now be made, by way of example only, to the accompanying drawings, in which:

[0031] Figure 1 is a schematic block diagram of a system for implementing a blockchain;

[0032] Figure 2 Some examples of transactions that may be recorded in a blockchain are schematically shown;

[0033] Figure 3A A schematic block diagram of a client application is shown;

[0034] Figure 3B It shows that Figure 3A a schematic model of an exemplary user interface represented by a client application of

[0035] Figure 4 is a schematic block diagram of a verification circuit;

[0036] Figure 5 is a schematic block diagram of an enhanced verification circuit;

[0037] Figure 6 The input to the proof generation process is shown;

[0038] Figure 7 The inputs to the proof verification process are shown;

[0039] Figure 8 A method is shown to prove (and verify) that a secret submitted in a batch commitment is the discrete logarithm of a common element in a finite set of data elements. DETAILED DESCRIPTION

[0040] Exemplary System Overview

[0041] Figure 1 An exemplary system 100 for implementing a blockchain 150 is shown. The system 100 may include a packet-switched network 101, typically a wide area internet such as the Internet. The packet-switched network 101 includes a plurality of blockchain nodes 104, which may be arranged to form a peer-to-peer (P2P) network 106 within the packet-switched network 101. Although not shown, the blockchain nodes 104 may be arranged as a nearly complete graph. Thus, each blockchain node 104 is highly connected to other blockchain nodes 104.

[0042] Each blockchain node 104 includes a computer device of a peer, and different nodes 104 belong to different peers. Each blockchain node 104 includes a processing device, which includes one or more processors, such as one or more central processing units (CPUs), accelerator processors, special processors and / or field programmable gate arrays (FPGAs), and other devices, such as application-specific integrated circuits (ASICs). Each node also includes a memory, that is, a computer-readable memory in the form of a non-transitory computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as solid-state drives (SSDs), flash memory, or electrically erasable programmable read-only memories (EEPROMs), and / or optical media such as optical disk drives.

[0043] The blockchain 150 includes a series of data blocks 151, wherein a respective copy of the blockchain 150 is maintained at each of the plurality of blockchain nodes 104 in the distributed or blockchain network 106. As described above, maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in its entirety. Instead, the blockchain 150 can be pruned as long as each blockchain node 150 stores a block header (discussed below) for each block 151. Each block 151 in the blockchain includes one or more transactions 152, wherein a transaction in this context refers to a data structure. The nature of the data structure will depend on the type of transaction protocol used as part of the transaction model or plan. A given blockchain uses a particular transaction protocol throughout. In a common transaction protocol, the data structure of each transaction 152 includes at least one input and at least one output. Each output specifies an amount of a digital asset represented as a property, an example of which is an output that is cryptographically locked to a user 103 (requiring the user's signature or other solution to unlock, thereby redeeming or spending). Each input points to the output of a previous transaction 152, thereby linking these transactions.

[0044] Each block 151 also includes a block pointer 155, which points to a previously created block 151 in the blockchain to define the order of blocks 151. Each transaction 152 (except for the coinbase transaction) includes a pointer to a previous transaction to define the order of the transaction sequence (Note: the sequence of transactions 152 can branch). The blockchain of blocks 151 is traced back to the genesis block (Gb) 153, which is the first block in the blockchain. One or more original transactions 152 earlier in the blockchain 150 point to the genesis block 153, not to the previous transaction.

[0045] Each blockchain node 104 is configured to forward transactions 152 to other blockchain nodes 104, so that transactions 152 are propagated throughout the network 106. Each blockchain node 104 is configured to create blocks 151 and store corresponding copies of the same blockchain 150 in its corresponding memory. Each blockchain node 104 also maintains an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into block 151. Ordered pools 154 are often referred to as "memory pools". In this article, the term is not intended to be limited to any particular blockchain, protocol, or model. The term refers to a set of ordered transactions that a node 104 has accepted as valid, and for which the node 104 is forced to not accept any other transaction that attempts to spend the same output.

[0046] In a given current transaction 152j, an input (or each input) includes a pointer that references an output of a previous transaction 152i in the transaction sequence, specifying that the output is to be redeemed or "spent" in the current transaction 152j. In general, the previous transaction can be any transaction in the ordered set 154 or any block 151. Although the previous transaction 152i will need to exist and be verified to be valid in order to ensure that the current transaction is valid, the previous transaction 152i does not have to exist when the current transaction 152j is created or even sent to the network 106. Therefore, in this article, "previous" refers to the predecessor in the logical sequence linked by the pointer, and not necessarily the creation time or sending time in the time sequence, and therefore, does not necessarily exclude the situation where transactions 152i, 152j are created or sent out of order (see the discussion of orphan transactions below). The previous transaction 152i can also be called a predecessor transaction or a predecessor transaction.

[0047] The inputs of the current transaction 152j also include input authorizations, such as the signature of the user 103a to whom the outputs of the previous transaction 152i are locked. In turn, the outputs of the current transaction 152j may be cryptographically locked to the new user or entity 103b. Thus, the current transaction 152j may transfer the amounts defined in the inputs of the previous transaction 152i to the new user or entity 103b defined in the outputs of the current transaction 152j. In some cases, a transaction 152 may have multiple outputs to split the input amounts among multiple users or entities (one of which may be the original user or entity 103a for changes). In some cases, a transaction may also have multiple inputs to aggregate the amounts from multiple outputs of one or more previous transactions and reallocate them to one or more outputs of the current transaction.

[0048] According to an output-based transaction protocol, such as Bitcoin, when a party 103, such as an individual user or an organization, wishes to issue a new transaction 152j (either by an automated program employed by the party or manually), the issuing party sends the new transaction from its computer terminal 102 to a recipient. The issuing party or recipient will ultimately send the transaction to one or more blockchain nodes 104 of the network 106 (now typically a server or data center, but in principle it can also be other user terminals). It is also not excluded that the party 103 issuing the new transaction 152j can send the transaction directly to one or more blockchain nodes 104, and in some examples, the transaction may not be sent to the recipient. The blockchain node 104 receiving the transaction checks whether the transaction is valid according to the blockchain node protocol applied at each blockchain node 104. The blockchain node protocol typically requires the blockchain node 104 to check whether the cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in the ordered sequence of transactions 152. In such an output-based transaction protocol, this may include checking whether the cryptographic signature or other authorization of the party 103 included in the input of the new transaction 152j matches the condition defined in the output of the previous transaction 152i assigned by the new transaction, wherein the condition typically includes at least checking whether the cryptographic signature or other authorization in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction is linked. The condition may be defined at least in part by a script included in the output of the previous transaction 152i. Alternatively, this may be determined solely by the blockchain node protocol, or may be determined by a combination thereof. In either case, if the new transaction 152j is valid, the blockchain node 104 forwards it to one or more other blockchain nodes 104 in the blockchain network 106. These other blockchain nodes 104 apply the same test according to the same blockchain node protocol, and therefore forward the new transaction 152j to one or more other nodes 104, and so on. In this way, the new transaction is propagated throughout the network of blockchain nodes 104.

[0049] In the output-based model, the definition of whether a given output (e.g., UTXO) is allocated (e.g., spent) is whether it is validly redeemed by the input of another subsequent transaction 152j according to the blockchain node protocol. Another condition for the transaction to be valid is that the output of the previous transaction 152i that it attempts to redeem has not been redeemed by another transaction. Similarly, if invalid, the transaction 152j will not be propagated (unless marked as invalid and propagated for reminder) or recorded in the blockchain 150. This prevents double spending, that is, the transaction processor allocates the output of the same transaction more than once. On the other hand, the account-based model prevents double spending by maintaining account balances. Because there is also a defined transaction order, the account balance has a single defined state at any time.

[0050] In addition to verifying that transactions are valid, blockchain nodes 104 compete to be the first node to create a block of transactions in a process generally referred to as mining, which is supported by "proof of work". At a blockchain node 104, a new transaction is added to an ordered pool 154 of valid transactions that have not yet appeared in a block 151 recorded on the blockchain 150. The blockchain nodes then compete to assemble a new valid transaction block 151 of transactions 152 in the ordered transaction set 154 by attempting to solve a cryptographic puzzle. Typically, this involves searching for a "nonce" value such that when the nonce is juxtaposed with a representation of the ordered pool 154 of pending transactions and hashed, the output of the hash value satisfies a predetermined condition. For example, the predetermined condition may be that the output of the hash value has a certain predefined number of leading zeros. Note that this is only one specific type of proof of work puzzle, and other types are not excluded. A property of a hash function is that it has an unpredictable output relative to its input. Therefore, this search can only be performed by brute force, consuming a large amount of processing resources at each blockchain node 104 that attempts to solve the puzzle.

[0051] The first blockchain node 104 that solves the puzzle announces the puzzle solution on the network 106, providing the solution as proof, which can then be easily checked by other blockchain nodes 104 in the network (once a solution to the hash value is given, it is directly possible to check whether the solution satisfies the output of the hash value). The first blockchain node 104 propagates a block to other nodes that accept the block to reach a threshold consensus, thereby enforcing the protocol rules. The ordered set of transactions 154 is then recorded by each blockchain node 104 as a new block 151 in the blockchain 150. A block pointer 155 is also assigned to the new block 151n pointing to the previously created block 151n-1 in the blockchain. The large amount of work required to create a proof-of-work solution (e.g., in the form of a hash) signals the first node 104's intention to follow the blockchain protocol. These rules include not accepting a transaction as valid if it allocates the same output as a previously verified valid transaction, otherwise it is called a double spend. Once created, the block 151 cannot be modified because it is identified and maintained at each blockchain node 104 in the blockchain network 106. The block pointers 155 also impose an order on the blocks 151. Because transactions 152 are recorded in ordered blocks at each blockchain node 104 in the network 106, an immutable public ledger of transactions is provided.

[0052] It should be noted that the different blockchain nodes 104 competing to solve a puzzle at any given time may do so based on different snapshots of the pool 154 of transactions that have not yet been published at any given time, depending on when they began searching for a solution or the order in which they received the transactions. The person solving the corresponding puzzle first defines the transactions 152 included in the new block 151n and their order, and updates the current pool of unpublished transactions 154. The blockchain nodes 104 then continue to compete to create blocks from the newly defined ordered pool of unpublished transactions 154, and so on. In addition, there is a protocol to resolve any "forks" that may occur, where two blockchain nodes 104 solve puzzles within a short time of each other, thereby propagating conflicting views of the blockchain between the nodes 104. In short, the fork direction that is the longest becomes the final blockchain 150. It should be noted that this does not affect users or agents of the network, as the same transaction will appear in both forks.

[0053] According to the Bitcoin blockchain (and most other blockchains), a node that successfully constructs a new block 104 is granted the ability to newly allocate an additional, accepted amount of digital assets in a new special type of transaction that allocates an additional limited amount of digital assets (as opposed to an inter-agent or inter-user transaction, which transfers a certain amount of digital assets from one agent or user to another). This special type of transaction is often called a "coinbase transaction", but may also be called a "starting transaction" or "generating transaction". It usually forms the first transaction of a new block 151n. The proof of work signals the intention of the node that constructs the new block to follow the protocol rules, thereby allowing the particular transaction to be redeemed later. The blockchain protocol rules may require a maturation period, such as 100 blocks, before the special transaction can be redeemed. Typically, a regular (non-generating) transaction 152 will also specify an additional transaction fee in one of its outputs to further reward the blockchain node 104 that created the block 151n in which the transaction was published. This fee is often called a "transaction fee" and is discussed below.

[0054] Due to the resources involved in transaction verification and publication, typically at least each blockchain node 104 takes the form of a server comprising one or more physical server units, or even an entire data center. However, in principle, any given blockchain node 104 may take the form of a user terminal or a group of user terminals networked together.

[0055] The memory of each blockchain node 104 stores software configured to run on the processing device of the blockchain node 104 to perform its corresponding role according to the blockchain node protocol and process transactions 152. It should be understood that any action attributed to the blockchain node 104 herein can be performed by software running on the processing device of the corresponding computer device. The node software can be implemented in one or more applications at the application layer or a lower layer such as an operating system layer or a protocol layer, or any combination of these layers.

[0056] Computer devices 102 of each of the parties 103 acting as consuming users are also connected to the network 101. These users can interact with the blockchain network 106 but do not participate in verifying transactions or constructing blocks. Some of these users or agents 103 can act as senders and receivers in transactions. Other users can interact with the blockchain 150 without acting as senders or receivers. For example, some parties can act as storage entities that store a copy of the blockchain 150 (e.g., having obtained a copy of the blockchain from the blockchain node 104).

[0057] Some or all of the parties 103 may be connected as part of a different network, such as a network overlaid on the blockchain network 106. Users of the blockchain network (often referred to as "clients") may be referred to as being part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 because they do not perform the roles required of blockchain nodes. Instead, each party 103 may interact with the blockchain network 106, thereby utilizing the blockchain 150 by connecting to (i.e., communicating with) the blockchain node 106. For illustrative purposes, two parties 103 and their corresponding devices 102 are shown: a first party 103a and its corresponding computer device 102a, and a second party 103b and its corresponding computer device 102b. It should be understood that more such parties 103 and their corresponding computer devices 102 may exist and participate in the system 100, but for convenience, they are not illustrated. Each party 103 may be an individual or an organization. For illustrative purposes only, in this document, the first party 103a is referred to as Alice and the second party 103b is referred to as Bob, but it should be understood that this is not limited to Alice or Bob, and any reference to Alice or Bob in this document can be replaced with "first party" and "second party" respectively.

[0058] The computer device 102 of each party 103 includes a corresponding processing device, which includes one or more processors, such as one or more CPUs, graphics processing units (GPUs), other accelerator processors, specific application processors and / or FPGAs. The computer device 102 of each party 103 also includes a memory, that is, a computer-readable memory in the form of a non-temporary computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as SSDs, flash memory or EEPROMs, and / or optical media such as optical disk drives. The memory on the computer device 102 of each party 103 stores software, which includes a corresponding instance of at least one client application 105 that is set to run on the processing device. It should be understood that any action attributed to a given party 103 in this article can be executed by software running on the processing device of the corresponding computer device 102. The computer device 102 of each party 103 includes at least one user terminal, such as a desktop or laptop computer, a tablet computer, a smart phone, or a wearable device such as a smart watch. The computer device 102 of a given party 103 may also include one or more other network resources, such as cloud computing resources accessed through a user terminal.

[0059] The client application 105 may initially be provided to the computer device 102 of any given party 103 via a suitable computer-readable storage medium downloaded from a server, for example, or via a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable disk drive, floppy disk or tape, an optical disk such as a CD or DVD ROM, or a removable optical drive, etc.

[0060] The client application 105 includes at least a "wallet" function. This has two main functions. One of the functions is to enable the corresponding party 103 to create, authorize (e.g., sign) and send transactions 152 to one or more Bitcoin nodes 104, which are then propagated in the network of blockchain nodes 104 and included in the blockchain 150. Another function is to report to the corresponding party the amount of digital assets it currently owns. In an output-based system, this second function includes collating the amounts defined in the outputs of various transactions 152 belonging to the relevant parties scattered in the blockchain 150.

[0061] Note: While various client functions may be described as being integrated into a given client application 105, this is not necessarily limiting, and rather, any client function described herein may be implemented in a suite consisting of two or more different applications, such as interfacing via an API or one application as a plug-in to another application. More generally, the client functions may be implemented at the application layer or at a lower layer such as an operating system, or any combination of these layers. The following description will be based on the client application 105, but it should be understood that this is not limiting.

[0062] An instance of a client application or software 105 on each computer device 102 is operably coupled to at least one of the blockchain nodes 104 of the network 106. This can enable a wallet function of the client 105 to send transactions 152 to the network 106. The client 105 can also contact the blockchain node 104 to query the blockchain 150 for any transactions to which the corresponding party 103 is a recipient (or indeed to check other parties' transactions in the blockchain 150, because in an embodiment, the blockchain 150 is a public facility that provides transaction trust to some extent through its public visibility). The wallet function on each computer device 102 is configured to formulate and send transactions 152 according to a transaction protocol. As described above, each blockchain node 104 runs software that is configured to verify transactions 152 according to the blockchain node protocol and forward transactions 152 for propagation in the blockchain network 106. The transaction protocol and the node protocol correspond to each other, and a given transaction protocol and a given node protocol together implement a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150. All nodes 104 in the network 106 use the same node protocol.

[0063] When a given party 103 (say Alice) wishes to send a new transaction 152j to be included in the blockchain 150, she will formulate the new transaction according to the relevant transaction protocol (using the wallet function in her client application 105). She will then send the transaction 152 from the client application 105 to one or more blockchain nodes 104 to which she is connected. For example, this may be the blockchain node 104 that Alice's computer 102 is best connected to. When any given blockchain node 104 receives the new transaction 152j, it will process it according to the blockchain node protocol and its corresponding role. This includes first checking whether the newly received transaction 152j meets certain conditions for becoming "valid", specific examples of which will be discussed in detail later. In some transaction protocols, the validity conditions may be configurable on a per-transaction basis through a script included in the transaction 152. Alternatively, the conditions may simply be a built-in function of the node protocol, or defined by a combination of script and node protocol.

[0064] If the newly received transaction 152j passes the validity test (i.e., under the “valid” condition), any blockchain node 104 that receives the transaction 152j will add the new verified valid transaction 152 to the ordered transaction set 154 maintained at the blockchain node 104. Further, any blockchain node 104 that receives the transaction 152j will then propagate the verified valid transaction 152 to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, it is assumed that the transaction 152j is valid, which means that the transaction will soon be propagated throughout the network 106.

[0065] Once in the ordered pool 154 of pending transactions maintained at a given blockchain node 104, that blockchain node 104 will begin racing to solve the proof-of-work puzzle on the latest version of its respective pool 154 containing the new transaction 152 (keep in mind that other blockchain nodes 104 can attempt to solve the puzzle based on different transaction pools 154. However, whoever solves the puzzle first will define the set of transactions included in the latest block 151. Ultimately, the blockchain node 104 will solve the puzzle for a portion of the ordered pool 154, which includes Alice's transaction 152j). Once the pool 154 including the new transaction 152j completes the proof-of-work, it will immutably become part of one of the blocks 151 in the blockchain 150. Each transaction 152 includes a pointer to an earlier transaction, so the order of transactions is also immutably recorded.

[0066] Different blockchain nodes 104 may initially receive different instances of a given transaction and therefore have conflicting views about which instance is “valid” before one instance is published in a new block 151, at which point all blockchain nodes 104 agree that the published instance is the only valid instance. If a blockchain node 104 accepts one instance as valid and then discovers that a second instance has been recorded in the blockchain 150, the blockchain node 104 must accept this and will discard (i.e., treat as invalid) the instance it originally accepted (i.e., the instance that has not yet been published in block 151).

[0067] Another type of transaction protocol operated by some blockchain networks as part of the account-based transaction model can be called an "account-based" protocol. In the account-based case, each transaction is defined not by reference to the UTXO of a previous transaction in the past sequence of transactions, but by reference to an absolute account balance. The current state of all accounts is stored individually in the blockchain by the nodes of the network and is continuously updated. In such systems, transactions are ordered using an account's running transaction record (also called a "position"). This value is signed by the sender as part of their cryptographic signature and hashed as part of the transaction reference calculation. In addition, optional data fields can also be signed in the transaction. For example, a data field can point to a previous transaction if it contains the ID of the previous transaction.

[0068] UTXO-based model

[0069] Figure 2 An exemplary transaction protocol is shown. This is an example of a UTXO-based protocol. A transaction 152 ("Tx" for short) is the basic data structure of the blockchain 150 (each block 151 includes one or more transactions 152). The following will be described with reference to an output-based or "UTXO"-based protocol. However, this is not limited to all possible embodiments. It should be noted that although the exemplary UTXO-based protocol is described with reference to Bitcoin, it can also be implemented on other exemplary blockchain networks.

[0070] In the UTXO-based model, each transaction ("Tx") 152 includes a data structure that includes one or more inputs 202 and one or more outputs 203. Each output 203 may include an unspent transaction output (UTXO), which can be used as a source of input 202 for another new transaction (if the UTXO has not been redeemed). The UTXO includes a value that specifies the amount of a digital asset. This represents a set of tokens on a distributed ledger. The UTXO may also include a transaction ID of its source transaction and other information. The transaction data structure may also include a header 201, which may include an indicator of the size of the input field 202 and the output field 203. The header 201 may also include an ID for the transaction. In an embodiment, the transaction ID is a hash value of the transaction data (excluding the transaction ID itself) and is stored in the header 201 of the original transaction 152 submitted to the node 104.

[0071] Let's say Alice 103a wishes to create a transaction 152j that transfers the relevant amount of digital assets to Bob 103b. Figure 2 In , Alice's new transaction 152j is labeled "Tx1". This new transaction takes the amount of digital assets locked to Alice in output 203 of the previous transaction 152i in the sequence and transfers at least a portion of such amount to Bob. Figure 2, the previous transaction 152i is labeled "Tx0". Tx0 and Tx1 are just arbitrary labels that do not necessarily mean that Tx0 refers to the first transaction in blockchain 151 and Tx1 refers to a subsequent transaction in pool 154. Tx1 can point to any previous (i.e., preceding) transaction that still has unspent output 203 locked to Alice.

[0072] When Alice creates her new transaction Tx1, or at least when she sends it to the network 106, the previous transaction Tx0 may already be valid and included in block 151 of the blockchain 150. The transaction may have been included in one of the blocks 151 at this time, or it may still be waiting in the ordered set 154, in which case it will be included in the new block 151 soon. Alternatively, Tx0 and Tx1 may be created and sent to the network 106 together; or, if the node protocol allows buffering of "orphan" transactions, Tx0 may even be sent after Tx1. The terms "previous" and "successor" as used herein in the context of transaction sequences refer to the order of transactions in the sequence defined by the transaction pointers specified in the transactions (which transaction points to which other transaction, etc.). They may equally be replaced by "predecessors" and "successors", "predecessors" and "descendants", or "parents" and "children", etc. This does not necessarily refer to the order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. However, subsequent transactions (descendant transactions or "child transactions") pointing to a previous transaction (predecessor transaction or "parent transaction") will not be valid unless the parent transaction is valid. A child transaction that arrives at the blockchain node 104 before the parent transaction is considered an orphan transaction. Depending on the node protocol and / or node behavior, it may be discarded or buffered for a period of time to wait for the parent transaction.

[0073] One of the one or more outputs 203 of the previous transaction Tx0 includes a specific UTXO, labeled UTXO0. Each UTXO includes a value specifying the amount of digital assets represented by the UTXO and a locking script that defines the conditions that the unlocking script in the input 202 of the subsequent transaction must satisfy in order for the subsequent transaction to be valid and thus successfully redeem the UTXO. Typically, the locking script locks the amount to a specific party (the beneficiary of the transaction for that amount). That is, the locking script defines the unlocking condition, which typically includes the following conditions: the unlocking script in the input of the subsequent transaction includes the cryptographic signature of the party to which the previous transaction was locked.

[0074] The locking script (also known as scriptPubKey) is a piece of code written in a domain-specific language recognized by the node protocol. A specific example of such a language is called a "Script" (with a capital S), which can be used by the blockchain network. The locking script specifies the information required to spend the transaction output 203, such as the requirement for Alice's signature. The unlocking script appears in the output of the transaction. The unlocking script (also known as scriptSig) is a piece of code written in a domain-specific language that provides the information required to meet the locking script criteria. For example, it can contain Bob's signature. The unlocking script appears in the input 202 of the transaction.

[0075] Thus in the example shown, UTXO0 in output 203 of Tx0 includes a locking script [Checksig P A ], the locking script requires Alice’s signature Sig P A , in order to redeem UTXO0 (strictly speaking, to make subsequent transactions that attempt to redeem UTXO0 valid). A ] contains Alice's public key P from her public-private key pair A The input 202 of Tx1 includes a pointer to Tx1 (e.g., by its transaction ID (TxID0), which in the embodiment is the hash value of the entire transaction Tx0). The input 202 of Tx1 includes an index identifying UTXO0 in Tx0 to identify it among any other possible outputs of Tx0. The input 202 of Tx1 further includes an unlocking script <Sig P A >, the unlocking script includes Alice's cryptographic signature, which is created by Alice by applying the private key of her key pair to a predetermined portion of data (sometimes called a "message" in cryptography). The data (or "message") that Alice needs to sign to provide a valid signature can be defined by the locking script, the node protocol, or a combination thereof.

[0076] When a new transaction Tx1 arrives at a blockchain node 104, the node applies the node protocol. This includes running the locking script and the unlocking script together to check whether the unlocking script satisfies the conditions defined in the locking script (where the conditions may include one or more criteria). In an embodiment, this involves juxtaposing two scripts:

[0077] <Sig PA> <pa>||[Checksig PA]

[0078] Where "||" means concatenation, "<…>" means putting data on the stack, and "[…]" means a function consisting of locked scripts (in this case, a stack-based language). Similarly, scripts can be run one after another using a common stack instead of concatenating the scripts. In either case, when run together, the scripts use Alice's public key P A (included in the locking script of the output of Tx0) to verify that the unlocking script in the input of Tx1 contains Alice's signature when signing the expected portion of the data. The expected partial data itself (the "message") also needs to be included in order to perform this verification. In an embodiment, the signed data includes the entire Tx1 (so there is no need to include a separate element to plaintext specify the signed partial data, as it is already present).

[0079] Those skilled in the art will be familiar with the details of verification by public-private cryptography. Basically, if Alice has signed a message using her private key encryption, then given Alice's public key and the message in plain text, other entities such as node 104 can verify that the message must have been signed by Alice. Signing typically includes hashing the message, signing the hash value, and marking this to the message as a signature, so that any holder of the public key can verify the signature. Therefore, it should be noted that in embodiments, any reference to signing a particular data fragment or transaction portion, etc. herein can mean signing the hash value of the data fragment or transaction portion.

[0080] If the unlocking script in Tx1 satisfies one or more conditions specified in the locking script of Tx0 (so, in the example shown, if Alice's signature is provided and verified in Tx1), then the blockchain node 104 considers Tx1 to be valid. This means that the blockchain node 104 will add Tx1 to the pending transaction ordered pool 154. The blockchain node 104 will also forward the transaction Tx1 to one or more other blockchain nodes 104 in the network 106 so that it will propagate throughout the network 106. Once Tx1 is valid and included in the blockchain 150, this will define UTXO0 from Tx0 as spent. It should be noted that Tx1 is only valid if it spends unspent transaction output 203. If it attempts to spend an output that has already been spent by another transaction 152, then Tx1 will be invalid even if all other conditions are met. Therefore, the blockchain node 104 also needs to check whether the UTXO referenced in the previous transaction Tx0 has been spent (that is, whether it has formed a valid input for another valid transaction). This is one of the reasons why it is important for the blockchain 150 to impose a defined order on transactions 152. In practice, a given blockchain node 104 may maintain a separate database marking the UTXO 203 of a transaction 152 as having been spent, but ultimately defining whether a UTXO has been spent depends on whether it has formed a valid input to another valid transaction in the blockchain 150.

[0081] If the total amount specified in all outputs 203 of a given transaction 152 is greater than the total amount pointed to by all its inputs 202, this is another basis for failure in most transaction models. Therefore, such a transaction will not be propagated or included in block 151.

[0082] Note that in the UTXO-based transaction model, a given UTXO needs to be spent as a whole. You cannot "leave behind" a portion of the amount defined in a UTXO as spent while spending another portion. However, the amount of a UTXO can be split between multiple outputs of subsequent transactions. For example, the amount defined in UTXO0 of Tx0 can be split between multiple UTXOs in Tx1. Therefore, if Alice does not want to give all of the amount defined in UTXO0 to Bob, she can use the remaining portion to make change for herself in the second output of Tx1, or to pay another party.

[0083] In practice, Alice will also typically need to include a fee for the Bitcoin node 104 that successfully includes Alice's transaction 104 in block 151. If Alice does not include such a fee, Tx0 may be rejected by the blockchain node 104, and therefore, although technically valid, may not be propagated and included in the blockchain 150 (if the blockchain node 104 does not want to accept transaction 152, the node protocol does not force the blockchain node 104 to accept). In some protocols, the transaction fee does not require its own separate output 203 (i.e., no separate UTXO is required). Instead, any difference between the total amount pointed to by input 202 and the total amount specified by output 203 of a given transaction 152 will be automatically provided to the blockchain node 104 that issued the transaction. For example, assume that a pointer to UTXO0 is the only input of Tx1, and Tx1 has only one output UTXO1. If the amount of the digital asset specified in UTXO0 is greater than the amount specified in UTXO1, the difference can be distributed by the node 104 that wins the proof-of-work competition to create a block containing UTXO1. Alternatively or additionally, this does not necessarily preclude that a transaction fee may be explicitly specified in one of the UTXOs 203 in the transaction 152 itself.

[0084] Alice and Bob's digital assets consist of the UTXO locked to them in any transaction 152 anywhere in the blockchain 150. Therefore, in general, the assets of a given party 103 are scattered among the UTXOs of various transactions 152 throughout the blockchain 150. No single number defining the total balance of a given party 103 is stored anywhere in the blockchain 150. The role of the wallet function of the client application 105 is to collate the various UTXO values ​​locked to the respective parties and not yet spent in other subsequent transactions. To achieve this, it can query a copy of the blockchain 150 stored at any one Bitcoin node 104.

[0085] It should be noted that script code is often represented schematically (i.e., using an imprecise language). For example, an opcode (opcode) may be used to represent a particular function. "OP_..." refers to a particular opcode of the scripting language. For example, OP_RETURN is a scripting language opcode that, when preceded by OP_FALSE at the beginning of a locking script, creates an unspendable output of a transaction that can store data within the transaction, thereby immutably recording the data in the blockchain 150. For example, the data may include a file to be stored in the blockchain.

[0086] Typically, the inputs to a transaction contain a digital signature corresponding to the public key PA. In an embodiment, this is based on ECDSA using the elliptic curve secp256k1. The digital signature signs a specific piece of data. In an embodiment, for a given transaction, the signature will sign part of the transaction input and part or all of the transaction output. Signing a specific part of the output depends on the SIGHASH flag. The SIGHASH flag is typically a 4-byte code included at the end of the signature that selects the output to be signed (and is therefore fixed at the time of signing).

[0087] The locking script is sometimes referred to as "scriptPubKey", which means that it usually includes the public key of the party to which the corresponding transaction is locked. The unlocking script is sometimes referred to as "scriptSig", which means that it usually provides the corresponding signature. However, more generally speaking, in all applications of blockchain 150, the conditions for UTXO redemption do not necessarily include verification of the signature. More generally speaking, the scripting language can be used to define any one or more conditions. Therefore, the more general terms "locking script" and "unlocking script" may be preferred.

[0088] Client Software

[0089] Figure 3A An exemplary implementation of a client application 105 for implementing an embodiment of the disclosed solution is shown. The client application 105 includes a transaction engine 301 and a user interface (UI) layer 302. According to the solution discussed above and the content to be discussed in further detail later, the transaction engine 301 is configured to implement the basic transaction-related functions of the client 105, such as formulating a transaction 152, sending a transaction to one or more nodes 104 to be propagated through the blockchain network 106.

[0090] The UI layer 302 is configured to present a user interface through a user input / output (I / O) mode of the corresponding user's computer device 102, including outputting information to the corresponding user 103 through the user output mode of the device 102, and receiving input from the corresponding user 103 through the user input mode of the device 102. For example, the user output mode may include one or more screens (touch or non-touch screen) that provide visual output, one or more speakers that provide audio output, and / or one or more tactile output devices that provide tactile output, etc. The user input mode may include, for example, an input array of one or more touch screens (which may be the same or different from that / those used for the output mode); one or more cursor-based devices such as a mouse, trackpad, or trackball; one or more microphones and voice or sound recognition algorithms for receiving voice or sound input; one or more gesture-based input devices for receiving input in the form of manual or physical gestures; or one or more mechanical buttons, switches, or joysticks, etc.

[0091] Note: Although various functions in this document may be described as being integrated into the same client application 105, this does not necessarily constitute a limitation. Instead, they can be implemented in a suite of programs consisting of two or more different applications, such as one application as a plug-in to another application or interfacing via an API (application programming interface). For example, the functionality of the transaction engine 301 can be implemented in a separate application rather than in the UI layer 302, or the functionality of a given module such as the transaction engine 301 can be split between multiple applications. At the same time, it is not excluded that some or all of the described functions can be implemented, for example, at the operating system level. Where a single or given application 105 or the like is referenced anywhere in this document, it should be understood that this is only by way of example, and more generally, the described functions can be implemented in any form of software.

[0092] Figure 3B A model is given of an example of a user interface (UI) 300 that may be presented by a UI layer 302 of a client application 105a on Alice's device 102a. It should be understood that a similar UI may be presented by a client 105b on Bob's device 102b or any other party's device.

[0093] By means of diagrams, Figure 3B The UI 300 is shown from Alice's perspective. The UI 300 may include one or more UI elements 351, 352, 353, which are presented as different UI elements through user output.

[0094] For example, the UI element may include one or more user-selectable elements 351, which may be different buttons on a screen, different options in a menu, or the like. The user input method is configured to enable the user 103 (in this case, Alice 103a) to select or otherwise operate one of these options, such as by clicking or touching the UI element on the screen, or speaking the name of the desired option (Note: the term "manual" as used herein is only used to contrast with automatic, and is not necessarily limited to performing operations by hand). These options enable the user (Alice) to formulate a transaction 152 and send the transaction to one or more nodes 104 for propagation through the blockchain network 106.

[0095] Additionally or alternatively, the UI element may include one or more data input fields 352 through which a user can formulate a transaction 152 and send the transaction to one or more nodes 104 to be propagated through the blockchain network 106. These data input fields are presented via user output means, such as on a screen, and data may be entered into the fields via user input means, such as a keyboard or touch screen. Alternatively, the data may be received verbally, such as based on speech recognition.

[0096] Additionally or alternatively, the UI element may include one or more information elements 353 that output information to the user. For example, this / these may be presented on a screen or audibly.

[0097] It should be understood that the specific manner in which the various UI elements are presented, the selection options are made, and the data is entered is not important. The functions of these UI elements will be discussed in more detail later. It should also be understood that Figure 3B The UI 300 shown in FIG. 3 is only an illustrative model, and in practice, it may include one or more further UI elements, which are not illustrated for the sake of brevity.

[0098] promise

[0099] At the heart of many interactive zero-knowledge protocols are commitment schemes, which are used to implement arithmetic circuit satisfiability. Commitments enable a prover to pre-commit to a secret value and then verifiably reveal (disclose) the secret value. Commitment schemes have two main properties: First, hiding—the commitment ensures that the value is secret. Second, binding—the commitment can only be revealed for the value that was originally committed. The Pedersen commitment scheme involves two elliptic curve generator points: G and F in a group G of prime order p, known to all parties. The committer generates a generator point in the prime field Z. p We generate a secure random number r in , and then compute (via elliptic curve addition / multiplication) a commitment to a secret value s:

[0100] Com(s,r)=s×G+r×F,

[0101] Where × represents elliptic curve point multiplication.

[0102] The promiser can make the promise fully public (i.e. verifiable) at a later stage by providing the values ​​s and r. As part of the Σ protocol, the promiser can also make the promise public in response to a specific challenge value, without revealing the secret s or the random number r.

[0103] Pedersen commitments are additively homomorphic, which means that adding two commitments together (on an elliptic curve) yields a commitment to the sum of the committed values, i.e.:

[0104] (s1×G+r1×F)+(s2×G+r2×F)=(s1+s2)×G+(r1+r2)×F

[0105] The proof of the satisfiability of arithmetic circuits can be realized in the "zero knowledge" case. p (above) is a virtual structure of arithmetic gates connected by lines (forming a directed acyclic graph) that can perform arbitrarily complex calculations, where the calculations are limited to integer operations and cannot have data-dependent loops or mutable state.

[0106] Each gate has two input lines and one output line, and performs a multiplication (×) or addition (+) operation on the inputs.

[0107] In practice, a complete circuit has free input wires and free output wires that define external (circuit) input and output values. A legal assignment is one that defines the values ​​of the wires as those that satisfy the requirements of the circuit, i.e., each wire is assigned a value where the output of each gate correctly corresponds to the product or sum of the inputs (i.e., the gates are consistent).

[0108] Several methods have been developed to significantly improve the performance of parallel Σ-protocol methods for proving arithmetic circuit satisfiability. Known methods, including the method proposed by Bootle and Groth, involve batching commitments to circuit line values ​​to significantly reduce the size of data that must be sent from the prover to the verifier (i.e., reduce communication complexity).

[0109] Similarly, as a comparison to prove the satisfiability of the same SHA circuit, the Bootle protocol has a proof key size of only 5KB and a key generation time of 180ms. The proof size is 24KB, the generation time is about 4 seconds, and the verification time is also about 4 seconds.

[0110] These methods are not described in full here, except that the main vector batching protocol adopted is described in the following steps. This obeys the same properties as the standard Pedersen commitment, but for n elements (m = m1, ..., m n ) requires only sending a single group element:

[0111] 1. The prover and verifier agree on a group element F←G.

[0112] 2. The prover generates n random numbers x1,...,x n ←Z p .

[0113] 3. The prover calculates point K i =x i ×F (where i=1,...,n). These values ​​constitute the proof key PrK sent to the verifier.

[0114] 4. The prover generates a random value: r←Z p .

[0115] 5. The prover calculates the commitment:

[0116]

[0117] and send it to the validator.

[0118] The vector Pedersen commitment or batch Pedersen commitment is a generalization of the Pedersen scheme to use a single point Pair Vector Make a commitment. An elliptic curve of prime order [ is called an elliptic curve or a subgroup of such a curve. It is represented by a capital letter The points in the The domain elements in , with vectors indicated in bold.

[0119] The scheme has two algorithms. Assuming the elliptic curve The description of is an implicit input to both algorithms.

[0120] ●Submit Com(x,CK;r): In the input message vector Random Elements and commitment key Above, output point:

[0121] C=r×G0+x 1× C1+…+x n×G n

[0122] Here, the commit operation outputs a linear combination of commitment key elements indicated by the message scalars x1,…,xn and the randomness r.

[0123] ●VerifyCom(x,r,C,CK): Reveal the input promise and commitment key Calculate C * =Com(x,CK;r). If C * =C, then the output (Accept). Otherwise, output b=⊥(Reject).

[0124] Here, verifying the commit operation re-executes the commit operation and checks the given message x=x1,…,xn and the randomness r.

[0125] Provide proof for a statement

[0126] In general, one aspect of the invention relates to a computer-implemented method for performing zero-knowledge proof or verification of statements. A prover can use the method herein to prove to a verifier that a statement is true while keeping the statement's witness confidential. In some embodiments, the statement is a compound statement that involves both arithmetic circuit satisfiability and a dependent statement about the validity of a public key (key-statement proof).

[0127] Our method can be used in known circuit satisfiability protocols, such as existing zero-knowledge proof protocols based on discrete logarithms. This method is particularly suitable for protocols that do not require the use of bilinear pairing-friendly elliptic curves.

[0128] The present invention enables efficient zero-knowledge verification of composite statements involving both arithmetic circuit satisfiability and dependent statements about public key validity (key-statement proofs). Public-key elliptic curve specifications are employed in homomorphic commitment functions to prove circuit satisfiability. This enables proving public-key statements corresponding to private keys used as circuit inputs and / or outputs in an efficient manner.

[0129] The proof size and computational expense of generating proofs for statements involving circuit satisfiability and elliptic curve key pairs can be significantly reduced. Our approach can be easily incorporated into existing discrete logarithm-based zero-knowledge proof protocols for circuit satisfiability, which does not require the use of bilinear pairing-friendly elliptic curves. Our approach uses discrete logarithm-based zero-knowledge proofs that are fully compatible with the Bitcoin secp256k1 standard.

[0130] The present invention relates to a method capable of proving a specific class of compound statements involving a relationship with an elliptic curve public / private key pair (based on elliptic curve point multiplication).

[0131] Using zkSNARKs to prove statements involving arbitrary cryptographic elliptic curve key operations was deemed impractical, so this method uses information about the elliptic curve public key extracted directly from the "homomorphic hiding" (or commitment scheme) used to construct general circuit satisfiability proofs. The specific type of elliptic curve involved in the method's statements is the same as the elliptic curve used in the circuit commitment scheme.

[0132] However, the SNARK method involves pairing operations and therefore requires special bilinear pairing-friendly elliptic curves. This makes it impossible to use zk-SNARKs based on elliptic curves (e.g., Groth16) because the elliptic curves used on some blockchains are not compatible with bilinear pairing-friendly elliptic curves. For example, statements associated with Bitcoin public keys use the Bitcoin secp256k1 curve, which is incompatible.

[0133] Therefore, the method of the present invention is compatible with alternative protocols for proving satisfiability of arithmetic circuits that do not rely on pairing and have fewer cryptographic assumptions. Embodiments of the present disclosure use zk-SNARKs based on discrete logarithms (e.g., the Bootle and Bulletproof families of zk-SNARKs). Overall, the method of the present invention is more efficient than elliptic curve-based zkSNARKS because fewer computations are required and the proof size is smaller for trustless exchange applications.

[0134] Figure 4 A verification circuit (which is itself an arithmetic circuit) 400 is shown.

[0135] Verification circuit 400 receives a common input and a secret input (sk). The secret input (sk) may be any value that is not disclosed to the verifier. For example, the secret input (sk) may be a private key. An example of a private key is a signing key, such as an Elliptic Curve Digital Signature Algorithm (ECDSA) signing key. The input (sk) is referred to as "secret" because it is not disclosed to the verifier.

[0136] Specifically, the functional circuit 402 (which is itself an arithmetic circuit) that represents the statement that the prover wants to prove receives the secret input sk and generates a functional circuit output Setting up ECDSA signature keys Any predicate domain are domain elements {0,1,2,…,p-1} that are remainders of n modulo p operations, where n is an integer and p is a prime number. It can be expressed as Arithmetic Circuits 402. Functional circuit 402 includes a plurality of arithmetic gates connected by wires and is capable of performing arbitrarily complex calculations. Each gate has two input wires and one output wire, and performs a multiplication (×) or addition (+) operation on the inputs.

[0137] The equality check module 404 receives the common input And the functional circuit output And determine the common input Does it correspond to the functional circuit output? to give a TRUE / FALSE result. , the result of the verification circuit 400 will be "true".

[0138] Therefore, given the public value claim However, a party who does not wish to reveal the secret input sk can use the verification circuit 400 to generate zero-knowledge parameters for the statement. Specifically, the prover can prove the following statement:

[0139] ●Statement 1: "P(sk) is the hash of sk under the SHA256 function."

[0140] ●Statement 2: "P(sk) is the result of decomposing sk into two subvectors of equal length, adding them together, and then performing an inner product operation with the common vector v."

[0141] • Any other statement involving a predicate P that can be expressed as an arithmetic circuit.

[0142] By verification circuit 400, the secret input sk must be an input line of verification circuit 400, but not necessarily a line of the multiplication gate, because it is desirable to consider arbitrary predicates about the secret input sk For example, to check if a given byte array Is it the hash of the secret input sk under SHA-256, the predicate circuit will be the implementation of the hash function Arithmetic circuits on .

[0143] Figure 5 An enhanced verification circuit (which is itself an arithmetic circuit) 500 is shown.

[0144] The enhanced verification circuit 500 includes the verification circuit 400 and a dummy multiplicative gate 502. The dummy multiplicative gate 502 is arranged to receive a secret input sk and a dummy value dummy value (d). The dummy value (d) can take any value. Figure 5 As shown, the output d*sk of multiplication gate 502 is not linked to verification circuit 400 in any way, nor does it provide an output of enhanced verification circuit 500. Within verification circuit 400, the output of the multiplication gate that is not an output of enhanced verification circuit 500 is referred to herein as an auxiliary variable.

[0145] The zkSNARK proof system collects the inputs of all multiplication gates of the enhanced verification circuit 500 into the matrix The use of a dummy multiplication gate 502 (to which the secret input sk is provided as input) ensures that the secret input sk is collected and is the matrix during proof generation. , thereby ensuring that the prover is committed to the secret input sk during proof generation.

[0146] The zkSNARK protocol usually consists of three phases:

[0147] a. Establishment: Given an arithmetic circuit (e.g., enhanced verification circuit 500), compute the proving and verification key pair. In the example of zk-SNARKs of the Bootle and Bulletproof families, the establishment phase includes generating a Pedersen commitment key in a verifiable manner, and the Pedersen commitment key is used as both the proving key and the verification key.

[0148] b. Proof generation (prover performs proof generation): given the proof key, the public components of the arithmetic circuit (including the common input of the arithmetic circuit, the common output of the arithmetic circuit, and any common auxiliary variables) and the secret component of the arithmetic circuit (including the secret input to the arithmetic circuit and any secret auxiliary variables), the prover generates a proof π and sends it to the verifier.

[0149] c. Verification (verifier executes verification protocol): the verifier receives proof π. Given the verification key and the public component of the arithmetic circuit (including the public inputs of the arithmetic circuit, the public outputs of the arithmetic circuit, and any public auxiliary variables), the verifier performs verification on the proof π.

[0150] Therefore, in the establishment phase, given the enhanced verification circuit 500, the proof key PrK and the verification key VK are calculated. The proof key PrK and the verification key VK can be the same (e.g., a public reference string) or different from each other (depending on the type of zkSNARK).

[0151] Figure 6 1 shows inputs provided to a proof generation process 600 performed by a proof computing device of a prover. For example, the prover may correspond to Alice 103a associated with proof computing device 102a. Figure 6 As shown, in order to provide proof that a statement (represented by functional circuit 402) is true while keeping the secret input sk secret, the proving computing device 102a uses the public component of the enhanced verification circuit 500 Enhanced Secret Component of Authentication Circuit 500 And the proof key PrK linked to the enhanced verification circuit 500 to generate a zero-knowledge proof π.

[0152] The proving computing device 102a may then transmit the zero-knowledge proof π to the verifying computing device to enable the verifying computing device to verify that the computing device knows the secret input.

[0153] The proving computing device 102a may transmit the statement to the verifying computing device. The statement may be transmitted together with the transmission of the zero-knowledge proof π, or may be transmitted separately to the zero-knowledge proof. In some implementations, the verifying computing device may obtain the statement by other means, and the proving computing device 102a does not have to transmit the statement to the verifying computing device.

[0154] In an embodiment of the present invention, the zkSNARK proof system uses the Pedersen commitment scheme to commit the inputs of the multiplication gates of the enhanced verification circuit 500. The enhanced verification circuit 500 is considered to have N=mn multiplication gates (where m and n are integers). For the i-th multiplication gate, the left input line, right input line and output line can be represented by (a i ,b i ,c i ). All left input lines can be arranged to have row a i The m×n matrix All right-side input lines can be arranged to have row b i The matrix All output lines can be arranged to have row c i The matrix The following references i*, which is a matrix of rows The index of .

[0155] Specifically, proving π involves using the pairwise components of the commitment key CK and the random value (also referred to as the first vector in this article) This can be expressed as:

[0156]

[0157] is the matrix The i * The commitment to the line is part of the circuit satisfiability parameter. Can be an elliptic curve The point on.

[0158] vector A vector consisting of "n" components (where n is an integer) from a finite set of data elements (where n is an integer value). One of the n components in (at position j*) is the secret input sk, which is the discrete logarithm of the elements in the finite set of data elements. The finite set of data elements can have an elliptic curve For example, the secret input sk can be a signature key, and the above-mentioned elements can be a public key PK corresponding to the signature key (where the public key PK is an elliptic curve point on it).

[0159] As described above, the use of a virtual multiplication gate 502 to which the secret input sk is provided as input ensures that the secret input sk is collected and is the vector sk during proof generation. Components of . Vector Kept confidential by the proving computing device (not shared with the verifying computing device).

[0160] The commitment key CK is also composed of a finite set of data elements (with the same A vector of "n" components (where n is an integer) with the same number of components. This can be expressed as:

[0161]

[0162] Each G i All come from a finite set of data elements, such as elliptic curves The point in .

[0163] As mentioned above, in the examples of zk-SNARKs of the Bootle and Bulletproof families, the proving key and the verification key are the same, and they correspond to (i.e., are the same as) the commitment key CK.

[0164] The embodiments extend to other discrete logarithm-based zero-knowledge proof schemes. Thus, depending on the specific discrete logarithm-based zero-knowledge proof scheme used, the proof key and the verification key may be the same, but the commitment key CK may be different from the proof key / verification key. In other implementations, the proof key and the verification key may be different from each other and also different from the commitment key CK.

[0165] One of the n components of the commitment key vector CK (at position j*) may be an elliptic curve A base point at a predetermined position corresponding to the first vector The jth position of the commitment key CK * Generators can be the base point G of the ECDSA scheme. In other words, the public key PK can be obtained by * Generators It is obtained by multiplying the secret input sk. This can be expressed as:

[0166]

[0167] More generally, an element in a finite set of data elements (not necessarily a public key PK) can be obtained by assigning the jth * Generators It is obtained by multiplying it with the secret input, which can be Any integer in (not necessarily a signing key).

[0168] The commitment key CK is public to both the certification computing device and the verification computing device. Similarly, the public key PK is public to both the certification computing device and the verification computing device.

[0169] To generate promises Randomness Kept confidential by the proving computing device (not shared with the verifying computing device).

[0170] It will be appreciated by those skilled in the art that the steps involved in the attestation generation process implemented by the attesting computer device will depend on the specific type of ZKP implemented, and such steps are known to those skilled in the art.

[0171] The third verification phase of the zkSNARK protocol returns an acceptance or rejection decision based on whether the proof is found to be valid or invalid, respectively.

[0172] Figure 7 Inputs provided to an attestation verification process 700 performed by a verifying computing device of a verifier are shown. For example, the verifier may correspond to Bob 103b associated with the verifying computing device 102b.

[0173] Verification computing device 102b receives zero-knowledge proof π from proof computing device 102a. Verification computing device 102b also obtains statement. Figure 7 As shown, in order to verify that a statement (represented by functional circuit 402) is true without knowing the secret input sk of the statement, the verifying computing device uses the proof π, the public component of the enhanced verification circuit 500 And the verification key VK linked to the enhanced verification circuit 500 is used to verify that the zero-knowledge proof π is valid.

[0174] If the attestation verification process 700 performed by the verifying computing device 102b returns an accept decision, then the verifying computing device 102b determines that the attestation computing device 102a knows the secret input and does not reveal the secret input to the verifying computing device 102b.

[0175] Anyone who knows the proof π and the corresponding enhanced verification circuit 500 can verify the computation, making it a non-interactive proof. The verifier does not know anything about the secret sk, and the proof is computationally impossible to succeed if it is not computed correctly, i.e., it is computationally infeasible for the prover to compute an accepted proof except by acting honestly. The verification key VK will assure the verifier that the predefined statement (identified by the functional circuit 402) is indeed being verified to be valid, without the verifier having to use the enhanced verification circuit 500 directly.

[0176] Similarly, it will be appreciated by those skilled in the art that the steps involved in the proof verification process implemented by the verifier computer device will depend on the specific type of ZKP implemented, and such steps are known to those skilled in the art.

[0177] Therefore, taking statement 1 as an example: "P(sk) is the hash of sk under the SHA256 function", according to an embodiment of the present disclosure, the prover can prove that they know the preimage (sk) of a given hash digest without revealing the preimage (sk).

[0178] Prove the consistency between private and public keys

[0179] In addition to proving statements related to the secret input sk, embodiments of the present disclosure are extended to the proving computing device 102a proving that the secret input sk is the discrete logarithm of an element in a finite set of data elements, and the verifying computing device 102b verifying that the secret input sk submitted in the batch commitment is the discrete logarithm of the element in the finite set of data elements (without knowing the secret input sk).

[0180] As mentioned above, a finite set of data elements can have an elliptic curve For example, the secret input sk can be a private key (e.g., a signature key), and the above-mentioned elements can be a public key PK corresponding to the private key (where the public key PK is an elliptic curve Thus, in one example, embodiments of the present disclosure extend to proving that the signing key sk corresponds to (i.e., is consistent with) a given public key PK that is public to both the proving computing device 102a and the verifying computing device 102b, without revealing any information about the signing key sk to the verifying computing device 102b.

[0181] Specifically, the attestation computing device 102a may attest to the batch commitment The signature key sk submitted in corresponds to the public key PK, that is, the signature key sk is the discrete logarithm of the public key PK. This involves proving that the computing device 102a proves the first vector At position j* the signature key sk is contained, which corresponds to the public key PK.

[0182] So, taking statement 1 as an example: “P(sk) is the hash of sk under the SHA256 function”, in addition to the prover proving that they know the preimage (sk) of a given hash digest without revealing the preimage (sk), the prover can also prove that the preimage (sk) they know happens to be the signature key corresponding to the known public key PK.

[0183] refer to Figure 8 A method of proving that a signature key sk corresponds to (ie is consistent with) a given public key PK is described.

[0184] refer to Figure 8 The described method may be used in conjunction with an enhanced verification circuit 500 that ensures that a batch commitment is sent to the verification computing device 102b as part of the attestation. is a vector containing the signature key sk commitment).

[0185] However, reference Figure 8 The described method is not limited to implementations using enhanced verification circuit 500. Figure 8 The described method can be used in conjunction with any other zkSNARK that generates a pair of vectors including the signing key sk commitments and is not limited to using the Bootle and Bulletproof families of zk-SNARKs.

[0186] In step S802, the attestation computing device 102a generates another batch commitment U. Specifically, in order to generate another batch commitment U, the attestation computing device 102a generates a random vector The vector u includes "n" components, where each of the "n" components is a random integer value (the vector u has the same same number of components). Prove that computing device 102a subsequently has position j in u * Insert zeros after -1. This produces a vector of length n (also referred to herein as the second vector), where That is, the vector One of the "n" components of (at position j*) is zero (where n is an integer).

[0187] To generate another batch commitment U, the attesting computing device 102a generates the random element Randomness used to generate another batch of commitments U Kept confidential by the proving computing device (not shared with the verifying computing device).

[0188] The attestation computing device 102a uses the commitment key CK and the random value s to calculate the pair vector Another batch of commitments U. This can be expressed as:

[0189]

[0190] In step S804 , the proving computing device 102 a transmits another batch commitment U to the verifying computing device 102 b .

[0191] In step S806, the verification computing device 102b generates a random challenge And in step S808 , the random challenge x is sent to the witness computing device 102 a .

[0192] In step S810, the proof computing device 102a uses the first vector Second vector and a random challenge x to generate a response to the random challenge x.

[0193] Specifically, the computing device 102a verifies that the location j * The first vector is modified by replacing the signature key sk at To generate the modified first vector in It can be expressed as:

[0194]

[0195] The computing device 102a proves that the computing device 102a combines the modified first vector by using the random challenge With the second vector To generate a response vector v including "n" components (the response vector v has the same The same number of components). Specifically, the response vector v can be expressed as:

[0196]

[0197] The attesting computing device 102a also performs the above operation by combining the random value s with the random value used to generate the commitment The random value r is used to generate the combined random element t. Specifically, the combined random element t can be expressed as:

[0198]

[0199] The response (v, t) generated by the attestation computing device 102a in step S810 includes a response vector v and a combined random element t.

[0200] In step S812 , the attestation computing device 102 a transmits the response (v, t) to the verification computing device 102 b .

[0201] In step S814, the verification computing device 102b uses the response (v, t), the batch commitment Another batch commitment U and a random challenge x to verify whether the secret input ` submitted in the batch commitment is the discrete logarithm of an element in a finite set of data elements (without knowing the secret input sk). Figure 8 In the example of FIG. 1 , the verifying computing device 102 b uses the response (v, t), the batch commitment Another batch processes the commitment U and the random challenge x to verify whether the proving computing device 102a knows the signature key sk, which corresponds to the public key PK. Specifically, in step S814, the verifying computing device 102b checks whether the public key PK is consistent with the commitment The consistency between them.

[0202] To this end, the verification computing device 102b determines the location j * If the verification computing device 102b determines that the position j * If the component of the response vector v at is non-zero, then the verification proves that the computing device 102a knows the signing key sk, which corresponds to the public key PK, and fails.

[0203] If the authentication computing device 102b determines that the location j * If the component of the response vector v at is zero, further checks are performed.

[0204] Specifically, the verification computing device 102b uses a batch commitment The random challenge x, another batch of commitments U and the public key PK are used to calculate the combined commitment A′. Specifically, the combined commitment A′ can be expressed as:

[0205]

[0206] Verifying computing device 102b uses the response (v, t), the combined commitment A′, and the commitment key CK to verify that proving computing device 102a knows the signing key `, which corresponds to the public key PK. As known to those skilled in the art, verifying a Pedersen commitment involves re-executing the commit algorithm using the provided randomness and checking whether it outputs the same commitment.

[0207] If the verification is successful, then the verifying computing device 102b determines that the proving computing device 102a knows the signing key sk, which corresponds to the public key PK.

[0208] Although the above reference has been made to elliptic curves A finite set of data elements describing the characteristics of Figure 8 , but this is only an example. In addition, although the above has been described with reference to the secret input sk as the signature key and the elements in the finite data element group as the public key PK Figure 8 , but this is merely an example, and method 800 can be used to prove that any secret input sk submitted in a batch commitment is the discrete logarithm of the common elements in a finite set of data elements.

[0209] Embodiments of the present disclosure may have many different applications.

[0210] Application I

[0211] As described in the implementation section above, examples of the present invention may be applied to ZKCP that outsources (Bitcoin) vanity addresses that represent data to be exchanged for payment or access to resources.

[0212] Bitcoin addresses are encoded in a human-readable alphanumeric format (Base58 encoding) to allow for easy publication, copying, and transcription. The use of this format has led to the prevalence of so-called vanity addresses, where a brute force search of the key space is performed in order to find a private key that produces an address containing a desired string (e.g., a name).

[0213] Since deriving vanity addresses with nontrivial patterns can be computationally expensive (for example, the address shown above requires about 10 13 There are many different public keys for vanity addresses, so searching is often outsourced, and there are several online marketplaces for delegating and selling vanity addresses. This can be done securely using the homomorphic properties of elliptic curve point multiplication.

[0214] While outsourcing generation is secure, selling vanity addresses is not trustless. Either the buyer gets the required value before the seller gets paid, or the seller gets paid before releasing the required value, or they both have to trust the escrow service. The present invention can be used to enable trustless sales of vanity addresses via ZKCP. The steps taken between the buyer / verifier and the seller / prover are as follows.

[0215] 1. The buyer and seller agree on the desired vanity mode (Str) and price (Bitcoin) and establish a communication channel, which does not need to be secure.

[0216] 2. The buyer generates a secure random key sk B And the corresponding elliptic curve public key, where the public key pk B =sk B ×G.

[0217] 3. The buyer will pk B Send to seller.

[0218] 4. Then, the seller changes i from pk = pk B +i×G searches for the required pattern in the Base58-encoded address exported.

[0219] 5. When an address with the desired pattern is found, the seller saves the value i, signals the buyer, and sends them pk s =i×G and SHA256 hash H(i).

[0220] 6. The seller also uses the techniques described in this article to provide the buyer with the original image of H(i) which is the same as pk s Proof of the corresponding private key.

[0221] 7. The buyer verifies the certificate and confirms that pk=pk B +pk s The corresponding address matches the agreed-upon pattern. At this point (via proof), the buyer knows that knowing the value i will enable them to derive the vanity address (sk B +i), and the particular value i is hashed to h=H(i).

[0222] 8. The buyer then constructs a hashed time lock contract (HTLC) transaction Tx1, which contains an output that includes the agreed-upon fee (a). This output can be unlocked in two ways:

[0223] i. Unlock at any time using the seller's signature and hash preimage i.

[0224] ii. Unlock with the buyer’s signature after a specified time, such as using the CHECKLOCKTIMEVERIFY (OP_CLTV) script opcode, which can be used to prevent the output from being spent before a specified time or block height.

[0225] 9. The buyer then signs the transaction and broadcasts it to the blockchain where it is mined into a block.

[0226] 10. After confirmation, the seller can claim the fees in the output of Tx1 by providing transaction Tx2, which provides the seller’s signature and the value i to unlock the hash lock, which is then disclosed on the blockchain.

[0227] 11. The buyer can calculate the final vanity address key sk = sk B +i, where pk = sk × G.

[0228] 12. If the buyer fails to provide the value i before the specified OP_CLTV time, the seller can provide his signature to reclaim the fee (to prevent losing fees due to uncooperative buyer).

[0229] The transaction is then completely atomic and trustless: the buyer can only get paid if he provides a valid value i, which is publicly disclosed on the blockchain. Due to the splitting of the private key, this value is useless to anyone else and the security of the full private key is not compromised.

[0230] Application II

[0231] Examples of the present invention can also be applied to private data exchange between two parties, where both parties register their respective data to be exchanged on different blockchains.

[0232] More specifically, the present invention can be applied to privacy-preserving cross-chain atomic swaps, which is an untrusted fair exchange protocol that leverages the transaction characteristics of blockchains, also known as atomic transactions. The protocol is used to exchange two different cryptocurrency tokens on two different blockchains without the need for a third-party centralized exchange. The term "atomic" in this article refers to the fair exchange property: either both parties complete the transaction, or neither party completes the transaction.

[0233] Follow the steps below to execute an example of a known basic protocol. For security reasons, both cryptocurrencies used in the swap must have scripting capabilities that support hashed and time-locked contracts. The swap involves two parties: Alice and Bob. In this example, Alice owns 1 Bitcoin and agrees to exchange it for Bob's 100 Litecoins.

[0234] 1. Alice generates a Litecoin public key P A , and sends it to Bob.

[0235] 2. Bob generates a Bitcoin public key P B , and sends it to Alice.

[0236] 3. Alice generates a secure random number x.

[0237] 4. Alice calculates the SHA-256 hash of x: h = H(x).

[0238] 5. Alice creates Bitcoin transaction Tx A ,in:

[0239] i. To P B Pay 1 Bitcoin, P B A value with a valid signature and hashed to h;

[0240] ii. Alternatively, return 1 Bitcoin to Alice after 24 hours.

[0241] 6. Alice broadcasts the transaction to the Bitcoin network.

[0242] 7. Once Bob observes Tx A Once confirmed on the Bitcoin blockchain, it will create a Litecoin transaction Tx B ,in:

[0243] i. To P A Pay 100 Litecoin, P A with a valid signature and hashed to the value h; ii. or return 100 Litecoin to Bob after 24 hours.

[0244] 8. Bob broadcasts the transaction to the Litecoin network.

[0245] 9. After the transaction is confirmed, Alice can claim the Litecoin output by providing her signature and the value x.

[0246] 10. Once Bob observes the value x on the Litecoin blockchain, he can then claim the Bitcoin output by providing his signature and the value x.

[0247] This example ensures that either both parties get their coins, or neither party gets their coins. Alice generates the hash, and only she knows the preimage, but she needs to reveal it to claim the coins, allowing Bob to then claim his coins. If either party does not complete as per the agreement, both parties can reclaim their coins after the lock.

[0248] A significant disadvantage of the known protocol is that transactions on both blockchains are easily linkable: after confirmation, the unique value x is always publicly visible on both blockchains. This not only affects the fungibility of the currency, but also the privacy of the transaction.

[0249] To unlink the two transactions, a different key must be used for each on-chain output, but to make the protocol secure and trustless, Alice must provide Bob with a proof that when she reveals the hash preimage to him, he will know the information he needs to unlock his coins.

[0250] By employing the key statement proof described in the above example, the hash-locked output on the second blockchain can be converted into a normal pay-to-public-key-hash (P2PKH) output, which not only obscures the nature of the transaction but also destroys any possible link.

[0251] Applied to the above example, where Alice owns 1 Bitcoin and agrees to exchange it for Bob’s 100 Litecoins, the improved process would include the following actions:

[0252] 1. Alice generates a Litecoin public key P A (Using public key S A ) and sends it to Bob.

[0253] 2. Bob generates a Bitcoin public key P B (Using private key S B ), and sends it to Alice.

[0254] 3. Alice generates a secure random number x←Z p .

[0255] 4. Alice calculates the SHA-256 hash of x: h = H(x) and the elliptic curve public key corresponding to x: P x =x×G

[0256] 5. Alice puts h and P x Sent securely to Bob.

[0257] 6. Alice also sends Bob a proof of the key statement to prove that the preimage of h is equal to the generated P x The private key of

[0258] 7. Alice creates Bitcoin transaction Tx A ,in:

[0259] i. To the public key P C Pay 1 Bitcoin, P C =P B +P x ;

[0260] ii. Alternatively, return 1 Bitcoin to Alice after 24 hours.

[0261] 8. Alice broadcasts the transaction to the Bitcoin network.

[0262] 9. Once Bob observes Tx A Once confirmed on the Bitcoin blockchain, it will create a Litecoin transaction Tx B ,in:

[0263] i. To P A Pay 100 Litecoin, P A A value with a valid signature and SHA-256 hashing to h; ii. Or return 100 Litecoin to Bob after 24 hours.

[0264] 10. Bob broadcasts the transaction to the Litecoin network.

[0265] 11. After the transaction is confirmed, Alice can claim the Litecoin output by providing her signature and the value x.

[0266] 12. Once Bob observes the value x on the Litecoin blockchain, he can then use P c" The private key of P provides a signature to claim Bitcoin output. c" According to the homomorphic property of elliptic curve point multiplication, s B +x.

[0267] Other applications

[0268] The present invention is suitable for zero-knowledge proof or verification of a statement (S), where a prover proves to a verifier that the statement is true, while keeping the witness (w) of the statement secret. The secret can be processed by functions such as hash functions, but also includes cryptographic elliptic curve key operations, such as the validity of a statement about a public key. In the above examples, the method of the present invention has been used to implement an untrusted ZKCP for vanity addresses. For example, this can also be applied to: deriving passwords; verifying valid machine-readable documents such as passports or identity cards; or other such confidential matters.

[0269] It should be noted that the above embodiments illustrate rather than limit the present invention, and those 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.

[0270] in conclusion

[0271] It will be appreciated by those skilled in the art that the steps involved in the attestation generation process implemented by the proving computer device will depend on the specific type of ZKP implemented, and such steps are known to those skilled in the art. Similarly, it will be appreciated by those skilled in the art that the steps involved in the attestation verification process implemented by the verifier computer device will depend on the specific type of ZKP implemented, and such steps are known to those skilled in the art.

[0272] Other variations or uses of the disclosed technology may become apparent to those skilled in the art once given the disclosure herein.The scope of the present disclosure is not limited by the described embodiments but only by the appended claims.

[0273] Some of the above embodiments have been described in terms of the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104. However, it should be understood that the Bitcoin blockchain is a specific example of a blockchain 150, and the above description can generally be applied to any blockchain. That is, the present invention is in no way limited to the Bitcoin blockchain. More generally, any references to the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104 above can be replaced with reference to the blockchain network 106, the blockchain 150, and the blockchain node 104, respectively. Blockchains, blockchain networks, and / or blockchain nodes can share some or all of the characteristics of the Bitcoin blockchain 150, the Bitcoin network 106, and the Bitcoin node 104 described above.

[0274] In a preferred embodiment of the present invention, the blockchain network 106 is a Bitcoin network, and the Bitcoin node 104 performs at least all of the functions described in creating, publishing, propagating and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that perform only one or some of these functions but not all of them. That is, a network entity may perform the functions of propagating and / or storing blocks without creating and publishing blocks (remember that these entities are not considered to be nodes of the preferred Bitcoin network 106).

[0275] In other embodiments of the present invention, the blockchain network 106 may not be a Bitcoin network. In these embodiments, it is not excluded that the node can perform at least one or part of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150, but not all of the functions. For example, on these other blockchain networks, "node" may be used to refer to a network entity that is configured to create and publish blocks 151 but does not store and / or propagate these blocks 151 to other nodes.

[0276] Even more generally, any reference above to the term "Bitcoin node" 104 may be replaced with the term "network entity" or "network element," where such entity / element is configured to perform some or all of the roles in creating, publishing, propagating, and storing blocks. The functionality of such a network entity / element may be implemented in hardware in the same manner as described above with reference to blockchain node 104.

[0277] It should be understood that the above embodiments are described by way of example only. In more general terms, a method, apparatus or program may be provided according to any one or more of the following statements.

[0278] Aspects of the present disclosure are defined below in conjunction with the following terms:

[0279] 1. A computer-implemented method for proving that a secret committed in a batch commitment is a discrete logarithm of common elements in a finite group of data elements, the method being executed on a computing device and comprising:

[0280] Obtaining a first vector for generating the batch commitment, the first vector comprising n components, wherein one component of the n components of the first vector is located at a position corresponding to the secret;

[0281] generating a second vector, the second vector comprising n components, wherein components of the second vector at predetermined positions corresponding to the positions in the first components are set to zero;

[0282] generating another batch commitment for the second vector r;

[0283] transmitting the another batch processing commitment to a verification computing device;

[0284] receiving a random challenge from the verification computing device;

[0285] generating a response to the random challenge using the first vector, the second vector, and the random challenge; and,

[0286] The response is transmitted to the verification computing device to prove that the secret is the discrete logarithm of the public element.

[0287] 2. A computer-implemented method according to clause 1, wherein the finite group of data elements has the characteristics of an elliptic curve (or is translated as, is an element of an elliptic curve).

[0288] 3. A computer-implemented method as described in clause 2, wherein the elements in the finite group of data elements are public keys and the secret is a signing key.

[0289] 4. A computer-implemented method according to clause 2 or 3, wherein generating the other batch commitment to the second vector uses a commitment key vector, the commitment key vector comprising n components from the finite group of data elements, and one of the n components of the commitment key vector is a base point of the elliptic curve at a predetermined position, the predetermined position corresponding to the position in the first vector, and the common element is obtained by multiplying the base point with the secret.

[0290] 5. A computer-implemented method according to any preceding clause, wherein generating the response to the random challenge comprises:

[0291] modifying the first vector by replacing the secret at the position with zero to generate a modified first vector;

[0292] generating a response vector by combining the modified first vector with the second vector using the random challenge;

[0293] Wherein the response comprises the response including the response vector.

[0294] 6. A computer-implemented method according to any of the preceding clauses, wherein the remaining components of the second vector are random values.

[0295] 7. A computer-implemented method according to any of the preceding clauses, further comprising: generating a random element; and using the random element to generate the further batch commitment.

[0296] 8. A computer-implemented method as described in clause 7, wherein the method further comprises: generating a combined random element by combining the random element with another random element used to generate the batch commitment, wherein the response includes the combined random element.

[0297] 9. A computer-implemented method according to any of the preceding clauses, wherein the batch commitment is a batch Pedersen commitment.

[0298] 10. A computer-implemented method according to any of the preceding clauses, wherein the another batch commitment is a batch Pedersen commitment.

[0299] 11. A computer-implemented method for verifying that a secret submitted in a batch commitment is a discrete logarithm of a common element in a finite group of data elements, the method being executed on a computing device and comprising:

[0300] Obtaining the batch commitment, wherein the batch commitment is a commitment to a first vector including n components, and one of the n components of the first vector is located at a position corresponding to the secret;

[0301] receiving another batch of commitments from the attestation computing device, wherein the another batch of commitments is a commitment to a second vector comprising n components, wherein components of the second vector at predetermined positions corresponding to the positions in the first vector are set to zero;

[0302] in response to receiving the another batch processing commitment, generating a random challenge and transmitting the random challenge to the attestation computing device;

[0303] receiving a response to the random challenge from the attesting computing device; and,

[0304] The response, the batch commitment, the other batch commitment, and the random challenge are used to verify that the secret is the discrete logarithm of the public element.

[0305] 12. A computer-implemented method according to clause 11, wherein the response includes a response vector, which is a combination of a modified first vector and the second vector (performed by using the random challenge), the modified first vector corresponding to the first vector, wherein the secret at the position has been replaced by zero.

[0306] 13. A computer-implemented method according to clause 12, wherein the response vector includes multiple components, and the verification includes: determining that a component of the multiple components of the response vector at a predetermined position is non-zero, and the predetermined position corresponds to the position in the first vector.

[0307] 14. The computer-implemented method of clause 11, wherein the finite group of data elements has properties of an elliptic curve.

[0308] 15. The computer-implemented method of clause 12, wherein the common element in the finite group of data elements is a public key and the secret is a signing key.

[0309] 16. The computer-implemented method of clause 14 or 15, further comprising:

[0310] computing a combined commitment using the batch commitment, the random challenge, the other batch commitment, and the common elements in the finite group of data elements; and,

[0311] Verifying that the secret is the discrete logarithm of the public element using the response, the combined commitment, and a commitment key vector, wherein the commitment key vector comprises n components from the finite group of data elements and one of the n components of the commitment key vector is a base point of the elliptic curve at a predetermined position corresponding to the position in the first vector, the public element being obtained by multiplying the base point by the secret.

[0312] 17. A computer-implemented method according to any of the preceding clauses, wherein the remaining components of the second vector are random values.

[0313] 18. A computer-implemented method according to any of the preceding clauses, wherein the batch commitment is a batch Pedersen commitment.

[0314] 19. A computer-implemented method according to any of the preceding clauses, wherein the another batch commitment is a batch Pedersen commitment.

[0315] 20. A computer program which, when read by a computing device, causes the computing device to perform a method according to any preceding clause.

[0316] 21. A non-transitory computer-readable storage medium comprising computer-readable instructions which, when read by a computing device, cause the computing device to perform the method of any one of clauses 1 to 19.

[0317] 22. A computing device comprising a processor and a memory, the memory storing instructions which, when executed by the processor, cause the computing device to perform the method according to any one of clauses 1 to 19.

[0318] Instructions may be provided on one or more carriers. For example, there may be one or more non-temporary memories, such as EEPROM (e.g., flash memory), disk, CD or DVD-ROM, read-only memory and other programming memories (e.g., for firmware), one or more temporary memories (e.g., RAM) and / or data vectors of optical or electrical signal carriers, etc. The memory may be integrated into the corresponding processing chip and / or separated from the chip. The code (and / or data) used to implement the embodiments of the present disclosure may include source, object or executable code in a conventional programming language (interpreted or compiled) such as C, assembly code, code for building or controlling an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA), or code for a hardware description language.< / pa>

Claims

1. A computer-implemented method for proving that a secret submitted in a batch commitment is a discrete logarithm of a common element in a finite group of data elements, the method being executed on a computing device and comprising: Obtaining a first vector for generating the batch commitment, the first vector comprising n components, wherein one component of the n components of the first vector is located at a position corresponding to the secret; generating a second vector, the second vector comprising n components, wherein components of the second vector at predetermined positions corresponding to the positions in the first components are set to zero; generating another batch commitment for the second vector; transmitting the another batch processing commitment to a verification computing device; receiving a random challenge from the verification computing device; generating a response to the random challenge using the first vector, the second vector, and the random challenge; as well as The response is transmitted to the verification computing device to prove that the secret is the discrete logarithm of the public element.

2. The computer-implemented method of claim 1, wherein the finite group of data elements has properties of an elliptic curve.

3. The computer-implemented method of claim 2, wherein the elements in the finite group of data elements are public keys and the secret is a signing key.

4. A computer-implemented method according to claim 2 or 3, wherein generating the other batch commitment to the second vector uses a commitment key vector comprising n components from the finite group of data elements, and one of the n components of the commitment key vector is a base point of the elliptic curve at a predetermined position, the predetermined position corresponding to the position in the first vector, and the public element is obtained by multiplying the base point with the secret.

5. The computer-implemented method of any preceding claim, wherein generating the response to the random challenge comprises: modifying the first vector by replacing the secret at the position with zero to generate a modified first vector; generating a response vector by combining the modified first vector with the second vector using the random challenge; Wherein the response comprises the response including the response vector.

6. A computer-implemented method according to any preceding claim, wherein the remaining components of the second vector are random values.

7. The computer-implemented method according to any preceding claim, further comprising: Generate random elements; And, generating the another batch commitment using the random element.

8. The computer-implemented method of claim 7, wherein the method further comprises: A combined random element is generated by combining the random element with another random element used to generate the batch commitment, wherein the response includes the combined random element.

9. A computer implemented method according to any preceding claim, wherein the batch commitment is a batch Pedersen commitment.

10. A computer implemented method according to any preceding claim, wherein the another batch commitment is a batch Pedersen commitment.

11. A computer-implemented method for verifying that a secret submitted in a batch commitment is a discrete logarithm of a common element in a finite group of data elements, the method being executed on a computing device and comprising: Obtaining the batch commitment, wherein the batch commitment is a commitment to a first vector including n components, and one of the n components of the first vector is located at a position corresponding to the secret; receiving another batch of commitments from the attestation computing device, wherein the another batch of commitments is a commitment to a second vector comprising n components, wherein components of the second vector at predetermined positions corresponding to the positions in the first vector are set to zero; in response to receiving the another batch processing commitment, generating a random challenge and transmitting the random challenge to the attestation computing device; receiving a response to the random challenge from the attesting computing device; as well as The response, the batch commitment, the other batch commitment, and the random challenge are used to verify that the secret is the discrete logarithm of the public element.

12. The computer-implemented method of claim 11, wherein the response comprises a response vector, the response vector being a combination of a modified first vector and the second vector using the random challenge, the modified first vector corresponding to the first vector, wherein the secret at the position has been replaced with zero.

13. The computer-implemented method of claim 12, wherein the response vector comprises a plurality of components, and the verifying comprises: A component of the plurality of components of the response vector at a predetermined position is determined to be non-zero, the predetermined position corresponding to the position in the first vector.

14. The computer-implemented method of claim 11, wherein the finite group of data elements has properties of an elliptic curve.

15. The computer-implemented method of claim 12, wherein the common element in the finite group of data elements is a public key and the secret is a signing key.

16. The computer-implemented method of claim 14 or 15, further comprising: computing a combined commitment using the batch commitment, the random challenge, the another batch commitment, and the common elements in the finite group of data elements; as well as Verifying that the secret is the discrete logarithm of the public element using the response, the combined commitment, and a commitment key vector, wherein the commitment key vector comprises n components from the finite group of data elements and one of the n components of the commitment key vector is a base point of the elliptic curve at a predetermined position corresponding to the position in the first vector, the public element being obtained by multiplying the base point by the secret.

17. A computer-implemented method according to any preceding claim, wherein remaining components of the second vector are random values.

18. A computer implemented method according to any preceding claim, wherein the batch commitment is a batch Pedersen commitment.

19. A computer implemented method according to any preceding claim, wherein the another batch commitment is a batch Pedersen commitment.

20. A computer program which, when read by a computing device, causes the computing device to perform a method according to any preceding claim.

21. A non-transitory computer-readable storage medium comprising computer-readable instructions which, when read by a computing device, cause the computing device to perform the method of any one of claims 1 to 19.

22. A computing device comprising a processor and a memory, the memory storing instructions which, when executed by the processor, cause the computing device to perform the method according to any one of claims 1 to 19.