Computer-implemented systems and methods for performing atomic swaps using blockchain
By constructing two transactions on the blockchain and using a one-way function to generate a hidden secret value, the problem of insufficient security of the atomic swap scheme on the blockchain is solved, the security and efficiency of atomic swaps are improved, and the resource security is ensured. Atomic swaps and privacy.
Patent Information
- Application Number
- CN201980032652.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-05-14
- Filing Date
- 2019-05-08
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-05-08
AI Technical Summary
Existing atomic swap schemes have insufficient security issues on the blockchain, especially since only one secret is used and the swap is performed asynchronously, resulting in one transaction having to be spent first before another transaction can be spent, limiting the number of transactions. Efficiency and safety.
Ensuring atomic exchange and secure transfer of resources by structuring two transactions on the blockchain, each containing an unspent output that can only be unlocked when certain unlocking criteria are met, leveraging one-way functions such as hashing or modular arithmetic Generating a covert secret value only unlocks the transaction when the intended recipient holds the private key, adding privacy and security.
Achieving the security of atomic exchange of secret values in a trustless environment ensures that no user can have more control than other users, improves the security and efficiency of transactions, and provides additional privacy and versatility.
Smart Images

Figure CN112154626B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to computer-implemented security methods and cryptographic techniques. More specifically, the present invention relates to a method for atomic swap resource control. The present invention is particularly suitable for, but not limited to, use on one or more blockchains and associated protocols. Background Art
[0002] In this document, we use the term "blockchain" to include all forms of electronic, computer-based, distributed ledgers. These include consensus-based blockchain and transaction chain technologies, licensed and unlicensed ledgers, shared ledgers, and variants thereof. Although other blockchain implementations have been proposed and developed, the most widely known application of blockchain technology is the digital asset ledger. Although digital assets may be mentioned herein for convenience and illustrative purposes, it should be noted that the present invention is not limited to use with digital asset blockchains, and alternative blockchain implementations and protocols fall within the scope of the present invention. The term "user" may refer to human-based or processor-based resources in this article. In addition, the term "digital asset" used herein is intended to include all versions and variants of protocols or implementations derived from digital asset protocols. The term "digital asset" used herein does not involve cryptocurrency buying and selling activities.
[0003] A blockchain is a peer-to-peer electronic ledger implemented as a decentralized, distributed computer-based system consisting of blocks, which in turn consist of transactions. Each transaction is a data structure that encodes the transfer of control of a digital asset or resource between participants in the blockchain system and includes at least one input and at least one output. Each block contains a hash of the previous block so that blocks are linked together to create a permanent, unchangeable record of all transactions that have been written to the blockchain since its inception. Transactions contain small programs called scripts embedded in the inputs and outputs of the transaction, which specify how and who can access the output of the transaction. On the digital asset platform, these scripts are written using a stack-based scripting language.
[0004] In order for a transaction to be written to the blockchain, it must be “validated”. Network nodes perform work to ensure that each transaction is valid, and invalid transactions are rejected by the network. The software client installed on the node performs this validation work on the unspent transactions (UTXO) by executing their locking and unlocking scripts. If the execution of the locking and unlocking scripts evaluates to TRUE, then the transaction is valid and the transaction is written to the blockchain. Therefore, in order for a transaction to be written to the blockchain, it must be: i) validated by the first node that receives the transaction – if the transaction is validated, then that node relays it to other nodes in the network; ii) added to a new block constructed by the network nodes; iii) added to the public ledger of past transactions.
[0005] Although blockchain technology is widely known for its use in digital asset implementations, digital entrepreneurs have begun exploring new systems using both the cryptographic security systems that digital assets are based on and the data that can be stored on the blockchain. It would be very beneficial if blockchain could be used to automate tasks and processes that are not limited to the field of digital assets. Such a solution would be able to leverage the benefits of blockchain, such as permanent, tamper-proof recording of events, distributed processing, etc., while having more uses in its applications.
[0006] The concept of atomic swaps has been discussed previously in the digital asset community. An exchange between parties is "atomic" in the sense that either all participants receive the resource they expected (e.g., digital asset tokens or coins), or none of the participants receive the resource they expected. At the time of writing, Wikipedia describes atomic swaps as "a proposed feature in digital assets that allows one digital asset to be exchanged for another digital asset without the need for a trusted third party. In traditional digital assets, a trusted third party such as a digital asset exchange is necessary to conduct the exchange of digital assets to prevent one party from sending currency without receiving it in return. Atomic swap systems use hashed time-locked smart contracts whereby the parties must deliver the currency to be exchanged within a specified time or the transaction is canceled. This maintains atomicity because either the exchange is made or the currency is not" - https: / / en.wikipedia.org / wiki / Atomic_swap.
[0007] Atomic swaps therefore offer enhanced security in terms of transfers made over the blockchain, as removing the need for a trusted third party eliminates the risk of exploitation and malicious intervention – a number of security breaches or “hacks” have occurred in the case of digital asset exchanges such as Mount Gox.
[0008] However, the proposed atomic swap scheme involves using only one secret, and the swap is performed asynchronously. This creates the disadvantage that one transaction must be spent before the other can be spent. Summary of the invention
[0009] Therefore, it is desirable to provide a cryptographically enhanced resource exchange method that atomically exchanges resources or assets with the trustlessness and immutability provided by blockchain technology and enhances the security of transfers over blockchain-implemented networks.
[0010] Such an improved scheme has now been devised.
[0011] According to the present invention, there is provided a computer-implemented method of exchange, interchange or transfer. According to additional or alternative limitations, the present invention provides a secure method that controls when resources may or may not be transferred from a sender to a receiver across a network. Additionally or alternatively, the present invention provides a method and corresponding system that are arranged to perform an atomic exchange or transfer of resources via a blockchain. The method may include the following steps:
[0012] (i) communicating a first concealed secret value from a first user to a second user, and communicating a second concealed secret value from the second user to the first user; and
[0013] (ii) constructing a first blockchain transaction and a second blockchain transaction, each of which includes a first shielded secret value and a second shielded secret value, the transaction being arranged to be unlockable upon providing the first secret value and the second secret value to the respective blockchain transaction to transfer control of the respective first resource or the second resource,
[0014] The unlocking of the first blockchain transaction causes the first secret value to be revealed to the second user, and the unlocking of the second blockchain transaction causes the second secret value to be revealed to the first user.
[0015] The method can provide an atomic swap mechanism by including at least two transactions (Tx1 and Tx2), each transaction having at least one unspent output (UTXO) that can be unlocked only when the required criteria are provided to multiple puzzles or scripts associated with the corresponding output. In other words, the locking and unlocking criteria of the unspent output in the first transaction can be the same as and mirrored by the locking criteria of the unspent output in the transaction or another transaction.
[0016] Providing the required unlocking criteria for an unspent output in a first transaction may reveal or make accessible one or more secret values required to unlock the unspent output in that transaction or another transaction.
[0017] The unlocking script containing the secret value can be provided in the input of a subsequent transaction that spends the output in the first transaction or the second transaction. Once the unlocking script of the subsequent transaction is executed together with the locking script of the first transaction or the second transaction, the subsequent transaction can be verified and then published on the blockchain, which makes the one or more secret values provided in the input of the subsequent transaction accessible or readable from the blockchain.
[0018] The method provides a secure way to ensure atomic exchange of secret values in an untrusted environment where no user of the method has more control over the method than any other user.
[0019] A secret value is related to a corresponding concealed secret value in that the secret value cannot be determined from the concealed secret value, but the concealed secret value can be determined from the secret value. An example of such a relationship is that applying a one-way function (e.g., hashing or modular arithmetic) to a secret value provides a concealed secret value. Thus, according to one definition, a concealed (secret) value may be a value that can be derived or has been derived from an original (secret) value, but cannot be used to determine the original (secret) value. It may not be possible to reverse engineer the concealed value to provide the original value.
[0020] The phrase "unlocking a transaction" can include the meaning of unlocking or spending at least one unspent output (UTXO) provided in the transaction. This can be achieved by providing the required data / unlocking script necessary to satisfy the locking script associated with the unspent output.
[0021] At least one of the first transaction and the second transaction may be configured to be redeemable (spendable) only upon application or provision of the corresponding first private key and the second private key.
[0022] The advantage of this is that only the intended recipient (indicated by their private key) can unlock the transaction.
[0023] The method may also include the steps of calculating at least one of: (a) a first derived public key based at least in part on a first public key of a first user; and (b) a second derived public key based at least in part on a second public key of a second user, wherein the first derived public key is part of an encryption key pair with a first private key and the second derived public key is part of an encryption key pair with a second private key.
[0024] This enables assets or resources to be stored at a derived rather than publicly known address, providing additional privacy and security for users of the method. It should be noted that the terms "asset" and "resource" are used interchangeably in this article. The term "asset" should not be interpreted as having only a financial context or use. An asset can be, for example, a token that represents another entity on or off the blockchain.
[0025] The step of calculating at least one of: (a) a first derived public key based at least in part on a first public key of a first user; and (b) a second derived public key based at least in part on a second public key of a second user, may also include: a combination of a first hidden secret value and a second hidden secret value.
[0026] This offers the advantage of providing a recorded and indelible link between the atomic swaps and transactions conducted.
[0027] The combination of the first concealed secret value and the second concealed secret value may include at least one of a concatenation of the first concealed secret value and the second concealed secret value and a concatenation of at least one concealed secret value and a random or pseudo-random value.
[0028] This offers the advantage that the security of the transaction is further increased via the additional deterministic obfuscation.
[0029] The method may further include the steps of constructing at least one of: a third blockchain transaction configured to return control of the first resource to the first user in response to a first time period of non-redemption of the first transaction having passed; and a fourth blockchain transaction configured to return control of the second resource to the second user in response to a second time period of non-redemption of the second transaction having passed.
[0030] This enables at least one user of the method to return control of a respective resource to another user without them fully participating in the exchange, thereby increasing the versatility of the method.
[0031] At least one of the first obscured secret value and the second obscured secret value may include a combination of at least one of the first secret value and the second secret value and a shared secret value accessible to both the first user and the second user.
[0032] This provides the advantage of increasing the privacy and security provided by the method.
[0033] The shared secret value may be established as a public secret prior to step (i).
[0034] This offers the advantage of further increasing the safety of the method.
[0035] The method may further comprise the following steps:
[0036] (iii) generating a sequence of at least one concealed secret value starting from at least one of the first secret value and the second secret value;
[0037] (iv) redeeming at least one blockchain transaction to reveal at least one of the first secret value and the second secret value, thereby causing at least one obscured secret value of the sequence to be revealed.
[0038] This allows secure atomic swap chains to be performed with greater efficiency than simple repetition of the method, since less storage space is required to store the secrets. Additionally, fewer communication rounds are required. This saves time and improves security.
[0039] The step of performing at least step (ii) of the method may use at least one obscured secret value revealed in step (iv) of the method.
[0040] This offers the advantage of further increasing the efficiency of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] These and other aspects of the invention will become apparent and elucidated by reference to the embodiments described herein. Embodiments of the invention will now be described by way of example only and not by way of limitation with reference to the accompanying drawings, in which:
[0042] Figure 1 A flow chart illustrating the steps taken in implementing the method of the present invention is shown;
[0043] Figure 2 is a schematic diagram of an example system for determining a common secret between a first node and a second node, which system may be used in the secure transmission of highly sensitive information according to the present invention;
[0044] Figure 3 is a flow chart of a computer-implemented method for determining a common secret, which method may be used in accordance with the present invention for the secure transmission of highly sensitive information;
[0045] Figure 4 is a flow chart of a computer-implemented method for registering a first node and a second node; and
[0046] Figure 5 is another flow chart of a computer-implemented method for determining a common secret, which method may be used in accordance with the present invention for the secure transmission of highly sensitive information. DETAILED DESCRIPTION
[0047] Atomic transaction exchange on the blockchain means that for two transactions, one from the first user Alice to the second user Bob, and the other from Bob to Alice, either both transactions are completed or neither transaction is completed.
[0048] Reference Figure 1 , the present invention involves enabling both Alice and Bob to create secrets (denoted A0 and B0, respectively) 30. If Alice and Bob are trusted, they can exchange information including these secrets using a communication channel that is not part of the blockchain protocol. They can use the secure secret exchange described below under the subheading "Determining a Common Secret".
[0049] Assume one party cannot be trusted, and has not shared their secret. The present invention provides that the only way for that party to spend their funds is to reveal their secret on the blockchain, thereby making the secret public knowledge and available to other users. This is due to the configuration of the transactions used in the exchange. Therefore, the method does not require either party to trust the other.
[0050] In an embodiment of the present invention, there are two secrets: one secret generated by Alice and accessible to Alice, and another secret generated by Bob and accessible to Bob. These are communicated via an off-blockchain channel.
[0051] Single Atom Swap
[0052] make Indicates that it has the corresponding private key Alice's Elliptic Curve Digital Signature Algorithm (ECDSA) public key, and Indicates that it has a private key Bob's public key.
[0053] 1. At 30, Alice chose the secret that only she knew And Bob chose a secret that only he knew These secrets have nothing to do with Alice and Bob's public or private keys. Here, n is the order of the elliptic curve generator point G. The secret can be in the form of a general data structure that has been passed through the SHA256 (mod n) algorithm.
[0054] 2. Alice and Bob open a communication channel between them. This can be a secure communication channel created using the method described below under the subheading "Determining a Common Secret". They then hash their respective secrets (step 34) and share their public keys and the hash values of their respective secrets (step 36). The hash values of A0 and B0 are denoted H(A0) and H(B0), respectively, where a standard hash function such as SHA-256 can be used. The values H(A0) and H(B0) can also be shared publicly. Alice and Bob now both know that
[0055] H(A0), H(B0).
[0056] 3. At 38, Alice and Bob calculate the deterministic key
[0057] H(A0)|H(B0),
[0058] Where “|” represents the operation OP_CAT, or alternatively, a derived hash value, such as H(H(A0)|H(B0)).
[0059] 4. At 40, Alice and Bob now create the derived public key
[0060] Alice:
[0061] Bob: It has a corresponding private key
[0062] Alice:
[0063] Bob: Alice and Bob will use the derived public key To perform atomic swaps, they can, in principle, use their original public keys But the derived public key has the advantage of being tied to the atomic swap and can be easily computed by Alice and Bob but not by anyone else (unless H(A0) and H(B0) are made public).
[0064] If a deterministic pseudo-random representation value is also incorporated at 38 (e.g., as shown below), increased privacy can be achieved:
[0065] H(A0)|H(B0)|Z
[0066] Here, Z is a value that can be calculated by both parties, such as the Zeta function, which is pre-agreed based on a shared starting value.
[0067] 5. Alice and Bob construct the following locking script at 42. Here, the script is schematically described by an exemplary implementation in a digital asset script shown later.
[0068] and Solve H(A0) and Solve H(B0)
[0069] and Solve H(A0) and Solve H(B0)
[0070] process Is for a public / private key pair Instead, you can use This is a public / private key pair The procedure Solve H(A0) is a hash puzzle with solution A0, which means that the unlocking script must contain a valid value A0 that, when hashed, is equal to H(A0) provided in the locking script. The unlocking script is given by
[0071]
[0072]
[0073] Here, it can be seen that if Alice or Bob unlock their funds, they must expose the values A0 and B0 on the blockchain.
[0074] 6. At 42, Alice creates a lock script LockingScript (B) to tx1, and Bob uses the locking script LockingScript(A) to create At this stage, since neither Alice nor Bob knows A0 and B0, neither party can and These transactions are sent to the network and subsequently appear on the blockchain.
[0075] 7. At 46C, Alice sends Bob her secret A0 and Bob sends Alice his secret B0. This is performed using the communication channel between Alice and Bob established above. Alice and Bob can check that these values are correct by confirming that their hash values are equal to H(A0) and H(B0).
[0076] 8. Assuming Alice and Bob are both honest and share their correct secrets, both parties know both secrets (step 48C) and can both spend the and The funds in (step 50C) are exchanged to complete the atomic swap.
[0077] 9. For example, suppose Bob does not send his correct secret B0 to Alice. That is, suppose only Alice sends her secret, and step 46B occurs instead of 46C. Due to the form of the locking script LockingScript(B), in order for Bob to spend the locked funds He must publicly reveal his secret B0 in the unlocking script. Therefore, whenever Bob spends his funds, Alice learns Bob's secret (step 48B) and is therefore able to spend her funds in This ensures that either Alice and Bob can both spend their funds, or neither can spend their funds.
[0078] The following are example locking and unlocking scripts for Alice in step 4 above that are compatible with the Digital Asset blockchain.
[0079] Alice's locking script:
[0080] OP_DUP OP_HASH160 <Hash160 >OP_EQUALVERI FY OP_CHECKS IG OP_HASH256<Hash256 A0> OP_EQUALVERIFY OP_HASH256<Hash256 B0> OP_EQUALVERIFY
[0081] Alice's unlocking script:
[0082] <b0> <a0><Sig >
[0083] Note that transactions to both Pay to Public Key Hash (P2PKH) addresses and Pay to Script Hash (P2SH) addresses allow for locking and unlocking scripts of the above type. For P2SH addresses, the locking script is presented as the hash of the redeem script containing the same information.
[0084] The above method is described with reference to a blockchain that uses a public / private key cryptographic system similar to ECSDA used on digital asset blockchains. However, the method can be generalized to general cryptographic mechanisms that require a general form of the secret exposed in the unlocking script, which can be an arbitrary data structure. All that is needed is a locking script, a transaction, and a blockchain, which is a secure, verifiable communication channel.
[0085] Time-locked refund transactions
[0086] If Bob refuses to give Alice the correct secret B0 and does not unlock the secret stored at address If the funds in Bob's account are In addition, Alice can never get back the funds she sent to Bob that are stored in of funds.
[0087] This problem can be solved by introducing a new transaction from Bob to Alice that is configured to send the funds back after a certain amount of time if they have not been spent. This also requires slight modifications to LockingScript(A) and LockingScript(B), which are described below.
[0088] This new transaction uses a time-dependent operation in the locking script that allows the block to accept the transaction only after a certain predetermined time has passed. For example, in a digital asset script, this could be an operation "Check Sequence Verification" (CSV) for a relative amount of time since a specified value or "Check Lock Time Verification" (CLTV) for a fixed time value.
[0089] The locking script in step 4 above is modified to include the option to spend if both Alice and Bob agree to sign, as follows:
[0090]
[0091]
[0092] At 44, two new transactions are then created after step 4 and before step 5 in the above method. Alice creates To Bob's transaction tx4, which returns all of Bob's funds. This transaction is time-locked, so that it can only be accepted in a block after a certain amount of time (for example, 24 hours). Bob creates a Similar transaction tx3 to Alice. Transactions tx3 and tx4 have corresponding locking scripts
[0093] with CSV(24hours)
[0094] with CSV(24hours)
[0095] Alice signs tx4 and sends it to Bob, who signs it and sends it to the network. Similarly, Bob signs tx3 and sends it to Alice, who signs it and sends it to the network.
[0096] At this stage, if either party does not comply, the process is abandoned and the funds are not transferred. If both parties comply, step 5 of the above method is performed (42). Now, if neither party spends the funds exchanged in the atomic swap (46A), the funds are returned to the original owner after 24 hours (48A, 50A).
[0097] Note that a CSV relative time of 24 hours is used as an example here, but it is possible to use any relative time in the future or any specific time in the future (e.g. using the CLTV operator).
[0098] An example of a locking script for tx3 that returns funds to Alice after 24 hours using the digital asset blockchain is
[0099] "24h" OP_CHECKSEQUENCEVERIFY OP_DROP OP_DUP OP_HASH160 <Hash160 >OP_EQUALVERIFY OP_CHECKS IG
[0100] The corresponding unlocking script is <Sig > Given
[0101] Masking of secret values
[0102] Another alternative embodiment includes a masking step 32, such that the values A0 and B0 are known only to Alice and Bob, and are never made public.
[0103] Initially, Alice and Bob agree on a shared secret S that only they know. c This can be accomplished by securely exchanging secrets using the method described below under the heading "Determining a Common Secret".
[0104] Alice and Bob then define the new secret
[0105] A′0=A0+S c
[0106] B′0=B0+S c .
[0107] They then proceed as outlined above using the masked secrets A′0, B′0 instead of the original secrets. During the atomic swap, only the masked secrets are revealed to the public on the blockchain.
[0108] This is useful if the secret values A0 and B0 will also be used in other contexts (eg, in other embodiments described below).
[0109] Another alternative embodiment enables Alice and Bob to perform a series of n atomic swaps. Each party starts with a random secret and creates a sequence of hash values of that secret, which is called an access chain. When an atomic swap is performed, it will expose the hash value of the next secret to be used in the next atomic swap. This process is repeated iteratively, up to a maximum of n times.
[0110] This method is efficient over a series of separate exchanges because Alice and Bob only need to store one secret at a time, requiring less storage space. They can compute the next secret from the hash of the previous secret. Since they don't need to communicate the hash of their secret every time, they need fewer rounds of communication with each other.
[0111] The method is as follows:
[0112] Alice and Bob agree to repeat the exchange a number of times n. They each create a random value A n and B n . Alice computes the following access chain:
[0113]
[0114]
[0115] Bob from B n Start computing equivalent chains. These chains correspond to secret values that will be used in a series of exchanges. The number of possible exchanges will be in the order {0, 1, ..., n}. That is, the parties can use these values for exchanges between 0 and n transactions before needing to reinitialize a new chain.
[0116] The method of achieving the exchange is outlined below. It should be understood that Bob follows an equivalent process.
[0117] 1. Alice starts from her chain A0, A1, ..., A n , Bob's public key and the hash of Bob's secret, H(B0). As before, Bob can share H(B0) publicly.
[0118] 2. Alice computes the derived public key
[0119] Alice:
[0120] Bob: Then calculate the locking script
[0121] and Solve H(A0)Solve H(B0)
[0122] and Solve H(A0)Solve H(B0).
[0123] Note that the time-dependent refunds described in the earlier embodiments can be included in the above locking script without any substantial changes to the logic.
[0124] 3. Alice and Bob perform the first swap. As described above, this involves swapping A0 and B0 between Alice and Bob. This means that after the swap, Alice now knows that H(B1)=B0.
[0125] 4. Alice repeats step 2 of the method, but uses the hash value H(B1) of Bob’s second secret in the chain. Specifically, she computes the derived public key
[0126] Alice:
[0127] Bob: and locking scripts
[0128] SolveH(A1)SolveH(B1)
[0129] and Solve H(A1) Solve H(B1).
[0130] 5. Once the second exchange has been completed, Alice knows that H(B2) = B1. She repeats step 2 again using the hash value H(B2) of Bob's third secret.
[0131] 6. Repeat the process iteratively until either swap is not completed or the maximum number of n swaps has been reached.
[0132] As described in the earlier embodiments, the pseudo-random value Z can be i Introduced into operation H(A i )|H(B i )|Z i to incorporate further security. In this case, the function should be implemented by using a hash function Z i-1 =H(Z i ) transform each iteration.
[0133] The atomic swap method outlined above is not limited to digital asset blockchains. An important component in the atomic swap method described above is that when one party spends their funds in step 7, they reveal their secret on the blockchain. This means that the method described above can be used to perform atomic swaps on any blockchain that allows locking and unlocking scripts of the form given in step 4.
[0134] In addition, the atomic swap method can be used to exchange digital assets. For example, it can be used for Alice to send one digital asset to Bob on one digital asset blockchain, and for Bob to send another digital asset to Alice on another digital asset blockchain.
[0135] Send and Receive
[0136] Alice BCH Eth
[0137] Bob Eth BCH
[0138] The only restriction on atomic swaps between two different blockchains is that the two blockchains allow the same hash function to be used in the hash puzzle of the locking script (or equivalent). Here's why: suppose Alice's blockchain only allows the SHA-256 hash algorithm, and Bob's blockchain only allows the SHA-384 algorithm. Bob sends Alice the SHA-256 hash of a secret, but in Bob's locking script, he sets up a SHA-384 hash puzzle for a different secret. When Bob spends his funds, the unlocking script will reveal the useless secret to Alice, who doesn't know the secret until Bob has already spent his funds.
[0139] According to another embodiment, a method is provided that enables both parties to create a public key for which only the corresponding private key is accessible to both parties or to neither party. The method utilizes the atomic exchange method described above to exchange two secret values between the two parties. These secret values are used to calculate the private key.
[0140] One application of this method is that it allows two parties to exchange multiple types of digital assets controlled by a single public / private key pair.
[0141] This method enables both Alice and Bob to create a public key for which the private key is not known until an atomic swap occurs. The atomic swap ensures that either Alice and Bob can both compute their corresponding private keys, or neither can.
[0142] The method is described below using an ECSDA private and public key pair. However, the method is not strictly dependent on the ECDSA protocol and can be easily adapted to any public / private key based cryptographic system for which a new secure public key can be deterministically created from an existing private key and a publicly known deterministic key.
[0143] The method is anonymous in the sense that partial information about the new private key is stored on one or more blockchains that are open ledgers. However, only the parties involved in the process can decode this information, so security is never compromised.
[0144] 1. Alice uses private key S A and the corresponding public key P A =S A G and a secret S2 known only to her. Bob starts with the private key S B and the corresponding public key P B =S B · G and the secret S1 that only he knows begins.
[0145] 2. Alice sends P2 = S2 G to Bob, and Bob sends P1 = S1 G to Alice. Since the secrets are multiplied by the elliptic curve base point, they are not exposed in the process, and P2 and P1 may be publicly known.
[0146] 3. Alice creates a new public key P AE =P A +P1, which can be used as an address to receive digital asset transactions, or similar addresses for alternative coins. Bob creates a new public key P BE =P B +P2.
[0147] According to the characteristics of elliptic curve cryptography, P AE The corresponding private key is S Ae =S A +S1, which means P AE =S AE ·G.P BE The corresponding private key is S BE =S B +S2.
[0148] At this stage, Alice does not know S1 and therefore does not know P AE Although Bob knows S1, he does not know S A , so we don’t know P AE By the same logic, neither Alice nor Bob knows the private key of P BE The private key of
[0149] 4. Alice sends Bob’s address P BE To make a transaction, Bob pays Alice’s address P AE These transactions can be the exchange of any digital asset using a public / private key system, or they can transfer tokens or even physical assets to a public key P AE and P BE It can also be a combination of the above.
[0150] 5. As described above, Alice and Bob now initialize the atomic swap using any blockchain using S2 and S1 as their respective secrets.
[0151] 6. Alice and Bob exchange secrets. This means:
[0152] Send and Receive
[0153] Alice S2 S1
[0154] Bob S1 S2
[0155] Alice and Bob can check that they have received the correct secret using the formulas P1 = S1·G and P2 = S2·G. If they do not exchange the correct values, then they will not be able to spend the output of the atomic swap.
[0156] 7. Now that Alice has S1, she can calculate AE Since no one except Alice knows her private key S A , so even if S1 is publicly known, no one else can calculate the difference with P AE Similarly, now that Bob has the secret S2, he can compute the corresponding private key to P BE and no one else can do this except Bob.
[0157] If neither Alice nor Bob spends the atomic swap transaction output, Alice's secret S2 will not be exposed to Bob, and Bob's secret S1 will not be exposed to Alice. In this case, neither Alice nor Bob can calculate the same AE and P BE The corresponding private key.
[0158] The blockchain uses a public / private key cryptographic system to sign transactions and prove ownership of transaction outputs. This makes it possible to use the method of the above embodiment to simultaneously send several digital assets to P AE and P BE Send a transaction. For example, in step 3 above, create P AE and P BE after:
[0159] Alice transfers funds from BCH and ETH to P BE .
[0160] Bob transfers funds from BCH and DASH to P AE .
[0161] Once the atomic swap has been performed, P is unlocked. BE and P AE These unlock the funds in the public key of one digital asset held by Alice and the public key of another digital asset held by Bob. Therefore, the following transaction from Alice to Bob can be completed securely
[0162] Send and Receive
[0163] Alice BCH, Eth BCH, DASH
[0164] Bob BCH, DASH BCH, Eth
[0165] Note that these blockchains do not have to allow the same hash functions in their locking scripts.
[0166] The above provides a general method for two parties to unlock a public key through a secret exchange using an atomic swap. This has applications beyond digital asset exchange and is relevant to any system that uses a public / private key encryption scheme similar to ECDSA. For example, other use cases include, but are not limited to:
[0167] 1. Provide access to the distributed hash table (DHT);
[0168] 2. Encrypted calculation;
[0169] 3. Private email clients;
[0170] 4. Obtain logistics data and exchange;
[0171] 5. Exchange of goods and services;
[0172] 6. Private exchange of value; and
[0173] 7. Key hierarchy.
[0174] Identify public secrets
[0175] Where appropriate, security may be enhanced by using secure methods of exchanging information between the two parties using, for example, a public / private key system as described below.
[0176] A common secret (CS) can be established between two parties and then used to generate a secure encryption key for transmitting one or more shares. A,B,1,2 ) (e.g., secret values, keys, or shares thereof) can be securely exchanged.
[0177] In the following, for convenience, Alice and Bob will be referred to as the first node (C) and the second node (S). The goal is to generate a common secret (CS) that is known to both nodes, but is not sent over the communication channel, thereby eliminating the possibility of unauthorized discovery.
[0178] The secure transmission technique involves generating the CS in an independent manner at each end of the transmission, so that although both nodes know the CS, the CS does not have to be transmitted over a potentially insecure communication channel. Once the CS has been established at both ends, it can be used to generate a secure encryption key, which both nodes can then use to communicate.
[0179] Figure 2 A system 1 is shown, which includes a first node 3, which communicates with a second node 7 via a communication network 5. The first node 3 has an associated first processing device 23, and the second node 5 has an associated second processing device 27. The first node 3 and the second node 7 may include electronic devices, such as computers, phones, tablet computers, mobile communication devices, computer servers, etc. In one example, the first node 3 may be a client (user) device and the second node 7 may be a server. The server may be a server of a digital wallet provider.
[0180] The first node 3 and the first node master private key (V 1C ) and the first node master public key (P 1C ). The second node (7) is associated with a second node master private key (V 1S ) and the second node master public key (P 1S ) is associated with a second asymmetric cryptographic pair. In other words, the first node and the second node both have a corresponding public key-private key pair.
[0181] The first asymmetric cryptographic pair and the second asymmetric cryptographic pair of the respective first node 3 and second node 7 may be generated during a registration process such as registration of a wallet. The public key of each node may be publicly shared, for example, via the communication network 5.
[0182] In order to determine a common secret (CS) at both the first node 3 and the second node 7 , the nodes 3 , 7 perform the steps of the respective methods 300 , 400 without communicating a private key over the communication network 5 .
[0183] The method 300 executed by the first node 3 includes: based on at least the first node master private key (V 1C ) and the generator value (GV) to determine 330 the first node second private key (V 2C ). The generator value may be based on a message (M) shared between the first node and the second node, which may include sharing the message over the communication network 5 as described in more detail below. The method 300 also includes generating a generator value based on at least the second node master public key (P 1S ) and the generator value (GV) to determine 370 the second node second public key (P 2S ). The method 300 includes: based on the first node second private key (V 2C ) and the second node's second public key (P 2S )Determine 380 public secrets (CS).
[0184] The same public secret (CS) can also be determined at the second node 7 by the method 400. The method 400 comprises: determining the public secret (CS) based on the first node master public key (P 1C ) and the generator value (GV) to determine 430 the first node second public key (P 2C ). The method 400 also includes a method based on the second node master private key (V 1S ) and the generator value (GV) to determine 470 the second node second private key (V 2S ). The method 400 includes: based on the second node second private key (V 2S ) and the first node's second public key (P 2C ) determines 480 the public secret (CS).
[0185] The communication network 5 may include a local area network, a wide area network, a cellular network, a radio communication network, the Internet, etc. These networks, which may transmit data via a communication medium such as wires, optical fibers, or wirelessly, may be susceptible to eavesdropping, for example by an eavesdropper 11. The methods 300, 400 may allow both the first node 3 and the second node 7 to independently determine a common secret without transmitting the common secret over the communication network 5.
[0186] Thus, one advantage is that a common secret (CS) can be securely and independently determined by each node without having to transmit a private key over a potentially insecure communication network 5. In turn, the common secret can be used as (or as a basis for) a secret key for encrypted communications between the first node 3 and the second node 7 over the communication network 5.
[0187] Methods 300 and 400 may include additional steps. Method 300 may include, at the first node 3, based on the message (M) and the first node second private key (V 2C ) to generate a signed message (SM1). The method 300 further comprises sending 360 the first signed message (SM1) to the second node 7 via the communication network. In turn, the second node 7 may perform the step of receiving 440 the first signed message (SM1). The method 400 further comprises the step of: using the first node second public key (P 2C ) to verify 450 the first signed message (SM2), and authenticate 460 the first node 3 based on the result of verifying the first signed message (SM1). Advantageously, this allows the second node 7 to authenticate that the claimed first node (where the first signed message was generated) is the first node 3. This is based on the assumption that only the first node 3 has access to the first node master private key (V 1C ), so only the first node 3 can determine the first node second private key (V 2C ) to generate a first signed message (SM1). It should be understood that similarly, a second signed message (SM2) can be generated at the second node 7 and sent to the first node 3 so that the first node 3 can authenticate the second node 7, for example in a peer-to-peer scenario.
[0188] Sharing the message (M) between the first node and the second node can be achieved in various ways. In one example, the message can be generated at the first node 3 and then sent to the second node 7 via the communication network 5. Alternatively, the message can be generated at the second node 7 and then sent to the second node 7 via the communication network 5. In another example, the message can be generated at the third node 9, and the message is sent to the first node 3 and the second node 7. In another alternative, the user can input the message to be received by the first node 3 and the second node 7 through the user interface 15. In another example, the message (M) can be retrieved from the data storage 19 and sent to the first node 3 and the second node 7. In some examples, the message (M) can be public and can therefore be transmitted over an unsecured network 5.
[0189] In other examples, one or more messages (M) may be stored in the data store 13, 17, 19, wherein the message may be associated with a certain entity, such as a digital wallet or a communication session established between the first node 3 and the second node 7. Thus, the message (M) may be retrieved and used to recreate the common secret (CS) associated with the wallet or session at the respective first node 3 and the second node 7.
[0190] Advantageously, a record can be kept that allows the common secret (CS) to be reconstructed, without the record itself having to be stored privately or transmitted securely. This may be advantageous if a large number of transactions are performed at the first node 3 and the second node 7 and it is impractical to store all messages (M) at the nodes themselves.
[0191] Will refer to Figure 4 An example of registration methods 100, 200 is described, wherein method 100 is performed by a first node 3 and method 200 is performed by a second node 7. This includes establishing a first asymmetric cryptographic pair and a second asymmetric cryptographic pair of the first node 3 and the second node 7, respectively.
[0192] An asymmetric cryptographic pair includes an associated private key and public key, such as those used in public key cryptography. In this example, the asymmetric cryptographic pair is generated using properties of elliptic curve cryptography (ECC) and elliptic curve operations.
[0193] The standards for ECC may include known standards such as the Efficient Cryptography Group ( www.sceg.org ) standards described in . Elliptic curve cryptography is also described in the following documents: US 5,600,725, US 5,761,305, US 5889,865, US 5,896,455, US 5,933,504, US 6,122,736, US 6,141,420, US 6,618,483, US 6,704,870, US 6,785,813, US 6,078,667, US 6,792,530.
[0194] In methods 100, 200, this includes the first node and the second node reaching an agreement 110, 210 on a public ECC system and using a base point (G) (note: the base point can be called a public generator, but the term "base point" is used to avoid confusion with the generator value GV). In one example, the public ECC system can be based on secp256K1, which is the ECC system used by the digital asset. The base point (G) can be selected, randomly generated or assigned.
[0195] Now turn to the first node 3, method 100 includes selecting 110 a public ECC system and a base point (G). This may include receiving a public ECC system and a base point from the second node 7 or the third node 9. Alternatively, a user interface 15 may be associated with the first node 3, whereby a user may selectively provide a public ECC system and / or a base point (G). In yet another alternative, one or both of the public ECC system and / or the base point (G) may be randomly selected by the first node 3. The first node 3 may send a notification indicating the use of a public ECC system and a base point (G) to the second node 7 via the communication network 5. In turn, the second node 7 may select 210 by sending a notification indicating the use of a public ECC system and a confirmation of the base point (G).
[0196] The method 100 further comprises the first node 3 generating 120 a first asymmetric cryptographic pair, the first asymmetric cryptographic pair comprising a first node master private key (V 1C ) and the first node master public key (P 1C This includes generating a first master private key (V) based at least in part on a random integer within an allowable range specified in the public ECC system. 1C This also includes the following formula based on the first node master private key (P 1C ) and the base point (G) to determine the first node master public key (P 1C ):
[0197] P 1C =V 1C x G (Equation 1)
[0198] Therefore, the first asymmetric cryptographic pair includes:
[0199] V 1C : The first node master private key that is kept secret by the first node.
[0200] P 1C : Publicly known first node master public key.
[0201] The first node 3 can use the first node master private key (V 1C ) and the first node master public key (P 1C ) is stored in the first data storage 13 associated with the first node 3. For security reasons, the first node master private key (V 1C ) may be stored in a secure portion of the first data storage 13 to ensure that the key remains private.
[0202] The method 100 further comprises sending 130 the first node master public key (P 1C ). The second node 7 receives 220 the first node master public key (P 1C ), the master public key of the first node may be stored 230 in the second data storage 17 associated with the second node 7 (P1C .
[0203] Similar to the first node 3, the method 200 of the second node 7 includes generating 240 a second asymmetric cryptographic pair, the second asymmetric cryptographic pair including a second node master private key (V 1S ) and the second node master public key (P 1S ). Second node master private key (V 1S ) is also a random integer within the permissible range. Conversely, the second node master public key (P 1S ) is determined by the following formula:
[0204] P 1S =V 1S x G (Equation 2)
[0205] Therefore, the second asymmetric cryptographic pair includes:
[0206] V 1S : The second node master private key that the second node keeps secret.
[0207] P 1S : Publicly known master public key of the second node.
[0208] The second node 7 may store the second asymmetric cryptographic pair in the second data storage 17. The method 200 also includes storing the second node master public key (P 1S ) sends 250 to the first node 3. In turn, the first node 3 may receive 140 and store 150 the second node master public key (P 1S ).
[0209] It will be appreciated that in some alternatives, the corresponding public master key may be received and stored at a third data store 19 associated with a third node 9 (e.g., a trusted third party). This may include a third party acting as a public directory, such as a certification authority. Thus, in some examples, the second node 7 may request and receive the first node master public key (P) only when a public secret (CS) needs to be determined. 1C ),vice versa.
[0210] The registration step may only need to occur once, as, for example, an initial setup of a digital wallet.
[0211] Now refer to Figure 5 An example of determining a common secret (CS) is described. The common secret (CS) may be used for a specific session, time, transaction, or other purpose between the first node 3 and the second node 7, so using the same common secret (CS) may not be desirable or safe. Therefore, the common secret (CS) may be changed between different sessions, times, transactions, etc.
[0212] The following content is provided to illustrate the above-mentioned secure transmission technology.
[0213] In this example, the method 300 performed by the first node 3 includes generating 310 a message (M). The message (M) may be random, pseudo-random, or user-defined. In one example, the message (M) is based on Unix time and a random number (and an arbitrary value). For example, the message (M) may be provided as:
[0214] Message (M) = Unix time + random number (Equation 3)
[0215] In some examples, the message (M) is arbitrary. However, it should be understood that the message (M) can have a selected value (e.g., Unix time, etc.) that may be useful in certain applications.
[0216] The method 300 comprises sending 315 a message (M) to the second node 7 via the communication network 3. Since the message (M) does not include information about the private key, the message (M) may be sent via an insecure network.
[0217] The method 300 also includes the step of determining 320 a generator value (GV) based on the message (M). In this example, this includes determining a cryptographic hash of the message. Examples of cryptographic hash algorithms include SHA-256, which is used to create a 256-bit generator value (GV). That is:
[0218] GV = SHA-256(M) (Equation 4)
[0219] It should be understood that other hash algorithms may be used. This may include other algorithms in the secure hash algorithm (SHA) family. Some specific examples include instances in the SHA-3 subset, including SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256. Other hash algorithms may include algorithms in the RACE Integrity Primitive Evaluation Message Digest (RIPEMD) family. Specific examples may include RIPEMD-160. Other hash functions may include families based on the Zémor-Tillich hash function and hash functions based on knapsacks.
[0220] Then the method 300 includes: 1C ) and the generator value (GV) to determine 330 the first node second private key (V 2C ) step 330. This can be based on the first node master private key (V 1C ) and the generator value (GV):
[0221] V 2C =V 1C +GV (Equation 5)
[0222] Therefore, the first node second private key (V 2C ) is not a random value, but is deterministically derived from the first node master private key. The corresponding public key in the password pair (i.e., the first node second public key (P 2C )) has the following relationship:
[0223] P 2C =V 2C x G (Equation 6)
[0224] Substituting V from Equation 5 2C Substituting into Equation 6 provides:
[0225] P 2C =(V 1C +GV)x G (Equation 7)
[0226] The "+" operator represents elliptic curve point addition. Note that elliptic curve cryptographic algebra is distributed, and Equation 7 can be expressed as:
[0227] P 2C =V 1C x G+GV x G (Equation 8)
[0228] Finally, Equation 1 can be substituted into Equation 7 to provide
[0229] P 2C =P 1C +GV x G (Equation 9.1)
[0230] P 2C =P 1C +SHA-256(M)x G (Equation 9.2)
[0231] Therefore, given the first node master public key (P 1C ) and the knowledge of the message (M), the corresponding first node second public key (P 2C ) may be derivable. The second node 7 may have such knowledge to independently determine the first node second public key (P 2C ), as will be discussed in more detail below with respect to method 400.
[0232] The method 300 also includes determining the first node second private key (V 2C ) to generate 350 a first signed message (SM1). Generating the signed message includes applying a digital signature algorithm to digitally sign the message (M). In one example, this includes signing the first node's second private key (V 2C ) is applied to the message to obtain the first signed message (SM1).
[0233] Examples of ECDSA include ECDSA based on an ECC system with secp256k1, secp256r1, secp384r1, se3cp521r1.
[0234] The corresponding first node second public key (P 2C ) verifies the first signed message (SM1). The second node 7 can use this verification of the first signed message (SM1) to authenticate the first node 3, which will be discussed in method 400 below.
[0235] Then, the first node 3 may determine 370 the second node second public key (P 2S As mentioned above, the second node second public key (P 2S ) can be based at least on the second node master public key (P 1S ) and the generator value (GV). In this example, since the public key is determined 370' as a private key by the base point (G) and the elliptic curve point multiplication, the second node second public key (P) can be expressed in a manner similar to Equation 6. 2S ),as follows:
[0236] P 2S =V 2S x G (Equation 10.1)
[0237] P 2S =P 1S +GV x G (Equation 10.2)
[0238] The mathematical proof of equation 10.2 is consistent with the above derivation of the first node second public key (P 2C It should be understood that the first node 3 can determine 370 the second node second public key independently of the second node 7.
[0239] Then, the first node 3 can determine the first node second private key (V 2C ) and the determined second node second public key (P 2S ) to determine 380 a public secret (CS). The public secret (CS) may be determined by the first node 3 using the following formula:
[0240] S=V 2C x P 2S (Equation 11)
[0241] The method 400 executed at the second node 7
[0242] The corresponding method 400 performed at the second node 7 will now be described. It will be appreciated that some of these steps are similar to the steps performed by the first node 3 above.
[0243] The method 400 includes receiving 410 a message (M) from a first node 3 via a communication network 5. This may include the message (M) sent by the first node 3 at step 315. The second node 7 then determines 420 a generator value (GV) based on the message (M). The step of the second node 7 determining 420 a generator value (GV) is similar to the step 320 performed by the first node described above. In this example, the second node 7 performs this determining step 420 independently of the first node 3.
[0244] The next step includes based on the first node master public key (P 1C ) and the generator value (GV) to determine 430 the first node second public key (P 2C In this example, since the public key is determined 430′ as a private key by the base point (G) and the elliptic curve point multiplication, the first node second public key (P) can be expressed in a manner similar to Equation 9. 2c ),as follows:
[0245] P 2C =V 2C x G (Equation 12.1)
[0246] P 2C =P 1C +GV x G (Equation 12.2)
[0247] The mathematical proof of equations 12.1 and 12.2 is the same as that discussed above for equations 10.1 and 10.2.
[0248] The method 400 may include steps performed by the second node 7 for authenticating that the claimed first node 3 is the first node 3. As previously discussed, this includes receiving 440 a first signed message (SM1) from the first node 3. The second node 7 may then authenticate the first node 3 using the first node second public key (P 2C ) to verify 450 the signature on the first signed message (SM1), the first node second public key (P 2C ) is determined at step 430.
[0249] Verification of digital signatures can be accomplished according to the Elliptic Curve Digital Signature Algorithm (ECDSA) as described above. Importantly, since V 2C and P 2C A password pair is formed, so the second private key of the first node (V 2C ) signed by the first signed message (SM1) should only be signed by the corresponding first node second public key (P 2C ) is correctly verified. Since the first node master private key (V 1C ) and the first node master public key (P 1C ), thus, verifying the first signed message (SM1) can be used as a basis for verifying that the claimed first node that sent the first signed message (SM1) during registration is the same first node 3. Therefore, the second node 7 can also perform a step of authenticating (460) the first node 3 based on the result of verifying (450) the first signed message.
[0250] The above authentication may be applicable to the following scenarios: one of the two nodes is a trusted node, and only one node needs to be authenticated. For example, the first node 3 may be a client, and the second node 7 may be a server trusted by the client, such as a wallet provider. Therefore, the server (second node 7) may need to authenticate the credentials of the client (first node 3) to allow the client to access the server system. The server may not have to authenticate the server's credentials to the client. However, in some scenarios, such as in a peer-to-peer scenario, it may be desirable for both nodes to authenticate each other.
[0251] The method 400 may further include the second node 7 based on the second node master private key (V 1S ) and the generator value (GV) to determine 470 the second node second private key (V 2S ). Similar to step 330 performed by the first node 3, the second node second private key (V 2S ) can be calculated based on the second node master private key (V 1S ) and the generator value (GV):
[0252] V 2S =V 1S +GV (Equation 13.1)
[0253] V 2S =V 1S +SHA-256(M) (Equation 13.2)
[0254] Then, the second node 7 can be independent of the first node 3, based on the following formula, based on the second node second private key (V 2S ) and the first node's second public key (P 2C ) Determine 480 Public Secret (CS):
[0255] S=V 2S x P 2C (Equation 14)
[0256] The common secret (CS) determined by the first node 3 is the same as the common secret (CS) determined at the second node 7. A mathematical proof that Equation 11 and Equation 14 provide the same common secret (CS) will now be described.
[0257] Turning to the common secret (CS) determined by the first node 3, equation 10.1 can be substituted into equation 11 as follows:
[0258] S=V 2C x P 2S (Equation 11)
[0259] S=V 2C x(V 2S x G))
[0260] S=(V 2C x V 2S ) x G (Equation 15)
[0261] Turning to the common secret (CS) determined by the second node 7, equation 12.1 can be substituted into equation 14 as follows:
[0262] S=V 2S x P 2C (Equation 14)
[0263] S=V 2S x(V 2C x G)
[0264] S=(V 2S x V 2C ) x G (Equation 16)
[0265] Since ECC algebra is commutative, Equation 15 and Equation 16 are equivalent because:
[0266] S=(V 2C x V 2S )x G=(V 2S x V 2C ) x G (Equation 17)
[0267] The public secret (CS) can now be used as a secret key, or as the basis for a secret key in a symmetric key algorithm, for secure communication between the first node 3 and the second node 7. The communication can be used to convey a portion of a private key, a representation or identifier of a private key, or a mnemonic of a private key. Thus, once the present invention has been used, for example, during the establishment of a digital wallet or other controlled resource, secure communication can thereafter be performed between the parties.
[0268] The common secret (CS) can be in the form of an elliptic curve point (x S ,y S ). It can be converted to a standard key format using publicly known standard operations agreed upon by nodes 3 and 7. For example, x S The value can be a 256-bit integer, which can be used as an AES 256 The encrypted key can also be converted to a 160-bit integer using RIPEMD160 for any application that requires a key of this length.
[0269] The public secret (CS) may be determined as needed. Importantly, the first node 3 does not need to store the public secret (CS) because the public secret can be re-determined based on the message (M). In some examples, the message (M) used may be stored in a data store 13, 17, 19 (or other data store) without the same level of security required for the master private key. In some examples, the message (M) may be publicly available.
[0270] However, according to certain applications, the public secret (CS) may be stored in the first data storage (X) associated with the first node, as long as the public secret (CS) is maintained with the first node master private key (V 1C ) is just as safe.
[0271] It should be noted that the above embodiments illustrate rather than limit the present invention, and that 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. In the claims, any reference numerals in parentheses shall not be interpreted as limiting the claims. The words "comprises" and "comprising" etc. do not exclude the presence of elements or steps other than those listed in any claim or in the entire specification. In this specification, "comprising" means "comprising or consisting of...". The singular form of an element does not exclude the plural form of such elements, and vice versa. The present invention may be implemented by hardware comprising several different elements and by a suitably programmed computer. In a device claim listing several devices, several of these devices may be implemented by one and the same hardware. The fact that certain means are recorded in mutually different dependent claims does not mean that a combination of these means cannot be used advantageously. < / b0>
Claims
1. A computer-implemented exchange method, the method comprising the following steps: (i) communicating (36) a first obscured secret value from a first user to a second user, and communicating a second obscured secret value from the second user to the first user; as well as (ii) constructing (42) a first blockchain transaction and a second blockchain transaction, each of which includes the first blind secret value and the second blind secret value, the first blockchain transaction and the second blockchain transaction being configured to be unlockable when the first secret value and the second secret value are provided to the corresponding blockchain transaction to transfer control of the corresponding first resource or the second resource, The unlocking of the first blockchain transaction causes the first secret value to be revealed to the second user, and the unlocking (48B) of the second blockchain transaction causes the second secret value to be revealed to the first user.
2. The method according to claim 1, wherein: At least one of the first blockchain transaction and the second blockchain transaction is configured to be redeemable only upon application of the corresponding first private key and the second private key.
3. The method of claim 2, further comprising the step of calculating (40) at least one of: (a) a first derived public key based at least in part on a first public key of the first user; and (b) a second derived public key based at least in part on a second public key of the second user, wherein The first derived public key is part of an encryption key pair with a first private key, and the second derived public key is part of an encryption key pair with a second private key.
4. The method according to claim 3, wherein: The step of calculating at least one of (a) a first derived public key based at least in part on a first public key of a first user and (b) a second derived public key based at least in part on a second public key of a second user also includes: a combination of a first obscured secret value and a second obscured secret value (38).
5. The method according to claim 4, wherein: The combination of the first obscured secret value and the second obscured secret value comprises at least one of a concatenation of the first obscured secret value and the second obscured secret value, and a concatenation of at least one obscured secret value and a random or pseudo-random value.
6. The method according to any one of claims 1 to 5, further comprising the step of constructing (44) at least one of: a third blockchain transaction configured to return control of the first resource to the first user in response to a first time period of non-redemption of the first blockchain transaction; and a fourth blockchain transaction configured to return control of the second resource to the second user in response to a second time period of non-redemption of the second blockchain transaction.
7. The method according to any one of claims 1 to 5, wherein: At least one of the first obscured secret value and the second obscured secret value comprises a combination of at least one of the first secret value and the second secret value and a shared secret value accessible to both the first user and the second user (32).
8. The method according to claim 7, wherein: The shared secret value is established as a common secret (CS) prior to step (i).
9. The method according to any one of claims 1 to 5, further comprising the steps of: (iii) generating a sequence of at least one concealed secret value starting from at least one of the first secret value and the second secret value; (iv) redeeming at least one blockchain transaction to reveal at least one of the first secret value and the second secret value, thereby causing at least one obscured secret value of the sequence to be revealed.
10. The method according to claim 9, further comprising: Step (ii) is performed using the at least one obscured secret value revealed in step (iv).
