# US 2022/0294637 A1 · System and Method of Establishing a Trusted Relationship in a Distributed System

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

- Number: US 2022/0294637 A1
- Document ID: US20220294637A1
- Status: Published application
- Kind: A1
- Application number: 17/832,410
- Filed: 2022-06-03
- Published: 2022-09-15
- Earliest claimed: 2019-12-05
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Lifeng Liu; Jian Li
- Web page: https://patentgrep.com/patent/US20220294637A1

## CPC

- H04L 9/3236: {using cryptographic hash functions}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- H04L 63/123: {received data contents, e.g. message integrity}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A node in a distributed network computes a hash of content for a service received in a data packet. The node verifies the data packet by comparing the hash of the content of a service received from a neighboring node to a hash of the content computed by the node. An amount of content of the service having a same identification is accumulated in a trusted execution environment (TEE) of the node, and a signature based on code stored in a TEE of the node is generated. The node then sends the data packet to the next neighboring node, where the service-related information includes the service ID, a hash of the service content and the signature. The service records with the accumulated amount of service content, accumulated hash values, and nodes' signatures are sent to the validation nodes to reach consensus for the service provided.

## Claims

### Claim 1

A method for establishing a trusted relationship implemented by a node in a distributed system, the method comprising:
receiving a data packet from a neighboring node, the data packet comprising a service and service-related information;
computing a first hash of content of the service;
verifying the data packet by comparing a second hash of the content of the service received from the neighboring node to the first hash;
accumulating an amount of content of the service received in the data packet from the neighboring node having a same service ID to generate an accumulated amount of content;
generating a first signature based on code stored in a trusted execution environment (TEE); and
sending the data packet with the service and the service-related information to a next neighboring node, the service-related information including a service ID, the first hash, and the first signature.

### Claim 2 (depends on 1)

The method of claim 1, further comprising sending an acknowledgement to the neighboring node, the acknowledgement including the service ID, a third hash of the accumulated amount of the content of the service and a second signature.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
creating a hash tree, the hash tree includes a node structure including one or more leaf nodes, one or more child nodes, and one or more parent nodes, wherein each leaf node represents a hash of the content in the data packet received from the neighboring node and each parent node represents an accumulated hash of the content of each direct leaf node or each child node.

### Claim 4 (depends on 3)

The method of claim 3, wherein the accumulated hash is calculated by:
incrementing the accumulated amount of content of the service based on the service ID;
adding the first hash as a leaf node in the hash tree, and updating the corresponding parent nodes until a root node; and
removing the one or more child nodes of each parent node when there is no empty leaf node in its children nodes.

### Claim 5 (depends on 3)

The method of claim 3, wherein
the hash tree is divided into hash subtrees, where each hash subtree represents a parent node and its corresponding one or more leaf nodes or one or more child nodes, and
the data packet corresponding to each hash subtree is received from the neighboring node along a plurality of different paths.

### Claim 6 (depends on 5)

The method of claim 5, further comprising merging, at the node, each of the hash subtrees corresponding to the received data packets along the plurality of different paths.

### Claim 7 (depends on 6)

The method of claim 6, further comprising determining whether the hash of the data packets is missing from the accumulated has, the determining comprising:
storing the accumulated hash for each transmission path with the same service ID after sending the data packet to the next neighboring node;
extracting a second accumulated hash from an acknowledgement of the next neighboring node; and
comparing the second accumulated hash with the stored accumulated hash.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
after completion of receipt of the data packets having the same service ID, sending the data packet including the accumulated amount of content of the service, the accumulated hash of the data packets and a node signature to a validation node, wherein the validation node is configured to:
verify, using a public key of a key pair for each record received from a neighboring node, the amount of the content of the service and the hash of the content are valid, and
form a consensus, based on the verified records received from different neighboring nodes with the same service ID, about the accumulated amount of the content for the service received in the data packets for nodes in the distributed system.

### Claim 9 (depends on 1)

The method of claim 1, wherein the service-related information received by the neighboring node includes the service ID, the second hash of the content of the service and a second signature created by a private key of a key pair.

### Claim 10 (depends on 1)

The method of claim 1, further comprising verifying a second signature, signed by the neighboring node, in the data packet using a public key of a key pair.

### Claim 11

A node for establishing a trusted relationship in a distributed system, comprising:
a memory storage comprising instructions; and
a processor in communication with the memory, wherein execution of the instructions by the processor causes the node to:
receive a data packet from a neighboring node, the data packet comprising a service and service-related information;
compute a first hash of content of the service;
verify the data packet by comparing a second hash of the content of the service received from the neighboring node to the first hash;
accumulate an amount of content of the service received in the data packet from the neighboring node having a same service ID to generate an accumulated amount of content;
generate a first signature based on code stored in a trusted execution environment (TEE); and
send the data packet with the service and the service-related information to a next neighboring node, the service-related information including a service ID, the first hash and the first signature.

### Claim 12 (depends on 11)

The node of claim 11, wherein the processor executes the instructions that cause the node to send an acknowledgement to the neighboring node, the acknowledgement including the service ID, a third hash of the accumulated amount of the content of the service and a second signature.

### Claim 13 (depends on 12)

The node of claim 12, wherein the processor further executes the instructions that cause the node to create a hash tree, the hash tree includes a node structure including one or more leaf nodes, one or more child nodes and one or more parent nodes, wherein each leaf node represents a hash of the content in the data packet received from the neighboring node and each parent node represents an accumulated hash of the content of each direct leaf node or each child node.

### Claim 14 (depends on 13)

The node of claim 13, wherein the accumulated hash is calculated by:
incrementing the accumulated amount of content of the service based on the service ID;
adding the first hash as a leaf node in the hash tree, and updating the corresponding parent nodes until a root node; and
removing the one or more child nodes of each parent node when there is no empty leaf node in its children nodes.

### Claim 15 (depends on 14)

The node of claim 14, wherein
the hash tree is divided into hash subtrees, where each hash subtree represents a parent node and its corresponding one or more leaf nodes or one or more child nodes, and
the data packet corresponding to each hash subtree is received from the neighboring node along a plurality of different paths.

### Claim 16 (depends on 15)

The node of claim 15, wherein the processor executes the instructions that cause the node to merge, at the node, each of the hash subtrees corresponding to the received data packets along the plurality of different paths.

### Claim 17 (depends on 16)

The node of claim 16, wherein the processor executes the instructions that cause the node to determine whether the hash of the data packets is missing from the accumulated hash by:
storing the accumulated hash for each transmission path with the same service ID after sending the data packet to the next neighboring node;
extracting a second accumulated hash from the acknowledgement of the neighboring node; and
comparing the second extracted accumulated hash with the stored accumulated hash.

### Claim 18 (depends on 11)

The node of claim 11, wherein the service-related information received by the neighboring node includes the service ID, the second hash of the content of the service and a second signature created by a private key of a key pair.

### Claim 19 (depends on 11)

The node of claim 11, wherein the processor executes the instructions that cause the node to verify the signature, signed by the neighboring node, in the data packet using a public key of a key pair.

### Claim 20

A non-transitory computer-readable medium storing computer instructions for establishing a trusted relationship in a distributed system, the instructions when executed by a processor of a node, cause the node to perform the steps of:
receiving a data packet from a neighboring node, the data packet including a service and service-related information;
computing a first hash of content of the service;
verifying the data packet by comparing a second hash of the content of the service received from the neighboring node to the first hash;
accumulating an amount of content of the service received in the data packet from the neighboring node having a same service ID;
generating a first signature based on code stored in a trusted execution environment (TEE); and
sending the data packet with the service and the service-related information to a next neighboring node, the service-related information including a service ID, the first hash and the first signature.
