WO2024041866A1 - Transaction de chaîne de blocs - Google Patents

Transaction de chaîne de blocs Download PDF

Info

Publication number
WO2024041866A1
WO2024041866A1 PCT/EP2023/071548 EP2023071548W WO2024041866A1 WO 2024041866 A1 WO2024041866 A1 WO 2024041866A1 EP 2023071548 W EP2023071548 W EP 2023071548W WO 2024041866 A1 WO2024041866 A1 WO 2024041866A1
Authority
WO
WIPO (PCT)
Prior art keywords
signature
transaction
locking
script
blockchain
Prior art date
Application number
PCT/EP2023/071548
Other languages
English (en)
Inventor
Craig Steven WRIGHT
Michaella PETTIT
Alec BURNS
Original Assignee
Nchain Licensing Ag
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nchain Licensing Ag filed Critical Nchain Licensing Ag
Publication of WO2024041866A1 publication Critical patent/WO2024041866A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3252Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using DSA or related signature schemes, e.g. elliptic based signatures, ElGamal or Schnorr schemes

Definitions

  • a blockchain refers to a form of distributed data structure, wherein a duplicate copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (referred to below as a “blockchain network”) and widely publicised.
  • P2P peer-to-peer
  • the blockchain comprises a chain of blocks of data, wherein each block comprises one or more transactions.
  • Each transaction points back to a preceding transaction in a sequence which may span one or more blocks going back to one or more coinbase transactions.
  • Coinbase transactions are discussed further below.
  • Transactions that are submitted to the blockchain network are included in new blocks. New blocks are created by a process often referred to as “mining”, which involves each of a plurality of the nodes competing to perform “proof-of-work”, i.e. solving a cryptographic puzzle based on a representation of a defined set of ordered and validated pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain may be pruned at some nodes, and the publication of blocks can be achieved through the publication of mere block headers.
  • the transactions in the blockchain may be used for one or more of the following purposes: to convey a digital asset (i.e. a number of digital tokens), to order a set of entries in a virtualised ledger or registry, to receive and process timestamp entries, and/or to time- order index pointers.
  • a blockchain can also be exploited in order to layer additional functionality on top of the blockchain.
  • blockchain protocols may allow for storage of additional user data or indexes to data in a transaction.
  • Nodes of the blockchain network (which are often referred to as “miners”) perform a distributed transaction registration and verification process, which will be described in more detail later.
  • a node validates transactions and inserts them into a block template for which they attempt to identify a valid proof-of-work solution. Once a valid solution is found, a new block is propagated to other nodes of the network, thus enabling each node to record the new block on the blockchain.
  • a user e.g. a blockchain client application
  • Nodes which receive the transaction may race to find a proof-of-work solution incorporating the validated transaction into a new block.
  • Each node is configured to enforce the same node protocol, which will include one or more conditions for a transaction to be valid. Invalid transactions will not be propagated nor incorporated into blocks. Assuming the transaction is validated and thereby accepted onto the blockchain, then the transaction (including any user data) will thus remain registered and indexed at each of the nodes in the blockchain network as an immutable public record.
  • the node who successfully solved the proof-of-work puzzle to create the latest block is typically rewarded with a new transaction called the “coinbase transaction” which distributes an amount of the digital asset, i.e. a number of tokens.
  • the detection and rejection of invalid transactions is enforced by the actions of competing nodes who act as agents of the network and are incentivised to report and block malfeasance.
  • the data structure of a given transaction comprises one or more inputs and one or more outputs.
  • Any spendable output comprises an element specifying an amount of the digital asset that is derivable from the proceeding sequence of transactions.
  • the spendable output is sometimes referred to as a UTXO (“unspent transaction output”).
  • the output may further comprise a locking script specifying a condition for the future redemption of the output.
  • a locking script is a predicate defining the conditions necessary to validate and transfer digital tokens or assets.
  • Each input of a transaction (other than a coinbase transaction) comprises a pointer (i.e. a reference) to such an output in a preceding transaction, and may further comprise an unlocking script for unlocking the locking script of the pointed-to output.
  • a pair of transactions call them a first and a second transaction (or “target” transaction).
  • the first transaction comprises at least one output specifying an amount of the digital asset, and comprising a locking script defining one or more conditions of unlocking the output.
  • the second, target transaction comprises at least one input, comprising a pointer to the output of the first transaction, and an unlocking script for unlocking the output of the first transaction.
  • one of the criteria for validity applied at each node will be that the unlocking script meets all of the one or more conditions defined in the locking script of the first transaction. Another will be that the output of the first transaction has not already been redeemed by another, earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate it (as a valid transaction, but possibly to register an invalid transaction) nor include it in a new block to be recorded in the blockchain.
  • An alternative type of transaction model is an account-based model.
  • each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance.
  • the current state of all accounts is stored by the nodes separate to the blockchain and is updated constantly.
  • SUMMARY Standard methods for locking outputs of a blockchain transaction such as Pay-to-Public-Key (P2PK) and Pay-to-Public-Key-Hash (P2PKH), secure their spending conditions using Elliptic Curve Digital Signature Algorithm (ECDSA) in the form of OP_CHECKSIG.
  • P2PK Pay-to-Public-Key
  • P2PKH Pay-to-Public-Key-Hash
  • EDSA Elliptic Curve Digital Signature Algorithm
  • This opcode checks a digital signature, ( ⁇ , ⁇ ), against a public key, ⁇ , validating that a spending party has knowledge of a private key associated with a given public key. It ensures both that: 1. only the intended recipient can generate a valid unlocking script, and 2. that rogue actors cannot change the spending transaction as this would invalidate the provided digital signature. Any value defined in the locking script is fixed as it is referenced later by its corresponding transaction hash, whilst elements in the unlocking script can be flexible as OP_CHECKSIG does not take it as input to the message serialisation. Therefore, only one of the ECSDA signature ( ⁇ , ⁇ ) or public key ⁇ can be fixed in the locking script when evaluated with the same OP_CHECKSIG.
  • a computer-implemented method for generating a blockchain transaction comprising: providing a first locking script of the blockchain transaction, the first locking script comprising a locking signature portion, wherein the locking signature portion is based on a locking signature, and wherein the first locking script is configured, when executed with a first unlocking script of a proof transaction, to: verify that a public key provided in the first unlocking script is associated with the locking signature; and making the blockchain transaction available to one or more nodes of a blockchain network.
  • a transaction output is locked to an already pre-generated ECDSA signature.
  • the funding, or challenge, transaction is published with a fixed signature ( ⁇ , ⁇ ) contained within its locking script.
  • a “K-puzzle” is provided which creates a more compact alternative to an R-puzzle.
  • a proof-of-work method enables a secure open puzzle, for which the funding party does not need to have any information about the solving party.
  • Figure 1 is a schematic block diagram of a system for implementing a blockchain
  • Figure 2 schematically illustrates some examples of transactions which may be recorded in a blockchain
  • Figure 3 illustrates an example method for generating a proof transaction using a K-puzzle
  • Figure 4 schematically illustrates unlocking an output of a self-signed transaction based on the K-puzzle
  • Figure 5 schematically illustrates unlocking an output of a self-signed transaction secured using hash concealment
  • Figure 6 shows an example method for proving storage of a document using a self-signed transaction and k-puzzle.
  • EXAMPLE SYSTEM OVERVIEW Figure 1 shows an example system 100 for implementing a blockchain 150.
  • the system 100 may comprise a packet-switched network 101, typically a wide-area internetwork such as the Internet.
  • the packet-switched network 101 comprises a plurality of blockchain nodes 104 that may be arranged to form a peer-to-peer (P2P) network 106 within the packet- switched network 101.
  • P2P peer-to-peer
  • the blockchain nodes 104 may be arranged as a near-complete graph.
  • Each blockchain node 104 is therefore highly connected to other blockchain nodes 104.
  • Each blockchain node 104 comprises computer equipment of a peer, with different ones of the nodes 104 belonging to different peers.
  • Each blockchain node 104 comprises processing apparatus comprising one or more processors, e.g. one or more central processing units (CPUs), accelerator processors, application specific processors and/or field programmable gate arrays (FPGAs), and other equipment such as application specific integrated circuits (ASICs).
  • processors e.g. one or more central processing units (CPUs), accelerator processors, application specific processors and/or field programmable gate arrays (FPGAs), and other equipment such as application specific integrated circuits (ASICs).
  • Each node also comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media.
  • the memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as a hard disk; an electronic medium such as a solid-state drive (SSD), flash memory or EEPROM; and/or an optical medium such as an optical disk drive.
  • SSD solid-state drive
  • EEPROM electrically erasable
  • the blockchain 150 comprises a chain of blocks of data 151, wherein a respective copy of the blockchain 150 is maintained at each of a plurality of blockchain nodes 104 in the distributed or blockchain network 106.
  • maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in full. Instead, the blockchain 150 may be pruned of data so long as each blockchain node 150 stores the block header (discussed below) of each block 151.
  • Each block 151 in the chain comprises one or more transactions 152, wherein a transaction in this context refers to a kind of data structure. The nature of the data structure will depend on the type of transaction protocol used as part of a transaction model or scheme. A given blockchain will use one particular transaction protocol throughout.
  • each transaction 152 comprises at least one input and at least one output.
  • Each output specifies an amount representing a quantity of a digital asset as property, an example of which is a user 103 to whom the output is cryptographically locked (requiring a signature or other solution of that user in order to be unlocked and thereby redeemed or spent).
  • Each input points back to the output of a preceding transaction 152, thereby linking the transactions.
  • Each block 151 also comprises a block pointer 155 pointing back to the previously created block 151 in the chain so as to define a sequential order to the blocks 151.
  • Each transaction 152 (other than a coinbase transaction) comprises a pointer back to a previous transaction so as to define an order to sequences of transactions (N.B.
  • sequences of transactions 152 are allowed to branch).
  • the chain of blocks 151 goes all the way back to a genesis block (Gb) 153 which was the first block in the chain.
  • Gb genesis block
  • One or more original transactions 152 early on in the chain 150 pointed to the genesis block 153 rather than a preceding transaction.
  • Each of the blockchain nodes 104 is configured to forward transactions 152 to other blockchain nodes 104, and thereby cause transactions 152 to be propagated throughout the network 106.
  • Each blockchain node 104 is configured to create blocks 151 and to store a respective copy of the same blockchain 150 in their respective memory.
  • Each blockchain node 104 also maintains an ordered set (or “pool”) 154 of transactions 152 waiting to be incorporated into blocks 151.
  • the ordered pool 154 is often referred to as a “mempool”. This term herein is not intended to limit to any particular blockchain, protocol or model. It refers to the ordered set of transactions which a node 104 has accepted as valid and for which the node 104 is obliged not to accept any other transactions attempting to spend the same output.
  • the (or each) input comprises a pointer referencing the output of a preceding transaction 152i in the sequence of transactions, specifying that this output is to be redeemed or “spent” in the present transaction 152j.
  • Spending or redeeming does not necessarily imply transfer of a financial asset, though that is certainly one common application.
  • the preceding transaction could be any transaction in the ordered set 154 or any block 151.
  • the preceding transaction 152i need not necessarily exist at the time the present transaction 152j is created or even sent to the network 106, though the preceding transaction 152i will need to exist and be validated in order for the present transaction to be valid.
  • preceding herein refers to a predecessor in a logical sequence linked by pointers, not necessarily the time of creation or sending in a temporal sequence, and hence it does not necessarily exclude that the transactions 152i, 152j be created or sent out-of-order (see discussion below on orphan transactions).
  • the preceding transaction 152i could equally be called the antecedent or predecessor transaction.
  • the input of the present transaction 152j also comprises the input authorisation, for example the signature of the user 103a to whom the output of the preceding transaction 152i is locked.
  • the output of the present transaction 152j can be cryptographically locked to a new user or entity 103b.
  • the present transaction 152j can thus transfer the amount defined in the input of the preceding transaction 152i to the new user or entity 103b as defined in the output of the present transaction 152j.
  • a transaction 152 may have multiple outputs to split the input amount between multiple users or entities (one of whom could be the original user or entity 103a in order to give change).
  • a transaction can also have multiple inputs to gather together the amounts from multiple outputs of one or more preceding transactions, and redistribute to one or more outputs of the current transaction.
  • an output-based transaction protocol such as bitcoin
  • a party 103 such as an individual user or an organization
  • wishes to enact a new transaction 152j either manually or by an automated process employed by the party
  • the enacting party sends the new transaction from its computer terminal 102 to a recipient.
  • the enacting party or the recipient will eventually send this transaction to one or more of the blockchain nodes 104 of the network 106 (which nowadays are typically servers or data centres, but could in principle be other user terminals).
  • a blockchain node 104 that receives a transaction checks whether the transaction is valid according to a blockchain node protocol which is applied at each of the blockchain nodes 104.
  • the blockchain node protocol typically requires the blockchain node 104 to check that a cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in an ordered sequence of transactions 152.
  • this may comprise checking that the cryptographic signature or other authorisation of the party 103 included in the input of the new transaction 152j matches a condition defined in the output of the preceding transaction 152i which the new transaction spends (or “assigns”), wherein this condition typically comprises at least checking that the cryptographic signature or other authorisation 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 to.
  • the condition may be at least partially defined by a script included in the output of the preceding transaction 152i. Alternatively it could simply be fixed by the blockchain node protocol alone, or it could be due to a combination of these.
  • 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 so forward the new transaction 152j on to one or more further nodes 104, and so forth. In this way the new transaction is propagated throughout the network of blockchain nodes 104.
  • the definition of whether a given output e.g. UTXO
  • spent is whether it has yet been validly redeemed by the input of another, onward transaction 152j according to the blockchain node protocol.
  • Another condition for a transaction to be valid is that the output of the preceding transaction 152i which it attempts to redeem has not already been redeemed by another transaction. Again if not valid, the transaction 152j will not be propagated (unless flagged as invalid and propagated for alerting) or recorded in the blockchain 150. This guards against double-spending whereby the transactor tries to assign the output of the same transaction more than once.
  • An account-based model on the other hand guards against double-spending by maintaining an account balance. Because again there is a defined order of transactions, the account balance has a single defined state at any one time.
  • blockchain nodes 104 In addition to validating transactions, blockchain nodes 104 also race to be the first to create blocks of transactions in a process commonly referred to as mining, which is supported by “proof-of-work”. At a blockchain node 104, new transactions are 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 race to assemble a new valid block 151 of transactions 152 from the ordered set of transactions 154 by attempting to solve a cryptographic puzzle. Typically this comprises searching for a “nonce” value such that when the nonce is concatenated with a representation of the ordered pool of pending transactions 154 and hashed, then the output of the hash meets a predetermined condition. E.g.
  • the predetermined condition may be that the output of the hash has a certain predefined number of leading zeros. Note that this is just one particular 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 with respect to its input. Therefore this search can only be performed by brute force, thus consuming a substantive amount of processing resource at each blockchain node 104 that is trying to solve the puzzle.
  • the first blockchain node 104 to solve the puzzle announces this to the network 106, providing the solution as proof which can then be easily checked by the other blockchain nodes 104 in the network (once given the solution to a hash it is straightforward to check that it causes the output of the hash to meet the condition).
  • the first blockchain node 104 propagates a block to a threshold consensus of other nodes that accept the block and thus enforce the protocol rules.
  • the ordered set of transactions 154 then becomes recorded as a new block 151 in the blockchain 150 by each of the blockchain nodes 104.
  • a block pointer 155 is also assigned to the new block 151n pointing back to the previously created block 151n-1 in the chain.
  • the significant amount of effort, for example in the form of hash, required to create a proof-of-work solution signals the intent of the first node 104 to follow the rules of the blockchain protocol.
  • Such rules include not accepting a transaction as valid if it spends or assigns the same output as a previously validated transaction, otherwise known as double-spending.
  • the block 151 cannot be modified since it is recognized and maintained at each of the blockchain nodes 104 in the blockchain network 106.
  • the block pointer 155 also imposes a sequential order to the blocks 151. Since the transactions 152 are recorded in the ordered blocks at each blockchain node 104 in a network 106, this therefore provides an immutable public ledger of the transactions. Note that different blockchain nodes 104 racing to solve the puzzle at any given time may be doing so based on different snapshots of the pool of yet-to-be published transactions 154 at any given time, depending on when they started searching for a solution or the order in which the transactions were received.
  • a node that successfully constructs a new block 104 is granted the ability to newly assign an additional, accepted amount of the digital asset in a new special kind of transaction which distributes an additional defined quantity of the digital asset (as opposed to an inter-agent, or inter-user transaction which transfers an amount of the digital asset from one agent or user to another).
  • This special type of transaction is usually referred to as a “coinbase transaction”, but may also be termed an “initiation transaction” or “generation transaction”. It typically forms the first transaction of the new block 151n.
  • the proof-of-work signals the intent of the node that constructs the new block to follow the protocol rules allowing this special transaction to be redeemed later.
  • the blockchain protocol rules may require a maturity period, for example 100 blocks, before this special transaction may be redeemed.
  • a regular (non-generation) 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 that transaction was published. This fee is normally referred to as the “transaction fee”, and is discussed blow.
  • each blockchain node 104 stores software configured to run on the processing apparatus of the blockchain node 104 in order to perform its respective role or roles and handle transactions 152 in accordance with the blockchain node protocol. It will be understood that any action attributed herein to a blockchain node 104 may be performed by the software run on the processing apparatus of the respective computer equipment.
  • the node software may be implemented in one or more applications at the application layer, or a lower layer such as the operating system layer or a protocol layer, or any combination of these.
  • Also connected to the network 101 is the computer equipment 102 of each of a plurality of parties 103 in the role of consuming users. These users may interact with the blockchain network 106 but do not participate in validating transactions or constructing blocks.
  • each party 103 may interact with the blockchain network 106 and thereby utilize the blockchain 150 by connecting to (i.e. communicating with) a blockchain node 106.
  • Two parties 103 and their respective equipment 102 are shown for illustrative purposes: a first party 103a and his/her respective computer equipment 102a, and a second party 103b and his/her respective computer equipment 102b. It will be understood that many more such parties 103 and their respective computer equipment 102 may be present and participating in the system 100, but for convenience they are not illustrated.
  • Each party 103 may be an individual or an organization.
  • the computer equipment 102 of each party 103 comprises respective processing apparatus comprising one or more processors, e.g. one or more CPUs, GPUs, other accelerator processors, application specific processors, and/or FPGAs.
  • the computer equipment 102 of each party 103 further comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media. This memory may comprise one or more memory units employing one or more memory media, e.g.
  • the memory on the computer equipment 102 of each party 103 stores software comprising a respective instance of at least one client application 105 arranged to run on the processing apparatus. It will be understood that any action attributed herein to a given party 103 may be performed using the software run on the processing apparatus of the respective computer equipment 102.
  • the computer equipment 102 of each party 103 comprises at least one user terminal, e.g. a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smartwatch.
  • the computer equipment 102 of a given party 103 may also comprise one or more other networked resources, such as cloud computing resources accessed via the user terminal.
  • the client application 105 may be initially provided to the computer equipment 102 of any given party 103 on suitable computer-readable storage medium or media, e.g. downloaded from a server, or provided on a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable magnetic disk drive, magnetic floppy disk or tape, optical disk such as a CD or DVD ROM, or a removable optical drive, etc.
  • the client application 105 comprises at least a “wallet” function. This has two main functionalities.
  • this second functionality comprises collating the amounts defined in the outputs of the various 152 transactions scattered throughout the blockchain 150 that belong to the party in question.
  • client functionality could be implemented at the application layer or a lower layer such as the operating system, or any combination of these.
  • the following will be described in terms of a client application 105 but it will be appreciated that this is not limiting.
  • the instance of the client application or software 105 on each computer equipment 102 is operatively coupled to at least one of the blockchain nodes 104 of the network 106. This enables the wallet function of the client 105 to send transactions 152 to the network 106.
  • the client 105 is also able to contact blockchain nodes 104 in order to query the blockchain 150 for any transactions of which the respective party 103 is the recipient (or indeed inspect other parties’ transactions in the blockchain 150, since in embodiments the blockchain 150 is a public facility which provides trust in transactions in part through its public visibility).
  • the wallet function on each computer equipment 102 is configured to formulate and send transactions 152 according to a transaction protocol.
  • each blockchain node 104 runs software configured to validate transactions 152 according to the blockchain node protocol, and to forward transactions 152 in order to propagate them throughout the blockchain network 106.
  • the transaction protocol and the node protocol correspond to one another, and a given transaction protocol goes with a given node protocol, together implementing a given transaction model.
  • the same transaction protocol is used for all transactions 152 in the blockchain 150.
  • the same node protocol is used by all the nodes 104 in the network 106.
  • a given party 103 say Alice
  • she formulates the new transaction in accordance with the relevant transaction protocol (using the wallet function in her client application 105).
  • this could be the blockchain node 104 that is best connected to Alice’s computer 102.
  • any given blockchain node 104 receives a new transaction 152j, it handles it in accordance with the blockchain node protocol and its respective role.
  • condition for validation may be configurable on a per-transaction basis by scripts included in the transactions 152. Alternatively the condition could simply be a built-in feature of the node protocol, or be defined by a combination of the script and the node protocol.
  • condition that the newly received transaction 152j passes the test for being deemed valid i.e. on condition that it is “validated”
  • any blockchain node 104 that receives the transaction 152j will add the new validated transaction 152 to the ordered set of transactions 154 maintained at that blockchain node 104.
  • any blockchain node 104 that receives the transaction 152j will propagate the validated transaction 152 onward to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, then assuming the transaction 152j is valid, this means it will soon be propagated throughout the whole network 106. Once admitted to the ordered pool of pending transactions 154 maintained at a given blockchain node 104, that blockchain node 104 will start competing to solve the proof-of- work puzzle on the latest version of their respective pool of 154 including the new transaction 152 (recall that other blockchain nodes 104 may be trying to solve the puzzle based on a different pool of transactions154, but whoever gets there first will define the set of transactions that are included in the latest block 151.
  • a blockchain node 104 will solve the puzzle for a part of the ordered pool 154 which includes Alice’s transaction 152j). Once the proof-of-work has been done for the pool 154 including the new transaction 152j, it immutably becomes part of one of the blocks 151 in the blockchain 150. Each transaction 152 comprises a pointer back to an earlier transaction, so the order of the transactions is also immutably recorded. Different blockchain nodes 104 may receive different instances of a given transaction first and therefore have conflicting views of 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.
  • a blockchain node 104 accepts one instance as valid, and then discovers that a second instance has been recorded in the blockchain 150 then that blockchain node 104 must accept this and will discard (i.e. treat as invalid) the instance which it had initially accepted (i.e. the one that has not been published in a block 151).
  • An alternative type of transaction protocol operated by some blockchain networks may be referred to as an “account-based” protocol, as part of an account-based transaction model.
  • each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance.
  • the current state of all accounts is stored, by the nodes of that network, separate to the blockchain and is updated constantly.
  • UTXO-BASED MODEL Figure 2 illustrates an example transaction protocol. This is an example of a UTXO-based protocol.
  • a transaction 152 (abbreviated “Tx”) is the fundamental data structure of the blockchain 150 (each block 151 comprising one or more transactions 152). The following will be described by reference to an output-based or “UTXO” based protocol.
  • each transaction (“Tx”) 152 comprises a data structure comprising one or more inputs 202, and one or more outputs 203.
  • Each output 203 may comprise an unspent transaction output (UTXO), which can be used as the source for the input 202 of another new transaction (if the UTXO has not already been redeemed).
  • the UTXO includes a value specifying an amount of a digital asset. This represents a set number of tokens on the distributed ledger.
  • the UTXO may also contain the transaction ID of the transaction from which it came, amongst other information.
  • the transaction data structure may also comprise a header 201, which may comprise an indicator of the size of the input field(s) 202 and output field(s) 203.
  • the header 201 may also include an ID of the transaction.
  • the transaction ID is the hash of the transaction data (excluding the transaction ID itself) and stored in the header 201 of the raw transaction 152 submitted to the nodes 104.
  • Alice 103a wishes to create a transaction 152j transferring an amount of the digital asset in question to Bob 103b.
  • Alice’s new transaction 152j is labelled “Tx1”.
  • Tx 0 The preceding transaction 152i is labelled “Tx 0 ” in Figure 2.
  • Tx 0 and Tx 1 are just arbitrary labels. They do not necessarily mean that Tx 0 is the first transaction in the blockchain 151, nor that Tx 1 is the immediate next transaction in the pool 154. Tx 1 could point back to any preceding (i.e. antecedent) transaction that still has an unspent output 203 locked to Alice.
  • the preceding transaction Tx 0 may already have been validated and included in a block 151 of the blockchain 150 at the time when Alice creates her new transaction Tx 1 , or at least by the time she sends it to the network 106. It may already have been included in one of the blocks 151 at that time, or it may be still waiting in the ordered set 154 in which case it will soon be included in a new block 151. Alternatively Tx 0 and Tx 1 could be created and sent to the network 106 together, or Tx 0 could even be sent after Tx 1 if the node protocol allows for buffering “orphan” transactions.
  • preceding and “subsequent” as used herein in the context of the sequence of transactions refer to the order of the transactions in the sequence as defined by the transaction pointers specified in the transactions (which transaction points back to which other transaction, and so forth). They could equally be replaced with “predecessor” and “successor”, or “antecedent” and “descendant”, “parent” and “child”, or such like. It does not necessarily imply an order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. Nevertheless, a subsequent transaction (the descendent transaction or “child”) which points to a preceding transaction (the antecedent transaction or “parent”) will not be validated until and unless the parent transaction is validated.
  • a child that arrives at a blockchain node 104 before its parent is considered an orphan. It may be discarded or buffered for a certain time to wait for the parent, depending on the node protocol and/or node behaviour.
  • One of the one or more outputs 203 of the preceding transaction Tx0 comprises a particular UTXO, labelled here UTXO0.
  • Each UTXO comprises a value specifying an amount of the digital asset represented by the UTXO, and a locking script which defines a condition which must be met by an unlocking script in the input 202 of a subsequent transaction in order for the subsequent transaction to be validated, and therefore for the UTXO to be successfully redeemed.
  • the locking script locks the amount to a particular party (the beneficiary of the transaction in which it is included).
  • the locking script defines an unlocking condition, typically comprising a condition that the unlocking script in the input of the subsequent transaction comprises the cryptographic signature of the party to whom the preceding transaction is locked.
  • the locking script (aka scriptPubKey) is a piece of code written in the domain specific language recognized by the node protocol. A particular example of such a language is called “Script” (capital S) which is used by the blockchain network.
  • the locking script specifies what information is required to spend a transaction output 203, for example the requirement of Alice’s signature. Unlocking scripts appear in the outputs of transactions.
  • the unlocking script (aka scriptSig) is a piece of code written the domain specific language that provides the information required to satisfy the locking script criteria. For example, it may contain Bob’s signature. Unlocking scripts appear in the input 202 of transactions. So in the example illustrated, UTXO 0 in the output 203 of Tx 0 comprises a locking script [Checksig PA] which requires a signature Sig PA of Alice in order for UTXO 0 to be redeemed (strictly, in order for a subsequent transaction attempting to redeem UTXO 0 to be valid). [Checksig PA] contains a representation (i.e. a hash) of the public key PA from a public- private key pair of Alice.
  • the input 202 of Tx1 comprises a pointer pointing back to Tx1 (e.g. by means of its transaction ID, TxID0, which in embodiments is the hash of the whole transaction Tx0).
  • the input 202 of Tx1 comprises an index identifying UTXO0 within Tx0, to identify it amongst any other possible outputs of Tx0.
  • the input 202 of Tx1 further comprises an unlocking script ⁇ Sig PA> which comprises a cryptographic signature of Alice, created by Alice applying her private key from the key pair to a predefined portion of data (sometimes called the “message” in cryptography).
  • the data (or “message”) that needs to be signed by Alice to provide a valid signature may be defined by the locking script, or by the node protocol, or by a combination of these.
  • the node applies the node protocol. This comprises running the locking script and unlocking script together to check whether the unlocking script meets the condition defined in the locking script (where this condition may comprise one or more criteria).
  • this involves concatenating the two scripts: ⁇ Sig P A > ⁇ P A >
  • the expected portion of data itself (the “message”) also needs to be included in order to perform this authentication.
  • the signed data comprises the whole of Tx 1 (so a separate element does not need to be included specifying the signed portion of data in the clear, as it is already inherently present).
  • the details of authentication by public-private cryptography will be familiar to a person skilled in the art. Basically, if Alice has signed a message using her private key, then given Alice’s public key and the message in the clear, another entity such as a node 104 is able to authenticate that the message must have been signed by Alice. Signing typically comprises hashing the message, signing the hash, and tagging this onto the message as a signature, thus enabling any holder of the public key to authenticate the signature.
  • any reference herein to signing a particular piece of data or part of a transaction can in embodiments mean signing a hash of that piece of data or part of the transaction. If the unlocking script in Tx1 meets the one or more conditions specified in the locking script of Tx0 (so in the example shown, if Alice’s signature is provided in Tx1 and authenticated), then the blockchain node 104 deems Tx1 valid. This means that the blockchain node 104 will add Tx1 to the ordered pool of pending transactions 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 be propagated throughout the network 106.
  • Tx1 Once Tx1 has been validated and included in the blockchain 150, this defines UTXO0 from Tx0 as spent. Note that Tx1 can only be valid if it spends an 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 the other conditions are met. Hence the blockchain node 104 also needs to check whether the referenced UTXO in the preceding transaction Tx 0 is already spent (i.e. whether it has already formed a valid input to another valid transaction). This is one reason why it is important for the blockchain 150 to impose a defined order on the transactions 152.
  • a given blockchain node 104 may maintain a separate database marking which UTXOs 203 in which transactions 152 have been spent, but ultimately what defines whether a UTXO has been spent is whether it has already formed a valid input to another valid transaction in the blockchain 150. If the total amount specified in all the 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 invalidity in most transaction models. Therefore such transactions will not be propagated nor included in a block 151. Note that in UTXO-based transaction models, a given UTXO needs to be spent as a whole. It cannot “leave behind” a fraction of the amount defined in the UTXO as spent while another fraction is spent.
  • the amount from the UTXO can be split between multiple outputs of the next transaction.
  • the amount defined in UTXO0 in Tx0 can be split between multiple UTXOs in Tx1.
  • Alice does not want to give Bob all of the amount defined in UTXO0, she can use the remainder to give herself change in a second output of Tx1, or pay another party.
  • Alice will also usually need to include a fee for the bitcoin node 104 that successfully includes her transaction 104 in a block 151.
  • Tx0 may be rejected by the blockchain nodes 104, and hence although technically valid, may not be propagated and included in the blockchain 150 (the node protocol does not force blockchain nodes 104 to accept transactions 152 if they don’t want).
  • the transaction fee does not require its own separate output 203 (i.e. does not need a separate UTXO). Instead any difference between the total amount pointed to by the input(s) 202 and the total amount of specified in the output(s) 203 of a given transaction 152 is automatically given to the blockchain node 104 publishing the transaction.
  • a pointer to UTXO0 is the only input to Tx 1 , and Tx 1 has only one output UTXO 1 .
  • the difference may be assigned (or spent) by the node 104 that wins the proof-of-work race to create the block containing UTXO 1 .
  • a transaction fee could be specified explicitly in its own one of the UTXOs 203 of the transaction 152.
  • Alice and Bob’s digital assets consist of the UTXOs locked to them in any transactions 152 anywhere in the blockchain 150.
  • the assets of a given party 103 are scattered throughout the UTXOs of various transactions 152 throughout the blockchain 150. There is no one number stored anywhere in the blockchain 150 that defines the total balance of a given party 103.
  • OP_RETURN is an opcode of the Script language 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, and thereby record the data immutably in the blockchain 150.
  • the data could comprise a document which it is desired to store in the blockchain.
  • an input of a transaction contains a digital signature corresponding to a public key PA. In embodiments this is based on the ECDSA using the elliptic curve secp256k1.
  • a digital signature signs a particular piece of data. In some embodiments, for a given transaction the signature will sign part of the transaction input, and some or all of the transaction outputs.
  • the particular parts of the outputs it signs depends on the SIGHASH flag.
  • the SIGHASH flag is usually a 4-byte code included at the end of a signature to select which outputs are signed (and thus fixed at the time of signing).
  • the locking script is sometimes called “scriptPubKey” referring to the fact that it typically comprises the public key of the party to whom the respective transaction is locked.
  • the unlocking script is sometimes called “scriptSig” referring to the fact that it typically supplies the corresponding signature.
  • scripting language could be used to define any one or more conditions. Hence the more general terms “locking script” and “unlocking script” may be preferred.
  • the client application on each of Alice and Bob’s computer equipment 102a, 120b, respectively, may comprise additional communication functionality.
  • This additional functionality enables Alice 103a to establish a separate side channel 107 with Bob 103b (at the instigation of either party or a third party).
  • the side channel 107 enables exchange of data separately from the blockchain network.
  • Such communication is sometimes referred to as “off-chain” communication.
  • this may be used to exchange a transaction 152 between Alice and Bob without the transaction (yet) being registered onto the blockchain network 106 or making its way onto the chain 150, until one of the parties chooses to broadcast it to the network 106. Sharing a transaction in this way is sometimes referred to as sharing a “transaction template”.
  • a transaction template may lack one or more inputs and/or outputs that are required in order to form a complete transaction.
  • the side channel 107 may be used to exchange any other transaction related data, such as keys, negotiated amounts or terms, data content, etc.
  • the side channel 107 may be established via the same packet-switched network 101 as the blockchain network 106.
  • the side channel 301 may be established via a different network such as a mobile cellular network, or a local area network such as a local wireless network, or even a direct wired or wireless link between Alice and Bob’s devices 102a, 102b.
  • the side channel 107 as referred to anywhere herein may comprise any one or more links via one or more networking technologies or communication media for exchanging data “off-chain”, i.e. separately from the blockchain network 106. Where more than one link is used, then the bundle or collection of off-chain links as a whole may be referred to as the side channel 107. Note therefore that if it is said that Alice and Bob exchange certain pieces of information or data, or such like, over the side channel 107, then this does not necessarily imply all these pieces of data have to be send over exactly the same link or even the same type of network. 4.
  • the ECDSA signature is ( ⁇ , ⁇ ).
  • a valid signature requires the private key as input. However only the signature pair ( ⁇ , ⁇ ), the message ⁇ , and the public key ⁇ are needed to validate the signature.
  • PAY-TO-PUBLIC-KEY P2PK
  • ECDSA is used to prove control of unspent transaction outputs (UTXOs).
  • Standard transactions such a pay-to-public-key (P2PK) and pay-to-public-key-hash (P2PKH) lock the output of the transaction a particular public key or hash of said public key.
  • P2PK and P2PKH scripts are defined as follows: The combined locking and unlocking scripts are evaluated by the miner, which checks that the correct public key is provided and that the signature is valid and corresponds to ⁇ .
  • Cryptographic hash functions such as RIPEMD-160 or SHA-256 provide a method for obscuring an input to that function, where a small change to the input will result in an unpredictable output.
  • Hash puzzle functionality can be emulated by exploiting the ephemeral random value ⁇ in an ECDSA signature.
  • h the intractability of inverting Elliptic Curve scalar multiplication can form an analogous puzzle called an R-puzzle. To solve the puzzle, one would need to obtain the value ⁇ . Note that ⁇ is never revealed, instead ⁇ is revealed within the signature, and from this knowledge of ⁇ can be proved.
  • a solution to this vulnerability is to include another extra signature ⁇ ⁇ ⁇ ⁇ in the unlocking script on another message ⁇ ⁇ , a non-arbitrary message based on the serialised spending transaction, which a miner will not be able to provide unless they know the secret key ⁇ ⁇ .
  • the unlocking script would be:
  • the transaction would need to include another OP_CHECKSIG at the end as shown below. 5.
  • SELF-SIGNED TRANSACTIONS Block transactions typically involve locking the output of a transaction to a combination of: 1. a known public key for an intended recipient, and 2. OP_CHECKSIG to verify a signature against the fixed public key. This intended recipient can then spend the transaction by generating a valid ECDSA signature for this public key using the corresponding private key, which only they should have knowledge of.
  • This new setup is referred to as a Self-Signed Transaction (SST), in which an SST is the transaction (Tx) that spends funds, or unlocks a UTXO, using this paradigm.
  • SST Self-Signed Transaction
  • This setup requires the unlocking party to derive a valid public key that solves for the fixed signature.
  • 5.1 SST CORE OUTLINE SST’s involve ‘locking’ a transaction to a signature value ( ⁇ , ⁇ ), referred to herein as a locking signature, where the unlocking script contains a public key ⁇ that results in the fixed (locking) signature being ‘valid’ for the given message, e.g. spending transaction.
  • the unlocking script contains a public key ⁇ that results in the fixed (locking) signature being ‘valid’ for the given message, e.g. spending transaction.
  • Alice is the funding party and Bob is the spending party.
  • ⁇ and ⁇ may be either randomly or deterministically selected. Random selection of one or both of these values improves the security of the transactions. However, deterministic derivation of one or both of these values may be used to prove knowledge of a shared item, such as a digital document, from which the value is derived as described below. Sufficient security may be maintained if the ephemeral key ⁇ is the hash of a large digital document, for example, since the hash function is suitably random.
  • the values ⁇ and ⁇ should be unpredictable for a party which is not intended to unlock the UTXO of the funding transaction.
  • SST provides a transaction locking mechanism for which anyone can sign, that is the party providing the locking signature (Alice) need not have knowledge of private-public key pair.
  • OP_CHECKSIG within the locking script ensures the spending condition depends on the message. So, if the message (i.e. ⁇ ⁇ ) is changed, additional computation must be done. This guarantees that if someone attempts to alter the spending transaction to steal any associated funds, they will need to re-calculate a valid public key ⁇ for said spending transaction. An example of this could be to guarantee a spending party has acknowledged the spending transaction.
  • a further property of SST is the pseudo-randomness derived from the public key ⁇ used to spend the transaction. Due to the unpredictable nature of cryptographic hash functions, it would be computationally infeasible to predict what public key would be used to solve for the SST until the spending transaction has been generated. This could be used to create some randomness as part of a game, or more simply used to mask a spending parties’ activity, where neither the funding nor spending party know which address will solve for SST until the spending transaction is generated. This property can be used to enable a Proof-of- Work (PoW) security addition, as described in Section 5.4.
  • PoW Proof-of- Work
  • the ephemeral key ⁇ should be selected from a large search space and should not be predictable. For example, if the defining party wants the value of ⁇ to correspond to some item, such as some documents, they should pass said documents through the SHA-256. This would ensure that value ⁇ is sufficiently unpredictable. For example, if the inputted item was a number between 1-10 the variation across potential inputs would not make the value of ⁇ sufficiently unpredictable, provided the solving party knew the input was a value between 1-10.
  • the K-puzzle method comprises two stages.
  • the public key ⁇ is derived using the locking signature ( ⁇ , ⁇ ) .
  • the public key ⁇ is derived using the locking signature ( ⁇ , ⁇ ) .
  • a candidate signature is derived for including in the unlocking script of the proof transaction. The candidate signature is derived using the same private key ⁇ as that corresponding to the locking signature.
  • the locking script would be as follows: OP_DUP ⁇ ⁇ ⁇ , ⁇ ⁇ > OP_SWAP OP_CHECKSIGVERIFY OP_CHECKSIG And the corresponding unlocking script would be given as such: ⁇ ⁇ ⁇ , ⁇ ⁇ > ⁇ ⁇ > Where: • ( ⁇ ⁇ , ⁇ ⁇ ) are the SST signature values defined by funding party Alice, • ⁇ is the compressed public key calculated by spending party Bob for the spending transaction, • And ( ⁇ ⁇ , ⁇ ⁇ ) is the signature calculated by Bob for the spending transaction, based on the given public key ⁇ . This secures the transaction, providing Bob knows the ephemeral key ⁇ used to generate the SST.
  • variable signature ( ⁇ ⁇ , ⁇ ⁇ ) is different to the fixed signature ( ⁇ ⁇ , ⁇ ⁇ )
  • a second ephemeral key ⁇ ′ is used to generate the variable signature, along with the private key ⁇ .
  • Opcodes that would check and reject any unlocking script where the two signatures were the same can be included in the locking script.
  • a more efficient method which may be used is to alter the message serialisation between the two OP_CHECKSIGs, ensuring that a repeated signature would be invalid for the second OP_CHECKSIG.
  • OP_CODESPERATOR is an opcode that works with OP_CHECKSIG (and OP_CHECKSIGVERIFY) to determine which part of the transaction is signed by the signature i.e. acting as a code separator.
  • OP_CHECKSIGVERIFY will check the signature against all data after the last OP_CODESEPARATOR has been executed.
  • By including an OP_CODESPERATOR between the two OP_CHECKSIGs in the SST locking script it is ensured that different message serialisations are evaluated, therefore preventing the repeated signature security flaw. Further, this is done in a more compact manner than manually verifying the two signatures are not the same.
  • the K-puzzle is therefore an alternative to R-puzzle with a more compact script size.
  • the locking script may be as follows: Locking script: OP_DUP ⁇ ⁇ ⁇ , ⁇ ⁇ > OP_SWAP OP_CHECKSIGVERIFY OP_CODESEPERATOR OP_CHECKSIG And the corresponding unlocking script may be given as such: Unlocking script: ⁇ ⁇ ⁇ , ⁇ ⁇ > ⁇ ⁇ > K-puzzle provides a more compact alternative to R-puzzle. Further, the opcode OP_SPLIT is not available in the Bitcoin protocol and R-puzzle, which is dependent on this opcode, cannot be used on the Bitcoin fork. It would be possible to replicate the functionality of OP_SPLIT using other available opcodes, but would require greater overall script size.
  • FIG 3 illustrates a method for generating the unlocking script of a proof blockchain transaction 302 for a K-puzzle SST.
  • the locking script of the challenge transaction 301 comprises the locking signature
  • Bob (the challengee) obtains the challenge value ⁇ .
  • Bob may be provided with the challenge value by Alice (the challenger), or may derive the challenge value from, for example, a digital document.
  • Bob generates the template for the proof transaction 302 and calculates its hash value, step B.
  • Bob uses the hash value ⁇ , the challenge value ⁇ , and the locking signature, which he has obtained from the locking script of the challenge transaction 301, to calculate the public key ⁇ associated with the locking signature, step C, and the corresponding private key ⁇ , step D.
  • Bob provides the public key in the unlocking script.
  • Bob selects a second ephemeral key ⁇ ′, which is different to the challenge value ⁇ , at step E and uses the second ephemeral key ⁇ ′ to generate the candidate signature ( ⁇ ⁇ , ⁇ ⁇ ), step F, which he also provides the in the unlocking script.
  • Bob proves knowledge of the challenge value. It will be appreciated that, for the core SST method set out in section 5.1, Bob does not provide the candidate signature in the unlocking script and, as such, only method steps A to C are performed.
  • Figure 4 illustrates the method implemented when the locking script of the challenge transaction 301 is executed with the unlocking script of the proof transaction 302.
  • the candidate signature ( ⁇ ⁇ , ⁇ ⁇ ) of the unlocking script is verified using the public key ⁇ provide in the unlocking script.
  • the locking signature ( ⁇ ⁇ , ⁇ ⁇ ) of the locking script is verified using the public key ⁇ .
  • An alternative method to mitigate the security concern of an SST may be to hash the fixed signature ( ⁇ , ⁇ ) in the locking script.
  • Locking script OP_DUP OP_SHA256 ⁇ ⁇ ( ⁇ , ⁇ ) > OP_EQUAL OP_CHECKSIG Unlocking script: ⁇ ⁇ , ⁇ > ⁇ ⁇ > That is, when the locking script and unlocking script are executed together, the candidate signature provided in the unlocking script is verified based on the public key provided in the unlocking script of the proof transaction 502. The candidate signature is hashed and compared to the hash provided in the locking script of the challenge transaction 501, referred to herein as the locking signature portion.
  • the UTXO is unlocked. This is illustrated by steps A to C of Figure 5.
  • This method requires that the spending party have knowledge of the signature values, which may be tied to some puzzle. For example, Alice asks Bob to prove knowledge of ⁇ and ⁇ to claim the associated funds, such that ⁇ and ⁇ are the challenge values. Alternatively, Alice may ask Bob to prove knowledge of ⁇ , which he does by deriving ⁇ and ⁇ from ⁇ , such that ⁇ is the challenge value. Bob does not need to access information from the locking script in order to derive the candidate signature. The candidate signature therefore proves Bob has knowledge of the challenge value(s).
  • Locking script OP_DUP OP_ROT OP_CAT OP_HASH160 ⁇ Threshold > OP_LESSTHAN OP_VERIFY OP_OVER OP_ HASH160 ⁇ ⁇ ( ⁇ , ⁇ ) > OP_EQUALVERIFY OP_CHECKSIG Unlocking script: ⁇ ⁇ , ⁇ > ⁇ ⁇ ⁇ ⁇ ⁇ > ⁇ ⁇ > As before, for the challenge transaction, Alice generates a locking script that includes the hash concealed signature ⁇ ( ⁇ , ⁇ ), requiring the unlocking party Bob to push ( ⁇ , ⁇ ) onto the stack.
  • Bob is also required to push a compressed public key ⁇ , that when evaluated by OP_CHECKSIG with the fixed ( ⁇ , ⁇ ) values evaluate to TRUE.
  • the locking script also comprises a ⁇ ⁇ ⁇ ⁇ ⁇ value. This ⁇ ⁇ ⁇ ⁇ ⁇ value is concatenated and hashed with the unlocking public key ⁇ .
  • the result needs to be below some Threshold value set by Alice.
  • the lower the PoW threshold the more work required by the unlocking party to solve, but the more computational power required of a bad miner to steal in the defined window.
  • OP_LESSTHAN will digest the threshold in little endian format. As such both Alice and Bob should ensure the threshold and digest are calculated based on this, respectively.
  • Alice wants Bob to prove his knowledge of some values, in this case ⁇ and ⁇ .
  • is a function of ⁇
  • Alice could in fact be asking Bob to prove his knowledge of ⁇ instead of ⁇ .
  • these values represent computations or even a hash value for documents that Alice wants to verify. It is important that these values should be selected from a large search space and should not be predictable. If required, they could be salted and hashed to make them less predictable, provided this step is communicated to solving party Bob.
  • the following steps may be executed.
  • Step 5 Alice must ensure that the ⁇ h ⁇ ⁇ ⁇ h ⁇ ⁇ ⁇ ⁇ is sufficiently difficult that it cannot be computed by a dishonest miner attempting to hijack the spending transaction after Bob reveals ( ⁇ , ⁇ ) values. It can be assumed that a miner has a much higher computation capacity than Bob.
  • Locking script OP_2DUP OP_HASH160 ⁇ ⁇ ( ⁇ , ⁇ ) > OP_EQUALVERIFY OP_1 OP_SPLIT OP_NIP OP_HASH160 ⁇ Threshold > OP_LESSTHAN OP_SWAP OP_CHECKSIG Unlocking script: ⁇ ⁇ > ⁇ ⁇ , ⁇ > The size of locking script for this method is 31 bytes + threshold size, which would be less than 20 bytes.
  • the size of the unlocking script is 107 bytes. Compared with the PoW solution described in Section 5.2.1, this method has a 1-byte transaction size saving in the locking script and a 1-byte size saving in the unlocking script. Overall, both PoW solutions provide a 30+ byte transaction size saving compared with the secure k-puzzle solution proposed in the previous section, at the cost of additional work required of the spending party. 6. EXAMPLE USE CASES Some example uses cases are provided below, in which the K-puzzle method is used.
  • the challenge value ⁇ in each of these examples is derived from a digital document. However, it will be appreciated that these examples are not limiting. The challenge value may be derived in some other way, for example by solving a problem provided to the spending user.
  • 6.1 DOCUMENT VERIFICATION – K-PUZZLE Alice works in a library that collects, stores, and maintains digital documents. Alice wants to verify that the record she has for some publicly available document, say a newspaper, is correct. She inputs her version of the document through the SHA-256 function to form a single unique value that is representative of the document. This value will be used as the ephemeral key ⁇ used to generate the SST. Alice then: 1. Selects some ⁇ ⁇ value, which is random in this case, 2.
  • ⁇ ⁇ x-coordinate of ⁇ ⁇ , where ⁇ is the unique SHA-256 value of the digital document.
  • Alice creates a funding SST transaction, ⁇ ⁇ ⁇ ⁇ ⁇ , locked with this derived ECDSA signature, ( ⁇ ⁇ , ⁇ ⁇ ), as shown below: After Alice has published this transaction, she shares the details of it to some public communication platform. Stating that anyone can attempt to solve the puzzle, provided they can verify the publicly available documents and solve for ephemeral key ⁇ . Any party, say Charlie in this case, can then solve for Alice’s transaction and earn the associated funds by: 1. Sourcing the publicly available documents and hashing them to find ⁇ . 2. Generating a spending transaction template. 3.
  • the previous use case can also be modified to incentivise peers in a network, such as InterPlanetary File System (IPFS), to prove they have a copy of a certain file stored locally, thus signalling to Alice that there is a ‘back-up’ of this file in the network.
  • IPFS InterPlanetary File System
  • Alice has some important document, say a 5-page employment contract.
  • Alice has shared the original copy of this document with an IPFS network to ensure there is always a backup copy stored there.
  • Alice can set the challenge to a be the hash of some part of the document, such as: “ ⁇ is derived from the hash of page 3 of the contract”. This would force a node on the network to consult the file, and hash the particular section, to redeem. This would prove the node has a copy of the actual document, and Alice may issue different challenges based on different portions of the document at various times. Alice could use this as a ‘proof-of-backup’ service, with the following set up: 1. Alice stores a large file X locally, 2. She takes a few random segments, hashes them, and stores a mapping of segment markers to the hashes, 3. She deletes file X, 4.
  • Alice 103a stores a document in a document store 602 at step 1.
  • the document store 602 may be, for example, an IPFS or other remote computing system.
  • Alice 103a defines the challenge for proving the document is stored as she has intended.
  • Alice 103b defines the portion(s) of the document from which the challenge value is to be derived.
  • Alice 103a calculates the challenge value at step 2.
  • Alice 103b uses the challenge value to generate the locking signature and provides this in the locking script of the challenge transaction, step 3, which she subsequently stores to the blockchain 150, step 4.
  • Bob 103b retrieves the challenge transaction from the blockchain 150 at step 5.
  • Bob 103b may be sent the challenge, i.e. which portion(s) comprise the challenge value, by Alice 103a.
  • the challenge may be defined in the challenge transaction such that there need not be any direct contact between Alice 103a and Bob 103b.
  • Bob 103b retrieves the document from the document store 602 at step 6, and calculates the challenge value as defined by the challenge at step 7.
  • Bob 103b uses the calculated challenge value and the locking signature from the challenge transaction to calculate the public key, and from that the private key, associated with the locking signature.
  • Bob 103b selects an ephemeral key to use to generate the candidate signature, and uses this ephemeral key and the calculated private key to generate the candidate signature.
  • any reference above to bitcoin network 106, bitcoin blockchain 150 and bitcoin nodes 104 may be replaced with reference to a blockchain network 106, blockchain 150 and blockchain node 104 respectively.
  • the blockchain, blockchain network and/or blockchain nodes may share some or all of the described properties of the bitcoin blockchain 150, bitcoin network 106 and bitcoin nodes 104 as described above.
  • the blockchain network 106 is the bitcoin network and bitcoin nodes 104 perform at least all of the described functions of 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 only perform one or some but not all of these functions.
  • a network entity may perform the function of propagating and/or storing blocks without creating and publishing blocks (recall that these entities are not considered nodes of the preferred bitcoin network 106).
  • the blockchain network 106 may not be the bitcoin network.
  • a node may perform at least one or some but not all of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150.
  • a “node” may be used to refer to a network entity that is configured to create and publish blocks 151 but not store and/or propagate those blocks 151 to other nodes.
  • any reference to the term “bitcoin node” 104 above may be replaced with the term “network entity” or “network element”, wherein such an entity/element is configured to perform some or all of the roles of creating, publishing, propagating and storing blocks.
  • the functions of such a network entity/element may be implemented in hardware in the same way described above with reference to a blockchain node 104.
  • proof- of-work is just one type of consensus mechanism and in general embodiments may use any type of suitable consensus mechanism such as, for example, proof-of-stake, delegated proof-of-stake, proof-of-capacity, or proof-of-elapsed time.
  • proof- of-stake uses a randomized process to determine which blockchain node 104 is given the opportunity to produce the next block 151.
  • the chosen node is often referred to as a validator.
  • Blockchain nodes can lock up their tokens for a certain time in order to have the chance of becoming a validator. Generally, the node who locks the biggest stake for the longest period of time has the best chance of becoming the next validator.
  • a computer-implemented method for generating a blockchain transaction comprising: providing a first locking script of the blockchain transaction, the first locking script comprising a locking signature portion, wherein the locking signature portion is based on a locking signature, and wherein the first locking script is configured, when executed with a first unlocking script of a proof transaction, to: verify that a public key provided in the first unlocking script is associated with the locking signature; and making the blockchain transaction available to one or more nodes of a blockchain network.
  • the method of statement 1, wherein the locking signature portion comprises the locking signature, wherein the step of verifying that the public key is associated with the locking signature comprises verifying the locking signature against the public key.
  • Statement 3. The method of statement 2, wherein the first locking script is further configured to verify a candidate signature provided in the first unlocking script based on the public key.
  • Statement 4. The method of statement 3, wherein the candidate signature is derived from a private key associated with the locking signature.
  • the method of statement 4, wherein the private key is derived from a challenge value.
  • Statement 7. The method of statement 1, wherein the locking signature portion comprises a hash of the locking signature.
  • the step of verifying that the public key provided in the first unlocking script is associated with the locking signature comprises: verifying a candidate signature provided in the first unlocking script based on the public key; computing a candidate signature hash using the candidate signature; and verifying that the candidate signature hash is equal to the hash of the locking signature.
  • Statement 9. The method of statement 8, wherein the first locking script further comprises a proof-of-work threshold value, wherein the locking script is further configured to verify that a threshold condition associated with the threshold value has been met.
  • Statement 10 The method of statement 9, wherein the first unlocking script comprises a nonce value, wherein the threshold condition is met if a hash value derived from the nonce value and the public key is less than the proof-of-work threshold value.
  • a computer-implemented method for generating a proof blockchain transaction for unlocking an unspent transaction output of a blockchain transaction comprising a first locking script, the first locking script comprising a locking signature portion based on a locking signature
  • the method comprising: calculating a public key, wherein the public key is associated with a private key corresponding to the locking signature; providing, in a first unlocking script of the proof blockchain transaction, the candidate public key; and making the proof blockchain transaction available to one or more nodes of a blockchain network.
  • the method of statement 15 wherein the method further comprises: calculating the private key based on the candidate public key and a challenge value; calculating a candidate signature using the private key; and providing the candidate signature in the first unlocking script.
  • Statement 17. The method of statement 16, wherein the challenge value is an ephemeral key, wherein the candidate signature is calculated using a second ephemeral key, wherein the second ephemeral key is not equal to the challenge value.
  • the locking signature portion comprises a hash of the locking signature
  • the method further comprises: determining a candidate signature based on a challenge value, wherein a hash of the candidate signature is equal to the hash of the locking signature; and providing the candidate signature in the first unlocking script; wherein the candidate public key is calculated based on the candidate signature and the proof blockchain transaction.
  • the first locking script further comprises a proof-of-work threshold value, wherein the method further comprises determining if a threshold condition has been met based on the public key, wherein the public key is provided in the first unlocking script if the threshold condition has been met.
  • the method of statement 19 wherein the method further comprises determining a nonce value and providing the nonce value in the first unlocking script, wherein the threshold condition is met if a hash value derived from the nonce value and the public key is less than the proof-of-work threshold value.
  • Statement 21 The method of statement 19, wherein the method further comprises determining if the public key is less than the proof-of-work threshold value, wherein the threshold condition is met if the public key is less than the proof-of-work threshold value.
  • Statement 22 The method of statement 13 or statement 18, wherein the challenge value is derived from at least a portion of a digital document, wherein the method further comprises deriving the challenge value.
  • the method of statement 22 wherein the challenge value is a hash of the at least a portion of the digital document, wherein the step of deriving the challenge value comprises calculating the hash of the at least a portion of the digital document.
  • Statement 24 The method of statement 22 when dependent on statement 13, wherein the method further comprises generating the locking script portion using the challenge value.
  • Statement 25. Computer equipment comprising: memory comprising one or more memory units; and processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when on the processing apparatus to perform the method of any of statements 1 to 24.
  • Statement 26 A computer program embodied on computer-readable storage and configured so as, when run on one or more processors, to perform the method of any of statements 1 to 24.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

L'invention concerne un procédé mis en œuvre par ordinateur pour générer une transaction de chaîne de blocs. Un premier script de verrouillage de la transaction de chaîne de blocs est fourni. Le premier script de verrouillage comprend une partie de signature de verrouillage sur la base d'une signature de verrouillage. Le premier script de verrouillage est configuré, lorsqu'il est exécuté avec un premier script de déverrouillage d'une transaction de preuve, pour vérifier qu'une clé publique fournie dans le premier script de déverrouillage est associée à la signature de verrouillage. La transaction de chaîne de blocs est mise à la disposition d'un ou de plusieurs nœuds d'un réseau à chaîne de blocs.
PCT/EP2023/071548 2022-08-24 2023-08-03 Transaction de chaîne de blocs WO2024041866A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
GB2212308.7A GB2621857A (en) 2022-08-24 2022-08-24 Blockchain transaction
GB2212308.7 2022-08-24

Publications (1)

Publication Number Publication Date
WO2024041866A1 true WO2024041866A1 (fr) 2024-02-29

Family

ID=83902157

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2023/071548 WO2024041866A1 (fr) 2022-08-24 2023-08-03 Transaction de chaîne de blocs

Country Status (2)

Country Link
GB (1) GB2621857A (fr)
WO (1) WO2024041866A1 (fr)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021254703A1 (fr) * 2020-06-17 2021-12-23 Nchain Licensing Ag Accords sur la chaîne de blocs
US20220263664A1 (en) * 2019-05-24 2022-08-18 nChain Holdings Limited Blockchain transaction comprising runnable code for hash-based verification

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220263664A1 (en) * 2019-05-24 2022-08-18 nChain Holdings Limited Blockchain transaction comprising runnable code for hash-based verification
WO2021254703A1 (fr) * 2020-06-17 2021-12-23 Nchain Licensing Ag Accords sur la chaîne de blocs

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "R-Puzzles - Bitcoin Wiki", 5 September 2020 (2020-09-05), XP055960568, Retrieved from the Internet <URL:https://web.archive.org/web/20200905150445/https://wiki.bitcoinsv.io/index.php/R-Puzzles> [retrieved on 20220913] *

Also Published As

Publication number Publication date
GB2621857A (en) 2024-02-28
GB202212308D0 (en) 2022-10-05

Similar Documents

Publication Publication Date Title
US20220239501A1 (en) Knowledge proof
US20220337427A1 (en) Cryptographically linked identities
JP2022533777A (ja) プルーフ・オブ・ワーク
EP3973661B1 (fr) Preuve de connaissance
US20240064020A1 (en) Blocking sensitive data
US20230308292A1 (en) Digital signatures
WO2024002758A1 (fr) Preuve de possession
US20240281806A1 (en) Multi-party blockchain address scheme
CN118044151A (zh) 传播锁定脚本
WO2023117230A1 (fr) Transaction de chaîne de blocs
WO2023110551A1 (fr) Authenticité de clé enfant basée sur une preuve d&#39;absence de connaissance
WO2024041866A1 (fr) Transaction de chaîne de blocs
WO2024041862A1 (fr) Transaction de chaîne de blocs
US20240235848A1 (en) Multi-party blockchain address scheme
US20240214179A1 (en) Blockchain-implemented hash function
WO2024052065A1 (fr) Détermination de secrets partagés à l&#39;aide d&#39;une chaîne de blocs
WO2023227529A1 (fr) Masques de hachage
WO2023208832A1 (fr) Transaction de chaîne de blocs
EP4348927A1 (fr) Fonction de hachage à sha partiel
WO2023156101A1 (fr) Transaction de chaîne de blocs
WO2024002756A1 (fr) Preuve de propriété
WO2023117274A1 (fr) Échange atomique à base de signature
WO2024061546A1 (fr) Application de contraintes sur des transactions de chaîne de blocs
WO2023143882A1 (fr) Arithmétique de courbe elliptique dans un script
JP2023527030A (ja) ブロックチェーントランザクションアウトプットの確率的メンバシップテスト

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23754183

Country of ref document: EP

Kind code of ref document: A1