Patent ID: 12244688

DETAILED DESCRIPTION

An atomic transaction exchange on a blockchain means that for two transactions, one from a first user, Alice, to a second user, Bob, and another from Bob to Alice, either both transactions are completed or neither are completed.

With reference toFIG.1, the present invention involves enabling Alice and Bob to each create secrets, denoted A0and B0respectively30. If Alice and Bob are trustworthy then they can exchange information, including these secrets, using a communication channel which is not be part of the blockchain protocol. The may use a secure secret exchange as described below beneath the subtitle Determination of a common secret.

Suppose that one party is not trustworthy and does not share their secret. The present invention provides that the only way for this party to spend their funds is to reveal their secret on the blockchain, thereby causing the secret to become public knowledge and available to the other user. This is due to the configuration of the transaction used in the exchange. Therefore, the method does not require either party to trust the other.

In an embodiment of the present invention, there are two secrets: one generated by and accessible to Alice and the other generated by and accessible to Bob. These are communicated through an off-blockchain channel.

Single Atomic Swap

Let PA0denote the elliptic curve digital signature algorithm (ECDSA) public key of Alice with corresponding private key SA0and let PB0denote the public key of Bob with private key SB0.

1. At30, Alice chooses a secret A0∈*nknown only to herself and Bob chooses a secret B0∈*nknown only to himself (These secrets are not related to the public or private keys of Alice and Bob.) Here, n is the order of the elliptic curve generator point G. The secret may be in the form of a general data structure which has been passed through a SHA256 (mod n) algorithm.

2. Alice and Bob open a communication channel between them. This may be a secure communication channel created using the method described below beneath the subtitle Determination of a common secret. They then hash their respective secrets (step34) and share their public keys and the hashes of their respective secrets (step36). The hash values of A0and B0are denoted H(A0) and H(B0) respectively, where a standard hash function such as SHA-256 may be used. The values H(A0) and H(B0) may also be publicly shared. Alice and Bob now both know
PA0,PB0,H(A0),H(B0).

3. At38, Alice and Bob calculate the deterministic key
H(A0)|H(B0),
where “|” denotes the operation OP_CAT, or, alternatively, a derived hash such as
H(H(A0)|H(B0)).

4. At40, Alice and Bob now create derived public keys
Alice:PA1=PA0+(H(A0)|H(B0))·G
Bob: PB1=PB0(H(A0)|H(B0))·G.

which have corresponding private keys
Alice:SA1=SA0+H(A0)|H(B0)
Bob: SB1=SB0H(A0)|H(B0).

Alice and Bob will use the derived public keys PA1, PB1to perform the atomic swap. In principle, they could use their original public keys PA0, PB0, however the derived public keys have the advantage that they are tied to the atomic swap and can easily be calculated by Alice and Bob but not to anyone else (unless H(A0) and H(B0) have been made public).

Added privacy may be achieved if a deterministic pseudo-random seeming value is also incorporated, such as:
H(A0)|H(B0)|Z

where Z is something both parties can calculate, such as a Zeta function, agreed in advance based on a shared starting value.

5. At42, Alice and Bob construct the following locking scripts. Here, the scripts are described schematically, with an exemplary implementation in Bitcoin script illustrated later.
LockingScript(A)=CheckSigH(PA1) AND SolveH(A0) AND SolveH(B0)
LockingScript(B)=CheckSigH(PB1) AND SolveH(A0) AND SolveH(B0)

The process CheckSig H(PA1) is the standard ECDSA signature validation operation for public/private key pair PA1, SA1. Instead, CheckSig H(PA0) may be used, which is a standard ECDSA signature validation with public/private key pair PA0, SA0. The process Solve H(A0) is a hash puzzle with solution A0, meaning that the unlocking script must contain a valid value A0that when hashed is equal to H(A0) as provided in the locking script. The unlocking scripts are given by
UnlockingScript(A)=[B0][A0][Sig PA1][PA1]
UnlockingScript(B)=[B0][A0][Sig PB1][PB1]

Here it can be seen that if either Alice or Bob unlock their funds they will necessarily expose the values A0and B0on the blockchain.

6. At42, Alice creates a transaction tx1to PB1with locking script LockingScript(B) and Bob creates a transaction tx2to PA1with locking script LockingScript(A). At this stage neither Alice nor Bob can spend the funds at PA1and PB1since neither party knows both A0and B0. These transactions are sent to the network and subsequently appear on the blockchain.

7. At46C, Alice sends Bob her secret A0and Bob sends Alice his secret B0. This is performed using the communication channel between Alice and Bob established above. Alice and Bob may check that these are the correct values by confirming that their hash values are equal to H(A0) and H(B0).

8. Assuming Alice and Bob are both honest and share their correct secrets, then both parties know both secrets (step48C) and both may spend the funds locked in PA1and PB1(step50C), and the atomic swap is complete.

9. Suppose, for example, that Bob does not send his correct secret B0to Alice. That is, suppose only Alice sends her secret, and step46B occurs rather than46C. Due to the form of the locking script LockingScript(B), in order for Bob to spend the funds locked PB1he must publicly expose his secret B0in the unlocking script. As a result, as soon as Bob spends his funds, Alice learns Bob's secret (step48B) and therefore becomes able to spend her funds in PA1(step50B). This ensures that either both Alice and Bob can spend their funds or neither can spend their funds.

Below are exemplary locking and unlocking scripts for Alice in step 4 above, compatible with the Bitcoin blockchain.

Locking script for Alice:

OP_DUP OP_HASH160<Hash160 PA1>OP_EQUALVERIFY OP_CHECKSIG OP_HASH256<Hash256 A0>OP_EQUALVERIFY OP_HASH256<Hash256 B0>OP_EQUALVERIFY

Unlocking script for Alice:

<B0><A0><Sig PA1><PA1>

Note that transactions to Pay To Public Key Hash (P2PKH) addresses and Pay To Script Hash (P2SH) addresses both allow for locking and unlocking scripts of the above type. For P2SH addresses, the locking script is presented as the hash of a redeem script containing the same information.

The method above is described with reference to a blockchain that uses a public/private key encryption system similar to the ECSDA used on the Bitcoin blockchain. However, the method can be generalised to a general encryption mechanism that requires a general form of a secret (which may be an arbitrary data structure) to be exposed in an unlocking script. Required are a locking script, transaction and a blockchain, which is a secure, verifiable communication channel.

Time-Lock Refund Transactions

If Bob refuses to give Alice his correct secret B0and also does not unlock his funds stored in address PB1then Bob's secret will not be revealed to Alice and she can never unlock her funds stored in PA1. Moreover, Alice can also never reclaim the funds she sent to Bob that are stored in PB1.

This problem can be solved by introducing a new transaction from Bob to Alice that is configured send the funds back after a certain amount of time if they are not spent. This also requires slightly modifying LockingScript(A) and LockingScript(B), which modification is described below.

This new transaction makes use of a time-dependent operation in the locking scripts that allows a transaction to be accepted by a block only after a certain pre-specified time has passed. For example, in Bitcoin script, this may be the operation Check Sequence Verify (CSV) for a relative amount of time since a specified value or Check Lock Time Verify (CLTV) for a fixed time value.

The locking scripts in step 4 above are modified to include the option of spending if both Alice and Bob agree to sign, as follows:

LockingScript′(A)={CheckSig⁢H⁡(PA1)⁢AND⁢Solve⁢H⁡(A0)⁢AND⁢Solve⁢H⁡(B0)ORCheckSig⁢H⁡(PA1)⁢AND⁢CheckSig⁢H⁡(PB1)⁢LockingScript′(B)={CheckSig⁢H⁡(PB1)⁢AND⁢Solve⁢H⁡(A0)⁢AND⁢Solve⁢H⁡(B0)ORCheckSig⁢H⁡(PA1)⁢AND⁢CheckSig⁢H⁡(PB1)

At44, two new transactions are then created after step 4 and before step 5 in the method described above. Alice creates a transaction tx4from PA1to Bob that returns all of his funds. This transaction is time-locked such that it can only be accepted in a block after a certain amount of time, for example 24 hours. Bob creates a similar transaction tx3from PB1to Alice. The transactions tx3and tx4have respective locking scripts
LockingScript2(A)=CheckSigH(PA1) ANDCSV(24 hours)
LockingScript2(B)=CheckSigH(PB1) ANDCSV(24 hours)

Alice signs tx4and sends it to Bob who signs and sends it to the network. Similarly, Bob signs tx3and sends it to Alice who signs and sends to the network.

At this stage, if neither party is compliant, the process is abandoned and no funds are transferred. If both parties are compliant, step 5 of the above method is performed (42). Now, if neither party spends the funds exchanged in the atomic swaps (46A), the funds will be returned to the original owners after 24 hours (48A,50A).

Note that here a CSV relative time of 24 hours has been used as an example, but it would be possible to use any relative time in the future or any specific time in the future (using a CLTV operator, for example).

An example of a locking script of tx3that returns funds to Alice after 24 hours using the Bitcoin blockchain is

“24h” OP_CHECKSEQUENCEVERIFY OP_DROP OP_DUP OP_HASH160<Hash160 PA1>OP_EQUALVERIFY OP_CHECKSIG

The corresponding unlocking script is given by <Sig PA1><PA1>.

Masking of the Secret Values

A further, alternative embodiment includes masking steps32so that the values A0and B0are known only to Alice and Bob and never made public.

In the beginning Alice and Bob both agree on a shared secret Scthat only they know. This can be achieved through the secure exchange of a secret using the method described below, titled

Determination of a Common Secret.

Alice and Bob then define the new secrets
A′0=A0+Sc
B′0=B0+Sc.

They then proceed as in the method outlined above but with the masked secrets A′0, B′0instead of the original secrets. During the atomic swap, only the masked secrets are revealed to the public on the blockchain.

This is useful if the secret values A0and B0are to be also used in other contexts, such as in further embodiments described below.

A further, alternative embodiment enables Alice and Bob to make a series of n atomic swaps. Each party starts with a random secret and create a sequence of hash values of this secret, which is called an access chain. When an atomic swap is performed it exposes the hash value of the next secret to be used in the next atomic swap. This process is repeated iterably up to a maximum of n times.

There are efficiency savings for this method over a series of individual swaps, in that less storage space is required for the secrets as Alice and Bob only need to store one secret at a time. They can calculate the next secret from hashing the previous secret. They need fewer rounds of communication between each other as they do not need to communicate the hash of their secret each time. This saves time and improves security.

The method is as follows:

Alice and Bob agree on a number n of repeat exchanges. They create a random value Anand Bnrespectively. Alice calculates the following access chain:

An=random⁢An-1=hash⁢(An)⁢An-2=hash⁢(An-1)⁢⋮⁢Ai-1=hash⁢(Ai)⁢⋮⁢A0=hash⁢(A1)

Bob calculates an equivalent chain starting from Bn. These chains correspond to secret values that will be used in a series of swaps. The number of possible swaps will be in the sequence {0,1, . . . , n}. That is, the parties can use these values for the swap of between 0 and n transactions before needing to re-initialize a new chain.

The method for implementing the swaps is outlined below. It should be understood that Bob follows an equivalent process.

1. Alice starts with her chain A0, A1, . . . , An, Bob's public key PB0, and the hash of Bob's secret H(B0). As before, H(B0) may be publically shared by Bob.

2. Alice calculates the derived public keys
Alice:PA1=PA0+(H(A0)|H(B0))·G
Bob: PB1=PB0+(H(A0)|H(B0))·G,

and then the locking scripts
LockingScript(A)0=CheckSigH(PA1) AND SolveH(A0) SolveH(B0)
LockingScript(B)0=CheckSigH(PB1) AND SolveH(A0) SolveH(B0).

Note that the time dependent refund described in an earlier embodiment could be included in the above locking scripts without any substantive change to the logic.

3. Alice and Bob perform the first swap. As described above, this involves the exchange of A0and B0between Alice and Bob. This means that after the swap Alice now knows H(B1)=B0.

4. Alice repeats step 2 of the method, but with the hash of Bob's second secret in the chain H(B1). Explicitly, she calculates the derived public keys
Alice:PA2=PA1+(H(A1)|H(B1))·G
Bob:PB2=PB1+(H(A1)|H(B1))·G,and the locking scripts
LockingScript(A)1=CheckSigH(PA2) AND SolveH(A1) SolveH(B1)LockingScript(B)1=CheckSigH(PB2) AND SolveH(A1) SolveH(B1).

5. Once the second swap has been completed Alice knows H(B2)=B1. She repeats step 2 again with the hash of Bob's third secret H(B2).

6. This process is repeated iterably until either a swap is not completed or the maximum number of n swaps has been reached.

As described in an earlier embodiment, further security may be incorporated by introducing a pseudo-random value Zito the operation H(Ai)|H(Bi)|Zi. In this case the function should transform every iteration for example by using a hash function Zi-1=H(Zi).

The atomic swap method outlined above is not restricted to the Bitcoin blockchain. 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 above method may be used to perform an atomic swap on any blockchain that allows for locking and unlocking scripts of the form given in step 4.

Furthermore, the atomic swap method may be used to exchange cryptocurrencies. For example, it may be used for Alice to send Bitcoin to Bob on the Bitcoin blockchain and Bob to send Ethereum to Alice on the Ethereum blockchain.

SendsReceivesAliceBCHEthBobEthBCH

The only restriction on an atomic swap between two different blockchains is that they allow for the same hash function to be used in the hash puzzle in the locking scripts (or equivalent). The reason for this is as follows: suppose Alice's blockchain only allows for the use of an SHA-256 hashing algorithm and Bob's blockchain only allows for an SHA-384 algorithm. Bob sends Alice the SHA-256 hash of one secret, but in his locking script he sets a SHA-384 hash puzzle for a different secret. When he spends his funds the unlocking script will reveal a secret that is of no use to Alice, and Alice has no way of knowing this until Bob has already spent his funds.

According to a further embodiment, a method is provided which enables two parties to each create a public key for which the corresponding private keys are only made accessible either to both parties or neither party. The method makes use of the atomic swap method described above in order to exchange two secret values between both parties. These secret values are used to compute the private keys.

One application of this method is that it allows for two parties to exchange multiple types of cryptocurrencies that are controlled by a single public/private key pair.

This method enables Alice and Bob to each create a public key for which the private key is not known until an atomic swap has taken place. The atomic swap ensures that either both Alice and Bob can calculate their corresponding private keys or neither can calculate their private keys.

The method is described below using ECSDA private and public key pairs, as used for example in Bitcoin, Ethereum and Dash. However, the method is not critically dependent on the ECDSA protocol and can be easily adapted to any public/private key based cryptography system, for which a new secure public key can be deterministically created from an existing private key and a publically known deterministic key.

The method is pseudonymous in the sense that partial information about the new private keys is stored on one or more blockchains, which are open ledgers. However, only the parties involved in the process are able to decode this information and thus security is never compromised.

1. Alice begins with a private key SAwith corresponding public key PA=SA·G and a secret S2that only she knows. Bob begins with a private key SBwith corresponding public key PB=SB·G and a secret S1that only he knows.

2. Alice sends Bob P2=S2·G and Bob sends Alice P1=S1·G. Since the secrets are multiplied by the elliptic curve base point they are not exposed in this process, and P2and P1may be publically known.

3. Alice creates a new public key PAE=PA+P1which may be used as an address in which to receive a bitcoin transaction (or similar for alt-coins). Bob creates the new public key PBE=PB+P2.

In accordance with the properties of elliptic curve cryptography, the corresponding private key to PAEis SAE=SA+S1, meaning that PAE=SAE·G. The corresponding private key to PBEis SBE=SB+S2.

At this stage, Alice does not know S1, and therefore does not know the private key for PAE. Although Bob knows S1, he does not know SA, and therefore also does not know the private key for PAE. By the same logic, neither Alice nor Bob know the private key for PBE.

4. Alice makes a transaction to Bob's address PBEand Bob makes a transaction to Alice's address PAE. These transactions may be the exchange of any cryptocurrency that uses a public/private key system, or they may transfer tokens or even physical assets to the ownership of the public keys PAEand PBE. It may also be a combination of the above.

5. Alice and Bob now initialise an atomic swap, as described above, using any blockchain, with S2and S1as their respective secrets.

6. Alice and Bob exchange secrets. This means that:

SendsReceivesAliceS2S1BobS1S2

Alice and Bob may check that they have received the correct secrets using the formulae P1=S1·G and P2=S2·G. If they do not exchange the correct values, then they cannot spend the outputs of the atomic swap.

7. Now Alice is in possession of S1she can calculate the private key corresponding to PAE. Since no one other than Alice knows her private key SA, no one else can calculate the private key corresponding to PAEeven if S1is publically known. Similarly, now that Bob is in possession of the secret S2, he may calculate the private key corresponding to PBE, and no one other than Bob can do this.

If neither Alice nor Bob spends their transaction output of the atomic swap, Alice's secret S2is not exposed to Bob, and Bob's secret S1is not exposed to Alice. In this case, neither Alice nor Bob are able to calculate the private keys corresponding to PAEand PBE.

Blockchains use public/private key encryption system to sign transactions and prove ownership of transaction outputs. This enables use of the method of the embodiment above to send transactions to PAEand PBEin several cryptocurrencies simultaneously. For example, after establishing PAEand PBEin step 3 above:

Alice moves funds in BCH and ETH to PBE.

Bob moves funds in BCH and DASH to PAE.

Once the atomic swap has been performed, the private keys to PBEand PAEare unlocked. These unlock the funds in the Bitcoin and Ethereum public key held by Alice, and the Bitcoin and Dash public key held by Bob. Hence, the following transactions from Alice to Bob can be completed securely

SendsReceivesAliceBCH, EthBCH, DASHBobBCH, DASHBCH, Eth

Note that these blockchains do not have to allow for the same hash functions in their locking scripts.

Provided above are general methods for two parties to unlock public keys through the exchange of secrets using an atomic swap. This has applications beyond the exchange of cryptocurrencies, and is relevant to any system using a public/private key cryptography scheme similar to that of ECDSA. For example, other use cases include, but are not limited to:1. Providing access to a Distributed Hash Table (DHT);2. Encrypted calculations;3. Private email clients;4. Access to logistics data and exchanges;5. Swaps of goods and services;6. Private exchange of value; and7. Hierarchy of keys.

Determination of a Common Secret

Where appropriate, security may be increased by using a secure method of the exchange of information between two parties using a public/private key system such as that described below.

A common secret (CS) can be established between two parties and then used to generate a secure encryption key for transmission of one or more of the shares. The Common Secret (CS) is generated and used to enable secure exchange of any Secret (SA,B,1,2) e.g. secret value, key or share thereof.

Hereafter, for the sake of convenience, Alice and Bob will be referred to as a first node (C) a second node (S). The aim is to generate a common (CS) secret which both nodes know but without that common secret having been sent via a communication channel, thus eliminating the possibility of its unauthorised discovery.

The secure transmission technique involves the CS being generated at each end of the transmission in an independent manner, so that while both nodes know the CS it has not had to travel over potentially unsecure communication channels. Once that CS has been established at both ends, it can be used to generate a secure encryption key that both nodes can use for communication thereafter.

FIG.2illustrates a system1that includes a first node3which is in communication with a second node7over a communications network5. The first node3has an associated first processing device23and the second node5has an associated second processing device27. The first and second nodes3,7may include an electronic device, such as a computer, phone, tablet computer, mobile communication device, computer server etc. In one example, the first node3may be a client (user) device and the second node7may be a server. The server may be a digital wallet provider's server.

The first node3is associated with a first asymmetric cryptography pair having a first node master private key (V1c) and a first node master public key (P1c). The second node (7) is associated with a second asymmetric cryptography pair having a second node master private key (V1S) and a second node master public key (P1S). In other words, the first and second nodes are each in possession of respective public-private key pairs.

The first and second asymmetric cryptography pairs for the respective first and second nodes3,7may be generated during a registration process, such as registration for a wallet. The public key for each node may be shared publicly, such as over communications network5.

To determine the common secret (CS) at both the first node3and second node7, the nodes3,7perform steps of respective methods300,400without communicating private keys over the communications network5.

The method300performed by the first node3includes determining330a first node second private key (V2C) based on at least the first node master private key (V1C) and a Generator Value (GV). The Generator Value may be based on a message (M) that is a shared between the first and second nodes, which may include sharing the message over the communications network5as described in further detail below. The method300also includes determining370a second node second public key (P2S) based on at least the second node master public key (P1S) and the Generator Value (GV). The method300includes determining380the common secret (CS) based on the first node second private key (V2C) and the second node second public key (P2S).

The same common secret (CS) can also be determined at the second node7by method400. The method400includes determining430a first node second public key (P2C) based on the first node master public key (P1C) and the Generator Value (GV). The method400further includes determining470a second node second private key (V2S) based on the second node master private key (V1S) and the Generator Value (GV). The method400includes determining480the common secret (CS) based on the second node second private key (V2S) and the first node second public key (P2C).

The communications network5may include a local area network, a wide area network, cellular networks, radio communication network, the internet, etc. These networks, where data may be transmitted via communications medium such as electrical wire, fibre optic, or wirelessly may be susceptible to eavesdropping, such as by an eavesdropper11. The method300,400may allow the first node3and second node7to both independently determine a common secret without transmitting the common secret over the communications network5.

Thus one advantage is that the common secret (CS) may be determined securely and independently by each node without having to transmit a private key over a potentially unsecure communications network5. In turn, the common secret may be used as a secret key (or as the basis of a secret key) for encrypted communication between the first and second nodes3,7over the communications network5.

The methods300,400may include additional steps. The method300may include, at the first node3, generating a signed message (SM1) based on the message (M) and the first node second private key (V2C). The method300further includes sending360the first signed message (SM1), over the communications network, to the second node7. In turn, the second node7may perform the steps of receiving440the first signed message (SM1). The method400also includes the step of validating450the first signed message (SM2) with the first node second public key (P2C) and authenticating460the first node3based on the result of validating the first signed message (SM1). Advantageously, this allows the second node7to authenticate that the purported first node (where the first signed message was generated) is the first node3. This is based on the assumption that only the first node3has access to the first node master private key (V1C) and therefore only the first node3can determine the first node second private key (V2C) for generating the first signed message (SM1). It is to be appreciated that similarly, a second signed message (SM2) can be generated at the second node7and sent to the first node3such that the first node3can authenticate the second node7, such as in a peer-to-peer scenario.

Sharing the message (M) between the first and second nodes may be achieved in a variety of ways. In one example, the message may be generated at the first node3which is then sent, over the communications network5, the second node7. Alternatively, the message may be generated at the second node7and then sent, over the communications network5, to the second node7. In yet another example, the message may be generated at a third node9and the message sent to both the first and second nodes3,7. In yet another alternative, a user may enter the message through a user interface15to be received by the first and second nodes3,7. In yet another example, the message (M) may be retrieved from a data store19and sent to the first and second nodes3,7. In some examples, the message (M) may be public and therefore may be transmitted over an unsecure network5.

In further examples, one or more messages (M) may be stored in a data store13,17,19, where the message may be associated with some entity such as digital wallet, or a communication session established between the first node3and the second node7. Thus the messages (M) may be retrieved and used to recreate, at the respective first and second nodes3,7, the common secret (CS) associated with that wallet or session.

Advantageously, a record to allow recreation of the common secret (CS) may be kept without the record by itself having to be stored privately or transmitted securely. This may be advantageous if numerous transactions are performed at the first and second nodes3,7and it would be impractical to store all the messages (M) at the nodes themselves.

An example of a method of registration100,200will be described with reference toFIG.4, where method100is performed by the first node3and method200is performed by the second node7. This includes establishing the first and second asymmetric cryptography pairs for the respective first and second nodes3,7.

The asymmetric cryptography pairs include associated private and public keys, such as those used in public-key encryption. In this example, the asymmetric cryptography pairs are generated using Elliptic Curve Cryptography (ECC) and properties of elliptic curve operations.

Standards for ECC may include known standards such as those described by the Standards for Efficient Cryptography Group (www.sceg.org). Elliptic curve cryptography is also described in U.S. Pat. Nos. 5,600,725, 5,761,305, 5,889,865, 5,896,455, 5,933,504, 6,122,736, 6,141,420, 6,618,483, 6,704,870, 6,785,813, 6,078,667, 6,792,530.

In the method100,200, this includes the first and second nodes agreeing110,210on a common ECC system and using a base point (G). (Note: the base point could be referred to as a Common Generator, but the term ‘base point’ is used to avoid confusion with the Generator Value GV). In one example, the common ECC system may be based on secp256K1 which is an ECC system used by Bitcoin. The base point (G) may be selected, randomly generated, or assigned.

Turning now to the first node3, the method100includes settling110on the common ECC system and base point (G). This may include receiving the common ECC system and base point from the second node7, or a third node9. Alternatively, a user interface15may be associated with the first node3, whereby a user may selectively provide the common ECC system and/or base point (G). In yet another alternative one or both of the common ECC system and/or base point (G) may be randomly selected by the first node3. The first node3may send, over the communications network5, a notice indicative of using the common ECC system with a base point (G) to the second node7. In turn, the second node7may settle210by sending a notice indicative of an acknowledgment to using the common ECC system and base point (G).

The method100also includes the first node3generating120a first asymmetric cryptography pair that includes the first node master private key (V1C) and the first node master public key (P1C). This includes generating the first master private key (V1C) based, at least in part, on a random integer in an allowable range specified in the common ECC system. This also includes determining the first node master public key (P1C) based on elliptic curve point multiplication of the first node master private key (P1C) and the base point (G) according to the formula:
P1C=V1C×G(Equation 1)

Thus the first asymmetric cryptography pair includes:V1C: The first node master private key that is kept secret by the first node.P1C: The first node master public key that is made publicly known.

The first node3may store the first node master private key (V1C) and the first node master public key (P1C) in a first data store13associated with the first node3. For security, the first node master private key (V1C) may be stored in a secure portion of the first data store13to ensure the key remains private.

The method100further includes sending130the first node master public key (P1C), over the communications network5, to the second node7. The second node7may, on receiving220the first node master public key (P1C), store230the first node master public key (P1C) in a second data store17associated with the second node7.

Similar to the first node3, the method200of the second7includes generating240a second asymmetric cryptography pair that includes the second node master private key (V1S) and the second node master public key (P1S). The second node master private key (Vis) is also a random integer within the allowable range. In turn, the second node master public key (P1S) is determined by the following formula:
P1S=V1S×G(Equation 2)
Thus the second asymmetric cryptography pair includes:V1S: The second node master private key that is kept secret by the second node.P1S: The second node master public key that is made publicly known.

The second node7may store the second asymmetric cryptography pair in the second data store17. The method200further includes sending250the second node master public key (P1S) to the first node3. In turn, the first node3may receive 140 and stores150the second node master public key (P1S).

It is to be appreciated that in some alternatives, the respective public master keys may be received and stored at a third data store19associated with the third node9(such as a trusted third party). This may include a third party that acts as a public directory, such as a certification authority. Thus in some examples, the first node master public key (P1C) may requested and received by the second node7only when determining the common secret (CS) is required (and vice versa).

The registration steps may only need to occur once as an initial setup of, for example, the digital wallet.

An example of determining a common secret (CS) will now be described with reference toFIG.5. The common secret (CS) may be used for a particular session, time, transaction, or other purpose between the first node3and the second node7and it may not be desirable, or secure, to use the same common secret (CS). Thus the common secret (CS) may be changed between different sessions, time, transactions, etc.

The following is provided for illustration of the secure transmission technique which has been described above.

In this example, the method300performed by the first node3includes generating310a 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 nonce (and arbitrary value). For example, the message (M) may be provided as:
Message (M)=UnixTime+nonce  (Equation 3)

In some examples, the message (M) is arbitrary. However it is to be appreciated that the message (M) may have selective values (such as Unix Time, etc) that may be useful in some applications.

The method300includes sending315the message (M), over the communications network3, to the second node7. The message (M) may be sent over an unsecure network as the message (M) does not include information on the private keys.

The method300further includes the step of determining320a Generator Value (GV) based on the message (M). In this example, this includes determining a cryptographic hash of the message. An example of a cryptographic hash algorithm includes SHA-256 to create a 256-bit Generator Value (GV). That is:
GV=SHA-256(M)  (Equation 4)

It is to be appreciated that other hash algorithms may be used. This may include other has algorithms in the Secure Hash Algorithm (SHA) family. Some particular examples include instances in the SHA-3 subset, including SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256. Other hash algorithms may include those in the RACE Integrity Primitives Evaluation Message Digest (RIPEMD) family. A particular example may include RIPEMD-160. Other hash functions may include families based on Zemor-Tillich hash function and knapsack-based hash functions.

The method300then includes the step330of determining330the first node second private key (V2C) based on the second node master private key (V1C) and the Generator Value (GV). This can be based on a scalar addition of the first node master private key (V1C) and the Generator Value (GV) according to the following formula:
V2C=V1C+GV(Equation 5)

Thus the first node second private key (V2C) is not a random value but is instead deterministically derived from the first node master private key. The corresponding public key in the cryptographic pair, namely the first node second public key (P2C), has the following relationship:
P2C=V2C×G(Equation 6)

Substitution of V2Cfrom Equation 5 into Equation 6 provides:
P2C=(V1C+GV)×G(Equation 7)

where the +operator refers to elliptic curve point addition. Noting that elliptic curve cryptography algebra is distributive, Equation 7 may be expressed as:
P2C=V1C×G+GV×G(Equation 8)

Finally, Equation 1 may be substituted into Equation 7 to provide:
P2C=P1C+GV×G(Equation 9.1)
P2C=P1CSHA-256(M)×G(Equation 9.2)

Thus the corresponding first node second public key (P2C) can be derivable given knowledge of the first node master public key (P1C) and the message (M). The second node7may have such knowledge to independently determine the first node second public key (P2C) as will be discussed in further detail below with respect to the method400.

The method300further includes generating350a first signed message (SM1) based on the message (M) and the determined first node second private key (V2C). Generating a signed message includes applying a digital signature algorithm to digitally sign the message (M). In one example, this includes applying the first node second private key (V2C) to the message in an Elliptic Curve Digital Signature Algorithm (ECDSA) to obtain the first signed message (SM1).

Examples of ECDSA include those based on ECC systems with secp256k1, secp256r1, secp384r1, se3cp521r1.

The first signed message (SM1) can be verified with the corresponding first node second public key (P2C) at the second node7. This verification of the first signed message (SM1) may be used by the second node7to authenticate the first node3, which will be discussed in the method400below.

The first node3may then determine370a second node second public key (P2S). As discussed above, the second node second public key (P2C) may be based at least on the second node master public key (P1S) and the Generator Value (GV). In this example, since the public key is determined370′ as the private key with elliptic curve point multiplication with the base point (G), the second node second public key (P2S) can be expressed, in a fashion similar to Equation 6, as:
P2S=V2S×G(Equation 10.1)
P2S=P1S+GV×G(Equation 10.2)

The mathematical proof for Equation 10.2 is the same as described above for deriving Equation 9.1 for the first node second public key (P2C). It is to be appreciated that the first node3can determine370the second node second public key independently of the second node7.

The first node3may then determine380the common secret (CS) based on the determined first node second private key (V2C) and the determined second node second public key (P2S). The common secret (CS) may be determined by the first node3by the following formula:
S=V2C×P2S(Equation 11)

Method400Performed at the Second Node7

The corresponding method400performed at the second node7will now be described. It is to be appreciated that some of these steps are similar to those discussed above that were performed by the first node3.

The method400includes receiving410the message (M), over the communications network5, from the first node3. This may include the message (M) sent by the first node3at step315. The second node7then determines420a Generator Value (GV) based on the message (M). The step of determining420the Generator Value (GV) by the second node7is similar to the step320performed by the first node described above. In this example, the second node7performs this determining step420independent of the first node3.

The next step includes determining430a first node second public key (P2C) based on the first node master public key (P1C) and the Generator Value (GV). In this example, since the public key is determined430′ as the private key with elliptic curve point multiplication with the base point (G), the first node second public key (P2C) can be expressed, in a fashion similar to Equation 9, as:
P2C=V2C×G(Equation 12.1)
P2C=P1C+GV×G(Equation 12.2)

The mathematical proof for Equations 12.1 and 12.2 is the same as those discussed above for Equations 10.1 and 10.2.

The method400may include steps performed by the second node7to authenticate that the alleged first node3, is the first node3. As discussed previously, this includes receiving440the first signed message (SM1) from the first node3. The second node7may then validate450the signature on the first signed message (SM1) with the first node second public key (P2C) that was determined at step430.

Verifying the digital signature may be done in accordance with an Elliptic Curve Digital Signature Algorithm (ECDSA) as discussed above. Importantly, the first signed message (SM1) that was signed with the first node second private key (V2C) should only be correctly verified with the corresponding first node second public key (P2C), since V2Cand P2Cform a cryptographic pair. Since these keys are deterministic on the first node master private key (V1C) and the first node master public key (P1C) that were generated at registration of the first node3, verifying first signed message (SM1) can be used as a basis of authenticating that an alleged first node sending the first signed message (SM1) is the same first node3during registration. Thus the second node7may further perform the step of authenticating (460) the first node3based on the result of validating (450) the first signed message.

The above authentication may be suitable for scenarios where one of the two nodes is a trusted node and only one of the nodes need to be authenticated. For example, the first node3may be a client and the second node7may be a server trusted by the client such as a wallet provider. Thus the server (second node7) may need to authenticate the credentials of the client (first node3) in order to allow the client access to the server system. It may not be necessary for the server to be authenticate the credentials of the server to the client. However in some scenarios, it may be desirable for both nodes to be authenticated to each other, such as in a peer-to-peer scenario.

The method400may further include the second node7determining470a second node second private key (V2S) based on the second node master private key (V1S) and the Generator Value (GV). Similar to step330performed by the first node3, the second node second private key (V2S) can be based on a scalar addition of the second node master private key (V1S) and the Generator Value (GV) according to the following formulas:
V2S=V1S+GV(Equation 13.1)
V2S=V1S+SHA-256(M)  (Equation 13.2)

The second node7may then, independent of the first node3, determine480the common secret (CS) based on the second node second private key (V2S) and the first node second public key (P2C) based on the following formula:
S=V2S×P2C(Equation 14)

The common secret (CS) determined by the first node3is the same as the common secret (CS) determined at the second node7. Mathematical proof that Equation 11 and Equation 14 provide the same common secret (CS) will now be described.

Turning to the common secret (CS) determined by the first node3, Equation 10.1 can be substituted into Equation 11 as follows:
S=V2C×P2S(Equation 11)
S=V2C×(V2S×G)
S=(V2C×V2S)×G(Equation 15)

Turning to the common secret (CS) determined by the second node7, Equation 12.1 can be substituted into Equation 14 as follows:
S=V2S×P2C(Equation 14)
S=V2S×(V2C×G)
S=(V2S×V2C)×G(Equation 16)

Since ECC algebra is commutative, Equation 15 and Equation 16 are equivalent, since:
S=(V2C×V2S)×G=(V2S×V2C)×G(Equation 17)

The common secret (CS) may now be used as a secret key, or as the basis of a secret key in a symmetric-key algorithm for secure communication between the first node3and second node7. This communication may be used to convey part of a private key, a representation of or identifier for a private key, or mnemonic for a private key. Therefore, once the invention has been used during set-up of, for example, a digital wallet or other controlled resource, secure communication between the parties can be performed thereafter.

The common secret (CS) may be in the form of an elliptic curve point (xs, ys). This may be converted into a standard key format using standard publicly known operations agreed by the nodes3,7. For example, the xs value may be a 256-bit integer that could be used as a key for AES256 encryption. It could also be converted into a 160-bit integer using RIPEMD160 for any applications requiring this length key.

The common secret (CS) may be determined as required. Importantly, the first node3does not need to store the common secret (CS) as this can be re-determined based on the message (M). In some examples, the message(s) (M) used may be stored in data store13,17,19(or other data store) without the same level of security as required for the master private keys. In some examples, the message (M) may be publicly available.

However depending on some application, the common secret (CS) could be stored in the first data store (X) associated with the first node provided the common secret (CS) is kept as secure as the first node master private key (V1C).

It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be capable of designing many alternative embodiments without departing from the scope of the invention as defined by the appended claims. In the claims, any reference signs placed in parentheses shall not be construed as limiting the claims. The word “comprising” and “comprises,” and the like, does not exclude the presence of elements or steps other than those listed in any claim or the specification as a whole. In the present specification, “comprises” means “includes or consists of” and “comprising” means “including or consisting of.” The singular reference of an element does not exclude the plural reference of such elements and vice-versa. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a device claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.