# US 2025/0097045 A1 · Partial sha-based hash function

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

- Number: US 2025/0097045 A1
- Document ID: US20250097045A1
- Status: Published application
- Kind: A1
- Application number: 18/562,242
- Filed: 2022-04-25
- Published: 2025-03-20
- Earliest claimed: 2021-05-24
- Assignees: nChain Licensing AG
- Applicants: nChain Licensing AG
- Inventors: Wei ZHANG; Steven Patrick COUGHLAN; John MURPHY; Arthur GORDAN
- Web page: https://patentgrep.com/patent/US20250097045A1

## CPC

- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 9/3247: {involving digital signatures}
- H04L 9/3236: {using cryptographic hash functions}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 63/123: {received data contents, e.g. message integrity}
- H04L 2209/56: Financial cryptography, e.g. electronic payment or e-cash
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A computer-implemented method of verifying the integrity of part of a pre-image corresponding to a hash digest generated by hashing the preimage with a SHA-based hash function, wherein the pre-image comprises a first message and a second message, and wherein the method comprises: a) receiving an iteration input vector; b) obtaining a second sequence of blocks; c) generating a final iteration output vector by performing an iteration of the SHA-based hash computation for each of the second sequence of blocks in order of a respective position in the second sequence of blocks, wherein the iteration of the SHA-based hash computation performed on a first one of the second sequence of blocks is based on the obtained iteration input vector; and d) generating a candidate hash digest based on the final iteration output vector, the candidate hash digest being for comparison with the hash digest.

## Claims

### Claim 1

A computer-implemented method of verifying an integrity of part of a pre-image corresponding to a hash digest generated by hashing the pre-image with a SHA-based hash function, wherein the pre-image comprises a first message and a second message, and wherein the method is performed by a verifying party and comprises:
a) receiving an iteration input vector, wherein the iteration input vector is generated by partially executing the SHA-based hash function, wherein partially executing the SHA-based hash function comprises:
i) obtaining a first sequence of blocks, wherein the first sequence of blocks is obtained by either padding a binary representation of the pre-image to generate a first padded sequence, and splitting the first padded sequence into a first sequence of blocks, or by splitting a binary representation of the first message into the first sequence of blocks-, and
ii) performing an iteration of a SHA-based hash computation for each of the first sequence of blocks in order of a respective position in the first sequence of blocks, up until a block that comprises one or more bits representing the second message;
b) obtaining a second sequence of blocks, wherein the second sequence of blocks is generated by:
i) padding a binary representation of the second message to generate a second padded sequence,
ii) splitting the second padded sequence into the second sequence of blocks;
c) generating a final iteration output vector by performing an iteration of the SHA-based hash computation for each of the second sequence of blocks in order of a respective position in the second sequence of blocks, wherein the iteration of the SHA-based hash computation performed on a first one of the second sequence of blocks is based on the obtained iteration input vector; and
d) generating a candidate hash digest based on the final iteration output vector, the candidate hash digest being for comparison with the hash digest.

### Claim 2 (depends on 1)

The method of claim 1, comprising:
obtaining the hash digest; and
verifying that the second message is part of the pre-image of the obtained hash digest based on a comparison of the candidate hash digest and the obtained hash digest.

### Claim 3 (depends on 1)

The method of claim 1, wherein said receiving of the iteration input vector comprises receiving the iteration input vector from a proving party.

### Claim 4 (depends on 1)

The method of claim 1, comprising obtaining the second message.

### Claim 5 (depends on 4)

The method of claim 4, wherein said obtaining of the second sequence of blocks comprises generating the second sequence of blocks.

### Claim 6 (depends on 4)

The method of claim 4, comprising obtaining a length of the pre-image, and wherein said generating of the second padded sequence is based on the second message and the length of the pre-image.

### Claim 7 (depends on 4)

The method of claim 4, comprising obtaining a length of the first message, and wherein generating of the second padded sequence is based on the second message and the length of the first message

### Claim 8 (depends on 1)

The method of claim 1, wherein said obtaining of the second sequence of blocks comprises receiving the second sequence of blocks.

### Claim 9

A computer-implemented method of proving an integrity of part of a pre-image corresponding to a hash digest generated by hashing the pre-image with a SHA-based hash function, wherein the pre-image comprises a first message and a second message, and wherein the method is performed by a proving party and comprises:
a) generating an iteration input vector, wherein the iteration input vector is generated by partially executing the SHA-based hash function, wherein partially executing the SHA-based hash function comprises:
i) obtaining a first sequence of blocks, wherein the first sequence of blocks is obtained by either padding a binary representation of the pre-image to generate a first padded sequence, and splitting the first padded sequence into a first sequence of blocks, or by splitting a binary representation of the first message into the first sequence of blocks, and
ii) performing an iteration of a SHA-based hash computation for each of the first sequence of blocks in order of a respective position in the first sequence of blocks, up until a block that comprises one or more bits representing the second message;
and
b) making the iteration input vector available to a verifying party.

### Claim 10 (depends on 9)

The method of claim 9, comprising making the hash digest available to the verifying party.

### Claim 11 (depends on 9)

The method of claim 9, comprising making the second message available to the verifying party.

### Claim 12 (depends on 9)

The method of claim 9, comprising making a bit-length of the pre-image or the first message available to the verifying party.

### Claim 13 (depends on 1)

The method of claim 1, wherein the first message is not available to the verifying party, such that the integrity of the second message is verified without revealing the first message.

### Claim 14 (depends on 1)

The method of claim 1, wherein the pre-image comprises at least part of a blockchain transaction.

### Claim 15 (depends on 14)

The method of claim 14, wherein the second message comprises one or more outputs of the blockchain transaction.

### Claim 16 (depends on 1)

The method of claim 1, wherein the pre-image comprises at least part of an identity document.

### Claim 17 (depends on 16)

The method of claim 16, wherein the identity document comprises one of: a driving license, a passport, a birth certificate, and a resident permit.

### Claim 18 (depends on 16)

The method of claim 16, wherein the second message comprises one or more data fields of the identity identify-document.

### Claim at position 19

19-23. (canceled)

### Claim 24

Computer equipment comprising:
memory comprising one or more memory units; and
processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when run on the processing apparatus, the processing apparatus performs a method of verifying an integrity of part of a pre-image corresponding to a hash digest generated by hashing the pre-image with a SHA-based hash function, wherein the pre-image comprises a first message and a second message, and wherein the method is performed by a verifying party and comprises:
a) receiving an iteration input vector, wherein the iteration input vector is generated by partially executing the SHA-based hash function, wherein partially executing the SHA-based hash function comprises:
i) obtaining a first sequence of blocks, wherein the first sequence of blocks is obtained by either padding a binary representation of the pre-image to generate a first padded sequence, and splitting the first padded sequence into a first sequence of blocks, or by splitting a binary representation of the first message into the first sequence of blocks, and
ii) performing an iteration of a SHA-based hash computation for each of the first sequence of blocks in order of a respective position in the first sequence of blocks, up until a block that comprises one or more bits representing the second message;
b) obtaining a second sequence of blocks, wherein the second sequence of blocks is generated by:
i) padding a binary representation of the second message to generate a second padded sequence,
ii) splitting the second padded sequence into the second sequence of blocks;
c) generating a final iteration output vector by performing an iteration of the SHA-based hash computation for each of the second sequence of blocks in order of a respective position in the second sequence of blocks, wherein the iteration of the SHA-based hash computation performed on a first one of the second sequence of blocks is based on the obtained iteration input vector; and
d) generating a candidate hash digest based on the final iteration output vector, the candidate hash digest being for comparison with the hash digest.

### Claim 25

A computer program embodied on non-transitory computer-readable storage media and configured so as, when run on one or more processors, the one or more processors to perform a method of verifying an integrity of part of a pre-image corresponding to a hash digest generated by hashing the pre-image with a SHA-based hash function, wherein the pre-image comprises a first message and a second message, and wherein the method is performed by a verifying party and comprises:
a) receiving an iteration input vector, wherein the iteration input vector is generated by partially executing the SHA-based hash function, wherein partially executing the SHA-based hash function comprises:
i) obtaining a first sequence of blocks, wherein the first sequence of blocks is obtained by either padding a binary representation of the pre-image to generate a first padded sequence, and splitting the first padded sequence into a first sequence of blocks, or by splitting a binary representation of the first message into the first sequence of blocks, and
ii) performing an iteration of a SHA-based hash computation for each of the first sequence of blocks in order of a respective position in the first sequence of blocks, up until a block that comprises one or more bits representing the second message;
b) obtaining a second sequence of blocks, wherein the second sequence of blocks is generated by:
i) padding a binary representation of the second message to generate a second padded sequence,
ii) splitting the second padded sequence into the second sequence of blocks;
c) generating a final iteration output vector by performing an iteration of the SHA-based hash computation for each of the second sequence of blocks in order of a respective position in the second sequence of blocks, wherein the iteration of the SHA-based hash computation performed on a first one of the second sequence of blocks is based on the obtained iteration input vector; and
d) generating a candidate hash digest based on the final iteration output vector, the candidate hash digest being for comparison with the hash digest.
