# US 2021/0286792 A1 · Hashed balanced tree data structure

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0286792 A1
- Document ID: US20210286792A1
- Status: Published application
- Kind: A1
- Application number: 16/814,207
- Filed: 2020-03-10
- Published: 2021-09-16
- Earliest claimed: 2020-03-10
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Jeronimo IRAZABAL
- Web page: https://patentgrep.com/patent/US20210286792A1

## CPC

- G06F 16/2246: {Trees, e.g. B+trees}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- G06F 16/93: Document management systems
- H04L 9/0891: {Revocation or update of secret information, e.g. encryption key update or rekeying}
- H04L 9/3236: {using cryptographic hash functions}
- H04L 9/3297: {involving time stamps, e.g. generation of time stamps}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Aspects create a tree data structure that indexes a collection of documents present in a data repository at a point in time. The tree data structure includes a plurality of nodes. For each such node, a respective root hash value of that node is determined. The root hash value of a leaf node is determined from hash value(s) for element(s) of that node that are keyed to documents in the collection. The root hash value of a parent node is determined from a root hash value for each of its child nodes. For a given document that is purported to be a target document present in the data repository at the point in time, processing is performed that uses the tree data structure in facilitating verification that the given document is the target document. This includes providing a cryptographic proof to demonstrate whether the given document is the target document.

## Claims

### Claim 1

A computer-implemented method comprising:
creating a tree data structure that indexes a collection of documents present in a data repository at a point in time, the tree data structure being stored in memory as a hierarchical data structure comprising a plurality of nodes, the plurality of nodes comprising parent nodes and leaf nodes of the tree data structure;
determining, for each node of the plurality of nodes, a respective root hash value of that node, wherein:
each leaf node of the tree data structure comprises a respective one or more elements, each element of the one or more elements of the leaf node being keyed to a corresponding document of the plurality of documents, and the root hash value of the leaf node is determined as a function of at least a respective hash value for each element of the one or more elements, the hash value for an element being based at least in part on a hash of data of the document to which the element corresponds; and
each parent node of the tree data structure is a parent to a respective one or more child nodes of the plurality nodes, and the root hash value of the parent node is determined as a function of at least the root hash value for each child node of the one or more child nodes of the parent node;
storing in each parent node of the tree data structure the root hash value for each of the one or more child nodes of that parent node; and
for a given document that is purported to be a target document of the collection of documents present in the data repository at the point in time, performing processing, using the tree data structure, in facilitating verification that the given document is the target document present as part of the collection of documents in the data repository at the point in time, wherein the performing processing comprises providing a cryptographic proof to demonstrate whether the given document is the target document.

### Claim 2 (depends on 1)

The method of claim 1, wherein the tree data structure is rooted at a root node of the tree data structure, wherein the root hash value for the root node represents a hash for the collection of documents at the point in time, wherein an identified node of the tree data structure has an element that is keyed to the target document, and wherein the provided cryptographic proof comprises a plurality of hash values for nodes of the tree data structure, the plurality of hash values being those which, together with the hash value for the element that is keyed to the target document, enable calculation of a root hash value of the root node.

### Claim 3 (depends on 2)

The method of claim 2, wherein the plurality of hash values comprises, for each parent node, of the tree data structure, from which the identified node is a descendent, one or more root hash values for one or more child nodes, of that parent node, that is not also a parent node from which the identified node descends.

### Claim 4 (depends on 3)

The method of claim 3, wherein plurality of hash values comprises one or more hash values for one or more elements, other than the element that is keyed to the target document, of the identified node.

### Claim 5 (depends on 3)

The method of claim 3, wherein non-leaf nodes of the tree data structure comprise a respective one or more elements each being keyed to a corresponding document of the plurality of documents, and wherein the plurality of hash values comprises, for each parent node of the parent nodes, of the tree data structure, from which the identified node is a descendent, one or more hash values for one or more elements of the parent node.

### Claim 6 (depends on 5)

The method of claim 5, wherein the identified node is a non-leaf node having at least one child node, and wherein the plurality of hash values further comprises one or more root hash values for the at least one child node of the identified node.

### Claim 7 (depends on 1)

The method of claim 1, wherein the creating the tree data structure is performed by a server and wherein the performing processing using the tree data structure is performed by the server based on a request from a client device holding the given document to be verified, wherein the verification that the given document is the target document present as part of the collection of documents in the data repository at the point in time is performed by the client device using the cryptographic proof provided by the server.

### Claim 8 (depends on 1)

The method of claim 1, wherein the collection of documents are stored in the data repository separate from the tree data structure, wherein each node of the tree data structure having one or more elements corresponding to one or more documents points to document data of the one or more documents

### Claim 9 (depends on 8)

The method of claim 8, wherein the root hash value for the node having an element corresponding to the target document is based at least in part on document data of that target document such that modification of the document data of that target document results in a different root hash value of the node and therefore a different root hash value of any parent node from which the node descends, and wherein, based on the given document being different from the target document, the provided cryptographic proof will demonstrate that the given document is not the target document and the verification that the given document is the target document present as part of the collection of documents in the data repository at the point in time will fail.

### Claim 10 (depends on 1)

The method of claim 1, wherein the collection of documents are stored in the tree data structure, wherein, for each node of the tree data structure, having one or more elements corresponding to one or more documents of the collection of documents, each element of the one or more elements of that node include the document data of the document to which the element respectively corresponds.

### Claim 11 (depends on 1)

The method of claim 1, wherein the hash value for an element of a node is determined based at least on data of the document to which the element corresponds and a time at which the document was stored to the data repository.

### Claim 12 (depends on 1)

The method of claim 1, wherein non-leaf nodes of the tree data structure do not hold a direct reference to any documents of the collection of documents and do not hold document data, wherein the non-leaf nodes hold document identifiers and root hash values for expediting tree data structure traversal, searching, and cryptographic proof construction.

### Claim 13 (depends on 1)

The method of claim 1, further comprising updating the tree data structure based on a change that performs at least one action selected from the group consisting of:
adding and changing a document of the collection of documents, wherein the updating comprises:
identifying a node of the tree data structure having an element to which the document corresponds;
determining a new root hash value of the identified node; and
determining, a respective new root hash value for each parent node, of the tree data structure, from which the identified node is a descendent.

### Claim 14

A computer system comprising:
a memory; and
a processor in communication with the memory, wherein the computer system is configured to perform a method comprising:
creating a tree data structure that indexes a collection of documents present in a data repository at a point in time, the tree data structure being stored in memory as a hierarchical data structure comprising a plurality of nodes, the plurality of nodes comprising parent nodes and leaf nodes of the tree data structure;
determining, for each node of the plurality of nodes, a respective root hash value of that node, wherein:
each leaf node of the tree data structure comprises a respective one or more elements, each element of the one or more elements of the leaf node being keyed to a corresponding document of the plurality of documents, and the root hash value of the leaf node is determined as a function of at least a respective hash value for each element of the one or more elements, the hash value for an element being based at least in part on a hash of data of the document to which the element corresponds; and
each parent node of the tree data structure is a parent to a respective one or more child nodes of the plurality nodes, and the root hash value of the parent node is determined as a function of at least the root hash value for each child node of the one or more child nodes of the parent node;
storing in each parent node of the tree data structure the root hash value for each of the one or more child nodes of that parent node; and
for a given document that is purported to be a target document of the collection of documents present in the data repository at the point in time, performing processing, using the tree data structure, in facilitating verification that the given document is the target document present as part of the collection of documents in the data repository at the point in time, wherein the performing processing comprises providing a cryptographic proof to demonstrate whether the given document is the target document.

### Claim 15 (depends on 14)

The computer system of claim 14, wherein the tree data structure is rooted at a root node of the tree data structure, wherein the root hash value for the root node represents a hash for the collection of documents at the point in time, wherein an identified node of the tree data structure has an element that is keyed to the target document, wherein the provided cryptographic proof comprises a plurality of hash values for nodes of the tree data structure, the plurality of hash values being those which, together with the hash value for the element that is keyed to the target document, enable calculation of a root hash value of the root node, wherein the plurality of hash values comprises, for each parent node, of the tree data structure, from which the identified node is a descendent, one or more root hash values for one or more child nodes, of that parent node, that is not also a parent node from which the identified node descends.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein non-leaf nodes of the tree data structure comprise a respective one or more elements each being keyed to a corresponding document of the plurality of documents, wherein the plurality of hash values comprises, for each parent node of the parent nodes, of the tree data structure, from which the identified node is a descendent, one or more hash values for one or more elements of the parent node, wherein the identified node is a non-leaf node having at least one child node, and wherein the plurality of hash values further comprises one or more root hash values for the at least one child node of the identified node.

### Claim 17 (depends on 14)

The computer system of claim 14, wherein the collection of documents are stored in the data repository separate from the tree data structure, wherein each node of the tree data structure having one or more elements corresponding to one or more documents points to document data of the one or more documents, wherein the root hash value for the node having an element corresponding to the target document is based at least in part on document data of that target document such that modification of the document data of that target document results in a different root hash value of the node and therefore a different root hash value of any parent node from which the node descends, and wherein, based on the given document being different from the target document, the provided cryptographic proof will demonstrate that the given document is not the target document and the verification that the given document is the target document present as part of the collection of documents in the data repository at the point in time will fail.

### Claim 18

A computer program product comprising:
a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
creating a tree data structure that indexes a collection of documents present in a data repository at a point in time, the tree data structure being stored in memory as a hierarchical data structure comprising a plurality of nodes, the plurality of nodes comprising parent nodes and leaf nodes of the tree data structure;
determining, for each node of the plurality of nodes, a respective root hash value of that node, wherein:
each leaf node of the tree data structure comprises a respective one or more elements, each element of the one or more elements of the leaf node being keyed to a corresponding document of the plurality of documents, and the root hash value of the leaf node is determined as a function of at least a respective hash value for each element of the one or more elements, the hash value for an element being based at least in part on a hash of data of the document to which the element corresponds; and
each parent node of the tree data structure is a parent to a respective one or more child nodes of the plurality nodes, and the root hash value of the parent node is determined as a function of at least the root hash value for each child node of the one or more child nodes of the parent node;
storing in each parent node of the tree data structure the root hash value for each of the one or more child nodes of that parent node; and
for a given document that is purported to be a target document of the collection of documents present in the data repository at the point in time, performing processing, using the tree data structure, in facilitating verification that the given document is the target document present as part of the collection of documents in the data repository at the point in time, wherein the performing processing comprises providing a cryptographic proof to demonstrate whether the given document is the target document.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the tree data structure is rooted at a root node of the tree data structure, wherein the root hash value for the root node represents a hash for the collection of documents at the point in time, wherein an identified node of the tree data structure has an element that is keyed to the target document, wherein the provided cryptographic proof comprises a plurality of hash values for nodes of the tree data structure, the plurality of hash values being those which, together with the hash value for the element that is keyed to the target document, enable calculation of a root hash value of the root node, wherein the plurality of hash values comprises, for each parent node, of the tree data structure, from which the identified node is a descendent, one or more root hash values for one or more child nodes, of that parent node, that is not also a parent node from which the identified node descends.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein non-leaf nodes of the tree data structure comprise a respective one or more elements each being keyed to a corresponding document of the plurality of documents, wherein the plurality of hash values comprises, for each parent node of the parent nodes, of the tree data structure, from which the identified node is a descendent, one or more hash values for one or more elements of the parent node, wherein the identified node is a non-leaf node having at least one child node, and wherein the plurality of hash values further comprises one or more root hash values for the at least one child node of the identified node.
