Blockchain-based privacy enhanced outsourcing data storage
By using Merkle tree and segment replacement technology, the verification problem of data integrity and availability in the data storage process is solved, the safe, efficient and verifiable storage of data is achieved, resource consumption is reduced, and the system reliability is improved. Scalability.
Patent Information
- Application Number
- CN202380020587.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-02-07
- Filing Date
- 2023-01-23
- Publication Date
- 2024-09-20
AI Technical Summary
During the data storage process, the data controller needs to prove that the storage service provider still owns and has not modified the data. However, the existing technology has complex calculations and high resource consumption, and usually requires a trust relationship, making it difficult to achieve data security without trust. and efficient storage and verification.
A Merkle tree is employed to check and verify data integrity at the data storage service provider by dividing the data into multiple segments, calculating the Merkle root, and replacing the original segments upon verification to generate a new Merkle tree, Ensure data integrity and availability.
It achieves quick and efficient verification of data integrity and availability without the need for trust relationships, reduces the burden of data storage, and improves data security and scalability.
Smart Images

Figure CN118679708A
Abstract
Description
Technical Field
[0001] The present disclosure relates to improved techniques and systems for secure, efficient and verifiable storage, backup, archiving and / or retrieval of electronic data. Specifically but not exclusively, this is suitable for use in scenarios where a second party (e.g., a storage service provider) stores data on behalf of a first party (e.g., a data owner, creator, controller and / or authorized administrator), even if the second party is not a trusted entity. Exemplary embodiments of the present disclosure provide improved schemes for verifying the integrity, existence and / or availability of data stored on or by a second party as needed. Advantages include, but are not limited to, the ability to outsource the storage of potentially most of the data to a secondary location or device, thereby avoiding or alleviating the need for storage and processing resources at a primary location. Background Art
[0002] In the digital age, data storage is a necessity for organizations and individuals alike. Storing such data securely and reliably can be challenging for a variety of reasons. For example, the data may have sentimental and / or commercial value; or it may be sensitive from a legal, security, military, or political perspective; and / or the storage of the data may require resources that are not available to the owner / controller of the data. Therefore, for a variety of reasons, it may be desirable to delegate the storage of at least some of the data to another entity. For example, consider the following scenarios: an individual wishes to store home video recordings for posterity; or a company wishes to store large amounts of historical archive data in order to comply with legal requirements; or an inventor wishes to store experimental data in a time-stamped, verifiable manner, but he / she does not have the necessary resources to do so.
[0003] In this case, the first entity may be the owner, creator, controller, manager and / or administrator of the data. For ease of reference, the first entity is referred to as the "data controller" below. The second entity may be any entity that provides data storage services upon request by the first entity, and for ease of reference, the entity may be referred to as the "storage service provider". The data controller and / or storage service provider may be a human, an organization, or a machine-based entity.
[0004] Technical challenges arise in these scenarios because after the storage service provider stores the data, the data controller needs to prove that the provider a) still possesses the data, and b) the data has not been modified or compromised relative to its original state. The storage service provider needs to be able to provide the data controller with proof of the ongoing integrity and availability of the data. To ensure reliability, this verification needs to be provided quickly and efficiently, as computationally complex proofs are often prohibitively expensive in terms of time or processing resources for the entities involved. Furthermore, it is often desirable to provide proof in a way that does not require a trust relationship between the two parties.
[0005] The embodiments of the present disclosure provide solutions to at least these technical problems. Summary of the invention
[0006] The present disclosure provides (at least) improved methods and systems for storing data securely and / or efficiently, or for enabling verification of the continued availability and unchanged state of the data. Preferred embodiments may include using Merkle trees to check and / or ensure the integrity of data blocks / partial data stored at a data storage service provider.
[0007] According to a preferred embodiment, a data controller (Alice) wishes to outsource or delegate the storage of a portion of the data to another entity (Bob) because she cannot or does not wish to retain storage of the entire portion of the data herself. The present disclosure is not limited by the form, structure, or purpose of the data. However, Alice will require Bob to prove that he continues to retain an entire copy of the data and that his copy has not changed in any way from the original version provided to him by Alice.
[0008] In a preferred embodiment, Alice organizes or arranges the original data (D) into multiple segments {m1, m2, m3...m N}. Each segment is a sub-part of the data D. This organization / arrangement may include dividing the data into logical segments or physically divided segments, for example by storing one or more of the segments separately from the other segments. In a preferred embodiment, Alice then records or provides the segments in a data storage block (B) and hashes them in pairs to form a Merkle tree, as is known in the art. This provides a binary tree (T) that represents a complete original version of the data D and includes a Merkle root (R), such as Figure 7 shown.
[0009] Alice selects or otherwise identifies a set (M) of one or more segments and retains the one or more segments. Each segment in the set M may be small and therefore require little storage space. The term "sample" may also be used hereinafter to refer to the segments that Alice retains. Although in some embodiments only one segment may be retained, in a typical embodiment, M may include more than one segment of the original data D so that different samples may be used in separate verification sessions, thereby further enhancing security.
[0010] Either before or after identifying and storing M, Alice sends the entire block B of the segment (and a complete copy of D) to Bob. After Bob receives the entire partial data, Alice deletes her own entire copy of D while retaining access to segment M. After receiving the block B from Alice, Bob stores it in a storage resource that he controls or at least has access to and from which he can retrieve D at a future date. In an exemplary variation, Alice may need to confirm that the data was safely received from Alice before Alice deletes her own copy. In other variations, Alice can send the data D to Bob, who can then organize it into fragment blocks himself. In such variations, the structure of the segments and / or the manner in which the various segments can be identified and referenced may need to be agreed upon between Alice and Bob, or predetermined in some way.
[0011] When Alice subsequently requires verification that Bob still has D and that the data is in its original state, she performs one or more operations on at least one segment of M. The operations provide an output (Y) that is the result of processing the at least one segment of M. Alice then computes a new Merkle root (R') of a new version (T') of T, in which the original segments used in the operations have been replaced with the processed output Y. Hereinafter, the terms "modify", "change" and "replace" may be used interchangeably, but all of these terms are intended to include an interpretation in which the original version of at least one given segment is overwritten or changed or replaced in some way by a different subsequent version. "Verify" may mean in this context "authenticate, prove and / or confirm".
[0012] Alice then asks Bob to perform the same operation using the same segment in his copy of D. Bob does not know in advance the segment and / or operation that Alice will ask him to use in verifying the proof. Bob then performs the operation using the specified segment in his original copy of the data to produce the output Y. He then computes a new Merkle tree (T') and root (R') of the updated block, which includes Y instead of the original segment. He sends Alice the new value of the root R'. Alice can then compare the value of Bob's recomputed Merkle root R' with the value of R' she computed. If the two values match, Bob must have a complete copy of Alice's data, and the data is in its original state when she provided it. If Bob does not have the complete data, or one of its parts has been changed, he will not be able to compute the correct value of the proof.
[0013] Illustrative embodiments and variations are further described in the following sections and demonstrate that the present disclosure provides (at least) the following non-exhaustive list of advantages:
[0014] ●The ability to outsource data storage to potentially untrustworthy storage service providers;
[0015] ● achieving verifiable proof that the data exists at the storage service provider's location, and proof that the data has not been altered from its original state;
[0016] ● Relieve the data storage burden on data controllers that are unable or unwilling to store data themselves (e.g., physical storage limitations, legal restrictions, business or organizational needs to place data in a shared location, etc.);
[0017] ●Easy to prove data integrity, source and authenticity;
[0018] ● Verify data availability and integrity securely, efficiently and quickly;
[0019] ● Facilitates the design and implementation of a wider range of systems and applications that require verification of data authenticity and availability;
[0020] ● Allows the use of simple operations that require few resources in terms of storage or processing and can provide results very quickly;
[0021] Alice keeps smaller segments, so it does not require a lot of storage space; this is good for devices with limited capacity.
[0022] Alice doesn’t even need the bucket itself; she only needs the part of the Merkle path that she can recompute if needed; this allows for Simplified Payment Verification (SPV)-style verification of the contents of block B.
[0023] Alice does not need to keep a large set of sample segments; instead, she can change the operations performed on her samples, and / or change the parameters she asks Bob to use for said operations. For example, in a first verification, she can ask him to concatenate the character "G" to a given segment, and in a subsequent verification ask for the result of an XOR operation on the same or a different segment using a randomly generated bit string as a mask. In a third verification, she can ask him to concatenate the character "U" to the same or a different segment, and so on. Thus, Alice only needs to keep a few segments to safely allow multiple repetitions or variations of the verification process, without facilitating Bob's ability to predict the proofs he will be asked to provide;
[0024] ● Traditionally, Merkle proofs are used to verify Specific blockchain transactions is part of the root (i.e., is located in a particular block). In contrast, the present disclosure uses >=1 sample segment of the block to verify The entire data tree The existence / control / storage of , not just a portion of it. So even if Alice’s block B contains 1 billion segments, she only needs one of those segments to quickly and easily verify All segments in the segment exists in Bob's copy of said tree / block;
[0025] Alice can delegate or authorize verification to another party (Carol), such as a third-party auditor or some entity that needs to verify the existence and authenticity of the stored data. Alice can send a secret or share a secret with Carol using any suitable technique (e.g., the techniques disclosed in WO2017 / 145016). Carol can use the secret to request the verification proof from Bob;
[0026] ● This allows delegation / authorization of third-party verification for specific data items, thereby improving or at least preserving privacy (i.e. Alice does not need to grant Carol access to her entire data store if Carol only needs to verify certain items);
[0027] ● The invention facilitates the scalability of technical systems and networks, as the storage of data can be securely and verifiably outsourced;
[0028] ● The embodiments also provide solutions to technical challenges related to data persistence; it is well known that common system imaging techniques face the challenge of requiring sufficient RAM to save an entire copy of the data. See: https: / / en.wikipedia.org / wiki / Persistence_(computer_science). The embodiments can solve this challenge by delegating the storage to the provider;
[0029] ● Embodiments may also provide improved solutions for data backup and recovery as well as archiving, file system dumps, version control, and ensuring consistency. See: https: / / en.wikipedia.org / wiki / Backup. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] To facilitate an understanding of the embodiments of the present disclosure and to show how such embodiments may be implemented, reference will now be made, by way of example only, to the accompanying drawings, in which:
[0031] Figure 1 A schematic block diagram of a system for implementing a blockchain.
[0032] Figure 2 Some examples of transactions that may be recorded in a blockchain are schematically shown.
[0033] Figure 3A A schematic block diagram of a client application is shown.
[0034] Figure 3B It shows that Figure 3A A schematic mockup of an exemplary user interface represented by a client application.
[0035] Figure 4 A schematic block diagram of some node software for processing transactions is shown.
[0036] Figure 5 A flow chart is provided that illustrates, at an overview level, an embodiment of the present disclosure, including at least some illustrative steps that may be taken during a storage phase and a subsequent verification phase of the present disclosure.
[0037] Figure 6 is an illustration of a preferred embodiment in which Alice sends a block of data segments to Bob for storage and a copy of the block header to the blockchain for storage in an on-chain transaction. Figure 6 Some steps that may be taken during the storage phase of the present disclosure are shown. Figure 6 Some of the steps shown in the figure may be omitted in certain embodiments, while other steps that may be performed are shown in the figure. Figure 6 Not shown.
[0038] Figure 7 A very simple Merkle tree T is shown, which includes a Merkle root R and nodes below the root.
[0039] Figure 8 A Merkle tree that may be used according to an embodiment of the present disclosure is shown, including sample segments {m1, m2, m3, m4}. DETAILED DESCRIPTION
[0040] Now for illustration purposes only, especially with reference to Figures 5 to 8 Exemplary embodiments of the present disclosure are provided.
[0041] Consider a scenario where a first party (Alice 1) who is a data controller needs to store a data item (D). The term "data controller" is used to include any party that owns the data that needs to be stored, including but not limited to the owner, creator, controller, manager, processor, and / or authorized administrator of the data. The term "data item" is used to refer to a portion of data, regardless of how it is structured, generated, formed, used, or organized. For example, it can be one or more discrete data files, a collection of related data items, such as database records, company accounts, related media content, legal documents, the contents of a physical storage medium such as a disk, etc.
[0042] Assume that Alice 1 cannot store the entire data item herself or does not wish to do so. For example, her device may not have enough memory, or the data may be sensitive and she does not want to store it locally for security or liability reasons. Therefore, she needs to outsource the storage to another entity (Bob 2) who will act as a storage service provider. Bob owns or at least has access to storage resources 3.
[0043] However, Alice 1 needs to ensure that Bob 2:
[0044] ● no loss of data item D; and / or
[0045] ● Will not (intentionally or accidentally) change the data D, for example if his device has been hacked into with a data-destroying vulnerability, or if his storage device fails and cannot recover Alice's data.
[0046] Alice 1 therefore needs verifiable proof that the data stored by Bob 2 on her behalf still exists and is in its original, unaltered state. She may need to obtain such proofs periodically (e.g., she may want Bob 2 to prove secure storage monthly) or at random / unscheduled times. Subsequent actions may depend on Bob's successful or unsuccessful provision of the proof. For example, if the existence and state of the data is successfully verified, a signal or confirmation of an electronic communication may be sent to a recipient, a file or record may be updated, an event may be triggered, a resource may be unlocked, a transfer may be made between parties conducting a transaction, such as Alice sending a payment to Bob, etc. Similarly, if the verification is unsuccessful, an event may be triggered, a communication may be sent to a recipient, a record / file may be updated. For example, an alarm signal may be generated and transmitted, or certain resources may be locked to prevent access, etc.
[0047] In some embodiments, Bob may be a completely independent entity from Alice, in that there may be no commercial or organizational association between them, and / or no trust-based relationship. For example, Bob may be a third-party provider that provides data storage as a service to paying customers. However, in other embodiments, Bob may be known to Alice, associated with Alice, and / or trusted by Alice. For example, Bob may include data storage functions or facilities that form part of Alice's organization. Even if Bob is trusted by Alice, she may need him to verify that the data he stores remains intact and unchanged. For example, this may be because Alice needs to comply with regulatory, commercial or legal requirements related to (sensitive) data storage.
[0048] Reference now Figures 5 to 8 Discussing exemplary embodiments. It should be noted that in practice, Figure 5 The steps shown and described in the specification may be performed in a different order. For example, the step of sending block B to Bob may be performed after or before Alice computes output Y. As long as Alice identifies and records her segment set M before deleting her entire copy of D, other steps may also be performed in a different order, and the present disclosure is not limited thereto.
[0049] exist Figure 5In step 110 of , Alice provides her data (D) in block (B). It should be noted that the term "block" here refers to a block of data in the traditional computing sense (see https: / / en.wikipedia.org / wiki / Block_(data_storage)), not a data block in a "blockchain block", which is a structured collection of blockchain transactions. As is known in the general computing field, data can be stored in a block that includes a body (or "payload") and a header. The header includes information related to the data stored in the body of the block.
[0050] To this end, the data is organized in segments. These segments of a data item can also be called "subparts". When combined, the subparts / segments form a complete copy of the data item D ( Figure 5 , step 110), and are thus also combined together to provide block B. The segments in the block are hashed in pairs starting from the leaf nodes upwards to compute a Merkle tree T representing all the segments in block B. T has a Merkle root (R) ( Figure 5 , step 112). Since the Merkle root R is derived from the hashes of all segments in the block, it can be used to verify D, as described below. Those skilled in the art will readily understand the concepts and techniques involved in generating and using Merkle trees, see https: / / en.wikipedia.org / wiki / Merkle_tree.
[0051] exist Figure 5 In step 114, Alice identifies a set (M) of one or more sample segments. For a simple example, assume that she selects three segments m0, m1, m3 and stores these segments for future reference. In other possible embodiments, Alice may not store the segments in their original form. Instead, she may save the segments in some processed form (e.g., in an encoded, hashed, or compressed form). In such embodiments, Alice will then ask Bob to perform a verification operation by referencing the selected segments through some form of segment identifier, and the first step of the verification operation is a processing step. For example, if Alice stores her segments in hashed form, she may ask Bob to perform a verification by concatenating "G" to the hash of segment number 11001110. Advantages of storing segments in a processed form rather than in their original form can include increased security and a reduction in storage resources required by Alice.
[0052] Whether stored in raw or processed form, Alice's segments are likely to be small (e.g., 1k bytes per segment), so storing the segments requires fewer resources on Alice's device. Alice can select her sample of segments based on any criteria (e.g., every 10 segments), or randomly select from the set of M segments. Random selection may enhance security because it is more difficult for a third party to predict the segments she will store. Although embodiments of the present disclosure can be implemented using only one selected segment, using multiple segments provides an enhanced level of security because it further reduces Bob's ability to predict the proofs he will need to generate.
[0053] exist Figure 5 In step 113, and also as Figure 6 As shown, Alice sends Bob block B containing the entire segment data D, asking him to store the block on her behalf, which he does. Figure 6 As shown, the entire block she sends includes a collection of sample segments m0, m1, m3). He stores the block B containing the data in a storage device 3 that he controls, or at least is able to send the data to that storage device for storage. Storage device 3 may include a combination of one or more databases, disks, servers, or data storage media. However, Bob does not know the segment or number of segments that Alice chooses to keep.
[0054] like Figure 6 As shown, the storage phase of this embodiment of the disclosure is now complete. However, at some point in the future, Alice needs to check that Bob still has D and that the data has not been changed in any way. Perhaps she wants to do this regularly or at random times, or when a triggering event occurs (e.g., at the beginning of each month), or when she notices a new malware vulnerability has recently appeared, or when a third party asks her to provide proof that D exists in its original form, etc. Alice needs to prove the existence and unchanged state of D that Bob has, so the verification phase begins.
[0055] exist Figure 5 In step 115, she computes a (possibly small) change to one or more of her sample segments m0, m1, m3 by performing some operation f on them or using them as input / parameters to an operation f. She may select segments from her retained set M randomly or according to a predetermined criterion, such as taking the next unused segment in the set. The changes she makes to the selected segments may produce any type of mutation. For example, this may involve bitwise operations, Boolean operations, or mathematical functions, etc. In the example of the present disclosure, suppose she appends the character "A" to sample m2. She now knows the result of this operation.
[0056] Therefore, if m2 is: 0111001001001110
[0058] and "A" (in ASCII) is 01000001, then she can calculate
[0059] m2∥'A'=011100100100111001000001.
[0060] exist Figure 4 In step 115, Alice recomputes the Merkle tree, this time including the modified version of m2 instead of its original version. Therefore, Alice knows the value of the new Merkle root (R') of the recomputed tree (T').
[0061] exist Figure 5 In step 116 of Alice’s D, she requests that Bob make the same change (i.e., operation f) to segment m2 in his version of D and send her the result (i.e., the value of the Merkle root of the new tree containing the modified version of segment m2). Therefore, in step 117, Bob must perform the computation based on the entire D plus the operation specified by Alice. Alice may also have provided or specified certain parameters to use for modifying the segment. If Bob no longer has the entire copy of D that Alice provided, he will not be able to compute the Merkle root that Alice needs to verify his copy.
[0062] Since Bob has a full copy of D, Alice can discard her full copy once she has stored samples m0, m1, m3 and / or their hashes. Alice also does not need to store the entire Merkle tree for block B, but does need to keep the Merkle root value of that block so that she can compare it with the value calculated by Bob during the verification phase described below.
[0063] Communicate the requested changes to Bob
[0064] Alice may specify the relevant block and / or segment by an identifier. The identifier of block B may be provided in the header of block B that Alice sends to Bob. The header may include the Merkle root R of the block, and this may be or form part of the identifier used in the verification request sent to Bob. At least one segment that Alice requests him to perform an operation on may be identified by an identifier that is unique within the block.
[0065] In another embodiment, Alice may communicate the requested modification to Bob using an encrypted or authenticated message technique, such as an authentication code (MAC). This would provide enhanced security because it would assure Bob that the message truly came from Alice and not an unauthorized party. For example, Alice could send a message to Bob using an HMAC, in which she provides the segment or its identifier and any relevant information, such as the operation and / or operands. HMAC techniques are known in the art, and Wikipedia (https: / / en.wikipedia.org / wiki / HMAC) provides a definition derived from RFC 2104:
[0066]
[0067] in,
[0068] H is a cryptographic hash function,
[0069] m is the message to be authenticated,
[0070] K is the secret key,
[0071] K' is the block-sized key derived from the secret key K; either by padding right with zeros up to the block size, or by first hashing down to less than or equal to the block size and then padding right with zeros,
[0072] || indicates cascade,
[0073] represents bitwise exclusive OR (XOR),
[0074] opad is the outer padding of the block size, consisting of repeated bytes with a value of 0x5c.
[0075] ipad is the internal padding of the chunk size, consisting of repeated bytes with value 0x36.
[0076] In such embodiments, any known technique may be used to generate a secret key, such as, but not limited to, the techniques disclosed in WO / 2017 / 145016, or the shared secret concepts and techniques mentioned in https: / / en.wikipedia.org / wiki / Secret_sharing and https: / / en.wikipedia.org / wiki / Shared_secret. Using such techniques, the process may be automated, as described in more detail below.
[0077] Authentication success or failure
[0078] After receiving the Merkle root computed by Bob, Figure 5In step 118 of , Alice checks that the value he provided matches her expectation for R'. Remember that if part of the data changes in any way, the resulting hash of that data will be different from the hash of the original data. So if part of the data in block B changes, the entire path and tree it is in changes, including the value of its Merkle root.
[0079] exist Figure 5 In step 120 of , if the value of the Merkle root recomputed by Bob matches the value recomputed by Alice, then the verification is considered successful, and she can be guaranteed that Bob a) still has a complete copy of D, and b) has not changed any part of D, since he needs a complete and unaltered copy of D in order to provide a correct recomputation. Figure 5 In step 119, if the two values do not match, Alice and / or Bob may take some form of remedial or alarm action.
[0080] Although the operations Alice chooses to perform may be more complex than the simple cascade example used above, it does not need to be. Since Bob does not know in advance the operations and segments that are selected for verification purposes, there is no feasible way for Bob to predict the operations Alice will ask him to perform for the purpose of providing the required proof.
[0081] Various options for storing data D
[0082] In alternative embodiments, the data may not be stored in data blocks, but may be stored in any suitable alternative form and in any suitable structure on any suitable medium. Importantly, there needs to be a way for Alice to identify and uniquely reference a specific segment of the data so that she can communicate to Bob the segment on which he needs to perform a verification operation. Likewise, Bob needs to be able to interpret Alice's reference and access the specified segment from his storage resource. For example, Bob may store the data on a sequential storage such as a tape, and Alice can reference the segment by byte number starting from byte number 0 (the first byte written to the tape). In another variation, the data may be stored in a linked list, a DHT, a distributed database. The storage of the data may be distributed on more than one physical and / or logical storage device. For convenience only, it is referred to here as storing the data in blocks, but this should be interpreted as meaning any suitable way of storing the data so that the portions of the data can be identified and / or specified. Preferably, the selected storage method and structure are arranged so that a header segment or sub-portion can be included, so that the embodiments disclosed herein that need to be included use a header H.
[0083] In some embodiments, Bob stores the original block B of Alice's segmented data item D off-chain in storage device 3, such as Figure 6Although data can be stored in a blockchain in various ways, this approach may not always be the ideal or most efficient solution depending on the requirements and limitations of the specific implementation. Therefore, in order to improve the efficiency of processing time, resources, and costs, in some cases, it may be preferable to store block B in an off-chain storage resource (e.g., Figure 6 In the memory 3).
[0084] However, a scenario may arise where the original state of block B needs to be verified. For example, there may be a difference between Alice and Bob regarding what she sent to him, or a third party may wish to verify that the copy Bob has stored does in fact match Alice's original data item. In other words, the authenticity of the original data item D also needs to be verified. To address this challenge, a preferred embodiment includes the following steps, where the header H of block B is written into a transaction (Tx), which includes the Merkle root of the tree T of the original block B, which is written to the ledger of the blockchain 4, see Figure 6 .
[0085] Simple Payment Verification (SPV)
[0086] Embodiments of the present disclosure allow the header H of a block to be used as an SPV-style marker or reference to a data block. As is known in the field of blockchain transactions, SPV can use the Merkle tree structure built into the blockchain block to simplify the transaction verification process and reduce the amount of storage and processing resources required. Without storing an entire copy of the blockchain, a verifier can prove that a target transaction (Tx) is located in a given block, as long as they know the Merkle root of the block and sufficient information required to calculate the path of the target transaction. This is advantageous for devices with limited resources (e.g., digital wallets running on smaller devices). More background information can be found in the art, for example, more background information can be found at https: / / medium.com / coinmonks / spv-proofs-explained-f38f8bb8f580.
[0087] Similarly, Figure 8 A Merkle tree that can be used according to an embodiment of the present disclosure is shown, including a sample segment {m1, m2, m3, m4}. In the same way that traditional SPV style verification enables the verifier to minimize storage and processing, the present disclosure enables Alice to compute the Merkle root of the Merkle tree using only the minimum number of required data items, as long as Alice chooses her sample segment appropriately.
[0088] For example, suppose Alice's data is represented by Figure 8 The Merkle tree T shown in . She chooses the sample segment {m1,m2,m3,m4}. She does not need to store the segments shown in solid black or dashed lines, she only needs the samples she chooses, because she can:
[0089] Hash m1 and m2 to compute c1;
[0090] ● She can then hash c1 and m3 to compute c2;
[0091] ●She can then hash c2 and m4 to compute the Merkle root R of T.
[0092] Clearly, this technology has significant technical advantages, including but not limited to increased speed and efficiency when performing verification and security processes. However, it should be noted that while having the same technical advantages as traditional style SPV, the disclosed embodiments operate in a completely different manner to achieve these results. In traditional SPV methods, the Merkle root is known, and the verifier builds a downward path from the root to prove whether the target transaction exists at a lower level. In contrast, the embodiments of the present disclosure allow the verifier to start at a lower level and work upward until the Merkle root is calculated, which is then used to determine the success or failure of the verification.
[0093] As described above, in use, Alice and Bob may exchange messages via any suitable communication method to transmit the information required for a particular verification request. The verifier (Bob) may perform off-chain verification checks. The process may be partially or fully automated, and / or may be arranged to be operated at least in part via a blockchain. Embodiments of blockchain implementations may be arranged to include a locking mechanism, such as a condition based on nLocktime, so that blockchain transactions may be exchanged between Alice and Bob and then settled using SPV.
[0094] Enable third-party data verification requests
[0095] Advantageously, embodiments of the present disclosure allow Alice herself or some other entity to request verification. The other entity is referred to as a third party, Carol. For example, Alice can delegate or authorize verification to Carol, who can be, for example, a third-party auditor or any (human, organizational, or machine-based) entity that needs to verify the existence and authenticity of the data stored by Alice. Alice can use any suitable technology (e.g., the technology disclosed in WO / 2017 / 145016) to send a secret or share a secret with Carol. Carol can use the secret to request a verification certificate from Bob by incorporating the use of the shared secret into an operation for modifying a selected segment or replacing a selected segment with a different version. Although the present disclosure is not limited to their use for secret sharing, the techniques disclosed in WO / 2017 / 145016 can be used to advantage because they allow both parties to generate a shared secret independently of each other. Therefore, the transmission of secrets and their potential interception during transmission can be avoided. This enhances security because if an unauthorized party is able to learn the secret, they may identify useful information for predicting or identifying the calculations that Bob will be asked to perform.
[0096] Advantageously, Alice does not need to grant Carol access to her entire data store (e.g., an entire server or disk) if Carol only needs to verify certain items within the storage space. Instead, she can send various data items to Bob (and possibly other service providers) in separate blocks, asking him to store each block according to the embodiments described herein. When Carol needs verification, Bob can provide the required proof only for the specific data item in the associated block. Thus, embodiments allow for delegation / authorization of third-party verification for specific data items, thereby improving or at least protecting the privacy of the data and protecting the storage of the data in order to enhance the security of other data items and / or storage resources.
[0097] Update Data Item D – Record incremental changes
[0098] Over time, data item D may change, evolve, or be updated. For example, an initial document such as a "last will and testament" may change as the testator ages; or a musical arrangement may be adapted to a popular style; or software is modified to fix a bug. There are many reasons why a data item may need to be changed or updated from its original form, so a technical solution is needed on how to capture and verifiably record such changes in a data item. In this case, it is necessary to capture and verify:
[0099] ● changes from the original form; and / or
[0100] ●The time when the adaptation occurred.
[0101] Consider a scenario where Alice changes at least one data segment stored in block B. Call the updated version B'. According to one embodiment, Alice or a third party can record incremental changes or modifications by specifying to Bob that one or more specific sub-portions must be changed. He may need to record details such as the nature, time, form of the change, and the difference between the existing version and the new version. In one embodiment, this can be achieved by writing transactions to the blockchain so that an "update" link or reference from a first transaction (Tx0) (including the header of block B) to a subsequent transaction (Tx1) is recorded on the chain. Tx1 includes the changed version of at least one segment of block B, or a reference / pointer / link to the location of the updated changed segment or the entire copy of B'. Alice can communicate to Bob that the state of block B has been changed by any suitable method. Bob can access the changed segment from the location specified by Alice, or Alice can communicate the relevant segment to Bob by any suitable selected method. The advantage of using a blockchain is that it can provide an immutable, auditable, and time-stamped record of modifications.
[0102] Alternatively or additionally, Bob may detect that block B has been modified. This may be accomplished in a variety of ways. For example, an automated process may be used to monitor and detect the state of the data. One way to do this may be to use an automated DFA, such as the technique disclosed in WO2018 / 078584. Bob may then access the modified (i.e., changed) segments from the location specified by Alice, or Alice may communicate the relevant segments to Bob by any suitable selected method.
[0103] Various permutations of such embodiments may be designed as needed for a particular scenario. For example, if only minor changes are made to the data, Alice may include the modified segment in a blockchain transaction, and Bob may access it from the transaction (for copying, downloading, etc.). She may embed the data in a transaction (Tx) in various ways, such as including the modified data segment as metadata in a script associated with an unspent output (UTXO). The new data may be included in a script at a location specified by the protocol associated with the blockchain as a cryptographic key location. This is a technique disclosed in WO2018 / 078584. Additionally or alternatively, the data may be included in the script after an OP_RETURN statement, and / or using a tokenized digital asset, and / or including a hash of a reference to the data, or using a condensed, encoded, abbreviated, abridged, and / or compressed version. For example, the modification may be provided in a manner that Bob may infer or compute the modification, such as by decompressing a file, by executing a function or applying a process to the original data, or by any other known technique for deriving the desired output (i.e., the modified data).
[0104] According to another variation of this embodiment, when Alice updates data D, she generates a blockchain transaction that spends the original transaction Tx0 including the header (H). "Spending a transaction" means "spending at least one UTXO of a transaction," as will be readily understood by those skilled in the art. A first transaction Tx0 may be spent such that the first transaction transfers one or more digital assets to the inputs of a second transaction Tx1. In some embodiments, a cryptographic key controlled by Alice, Bob, and / or a third party may be required to unlock the assets transferred to Tx1.
[0105] Thus, embodiments provide the ability to record changes to stored data, and ensure that associated but different versions of data are linked in a verifiable manner, possibly with a cryptographically enforced timestamp. This ensures the integrity of the latest form of the data, enabling reliance on, verification and certification of new versions of the data. Thus, embodiments of the present invention provide improved techniques for ensuring the integrity of data, which then enables the use of the data in other applications further "downstream" in a technical process that needs to utilize the data in some way. For example, critical systems involving safety and security may need to be able to rely on the integrity of the data it uses as input to the process.
[0106] Automation Example
[0107] In some cases, it may be advantageous to automate the process described herein. This not only relieves Alice and / or Bob of the burden of performing parts of the process, but also enables the process to be delegated to third-party resources, thereby facilitating the implementation of different hardware / software architectures. This may also enable separation and / or partitioning of technical processes, thereby enhancing security.
[0108] For example, automated resources (which may be referred to as "oracles," "robots," or "smart contracts") may be used to perform the steps of the disclosed technology without manual, human intervention. For ease of reference, these automated resources are referred to as "agents," which may be software-implemented entities executed on one or more hardware devices, each of which includes at least one processor.
[0109] Consider a scenario where Alice enters into a 12-month contract with Bob that Bob will store her data on her behalf. Alice can automate the arrangement by determining monthly verification proofs. She can determine multiple Merkle roots in advance and use these Merkle roots in scheduled verification sessions, requiring Bob to provide the correct proof.
[0110] In this scenario, Alice precomputes several different variations of R'. She selects or otherwise identifies different modifications to the data and computes the corresponding Merkle paths and roots for each modification. For example, she selects or predetermines at least one operation (f), at least one operand of the operation, and / or at least one segment on which the operation will be performed or used. She then computes and records the Merkle roots for each of the various modifications. Figure 5 , this embodiment involves selecting more than one operation and / or segment in step 114 and then repeating the computation of step 115 for each new Merkle tree T' that includes the output Y of operation f. Assume Figure 7 The tree shown in is a Merkle tree T representing Alice's data block B. Each node in the tree is a segment of data D. Assume that Alice selects segments m1 and m4 as sample segments.
[0111] She then performs an operation on each segment. Suppose she changes the segment by performing a bitwise XOR operation on m1 with the first mask, and then she performs the same operation on m4 with the second mask. For example:
[0112] m1⊕01100011
[0113] m4⊕11001010
[0114] Now, she can compute the Merkle root of the new tree resulting from the operation on m1, and the Merkle root of the new tree resulting from the operation on m4. She stores these two computed Merkle roots.
[0115] She then builds a blockchain transaction that specifies the individual selected segments and their corresponding masks so that Bob knows what he is being asked to compute.
[0116] This transaction can be arranged with a time lock mechanism that reveals the next required computation at the required time. For example, Alice can compute 12 different Merkle roots using different sample segments and / or masks, and Bob can spend each of these Merkle roots at the end of each month. Bob can reply to Alice every month by providing verification in an HMAC:
[0117] HMAC1(MerkleRoot1,Secret1)
[0118] HMAC2(MerkleRoot2,Secret2)
[0119] etc.
[0120] Therefore, Alice predetermines multiple verification challenges and then uses an automated system to provide these verification challenges to Bob through the blockchain. After successful verification at the end of each time period, Alice pays Bob for the storage service. Smart contracts can be used to monitor or enforce the execution of these steps.
[0121] The contents of international applications PCT / IB2017 / 050856, PCT / IB2017 / 056696 and PCT / IB2017 / 050819 are incorporated herein in their entirety.
[0122] Exemplary System Overview
[0123] Some (but not all) of the embodiments described above include the use of or interaction with a blockchain. Now, an explanation of an exemplary system that can be used to implement such embodiments is provided. It should be noted that in accordance with standard terminology, reference is made below to "Alice" and "Bob", but the use of these terms in the following overview is independent of the use of the same names in the previous section. Figures 1 to 4 It should also be noted that reference is made to the Bitcoin network below, but a) the term "Bitcoin" is intended herein to include all variations or deviations from the original Bitcoin protocol; and b) references herein to the Bitcoin blockchain / protocol / network are for illustrative purposes only, and the present disclosure is not limited thereto, as non-Bitcoin blockchains / protocols / networks may be used to implement one or more embodiments of the present disclosure and fall within the scope of the present disclosure.
[0124] The term "blockchain" refers to a distributed data structure in which a copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (hereinafter referred to as a "blockchain network") and is widely disclosed. The blockchain includes a series of data blocks, each of which includes one or more transactions. Each transaction, except for the so-called "coinbase transaction", points to a previous transaction in a sequence, which may span one or more blocks back to one or more coinbase transactions. The coinbase transaction will be discussed further below. Transactions submitted to the blockchain network are included in new blocks. The process of creating a new block is generally referred to as "mining", which involves each of a plurality of nodes competing to perform "proof of work", i.e., solving a cryptographic puzzle based on a representation of a defined set of ordered and verified valid pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain can be pruned at some nodes, and the publication of blocks can be achieved by publishing only the block header.
[0125] Transactions in a blockchain can be used for one or more of the following purposes: transferring digital assets (i.e., a certain number of digital tokens); sorting a set of entries in a virtualized ledger or registry; receiving and processing time-stamped entries; and / or sorting index pointers by time. Blockchains can also be used to implement hierarchical additional functions on blockchains. For example, a blockchain protocol may allow additional user data or data indexes to be stored in a transaction. There is no pre-specified limit on the maximum data capacity that can be stored in a single transaction, so increasingly complex data can be incorporated. For example, this can be used to store electronic documents, audio, or video data in a blockchain.
[0126] The nodes of the blockchain network (commonly referred to as "miners") perform a distributed transaction registration and verification process, which will be described in more detail later. In summary, in this process, nodes verify transactions and insert them into block templates, which attempt to identify a valid proof-of-work solution for the block template. Once a valid solution is found, the new block is propagated to other nodes of the network, so that each node can record the new block on the blockchain. In order to record a transaction in the blockchain, a user (e.g., a blockchain client application) sends the transaction to one of the nodes in the network for propagation. The nodes receiving the transaction can compete to find a proof-of-work solution that incorporates the verified valid transaction into the new block. Each node is configured to execute the same node protocol, which will include one or more conditions for confirming that the transaction is valid. Invalid transactions will not be propagated or incorporated into the block. Assuming that the transaction has been verified to be valid and thus accepted on the blockchain, the transaction (including any user data) will therefore be registered and indexed as an immutable public record on each node in the blockchain network.
[0127] The node that successfully solves the proof-of-work puzzle to create the latest block is usually rewarded with a new transaction called a "coinbase transaction" that distributes the amount of digital assets, i.e. the number of tokens. The detection and rejection of invalid transactions is performed by the actions of competing nodes, which act as agents of the network and are incentivized to report and prevent improper behavior. The widespread publication of information allows users to continuously audit the performance of nodes. Publishing only block headers allows participants to ensure the continued integrity of the blockchain.
[0128] In the "output-based" model (sometimes referred to as the UTXO-based model), the data structure of a given transaction includes one or more inputs and one or more outputs. Any spendable output includes an element that specifies the amount of a digital asset, which can be derived from the ongoing sequence of transactions. Spendable outputs are sometimes called UTXOs ("unspent transaction outputs"). Outputs may also include a locking script that specifies future redemption conditions for the output. A locking script is a predicate that defines the conditions necessary to verify and transfer a digital token or asset. Each input of a transaction (except for a coinbase transaction) includes a pointer (i.e., a reference) to such an output in a previous transaction, and may also include an unlocking script for unlocking the locking script pointing to the output. Thus, consider a pair of transactions, referred to as a first transaction and a second transaction (or "target" transaction). The first transaction includes at least one output that specifies the amount of a digital asset, and includes a locking script that defines one or more conditions for unlocking the output. The second (target) transaction includes at least one input and an unlocking script, the at least one input including a pointer to the output of the first transaction; the unlocking script is used to unlock the output of the first transaction.
[0129] In such a model, when the second (target) transaction is sent to the blockchain network to be propagated and recorded in the blockchain, one of the validity conditions applied at each node will be that the unlocking script satisfies all of the one or more conditions defined in the locking script of the first transaction. Another condition will be that the output of the first transaction has not been redeemed by another earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate the transaction (as a valid transaction, but may register an invalid transaction) nor include the transaction in a new block to be recorded in the blockchain.
[0130] Another transaction model is the account-based model. In this case, each transaction is defined not by reference to the UTXO of the previous transaction in the past transaction sequence, but by reference to the absolute account balance. The current state of all accounts is stored individually by the node in the blockchain and is constantly updated.
[0131] Go to Figures 1 to 4 . Figure 1 An exemplary system 100 for implementing a blockchain 150 is shown. The system 100 may include a packet-switched network 101, typically a wide area internet such as the Internet. The packet-switched network 101 includes a plurality of blockchain nodes 104, which may be arranged to form a peer-to-peer (P2P) network 106 within the packet-switched network 101. Although not shown, the blockchain nodes 104 may be arranged as a nearly complete graph. Thus, each blockchain node 104 is highly connected to other blockchain nodes 104.
[0132] Each blockchain node 104 includes a computer device of a peer, and different nodes 104 belong to different peers. Each blockchain node 104 includes a processing device, which includes one or more processors, such as one or more central processing units (CPUs), accelerator processors, special processors and / or field programmable gate arrays (FPGAs), and other devices, such as application-specific integrated circuits (ASICs). Each node also includes a memory, that is, a computer-readable memory in the form of a non-transitory computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as solid-state drives (SSDs), flash memory, or electrically erasable programmable read-only memories (EEPROMs), and / or optical media such as optical disk drives.
[0133] The blockchain 150 includes a series of data blocks 151, wherein a respective copy of the blockchain 150 is maintained at each of the plurality of blockchain nodes 104 in the distributed or blockchain network 106. As described above, maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in its entirety. Instead, the blockchain 150 can be pruned as long as each blockchain node 150 stores a block header (discussed below) for each block 151. Each block 151 in the blockchain includes one or more transactions 152, wherein a transaction in this context refers to a data structure. The nature of the data structure will depend on the type of transaction protocol used as part of the transaction model or plan. A given blockchain uses a particular transaction protocol throughout. In a common transaction protocol, the data structure of each transaction 152 includes at least one input and at least one output. Each output specifies an amount of a digital asset represented as a property, an example of which is an output that is cryptographically locked to a user 103 (requiring the user's signature or other solution to unlock, thereby redeeming or spending). Each input points to the output of a previous transaction 152, thereby linking these transactions.
[0134] Each block 151 also includes a block pointer 155, which points to a previously created block 151 in the blockchain to define the order of blocks 151. Each transaction 152 (except for the coinbase transaction) includes a pointer to a previous transaction to define the order of the transaction sequence (Note: the sequence of transactions 152 can branch). The blockchain of blocks 151 is traced back to the genesis block (Gb) 153, which is the first block in the blockchain. One or more original transactions 152 earlier in the blockchain 150 point to the genesis block 153, not to the previous transaction.
[0135] Each blockchain node 104 is configured to forward transactions 152 to other blockchain nodes 104, so that transactions 152 are propagated throughout the network 106. Each blockchain node 104 is configured to create blocks 151 and store corresponding copies of the same blockchain 150 in its corresponding memory. Each blockchain node 104 also maintains an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into block 151. Ordered pools 154 are often referred to as "memory pools". In this article, the term is not intended to be limited to any particular blockchain, protocol, or model. The term refers to a set of ordered transactions that a node 104 has accepted as valid, and for which the node 104 is forced to not accept any other transaction that attempts to spend the same output.
[0136] In a given current transaction 152j, an input (or each input) includes a pointer that references an output of a previous transaction 152i in the transaction sequence, specifying that the output is to be redeemed or "spent" in the current transaction 152j. In general, the previous transaction can be any transaction in the ordered set 154 or any block 151. Although the previous transaction 152i will need to exist and be verified to be valid in order to ensure that the current transaction is valid, the previous transaction 152i does not have to exist when the current transaction 152j is created or even sent to the network 106. Therefore, in this article, "previous" refers to the predecessor in the logical sequence linked by the pointer, and not necessarily the creation time or sending time in the time sequence, and therefore, does not necessarily exclude the situation where transactions 152i, 152j are created or sent out of order (see the discussion of orphan transactions below). The previous transaction 152i can also be called a predecessor transaction or a predecessor transaction.
[0137] The inputs of the current transaction 152j also include input authorizations, such as the signature of the user 103a to whom the outputs of the previous transaction 152i are locked. In turn, the outputs of the current transaction 152j may be cryptographically locked to the new user or entity 103b. Thus, the current transaction 152j may transfer the amounts defined in the inputs of the previous transaction 152i to the new user or entity 103b defined in the outputs of the current transaction 152j. In some cases, a transaction 152 may have multiple outputs to split the input amounts among multiple users or entities (one of which may be the original user or entity 103a for changes). In some cases, a transaction may also have multiple inputs to aggregate the amounts from multiple outputs of one or more previous transactions and reallocate them to one or more outputs of the current transaction.
[0138] According to an output-based transaction protocol, such as Bitcoin, when a party 103, such as an individual user or an organization, wishes to issue a new transaction 152j (either by an automated program employed by the party or manually), the issuing party sends the new transaction from its computer terminal 102 to a recipient. The issuing party or recipient will ultimately send the transaction to one or more blockchain nodes 104 of the network 106 (now typically a server or data center, but in principle it can also be other user terminals). It is also not excluded that the party 103 issuing the new transaction 152j can send the transaction directly to one or more blockchain nodes 104, and in some examples, the transaction may not be sent to the recipient. The blockchain node 104 receiving the transaction checks whether the transaction is valid according to the blockchain node protocol applied at each blockchain node 104. The blockchain node protocol typically requires the blockchain node 104 to check whether the cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in the ordered sequence of transactions 152. In such an output-based transaction protocol, this may include checking whether the cryptographic signature or other authorization of the party 103 included in the input of the new transaction 152j matches the condition defined in the output of the previous transaction 152i assigned by the new transaction, wherein the condition typically includes at least checking whether the cryptographic signature or other authorization in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction is linked. The condition may be defined at least in part by a script included in the output of the previous transaction 152i. Alternatively, this may be determined solely by the blockchain node protocol, or may be determined by a combination thereof. In either case, if the new transaction 152j is valid, the blockchain node 104 forwards it to one or more other blockchain nodes 104 in the blockchain network 106. These other blockchain nodes 104 apply the same test according to the same blockchain node protocol, and therefore forward the new transaction 152j to one or more other nodes 104, and so on. In this way, the new transaction is propagated throughout the network of blockchain nodes 104.
[0139] In the output-based model, the definition of whether a given output (e.g., UTXO) is allocated (e.g., spent) is whether it is validly redeemed by the input of another subsequent transaction 152j according to the blockchain node protocol. Another condition for the transaction to be valid is that the output of the previous transaction 152i that it attempts to redeem has not been redeemed by another transaction. Similarly, if invalid, the transaction 152j will not be propagated (unless marked as invalid and propagated for reminder) or recorded in the blockchain 150. This prevents double spending, that is, the transaction processor allocates the output of the same transaction more than once. On the other hand, the account-based model prevents double spending by maintaining account balances. Because there is also a defined transaction order, the account balance has a single defined state at any time.
[0140] In addition to verifying that transactions are valid, blockchain nodes 104 compete to be the first node to create a block of transactions in a process generally referred to as mining, which is supported by "proof of work". At a blockchain node 104, a new transaction is added to an ordered pool 154 of valid transactions that have not yet appeared in a block 151 recorded on the blockchain 150. The blockchain nodes then compete to assemble a new valid transaction block 151 of transactions 152 in the ordered transaction set 154 by attempting to solve a cryptographic puzzle. Typically, this involves searching for a "nonce" value such that when the nonce is juxtaposed with a representation of the ordered pool 154 of pending transactions and hashed, the output of the hash value satisfies a predetermined condition. For example, the predetermined condition may be that the output of the hash value has a certain predefined number of leading zeros. Note that this is only one specific type of proof of work puzzle, and other types are not excluded. A property of a hash function is that it has an unpredictable output relative to its input. Therefore, this search can only be performed by brute force, consuming a large amount of processing resources at each blockchain node 104 that attempts to solve the puzzle.
[0141] The first blockchain node 104 that solves the puzzle announces the puzzle solution on the network 106, providing the solution as proof, which can then be easily checked by other blockchain nodes 104 in the network (once a solution to the hash value is given, it is directly possible to check whether the solution satisfies the output of the hash value). The first blockchain node 104 propagates a block to other nodes that accept the block to reach a threshold consensus, thereby enforcing the protocol rules. The ordered set of transactions 154 is then recorded by each blockchain node 104 as a new block 151 in the blockchain 150. A block pointer 155 is also assigned to the new block 151n pointing to the previously created block 151n-1 in the blockchain. The large amount of work required to create a proof-of-work solution (e.g., in the form of a hash) signals the first node 104's intention to follow the blockchain protocol. These rules include not accepting a transaction as valid if it allocates the same output as a previously verified valid transaction, otherwise it is called a double spend. Once created, the block 151 cannot be modified because it is identified and maintained at each blockchain node 104 in the blockchain network 106. The block pointers 155 also impose order on the blocks 151. Because transactions 152 are recorded in ordered blocks at each blockchain node 104 in the network 106, an immutable public ledger of transactions is provided.
[0142] It should be noted that the different blockchain nodes 104 competing to solve a puzzle at any given time may do so based on different snapshots of the pool 154 of transactions that have not yet been published at any given time, depending on when they began searching for a solution or the order in which they received the transactions. The person solving the corresponding puzzle first defines the transactions 152 included in the new block 151n and their order, and updates the current pool of unpublished transactions 154. The blockchain nodes 104 then continue to compete to create blocks from the newly defined ordered pool of unpublished transactions 154, and so on. In addition, there is a protocol to resolve any "forks" that may occur, where two blockchain nodes 104 solve puzzles within a short time of each other, thereby propagating conflicting views of the blockchain between the nodes 104. In short, the fork direction that is the longest becomes the final blockchain 150. It should be noted that this does not affect users or agents of the network, as the same transaction will appear in both forks.
[0143] According to the Bitcoin blockchain (and most other blockchains), a node that successfully constructs a new block 104 is granted the ability to newly allocate an additional, accepted amount of digital assets in a new special type of transaction that allocates an additional limited amount of digital assets (as opposed to an inter-agent or inter-user transaction, which transfers a certain amount of digital assets from one agent or user to another). This special type of transaction is often called a "coinbase transaction", but may also be called a "starting transaction" or "generating transaction". It usually forms the first transaction of a new block 151n. The proof of work signals the intention of the node that constructs the new block to follow the protocol rules, thereby allowing the particular transaction to be redeemed later. The blockchain protocol rules may require a maturation period, such as 100 blocks, before the special transaction can be redeemed. Typically, a regular (non-generating) transaction 152 will also specify an additional transaction fee in one of its outputs to further reward the blockchain node 104 that created the block 151n in which the transaction was published. This fee is often called a "transaction fee" and is discussed below.
[0144] Due to the resources involved in transaction verification and publication, typically at least each blockchain node 104 takes the form of a server comprising one or more physical server units, or even an entire data center. However, in principle, any given blockchain node 104 may take the form of a user terminal or a group of user terminals networked together.
[0145] The memory of each blockchain node 104 stores software configured to run on the processing device of the blockchain node 104 to perform its corresponding role according to the blockchain node protocol and process transactions 152. It should be understood that any action attributed to the blockchain node 104 herein can be performed by software running on the processing device of the corresponding computer device. The node software can be implemented in one or more applications at the application layer or a lower layer such as an operating system layer or a protocol layer, or any combination of these layers.
[0146] Computer devices 102 of each of the parties 103 acting as consuming users are also connected to the network 101. These users can interact with the blockchain network 106 but do not participate in verifying transactions or constructing blocks. Some of these users or agents 103 can act as senders and receivers in transactions. Other users can interact with the blockchain 150 without acting as senders or receivers. For example, some parties can act as storage entities that store a copy of the blockchain 150 (e.g., having obtained a copy of the blockchain from the blockchain node 104).
[0147] Some or all of the parties 103 may be connected as part of a different network, such as a network overlaid on the blockchain network 106. Users of the blockchain network (often referred to as "clients") may be referred to as being part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 because they do not perform the roles required of blockchain nodes. Instead, each party 103 may interact with the blockchain network 106, thereby utilizing the blockchain 150 by connecting to (i.e., communicating with) the blockchain node 106. For illustrative purposes, two parties 103 and their corresponding devices 102 are shown: a first party 103a and its corresponding computer device 102a, and a second party 103b and its corresponding computer device 102b. It should be understood that more such parties 103 and their corresponding computer devices 102 may exist and participate in the system 100, but for convenience, they are not illustrated. Each party 103 may be an individual or an organization. For illustrative purposes only, in this document, the first party 103a is referred to as Alice and the second party 103b is referred to as Bob, but it should be understood that this is not limited to Alice or Bob, and any reference to Alice or Bob in this document can be replaced with "first party" and "second party" respectively.
[0148] The computer device 102 of each party 103 includes a corresponding processing device, which includes one or more processors, such as one or more CPUs, graphics processing units (GPUs), other accelerator processors, specific application processors and / or FPGAs. The computer device 102 of each party 103 also includes a memory, that is, a computer-readable memory in the form of a non-temporary computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as SSDs, flash memory or EEPROMs, and / or optical media such as optical disk drives. The memory on the computer device 102 of each party 103 stores software, which includes a corresponding instance of at least one client application 105 that is set to run on the processing device. It should be understood that any action attributed to a given party 103 in this article can be executed by software running on the processing device of the corresponding computer device 102. The computer device 102 of each party 103 includes at least one user terminal, such as a desktop or laptop computer, a tablet computer, a smart phone, or a wearable device such as a smart watch. The computer device 102 of a given party 103 may also include one or more other network resources, such as cloud computing resources accessed through a user terminal.
[0149] The client application 105 may initially be provided to the computer device 102 of any given party 103 via a suitable computer-readable storage medium downloaded from a server, for example, or via a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable disk drive, floppy disk or tape, an optical disk such as a CD or DVD ROM, or a removable optical drive, etc.
[0150] The client application 105 includes at least a "wallet" function. This has two main functions. One of the functions is to enable the corresponding party 103 to create, authorize (e.g., sign) and send transactions 152 to one or more Bitcoin nodes 104, which are then propagated in the network of blockchain nodes 104 and included in the blockchain 150. Another function is to report to the corresponding party the amount of digital assets it currently owns. In an output-based system, this second function includes collating the amounts defined in the outputs of various transactions 152 belonging to the relevant parties scattered in the blockchain 150.
[0151] Note: While various client functions may be described as being integrated into a given client application 105, this is not necessarily limiting, and rather, any client function described herein may be implemented in a suite consisting of two or more different applications, such as interfacing via an API or one application as a plug-in to another application. More generally, the client functions may be implemented at the application layer or at a lower layer such as an operating system, or any combination of these layers. The following description will be based on the client application 105, but it should be understood that this is not limiting.
[0152] An instance of a client application or software 105 on each computer device 102 is operably coupled to at least one of the blockchain nodes 104 of the network 106. This can enable a wallet function of the client 105 to send transactions 152 to the network 106. The client 105 can also contact the blockchain node 104 to query the blockchain 150 for any transactions to which the corresponding party 103 is a recipient (or indeed to check other parties' transactions in the blockchain 150, because in an embodiment, the blockchain 150 is a public facility that provides transaction trust to some extent through its public visibility). The wallet function on each computer device 102 is configured to formulate and send transactions 152 according to a transaction protocol. As described above, each blockchain node 104 runs software that is configured to verify transactions 152 according to the blockchain node protocol and forward transactions 152 for propagation in the blockchain network 106. The transaction protocol and the node protocol correspond to each other, and a given transaction protocol and a given node protocol together implement a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150. All nodes 104 in the network 106 use the same node protocol.
[0153] When a given party 103 (say Alice) wishes to send a new transaction 152j to be included in the blockchain 150, she will formulate the new transaction according to the relevant transaction protocol (using the wallet function in her client application 105). She will then send the transaction 152 from the client application 105 to one or more blockchain nodes 104 to which she is connected. For example, this may be the blockchain node 104 that Alice's computer 102 is best connected to. When any given blockchain node 104 receives the new transaction 152j, it will process it according to the blockchain node protocol and its corresponding role. This includes first checking whether the newly received transaction 152j meets certain conditions for becoming "valid", specific examples of which will be discussed in detail later. In some transaction protocols, the validity conditions may be configurable on a per-transaction basis through a script included in the transaction 152. Alternatively, the conditions may simply be a built-in function of the node protocol, or defined by a combination of script and node protocol.
[0154] If the newly received transaction 152j passes the validity test (i.e., under the “valid” condition), any blockchain node 104 that receives the transaction 152j will add the new verified valid transaction 152 to the ordered transaction set 154 maintained at the blockchain node 104. Further, any blockchain node 104 that receives the transaction 152j will then propagate the verified valid transaction 152 to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, it is assumed that the transaction 152j is valid, which means that the transaction will soon be propagated throughout the network 106.
[0155] Once in the ordered pool 154 of pending transactions maintained at a given blockchain node 104, that blockchain node 104 will begin racing to solve the proof-of-work puzzle on the latest version of its respective pool 154 containing the new transaction 152 (keep in mind that other blockchain nodes 104 can attempt to solve the puzzle based on different transaction pools 154. However, whoever solves the puzzle first will define the set of transactions included in the latest block 151. Ultimately, the blockchain node 104 will solve the puzzle for a portion of the ordered pool 154, which includes Alice's transaction 152j). Once the pool 154 including the new transaction 152j completes the proof-of-work, it will immutably become part of one of the blocks 151 in the blockchain 150. Each transaction 152 includes a pointer to an earlier transaction, so the order of transactions is also immutably recorded.
[0156] Different blockchain nodes 104 may initially receive different instances of a given transaction and therefore have conflicting views about which instance is “valid” before one instance is published in a new block 151, at which point all blockchain nodes 104 agree that the published instance is the only valid instance. If a blockchain node 104 accepts one instance as valid and then discovers that a second instance has been recorded in the blockchain 150, the blockchain node 104 must accept this and will discard (i.e., treat as invalid) the instance it originally accepted (i.e., the instance that has not yet been published in block 151).
[0157] Another type of transaction protocol operated by some blockchain networks as part of the account-based transaction model can be called an "account-based" protocol. In the account-based case, each transaction is defined not by reference to the UTXO of a previous transaction in the past sequence of transactions, but by reference to an absolute account balance. The current state of all accounts is stored individually in the blockchain by the nodes of the network and is continuously updated. In such systems, transactions are ordered using an account's running transaction record (also called a "position"). This value is signed by the sender as part of their cryptographic signature and hashed as part of the transaction reference calculation. In addition, optional data fields can also be signed in the transaction. For example, a data field can point to a previous transaction if it contains the ID of the previous transaction.
[0158] UTXO-based model
[0159] Figure 2 An exemplary transaction protocol is shown. This is an example of a UTXO-based protocol. A transaction 152 ("Tx" for short) is the basic data structure of the blockchain 150 (each block 151 includes one or more transactions 152). The following will be described with reference to an output-based or "UTXO"-based protocol. However, this is not limited to all possible embodiments. It should be noted that although the exemplary UTXO-based protocol is described with reference to Bitcoin, it can also be implemented on other exemplary blockchain networks.
[0160] In the UTXO-based model, each transaction ("Tx") 152 includes a data structure that includes one or more inputs 202 and one or more outputs 203. Each output 203 may include an unspent transaction output (UTXO), which can be used as a source of input 202 for another new transaction (if the UTXO has not been redeemed). The UTXO includes a value that specifies the amount of a digital asset. This represents a set of tokens on a distributed ledger. The UTXO may also include a transaction ID of its source transaction and other information. The transaction data structure may also include a header 201, which may include an indicator of the size of the input field 202 and the output field 203. The header 201 may also include an ID for the transaction. In an embodiment, the transaction ID is a hash value of the transaction data (excluding the transaction ID itself) and is stored in the header 201 of the original transaction 152 submitted to the node 104.
[0161] Let's say Alice 103a wishes to create a transaction 152j that transfers the relevant amount of digital assets to Bob 103b. Figure 2 In , Alice's new transaction 152j is labeled "Tx1". This new transaction takes the amount of digital assets locked to Alice in output 203 of the previous transaction 152i in the sequence and transfers at least a portion of such amount to Bob. Figure 2, the previous transaction 152i is labeled "Tx0". Tx0 and Tx1 are just arbitrary labels that do not necessarily mean that Tx0 refers to the first transaction in blockchain 151 and Tx1 refers to a subsequent transaction in pool 154. Tx1 can point to any previous (i.e., preceding) transaction that still has unspent output 203 locked to Alice.
[0162] When Alice creates her new transaction Tx1, or at least when she sends it to the network 106, the previous transaction Tx0 may already be valid and included in block 151 of the blockchain 150. The transaction may have been included in one of the blocks 151 at this time, or it may still be waiting in the ordered set 154, in which case it will be included in the new block 151 soon. Alternatively, Tx0 and Tx1 may be created and sent to the network 106 together; or, if the node protocol allows buffering of "orphan" transactions, Tx0 may even be sent after Tx1. The terms "previous" and "successor" as used herein in the context of transaction sequences refer to the order of transactions in the sequence defined by the transaction pointers specified in the transactions (which transaction points to which other transaction, etc.). They may equally be replaced by "predecessors" and "successors", "predecessors" and "descendants", or "parents" and "children", etc. This does not necessarily refer to the order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. However, subsequent transactions (descendant transactions or "child transactions") pointing to a previous transaction (predecessor transaction or "parent transaction") will not be valid unless the parent transaction is valid. A child transaction that arrives at the blockchain node 104 before the parent transaction is considered an orphan transaction. Depending on the node protocol and / or node behavior, it may be discarded or buffered for a period of time to wait for the parent transaction.
[0163] One of the one or more outputs 203 of the previous transaction Tx0 includes a specific UTXO, labeled UTXO0. Each UTXO includes a value specifying the amount of digital assets represented by the UTXO and a locking script that defines the conditions that the unlocking script in the input 202 of the subsequent transaction must satisfy in order for the subsequent transaction to be valid and thus successfully redeem the UTXO. Typically, the locking script locks the amount to a specific party (the beneficiary of the transaction for that amount). That is, the locking script defines the unlocking condition, which typically includes the following conditions: the unlocking script in the input of the subsequent transaction includes the cryptographic signature of the party to which the previous transaction was locked.
[0164] The locking script (also known as scriptPubKey) is a piece of code written in a domain-specific language recognized by the node protocol. A specific example of such a language is called a "Script" (with a capital S), which can be used by the blockchain network. The locking script specifies the information required to spend the transaction output 203, such as the requirement for Alice's signature. The unlocking script appears in the output of the transaction. The unlocking script (also known as scriptSig) is a piece of code written in a domain-specific language that provides the information required to meet the locking script criteria. For example, it can contain Bob's signature. The unlocking script appears in the input 202 of the transaction.
[0165] Thus in the example shown, UTXO0 in output 203 of Tx0 includes a locking script [Checksig P A ], the locking script requires Alice’s signature Sig P A , in order to redeem UTXO0 (strictly speaking, to make subsequent transactions that attempt to redeem UTXO0 valid). A ] contains Alice's public key P from her public-private key pair A The input 202 of Tx1 includes a pointer to Tx1 (e.g., by its transaction ID (TxID0), which in the embodiment is the hash value of the entire transaction Tx0). The input 202 of Tx1 includes an index identifying UTXO0 in Tx0 to identify it among any other possible outputs of Tx0. The input 202 of Tx1 further includes an unlocking script <Sig P A >, the unlocking script includes Alice's cryptographic signature, which is created by Alice by applying the private key of her key pair to a predetermined portion of data (sometimes called a "message" in cryptography). The data (or "message") that Alice needs to sign to provide a valid signature can be defined by the locking script, the node protocol, or a combination thereof.
[0166] When a new transaction Tx1 arrives at a blockchain node 104, the node applies the node protocol. This includes running the locking script and the unlocking script together to check whether the unlocking script satisfies the conditions defined in the locking script (where the conditions may include one or more criteria). In an embodiment, this involves juxtaposing two scripts:
[0167] <Sig PA> <pa>||[Checksig PA]
[0168] Where "||" means concatenation, "<…>" means putting data on the stack, and "[…]" means a function consisting of locked scripts (in this case, a stack-based language). Similarly, scripts can be run one after another using a common stack instead of concatenating the scripts. In either case, when run together, the scripts use Alice's public key P A (included in the locking script of the output of Tx0) to verify that the unlocking script in the input of Tx1 contains Alice's signature when signing the expected portion of the data. The expected partial data itself (the "message") also needs to be included in order to perform this verification. In an embodiment, the signed data includes the entire Tx1 (so there is no need to include a separate element to plaintext specify the signed partial data, as it is already present).
[0169] Those skilled in the art will be familiar with the details of verification by public-private cryptography. Basically, if Alice has signed a message using her private key encryption, then given Alice's public key and the message in plain text, other entities such as node 104 can verify that the message must have been signed by Alice. Signing typically includes hashing the message, signing the hash value, and marking this to the message as a signature, so that any holder of the public key can verify the signature. Therefore, it should be noted that in embodiments, any reference to signing a particular data fragment or transaction portion, etc. herein can mean signing the hash value of the data fragment or transaction portion.
[0170] If the unlocking script in Tx1 satisfies one or more conditions specified in the locking script of Tx0 (so, in the example shown, if Alice's signature is provided and verified in Tx1), then the blockchain node 104 considers Tx1 to be valid. This means that the blockchain node 104 will add Tx1 to the pending transaction ordered pool 154. The blockchain node 104 will also forward the transaction Tx1 to one or more other blockchain nodes 104 in the network 106 so that it will propagate throughout the network 106. Once Tx1 is valid and included in the blockchain 150, this will define UTXO0 from Tx0 as spent. It should be noted that Tx1 is only valid if it spends unspent transaction output 203. If it attempts to spend an output that has already been spent by another transaction 152, then Tx1 will be invalid even if all other conditions are met. Therefore, the blockchain node 104 also needs to check whether the UTXO referenced in the previous transaction Tx0 has been spent (that is, whether it has formed a valid input for another valid transaction). This is one of the reasons why it is important for the blockchain 150 to impose a defined order on transactions 152. In practice, a given blockchain node 104 may maintain a separate database marking the UTXO 203 of a transaction 152 as having been spent, but ultimately defining whether a UTXO has been spent depends on whether it has formed a valid input to another valid transaction in the blockchain 150.
[0171] If the total amount specified in all outputs 203 of a given transaction 152 is greater than the total amount pointed to by all its inputs 202, this is another basis for failure in most transaction models. Therefore, such a transaction will not be propagated or included in block 151.
[0172] Note that in the UTXO-based transaction model, a given UTXO needs to be spent as a whole. You cannot "leave behind" a portion of the amount defined in a UTXO as spent while spending another portion. However, the amount of a UTXO can be split between multiple outputs of subsequent transactions. For example, the amount defined in UTXO0 of Tx0 can be split between multiple UTXOs in Tx1. Therefore, if Alice does not want to give all of the amount defined in UTXO0 to Bob, she can use the remaining portion to make change for herself in the second output of Tx1, or to pay another party.
[0173] In practice, Alice will also typically need to include a fee for the Bitcoin node 104 that successfully includes Alice's transaction 104 in block 151. If Alice does not include such a fee, Tx0 may be rejected by the blockchain node 104, and therefore, although technically valid, may not be propagated and included in the blockchain 150 (if the blockchain node 104 does not want to accept transaction 152, the node protocol does not force the blockchain node 104 to accept). In some protocols, the transaction fee does not require its own separate output 203 (i.e., no separate UTXO is required). Instead, any difference between the total amount pointed to by input 202 and the total amount specified by output 203 of a given transaction 152 will be automatically provided to the blockchain node 104 that issued the transaction. For example, assume that a pointer to UTXO0 is the only input of Tx1, and Tx1 has only one output UTXO1. If the amount of the digital asset specified in UTXO0 is greater than the amount specified in UTXO1, the difference can be distributed by the node 104 that wins the proof-of-work competition to create a block containing UTXO1. Alternatively or additionally, this does not necessarily preclude that a transaction fee may be explicitly specified in one of the UTXOs 203 in the transaction 152 itself.
[0174] Alice and Bob's digital assets consist of the UTXO locked to them in any transaction 152 anywhere in the blockchain 150. Therefore, in general, the assets of a given party 103 are scattered among the UTXOs of various transactions 152 throughout the blockchain 150. No single number defining the total balance of a given party 103 is stored anywhere in the blockchain 150. The role of the wallet function of the client application 105 is to collate the various UTXO values locked to the respective parties and not yet spent in other subsequent transactions. To achieve this, it can query a copy of the blockchain 150 stored at any one Bitcoin node 104.
[0175] It should be noted that script code is often represented schematically (i.e., using an imprecise language). For example, an opcode (opcode) may be used to represent a particular function. "OP_..." refers to a particular opcode of the scripting language. For example, OP_RETURN is a scripting language opcode that, when preceded by OP_FALSE at the beginning of a locking script, creates an unspendable output of a transaction that can store data within the transaction, thereby immutably recording the data in the blockchain 150. For example, the data may include a file to be stored in the blockchain.
[0176] Typically, the inputs to a transaction contain a digital signature corresponding to the public key PA. In an embodiment, this is based on ECDSA using the elliptic curve secp256k1. The digital signature signs a specific piece of data. In an embodiment, for a given transaction, the signature will sign part of the transaction input and part or all of the transaction output. Signing a specific part of the output depends on the SIGHASH flag. The SIGHASH flag is typically a 4-byte code included at the end of the signature that selects the output to be signed (and is therefore fixed at the time of signing).
[0177] The locking script is sometimes referred to as "scriptPubKey", which means that it usually includes the public key of the party to which the corresponding transaction is locked. The unlocking script is sometimes referred to as "scriptSig", which means that it usually provides the corresponding signature. However, more generally speaking, in all applications of blockchain 150, the conditions for UTXO redemption do not necessarily include verification of the signature. More generally speaking, the scripting language can be used to define any one or more conditions. Therefore, the more general terms "locking script" and "unlocking script" may be preferred.
[0178] Side Channel
[0179] like Figure 1 As shown, the client application on each of Alice and Bob's computer devices 102a, 120b can include additional communication functionality. This additional functionality enables Alice 103a to establish a separate side channel 107 with Bob 103b (at the instigation of any party or third party). Side channel 107 enables data to be exchanged away from the blockchain network. Such communications are sometimes referred to as "off-chain" communications. For example, this can be used to exchange transactions 152 between Alice and Bob without registering the transaction (yet) on the blockchain network 106 or publishing it on the chain 150 until one of the parties chooses to broadcast it to the network 106. Sharing transactions in this way is sometimes referred to as sharing "transaction templates". The transaction template may lack one or more inputs and / or outputs required to form a complete transaction. Alternatively or additionally, the side channel 107 can be used to exchange any other transaction-related data, such as keys, negotiation amounts or terms, data content, etc.
[0180] The side channel 107 may be established via the same packet switching network 101 as the blockchain network 106. Alternatively or additionally, the side channel 301 may be established via a different network such as a mobile cellular network or a local area network such as a wireless local area network, or even via a direct wired or wireless link between Alice's and Bob's devices 102a, 102b. In general, a side channel 107 referred to anywhere in this document may include any one or more links via one or more networking technologies or communication media that are used to exchange data "off-chain", i.e., off-chain. The bundle or collection of off-chain links may be referred to as a side channel 107 as a whole. Therefore, it should be noted that if Alice and Bob are said to exchange certain information or data, etc., via a side channel 107, this does not necessarily mean that all of this data must be sent over exactly the same link or even the same type of network.
[0181] Client Software
[0182] Figure 3A An exemplary implementation of a client application 105 for implementing an embodiment of the disclosed solution is shown. The client application 105 includes a transaction engine 401 and a user interface (UI) layer 402. According to the solution discussed above and discussed in further detail later, the transaction engine 401 is configured to implement basic transaction-related functions of the client 105, such as formulating transactions 152, receiving and / or sending transactions and / or other data through the side channel 301, and / or sending transactions to one or more nodes 104 for propagation through the blockchain network 106.
[0183] The UI layer 402 is configured to present a user interface through a user input / output (I / O) mode of the corresponding user's computer device 102, including outputting information to the corresponding user 103 through the user output mode of the device 102, and receiving input from the corresponding user 103 through the user input mode of the device 102. For example, the user output mode may include one or more screens (touch or non-touch screen) that provide visual output, one or more speakers that provide audio output, and / or one or more tactile output devices that provide tactile output, etc. The user input mode may include, for example, an input array of one or more touch screens (which may be the same or different from that / those used for the output mode); one or more cursor-based devices such as a mouse, trackpad, or trackball; one or more microphones and voice or sound recognition algorithms for receiving voice or sound input; one or more gesture-based input devices for receiving input in the form of manual or physical gestures; or one or more mechanical buttons, switches, or joysticks, etc.
[0184] Note: Although various functions in this document may be described as being integrated into the same client application 105, this does not necessarily constitute a limitation. Instead, they can be implemented in a suite of two or more different applications, such as one application as a plug-in to another application or interfacing via an API (application programming interface). For example, the functionality of the transaction engine 401 can be implemented in a separate application rather than in the UI layer 402, or the functionality of a given module such as the transaction engine 401 can be split between multiple applications. At the same time, it is not excluded that some or all of the described functions can be implemented, for example, at the operating system level. Where a single or given application 105 or the like is referenced anywhere in this document, it should be understood that this is only by way of example, and more generally, the described functions can be implemented in any form of software.
[0185] Figure 3B A model is given of an example of a user interface (UI) 500 that may be presented by the UI layer 402 of the client application 105a on Alice's device 102a. It should be understood that a similar UI may be presented by the client 105b on Bob's device 102b or any other party's device.
[0186] By means of diagrams, Figure 3B The UI 500 is shown from Alice's perspective. The UI 500 may include one or more UI elements 501, 502, 503, which are presented as different UI elements through user output.
[0187] For example, the UI elements may include one or more user-selectable elements 501, which may be different buttons on a screen, different options in a menu, or the like. The user input method is configured to enable the user 103 (in this case, Alice 103a) to select or otherwise operate one of the options, such as by clicking or touching the UI element on the screen, or speaking the name of the desired option (Note: the term "manual" as used herein is only used to contrast with automatic, and is not necessarily limited to performing operations by hand).
[0188] Alternatively or additionally, the UI element may include one or more data entry fields 502 through which a user can perform ... These data entry fields are presented via a user output means, such as on a screen, and data may be entered into the fields via a user input means, such as a keyboard or touch screen. Alternatively, the data may be received verbally, such as based on speech recognition.
[0189] Alternatively or additionally, the UI element may include one or more information elements 503 that output information to the user. For example, this / these may be presented on a screen or audibly.
[0190] It should be understood that the specific manner in which various UI elements, selection options, and input data are presented is not important. The functions of these UI elements will be discussed in more detail later. It should also be understood that the UI 500 shown in Figure 3 is only a diagram model, and in practice, it may include one or more further UI elements, which are not described for the sake of brevity.
[0191] Node software
[0192] Figure 4 An example of node software 450 running on each blockchain node 104 of the network 106 in an example of a UTXO-based or output-based model is shown. It should be noted that another entity may run the node software 450 without being classified as a node 104 on the network 106, i.e., not performing the actions required of the node 104. The node software 450 may include, but is not limited to, a protocol engine 451, a scripting engine 452, a stack 453, an application-level decision engine 454, and a collection of one or more blockchain-related functional modules 455. Each node 104 may run node software that includes, but is not limited to, all three of the following: a consensus module 455C (e.g., proof of work), a propagation module 455P, and a storage module 455S (e.g., a database). The protocol engine 401 is typically configured to identify different fields of a transaction 152 and process such fields according to the node protocol. When a transaction 152i (Tx m-1 )’s output (e.g., UTXO) is an input transaction 152j (Tx j ), the protocol engine 451 identifies Tx j The unlocking script in and passes it to the script engine 452. The protocol engine 451 also j The pointer in the input to identify and retrieve Tx i .Tx i may be published on blockchain 150, in which case the protocol engine may retrieve Tx from the copy of block 151 of blockchain 150 stored at node 104 i . Or, Tx i It can also be published on blockchain 150. In this case, protocol engine 451 can retrieve Tx from unpublished ordered transaction set 154 maintained by node 104. i Regardless of the method used, the script engine 451 will identify Tx i The locked script in the reference output is passed to the script engine 452.
[0193] Therefore, the script engine 452 has Tx i The locking script and the j The unlocking script for the corresponding input. For example, Figure 2 Transaction labels Tx0 and Tx1 are shown in FIG, but the same transaction can also be applied to any transaction pair. As previously described, the script engine 452 runs two scripts together, which will include placing data on and retrieving data from the stack 453 according to the stack-based scripting language used (e.g., script).
[0194] By running the scripts simultaneously, the script engine 452 determines whether the unlocking script satisfies one or more criteria defined in the locking script, i.e., whether the unlocking script unlocks the output including the locking script? The script engine 452 returns the result of the determination to the protocol engine 451. If the script engine 452 determines that the unlocking script does meet one or more criteria specified in the corresponding locking script, the result "TRUE" is returned. Otherwise, the result "FALSE" is returned.
[0195] In the output-based model, the result "TRUE" from the script engine 452 is one of the conditions for the validity of the transaction. Typically, one or more further protocol-level conditions evaluated by the protocol engine 451 must also be satisfied; for example, Tx j The total amount of digital assets specified in the inputs of tx does not exceed the total amount pointed to in its outputs, and tx i The pointed output of has not been spent by another valid transaction. The protocol engine 451 evaluates the result from the script engine 452 and one or more protocol-level conditions, and only if they are all TRUE, the protocol engine verifies the transaction Tx j The protocol engine 451 outputs an indication of whether the transaction is valid to the application-level decision engine 454. j Only when the conditions are really valid, the decision engine 454 can choose to control the consensus module 455C and the propagation module 455P at the same time to execute its Tx j . This includes the consensus module 455C, adding Tx to the corresponding ordered transaction set 154 of the node j , for incorporation into block 151; and propagation module 455P, Tx j Forwarded to another blockchain node 104 in the network 106. Optionally, in an embodiment, the application-level decision engine 454 may apply one or more additional conditions before triggering one or both of these functions. For example, the decision engine may choose to publish a transaction only if the transaction is valid and sufficient transaction fees are reserved.
[0196] In addition, it should be noted that in this article, the terms "TRUE" and "FALSE" are not necessarily limited to returning results that are expressed only in the form of a single binary number (bit), although this is indeed a possible implementation. More generally, "TRUE" can refer to any state indicating a successful or positive result, while "FALSE" can refer to any state indicating an unsuccessful or non-positive result. For example, in an account-based model, the combination of implicit protocol-level verification of signatures and additional positive outputs of smart contracts can be used to indicate that the result is "TRUE" (if both individual results are TRUE, the overall result is considered to be TRUE).
[0197] in conclusion
[0198] Other variations or uses of the disclosed technology may become apparent to those skilled in the art once given the disclosure herein.The scope of the present disclosure is not limited by the described embodiments but only by the appended claims.
[0199] For example, some of the embodiments above have been described in terms of the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104. However, it should be understood that the Bitcoin blockchain is a specific example of a blockchain 150, and the above description can generally be applied to any blockchain. That is, the present invention is in no way limited to the Bitcoin blockchain. More generally, any references to the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104 above can be replaced with reference to the blockchain network 106, the blockchain 150, and the blockchain node 104, respectively. Blockchains, blockchain networks, and / or blockchain nodes can share some or all of the characteristics of the Bitcoin blockchain 150, the Bitcoin network 106, and the Bitcoin node 104 described above.
[0200] In a preferred embodiment of the present disclosure, the blockchain network 106 is a Bitcoin network, and the Bitcoin node 104 performs at least all of the functions described in creating, publishing, propagating, and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that perform only one or part of these functions but not all of them. That is, a network entity may perform the functions of propagating and / or storing blocks without creating and publishing blocks (remember that these entities are not considered to be nodes of the preferred Bitcoin network 106).
[0201] In other embodiments of the present disclosure, the blockchain network 106 may not be a Bitcoin network. In these embodiments, it is not excluded that the node can perform at least one or part of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150, but not all of the functions. For example, on these other blockchain networks, "node" may be used to refer to a network entity that is configured to create and publish blocks 151 but does not store and / or propagate these blocks 151 to other nodes.
[0202] Even more generally, any reference above to the term "Bitcoin node" 104 may be replaced with the term "network entity" or "network element," where such entity / element is configured to perform some or all of the roles in creating, publishing, propagating, and storing blocks. The functionality of such a network entity / element may be implemented in hardware in the same manner as described above with reference to blockchain node 104.
[0203] Enumeration Statement
[0204] It should be understood that the above embodiments are described by way of example only. In more general terms, a method, apparatus or program may be provided according to any one or more of the following statements.
[0205] In statement 1 (alternative wordings 1a to 1h), the first entity may be Alice, and / or the second entity may be Bob, which entities may also be entities that Alice / Bob authorizes or instructs to act on their behalf. The third entity may be Carol. Alice may keep the variation of Bob's request confidential before sending the request to Bob. Any of the features below for one of the two statements may be incorporated into any one or more of the other alternative wordings of statements 1a to 1h. In the following statements, the term "request" may be replaced with "instruction".
[0206] Statement 1 (including alternate wording Statement 1a through Statement 1.h):
[0207] 1.a A computer-implemented method may be provided, the method comprising the following steps:
[0208] The first entity requests the second entity to obtain a root value (R') of a Merkle tree (T') calculated based on a variation of at least one of a plurality of sub-parts of the partial data (D);
[0209] and / or,
[0210] A root value (R') of a Merkle tree (T') calculated based on a variation of at least one of a plurality of sub-portions of the partial data (D) is provided from the second entity to the first entity.
[0211] 1.b Additionally or alternatively, a (computer-implemented) method may be provided, the method comprising the following steps:
[0212] A first entity requests a second entity to obtain a root value (R') of a Merkle tree (T') calculated based on a variation of at least one of a plurality of sub-parts of partial data (D).
[0213] 1.c Additionally or alternatively, a (computer-implemented) method may be provided, the method comprising the following steps:
[0214] A root value (R') of a Merkle tree (T') calculated based on a variation of at least one of a plurality of sub-portions of the partial data (D) is provided from the second entity to the first entity.
[0215] 1.d Additionally or alternatively, a (computer-implemented) method may be provided, the method comprising the following steps:
[0216] providing, from the second entity to the first entity, a root value (R') of a Merkle tree (T') calculated based on a variation of at least one of the plurality of sub-portions of the partial data (D); and
[0217] A root value (R') of a Merkle tree (T") calculated based on a variation of at least one of the sub-parts is received from the second entity and / or a party authorized to represent the second entity.
[0218] 1.e Additionally or alternatively, a (computer-implemented) method may be provided, the method comprising the following steps:
[0219] Sending a portion of data D from the first entity to the second entity;
[0220] sending, from the first entity or the third entity to the second entity, a request to compute an output of a challenge based on a modified version of the portion of data;
[0221] checking, by the first entity or the third entity, whether the output calculated by the second entity matches an output calculated by the first entity or the third entity for the same challenge;
[0222] Preferably, the method further comprises one or more of the following:
[0223] i) storing, by said first party or third party, at least one, some or all of the one or more sub-parts;
[0224] ii) selecting or otherwise identifying, by the first entity, at least one sub-portion of the portion of data (D);
[0225] iii) keeping, by the first entity and / or the third entity, the at least one sub-portion and / or the at least one operation confidential from the second entity;
[0226] iv) calculating the output of the challenge comprises the following steps:
[0227] computing a modified version of the partial data by performing at least one operation on at least one sub-portion of the partial data, the at least one sub-portion being specified in the request; and
[0228] Calculating a root value of a Merkle tree representing the modified version of the portion of data;
[0229] v) The checking step comprises checking whether the root value calculated by the second entity matches a root value calculated by the first entity or the third entity.
[0230] 1.f Additionally or alternatively, a (computer-implemented) method of verifying, backing up, restoring and / or maintaining a portion of data D may be provided, the method comprising the following steps:
[0231] The second entity stores the portion of data;
[0232] performing, by the first entity or the third entity, a verification check by comparing the challenge output computed by the second entity with the challenge output computed by the first entity and / or the third entity;
[0233] Wherein calculating the challenge output comprises:
[0234] computing a modified version of the portion of data by performing at least one operation on at least one sub-portion of the portion of data, the at least one sub-portion being specified in the request; and
[0235] Calculating a root value of a Merkle tree representing the modified version of the portion of data;
[0236] Preferably, the method comprises at least one of the following:
[0237] Sending the portion of data D from the first entity to the second entity;
[0238] sending, from the first entity or the third entity to the second entity, a request to compute an output of a challenge based on a modified version of the portion of data;
[0239] checking, by the first entity or the third entity, whether the output calculated by the second entity matches an output calculated by the first entity or the third entity for the same challenge;
[0240] The at least one sub-portion is an element of a set of sub-portions (M) identified and / or selected from the plurality of sub-portions; and the set of sub-portions (M) is identified so as to allow the root value (R') to be calculated using a minimum number of calculations.
[0241] 1.g Additionally or alternatively, there may be provided a (computer-implemented) method comprising the following steps:
[0242] A request for a root value of a Merkle tree is received by a data store from or on behalf of a data provider, the request being for a modified (ie, changed) version of a portion of data stored by, at or on behalf of the data store.
[0243] Preferably, the modified version of the data is specified by or on behalf of the data provider, and the data provider may specify one or more modifications that the data store makes to one or more segments (sub-portions) of the data before calculating the root value of the Merkle tree. The data store may be referred to as a second entity. The data provider may be referred to as a first entity. The one or more modifications may be referred to as one or more variants. The request may include a request or instruction to a) modify one or more sub-portions of the data and / or b) calculate the root value.
[0244] 1.h Additionally or alternatively, a (computer-implemented) method may be provided, the method comprising the following steps:
[0245] A request is made by or on behalf of a data provider to a data store / by or on behalf of a data provider of a data store for a root value of a Merkle tree, wherein the request is for a modified (i.e., changed) version of a portion of data stored by, at or on behalf of the data store.
[0246] Preferably, the modified version of the data is specified by or on behalf of the data provider, and the data provider may specify one or more modifications that the data store makes to one or more segments (sub-portions) of the data before calculating the root value of the Merkle tree. The data store may be referred to as a second entity. The data provider may be referred to as a first entity. The one or more modifications may be referred to as one or more variants. The step of requesting the root value may include requesting a) modification of one or more sub-portions of the data and / or b) calculation of the root value.
[0247] The following one or more statements may apply to any statement from statement 1a to statement 1h. The phrase "statement 1" used below means "any one or more statements from statement 1a to statement 1h".
[0248] Clause 2: The method of clause 1, wherein said modification of said at least one sub-portion is performed or provided by:
[0249] i) by or on behalf of the second entity; and / or
[0250] ii) using at least one operation specified by the first entity; and / or
[0251] iii) generating an output (Y) by applying at least one operation (f) to the at least one sub-portion;
[0252] iv) by using the at least one sub-portion as an operand or input to at least one operation (f);
[0253] v) By using bit-wise, logical, mathematical or cryptographic operations.
[0254] The term "operation" is intended to include any function, procedure, process, subroutine, or method that produces a transformation, change, or processed version of a value. The subpart may be used as one or more operands or some input by the operation.
[0255] Clause 3: The method of clause 1 or 2, wherein:
[0256] i) the portion of data (D) is stored by the second entity and / or provided to the second entity as a data block (B), the data block comprising the at least one sub-portion; and / or
[0257] ii) the first entity is the owner, creator, controller, manager, processor and / or administrator of the portion of data; and / or
[0258] iii) The second entity is a storage service provider.
[0259] Statement 4: The method of any preceding statement, wherein the at least one sub-portion is:
[0260] i) identified by the first entity; and / or
[0261] ii) elements of a set (M) of one or more sub-parts identified by the first entity from among the plurality of sub-parts; and / or
[0262] iii) a sample of said portion of data (D); and / or
[0263] iv) identifiable by an identifier, said identifier being unique within said plurality of sub-portions and / or within said set (M) of one or more sub-portions.
[0264] Statement 5: A method according to any of the preceding statements, comprising the steps of:
[0265] i) storing the portion of data (D) in a storage resource by the second entity;
[0266] ii) receiving, by the first entity from the second entity, the root value (R'); and / or,
[0267] iii) comparing said root value (R') received from said second entity with a pre-computed root value calculated by said first entity.
[0268] Clause 6: A method according to any preceding clause, wherein the method comprises:
[0269] i) storing, by or on behalf of the second entity, the portion of data (D), preferably in an off-chain storage resource;
[0270] ii) storing a header (H) of a data block (B), the data block comprising the portion of data (D) in a transaction (Tx) on the blockchain.
[0271] Clause 7: A method according to any preceding clause, wherein the method comprises one or both of the following:
[0272] i) triggering an action in response to a comparison of said root value provided from said second entity to the first entity, preferably wherein said action is transmitting a signal or an electronic communication or unlocking a resource; and / or
[0273] ii) comparing a root value (R') received from the second entity with a pre-computed root value calculated by the first entity, and if the received root value (R') matches the pre-computed root value, then the verification (of the partial data (D)) is deemed to be successful, or if the received root value (R') does not match the pre-computed root value, then the verification of the partial data (D) is deemed to have failed.
[0274] Statement 8: A method according to any of the preceding statements, further comprising:
[0275] The first entity requests the second entity to calculate a root value of another Merkle tree based on a further variation of the at least one sub-part; and / or
[0276] A root value of another Merkle tree calculated based on a further variation of the at least one sub-portion is provided from the second entity to the first entity.
[0277] Statement 9: A method as described in any of the preceding statements, wherein:
[0278] The at least one sub-portion is an element of a set (M) of sub-portions identified from the plurality of sub-portions; and
[0279] The set of sub-parts (M) is identified so as to allow the root value (R') to be calculated using a minimum number of calculations.
[0280] Statement 10: A method as described in any of the preceding statements, wherein:
[0281] The at least one sub-portion is an element of a set (M) of sub-portions identified from the plurality of sub-portions;
[0282] The method further comprises the following steps:
[0283] A plurality of predetermined challenges are determined, by the first entity, based on a plurality of variations of the set of sub-portions (M).
[0284] The challenge may be or may include computing an output of a selected / predetermined operation, where the selected operation may be arranged to operate on or otherwise use one or more sub-parts to produce a result based on or dependent upon the sub-parts.
[0285] Statement 11: A method according to any of the preceding statements, wherein the method comprises: verifying the existence, state, integrity, consistency, persistence, storage and / or security of the portion of data (D);
[0286] Additionally / alternatively, it may be a method for performing one or more of the following: data backup and / or recovery, data archiving, file system dump, and / or data versioning activities.
[0287] Statement 12: A computer device, the computer device comprising:
[0288] a memory, the memory comprising one or more memory cells; and
[0289] a processing device, the processing device comprising one or more processing units;
[0290] The memory stores code arranged to be executed on the processing device, the code being configured to perform the method according to any of the preceding statements when executed on the processing device.
[0291] Clause 13: A computer program embodied on a computer readable memory and configured to, when executed on one or more processors, perform the method of any one of clauses 1 to 11.< / pa>
Claims
1. A computer-implemented method, the method comprising: The following steps are involved: i) requesting, by the first entity to the second entity, a root value (R') of a Merkle tree (T') calculated based on a variation of at least one of a plurality of sub-parts of the partial data (D); or providing, from the second entity to the first entity, a root value (R') of a Merkle tree (T') calculated based on a variation of at least one of the plurality of sub-portions of the partial data (D); as well as ii) the first entity compares the root value (R') received from the second entity with the pre-calculated root value calculated by the first entity, and if the received root value (R') matches the pre-calculated root value, the verification of the partial data (D) is deemed to be successful, or if the received root value (R') does not match the pre-calculated root value, the verification of the partial data (D) is deemed to have failed.
2. The method according to claim 1, wherein the modification of the at least one sub-portion is performed or provided by: i) by or on behalf of the second entity; and / or ii) using at least one operation specified by the first entity; and / or iii) generating an output (Y) by applying at least one operation (f) to the at least one sub-portion; and / or iv) by using the at least one sub-portion as an operand or input to at least one operation (f); and / or v) By using bit-wise, logical, mathematical or cryptographic operations.
3. The method according to claim 1 or 2, in: i) the portion of data (D) is stored by the second entity and / or provided to the second entity as a data block (B), the data block comprising the at least one sub-portion; and / or ii) the first entity is the owner, creator, controller, manager, processor and / or administrator of the portion of data; and / or iii) The second entity is a storage service provider.
4. A method according to any preceding claim, wherein the at least one sub-portion is: i) identified by the first entity; and / or ii) an element of a set (M) of one or more sub-parts identified by the first entity from among the plurality of sub-parts ; and / or iii) a sample of said portion of data (D); and / or iv) identifiable by an identifier that is unique among the plurality of sub-portions and / or the set (M) of one or more sub-portions.
5. A method according to any preceding claim, comprising one or more of the following steps: i) storing the portion of data (D) in a storage resource by the second entity; ii) receiving, by the first entity, the root value (R') from the second entity; iii) comparing said root value (R') received from said second entity with a pre-computed root value calculated by said first entity.
6. A method according to any preceding claim, wherein the method comprises one or both of the following: i) storing, by or on behalf of the second entity, the portion of data (D), preferably in an off-chain storage resource; ii) storing a header (H) of a data block (B), the data block comprising the portion of data (D) in a transaction (Tx) on the blockchain.
7. A method according to any preceding claim, wherein the method comprises one or more of the following: An action is triggered in response to a comparison of said root value provided from said second entity to the first entity, preferably wherein said action is transmitting a signal or an electronic communication or unlocking a resource.
8. A method according to any preceding claim, further comprising: include: Requesting, by the first entity to the second entity, a root value of another Merkle tree calculated based on a further variation of the at least one sub-part; and / or A root value of another Merkle tree calculated based on a further variation of the at least one sub-portion is provided from the second entity to the first entity.
9. A method according to any preceding claim, in: The at least one sub-portion is an element of a set (M) of sub-portions identified from the plurality of sub-portions; as well as The set of sub-parts (M) is identified so as to allow the root value (R') to be calculated using a minimum number of calculations.
10. A method according to any preceding claim, in: i) the at least one sub-part is an element of a set (M) of sub-parts identified from the plurality of sub-parts; and / or ii) the method further comprises the following steps: A plurality of predetermined challenges are determined, by the first entity, based on a plurality of variations of the set of sub-portions (M).
11. A method according to any preceding claim, wherein the method include: i) verifying the existence, status, integrity, consistency, persistence, storage and / or security of the portion of data (D); and / or ii) Perform data backup and / or recovery, data archiving, file system dumps and / or data versioning activities.
12. A computer device, wherein the computer device include: a memory, the memory comprising one or more memory units; as well as a processing device, the processing device comprising one or more processing units; The memory stores code arranged to be executed on the processing device, the code being configured to perform a method according to any preceding claim when executed on the processing device.
13. A computer program embodied on a computer readable memory and configured to, when run on one or more processors, perform the method according to any one of claims 1 to 11.
