Improved system and method for storage, generation and verification of tokens for controlling access to resources

By using one-way function chains to generate and verify tokens in the blockchain system, the security and efficiency issues of token transfer and access control are solved, and efficient and secure resource access control is achieved.

CN118740393APending Publication Date: 2024-10-01NCHAIN HLDG LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410967574.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-05-14
Filing Date
2019-05-13
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing token transfer and access control methods have shortcomings in security and efficiency, especially in blockchain systems, where it is difficult to achieve secure and efficient communication, storage, and verification.

Method used

Use a one-way function chain (such as a hash chain) to generate, store and verify tokens, record transactions through the blockchain, ensure the publicity and immutability of the tokens, and link tokens to each other through hash functions to reduce storage and communication needs.

Benefits of technology

Improves token security and reliability, reduces the likelihood of errors, reduces storage and communication volume, and enables secure and documented transfer and verification of resource access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740393A_ABST
    Figure CN118740393A_ABST
Patent Text Reader

Abstract

A computer-implemented access method is provided. The method comprises the steps of: (i) providing a verification data item of a one-way function chain of data items; (ii) submitting to the blockchain an access blockchain transaction comprising a data item of the chain; (iii) applying a one-way function to the data item to provide an output; (iv) comparing the output of step (iii) with a verification item to provide a result; and (v) based on the result of step (iv): (a) assigning the output as a further verification data item to verify the further data item of the chain; and (b) granting access to a resource associated with the data item.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with Chinese application number 2019800325659 (corresponding to PCT international application number PCT / IB2019 / 053944), application date May 13, 2019, and invention name “Improved system and method for storage, generation and verification of tokens for controlling access to resources”. Technical Field

[0002] The present invention generally relates to secure and efficient schemes for the transfer and access control of digital resources, and more specifically to the transfer, storage, communication, generation and verification of electronic / digital tokens used as access keys. The present invention is particularly suitable for, but not limited to, use with blockchain. Background Art

[0003] 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, public and private ledgers, permissioned and unpermissioned ledgers, shared ledgers and their variations. The term "user" in this article can refer to human or processor-based resources.

[0004] 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 digital assets 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 transaction's inputs and outputs that specify how and by whom the transaction's outputs can be accessed.

[0005] Although blockchain technology is widely known for its cryptocurrency implementation, it would be extremely beneficial if blockchain could be used to automate tasks and processes that are not limited to the cryptocurrency field. Such a solution would be able to leverage the benefits of blockchain (e.g., permanent, tamper-proof records of events, distributed processing, etc.) while being more versatile in its applications.

[0006] One area of ​​current research is the use of tokens to represent and transfer resources or their control, or to allow access to these resources via a blockchain. The resources associated with a token can be electronic or physical, virtual or real world. Potentially sensitive or secret resources can be represented by tokens that have no clear meaning or value. Thus, the token serves as an identifier that allows the real world resource to be referenced from the blockchain. Summary of the invention

[0007] It would be desirable to provide a secure and efficient method of communicating, storing, generating and / or transferring tokens from one user to another while minimizing the use of computing resources. Such an improved scheme has now been devised.

[0008] Thus, according to the present invention, there is provided a method as defined in the accompanying claims.

[0009] According to the present invention, a computer-implemented access or control method may be provided, comprising the following steps:

[0010] (i) providing a verification data item of a first one-way function chain of a data item or providing a verification data item for a first one-way function chain of a data item;

[0011] (ii) submitting to the blockchain an access blockchain transaction for the data item of the first chain including the data item;

[0012] (iii) applying a one-way function to a data item to provide an output;

[0013] (iv) comparing the output of step (iii) with the verification item to provide a result; and

[0014] (v) Based on the results of step (iv):

[0015] (a) assigning the data item as a further verification data item to verify a further data item of the first chain; and

[0016] (b) Grant access to resources associated with the data item.

[0017] Steps (i) and / or (ii) may be performed by a first party. Steps (iii) to (v) may be performed by a second party. The term "user" may be used interchangeably with "party" herein. The terms "party" and "user" are intended to include human users, computing resources, clients, servers, and / or network nodes.

[0018] Applying a one-way function (e.g., a cryptographic hash function) to a data item produces another data item. A subsequent application of the one-way function to another data item produces yet another data item. In this way, a data necklace can be generated, wherein the members of the data necklace are deterministically linked to each other via the application of the one-way function. Such a chain can be referred to as a one-way function chain of data items. A verification data item can be a data item that is a member of a one-way function chain and is used for verification purposes, as described in detail below.

[0019] The comparison of step (iv) may include application of at least one test or criterion. The test or criterion may include an assessment of whether the output matches or is identical to the verification item. The test may include an assessment based on a threshold. The one-way function may be a hash function.

[0020] Such an approach improves security and reliability by providing a provenance check for each data item, improves efficiency by reducing the amount of storage space and memory required for authentication purposes, and improves security and reduces the likelihood of errors by reducing the amount of data communicated.

[0021] The method may further comprise repeating steps (ii) to (v) using further verification data items and further data items.

[0022] This records the event on the blockchain, which has the advantage of making the record public and immutable. Therefore, the blockchain can be used as a communication tool or mechanism for transmitting or transferring data items from one user to another. The second user can access the data items from the blockchain. Therefore, direct communication between the first user and the second user is avoided or minimized. This is advantageous because such communication may cause interception via unauthorized parties. The present invention provides a solution in which users may not know each other or have a trusted relationship. This provides improved security and improved communication solutions for the transfer of tokens. In addition, the public and immutable nature of the blockchain can be used to verify events that have occurred and data items that the first user has submitted.

[0023] The method may further comprise the following steps:

[0024] (vi) providing a verification data item of a second one-way chain of functions of the data item; and

[0025] (vii) submitting an unlockable exchange blockchain transaction to the blockchain upon providing at least one verification item of the first chain and a verification data item of the second chain, wherein the unlocking associates the at least one data item of the second chain with the resource.

[0026] This provides a secure and documented method of transferring the ability to access at least one resource associated with a respective at least one data item between users.

[0027] The method may further include the steps of unlocking the exchange blockchain transaction and repeating steps (ii) to (v) using the data item of the second chain and the verification data item of the second chain.

[0028] This provides the advantage of enabling new users to securely access at least one resource.

[0029] The method may further comprise the step of submitting a return blockchain transaction to the blockchain, the return blockchain transaction being arranged to return control of the input of the exchange blockchain transaction after a lock time has elapsed.

[0030] This prevents dishonest users from locking the inputs of an exchange blockchain transaction indefinitely, providing the advantage of increasing the versatility of the method and providing a more secure method.

[0031] The method may further comprise the step of storing an initial data item of the one-way function chain, from which at least one data item of the one-way function chain is computable.

[0032] This offers the advantage of further reducing the storage requirements and correspondingly increasing the efficiency of the method.

[0033] Step (v) may also include deleting the verification data item.

[0034] This offers the advantage of further reducing the storage requirements and correspondingly increasing the efficiency of the method.

[0035] Access blockchain transactions can include information identifying a resource. For example, a blockchain transaction can include a URL or a hash value thereof that points to an off-chain data repository containing information about the resource. The URL can be stored in the metadata of the transaction.

[0036] This provides an advantage that information about the resource can be securely communicated.

[0037] At least one data item may be stored in the access blockchain transaction in the form of an encrypted (public) key.

[0038] This provides the advantages of reduced transaction size, increased privacy by being able to use standard transactions instead of custom transactions, and enabling users of the method to execute the method on multiple different blockchains implementing different protocols.

[0039] At least one of the public keys may be generated using a predetermined public key and a data item of a one-way function chain.

[0040] This provides a simple and secure method by which public keys can be derived, thereby providing the advantage of reduced storage requirements.

[0041] The method may comprise the step of providing a chain of public keys, each public key in the chain corresponding to a respective data item of the one-way function chain.

[0042] This links the public keys together in a checkable chain, providing the advantage of increased security.

[0043] The present invention also provides a computer-implemented method comprising the following steps:

[0044] (viii) providing a verification data item of a one-way function chain of the data item;

[0045] (ix) provide chain data items;

[0046] (x) applying a one-way function to a data item to provide an output;

[0047] (xi) comparing the output of step (x) with the verification item to provide a result; and

[0048] (xii) based on the result of step (xi): (a) assigning the data item as a further verification data item to verify further data items of the chain; (b) granting access to a resource associated with the data item.

[0049] The comparison of step (x) may include application of at least one test or criterion. The test may include an assessment of whether the output matches or is identical to the verification item. The test may include an assessment based on a threshold. The one-way function may be a hash function.

[0050] The method may provide a way to provide access to resources in a publicly verifiable, secure and computationally efficient manner.Embodiments of the present invention may be referred to as security and / or access control methods.

[0051] The present invention also provides a system, comprising:

[0052] Processor; and

[0053] A memory comprising executable instructions that, due to being executed by a processor, cause the system to perform any embodiment of the computer-implemented method described herein.

[0054] The present invention also provides a non-transitory computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor of a computer system, causes the computer system to at least perform an embodiment of the computer-implemented method described herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] These and other aspects of the invention will become apparent from and elucidated with reference to the embodiments described herein. Embodiments of the invention will now be described by way of example only and with reference to the accompanying drawings, in which:

[0056] Figure 1 is a flow chart showing steps for generating and activating a token;

[0057] Figure 2 is a flow chart showing the steps of control for exchanging tokens; and

[0058] Figure 3 is a flow chart showing the steps for activating a token using a public key. DETAILED DESCRIPTION

[0059] The present invention enables efficient creation and storage of tokens using a cryptographically secure one-way function chain such as a hash chain. The method has advantages in performance, storage, scalability, and reliability. Tokens can be securely sold to other users. Tokens can be verifiably linked to public keys, providing a universal method of activating and verifying tokens that is private and secure.

[0060] A token is a data structure or data item that ensures trusted communication between one or more different parties over a network. For example, a token can be used to represent the transfer of control of a resource from one party to another, and / or to access a controlled resource such as a good or service. For example, by activating a token, a customer can be granted access to: resources such as computing or electronic resources, hotel rooms, rental cars, or toll roads; goods such as prescription drugs, consumer goods, or items in a supply chain; and services such as a session on a website or computer application. The token itself can be used as a key to unlock these resources, or it can point to an external state that contains further information about the resource (e.g., a distributed hash table (DHT)).

[0061] Tokens are typically represented as 256-bit numbers and, once activated, may be time-limited (e.g., if a token represents permitted access to a secure data repository for 24 hours) and may have a limited number of uses (e.g., once a token is activated and 24 hours have passed, access to the secure data repository will be revoked until a new, different token is issued and activated).

[0062] We call the party that wants to activate the token the "client" and the party that wants to verify that the token has been activated the "server".

[0063] Role Function Alice Client Activation Token Bob server Verify that the token has been activated

[0064] The client activates the token by providing it to the server. This can be performed by publicly revealing the token on the blockchain. This is achieved by completing a transaction that records the value of the token in the transaction data or metadata that the server can verify. Note that the output of this transaction does not need to be spent.

[0065] The number of tokens required may be linearly proportional to the number of events in which they are needed. For example, if a user needs to access a secure data repository multiple times, the same number of tokens may be generated. A known method of creating multiple tokens for future use is to generate each token separately, for example randomly. All tokens are then stored in a database by both the client and the server.

[0066] However, in the present invention, each of the client and server only needs to store one token at a time. This is achieved by implementing the following rule: each token is related to the token that preceded it by / via the successive application of a cryptographically secure one-way function such as a hash function. For example, token t i According to the rules and token t i-1 Related:

[0067] t i =H(t i-1 ) (1)

[0068] Where H is a hash function, such as SHA-256. To activate token t i-1 , will include t i-1 The transaction is submitted to the blockchain, where t i-1 is the token t that precedes it i The solution to the hash problem of t is thus publicly revealed i-1 Verifiably links each token in the chain.

[0069] Advantages of the present invention include:

[0070] The client and server only need to store one token at any given time, which saves memory. If a token is a 256-bit number, and Alice wants to use n tokens, then using this method saves (n-1)*256 bits of space compared to storing each token individually in the database.

[0071] Only a small amount of data needs to be transferred between the client and the server, which improves performance, security, and reliability.

[0072] Since the token is computed rather than stored, it is protected from accidental loss due to breach or data corruption.

[0073] • Since each token is verifiably linked to the previous token through the solution of a hash problem, a checkable record is available for the tokens.

[0074] refer to Figure 1, a method (100) will now be described for a client (Alice) to activate a sequence of tokens that a server Bob can verify. The token is generated by Alice using a hash chain. The following steps are performed:

[0075] 1. Alice and Bob agree on n resources that require activation tokens to access (105).

[0076] 2. Alice generates a 256-bit number t0(110). This can be done by hashing some input data, or the number t0 can be a random number. The value t0 will be the last token she uses. She hashes this number n times to calculate

[0077] t n =H n (t0)

[0078] Here, tn is a verification data item rather than a token. She will n Send to Bob (115).

[0079] Alice stores t0 and no other value. She will use this value to calculate n tokens t using rule (1). n-1 ,…,t1,t0. This creates an access chain or hash chain of tokens that satisfy the following:

[0080] t n-1 =H(t n-2 )

[0081] t n-2 =H(t n-3 )

[0082] M

[0083] t1=H(t0).

[0084] Also note that t n =H(t n-1 ).

[0085] The first token she uses will be t n-1 , and the last token she uses will be t0. Verify data item t n Used for authentication purposes only and is not a token in itself.

[0086] 3. Bob Storage n (120), and no other values ​​are stored. Note that Bob cannot compute t0,t1,…,t n-1 .

[0087] 4. Alice calculates the value of her first token t n-1 =H n-1(t0)(125) and activates it by creating a transaction containing the token (130). The token can be stored, for example, in transaction metadata or in a lock or unlock script. The token can even be stored in the public key of the recipient address itself; details of which are discussed below in conjunction with another embodiment of the present invention. Alice submits the transaction to the blockchain, which reveals the token (135).

[0088] 5. Now, Bob can view and read the revealed token and verify the n =H(t n-1 ) to verify that Alice has activated the correct token (140). If the hash of the token revealed on the blockchain is different from the verification item Bob has stored (145), Bob denies access to the resource (150). Otherwise, Bob allows access (155), storing t n-1 And delete t n .t n-1 Becomes the next verification data item in the sequence.

[0089] 6. Alice repeats step 4 but uses t n-2 to activate another token. Bob does this by repeating step 5 but checking t n-1 =H(t n-2 ) to verify this token. The process (160) is repeated iteratively until all n tokens have been activated and verified (165).

[0090] refer to Figure 2 A method (200) for transferring the ability to access a resource is described.

[0091] Assume Alice has activated m tokens t of her tokens n-1 ,…,t n-m , and Charlie wants to obtain access to the remaining nm tokens t n-m-1 ,…,t0, to satisfy one or more conditions. He can do this safely (without trusting Alice) as follows.

[0092] Alice and Charlie agree to transfer Alice's remaining tokens to Charlie (205). Alice sends Charlie the hash of her next unspent token H(t m-n-1 ).

[0093] Charlie creates a new token s0. He then generates a series of nm tokens s using the following rule m-n-1 ,…,s0(210)

[0094] s m-n-1 =H(s m-n-2 )

[0095] sm-n-2 =H(s m-n-3 )

[0096] M

[0097] s1=H(s0).

[0098] He also calculated s m-n =H(s m-n-1 ), which is a verification data item used for verification purposes. Charlie will s m-n Send to Alice (215).

[0099] Charlie submits a transaction to the blockchain that satisfies one or more conditions (220), where the unlocking script of the transaction has the following form:

[0100] LockingScript=CheckSig H(P A )AND SolveH(t n-m-1 )AND Solve H(s n-m ),

[0101] Among them, P A is Alice's public key. This address can be a Pay to Public Key Hash (P2PKH) or Pay to Script Hash (P2SH) address controlled by Alice.

[0102] Alice now notifies the server Bob that she has transferred the token to Charlie. She does this by transferring her next token t m-n-1 and verification data items m-n Notify Bob to do this (225). Bob can ensure that only Alice can do this because only Alice knows t which Bob can verify. m-n-1 The value is the token t that is hashed to the current verification item. m-n =H(t m-n-1 )'s token (235).

[0103] If Alice is dishonest and does not provide this information to server Bob, then once she spends the transaction from Charlie, the information will be publicly exposed on the blockchain anyway (230), because the transaction unlocking script has the form

[0104] UnlockingScript=[s m-n ][t n-m-1 ][Sig P A ][P A ]

[0105] If the hash value is the same as the current verification item (240), Bob transfers control of the token to Charlie (245) and replaces t n-m-1 Replace with sn-m as the next verification data item (250). Otherwise, Bob does not transfer control of the token to Charlie (260).

[0106] Bob can now check s m-n =H(s m-n-1 ) to verify Charlie's first token s m-n-1 (255).

[0107] Thus, Charlie can prove to Bob that he has received the token from Alice.

[0108] It is also possible to include a timelock refund on transactions from Charlie to Alice, so that the inputs of transactions submitted by Charlie cannot be locked indefinitely by Alice.

[0109] The tokens in the access chain described above can be verifiably linked to a public / private key. Note that this method of linking public / private keys to tokens does not require the tokens to be linked via a one-way function or hash chain as described above, and works if each token is created individually without being associated with a previous token. However, the advantages of using a token access chain translate to linked keys. The linked keys then form an access chain and form a checkable sequence of public / private keys that are verifiably linked to each other via the one-way function of the access chain.

[0110] One application for this is that Alice activates her tokens by making a transaction to these public key addresses. Bob can verify that the tokens have been activated by observing the public key addresses themselves.

[0111] This helps keep the size of transactions as small as possible and improves privacy, as only standard transactions are required, as opposed to custom transactions for token schemes. It is also a universal approach for any public / private key system that works on any blockchain protocol or platform.

[0112] refer to Figure 3 , a method (300) for client Alice to activate a sequence of tokens that server Bob can verify will now be described.

[0113] Let P0 denote Alice's public key and S0 denote her private key. In the Elliptic Curve Digital Signature Algorithm (ECDSA) system, public / private key pairs are related by the following formula: P0 = S0·G, where G is the generator point of the elliptic curve. However, any equivalent public / private key system may be used to perform the steps of the method.

[0114] After agreeing on the number of tokens (305), a token is generated from an initial value t0 (310), and the chain verification data item t nAfter sending it to Bob (315), Alice shares her public key P0 (320) with Bob, who stores it as a verification data item (325).

[0115] After generating the first token t n-1 (330) Alice then uses this to create a derived public key

[0116] P1=(S0+t n-1 )·G=P0+t n-1 ·G (335)

[0117] Since only Alice knows t n-1 , so only she can create this public key. Public key P1 can be verifiably linked to the first token in Alice's access chain.

[0118] Alice can use this public key as the address to which she can send a transaction to activate her first token. Alice generates a blockchain transaction (340) addressed to this public key and submits it to the blockchain (345), thereby publicly revealing the public key.

[0119] Then, Alice will n-1 Send to Bob (350). Bob can then check that Alice has already sent p1=P0+t n-1 G conducts a transaction to verify token t n-1 has been activated (355). If the submitted transaction reveals the same public key as Bob using public key P0 and token t n-1 If the calculated public keys are the same (360), Bob allows Alice to access the resource (370). Otherwise, Bob denies access (365).

[0120] This process may be repeated iteratively (375): if the final token has not yet been activated, Bob stores the revealed public key as the next verification data item (380) and the process continues; otherwise, the process ends (385).

[0121] This method creates n public keys, each of which is provably uniquely linked to a token in the access chain, as follows:

[0122] P1=P0+t n-1 ·G

[0123] P2=P1+t n-2 ·G

[0124] M

[0125] P n =P n-1 +t0·G.

[0126] This process relies on the token taking on a value that is in the same set as the private key, where n is the order of the elliptic curve generator G. This number is slightly less than 2 256 If the token is not in the set, the token can be passed through a hash function (e.g., SHA-256) and then modulo n. If any token is 0 after this process, Alice must start over and choose a different seed token t0.

[0127] 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 "comprise" and "comprising" and the like do not exclude the presence of elements or steps other than those listed in any claim or the entire specification. In this specification, "comprise" means "include or consist of...", and "comprising" means "including or consist of...". The singular reference of an element does not exclude the plural reference of such elements, and vice versa. The present invention can be implemented by hardware comprising several different elements and by a suitably programmed computer. In a device claim that lists several components, several of these components 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.

Claims

1. A computer-implemented method for transferring one or more tokens for providing access to a resource from a first party to a second party, the method comprising: (i) Receive the hash H(t) of the unspent tokens from the first party to the second party m-n-1 ); (ii) the second party generates a token s0, a series of tokens s of the first one-way function chain of the data item m-n-1 ,…,s0, and verification data item s m-n =H(s m-n-1 ); (iii) submitting, by the second party, a blockchain transaction to a blockchain, the blockchain transaction being used to transfer one or more unspent tokens from the first party to the second party, the blockchain transaction comprising one or more conditions; (iv) receiving control of the one or more tokens based on verification by a third party.

2. The method according to claim 1, wherein: The data items of the first one-way function chain are deterministically linked to each other via application of a one-way function.

3. The method according to claim 1 or 2, wherein: The unlocking script of the blockchain transaction has the following form: LockingScript=CheckSig H(P A )AND SolveH(t n-m-1 )AND SolveH(s n-m ), Among them, P A is the public key of the first party.

4. A method according to any one of the preceding claims, wherein: The unlocking script of the blockchain transaction has the following form: UnlockingScript = [s m-n ][t n-m-1 ][Sig P A ][P A ], where P A is the public key of the first party, SigP A is the signature of the first party, t m-n-1 is the token of the first party.

5. A method according to any one of the preceding claims, wherein the second party sends an s to the first party before submitting the blockchain transaction to the blockchain. m-n .

6. A method according to any preceding claim, further comprising the first party notifying the third party that a token has been transferred to the second party.

7. The method according to claim 6, wherein the first party notifies the third party of the next token t m-n-1 and verification data items m-n to notify the third party.

8. A method according to any one of the preceding claims, wherein the verification comprises checking, by the third party, a first token s of the second party. m-n-1 is the verification data item s m-n =H(s m-n-1 )’s hash.

9. A method according to any one of the preceding claims, wherein the third party uses s m-n Replace t m-n-1 As the next verification item.

10. The method of any one of the preceding claims, wherein the blockchain transaction further comprises a time lock refund from the second party to the first party.

11. The method of any preceding claim, further comprising activating a first token to access the resource.

12. The method of claim 11, wherein activating the first token comprises submitting an access blockchain transaction to a blockchain, the access blockchain transaction comprising the first token to be activated.

13. The method of claim 12, wherein generating the first token to be activated comprises applying a one-way function to token s0.

14. A system comprising: processor; as well as A memory comprising executable instructions which, as a result of being executed by the processor, cause the system to perform a computer-implemented method according to any one of claims 1 to 13.

15. A non-transitory computer-readable storage medium having executable instructions stored thereon, the executable instructions causing the computer system to at least perform the computer-implemented method according to any one of claims 1 to 13 when executed by a processor of the computer system.