> For the complete documentation index, see [llms.txt](https://satoshichain.gitbook.io/satoshi-chain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://satoshichain.gitbook.io/satoshi-chain/background/3.1-cryptographic-hash-functions.md).

# 3.1 Cryptographic Hash Functions

An essential tool in blockchain technology is the cryptographic function that ensures transaction integrity and immutability. The hash function is the mathematical algorithm that produces a fixed size numerical output (called fingerprint or digest) consisting of input data. More specifically, a hash function can be denoted as: \
\
`H:{0,1}*→ {0,1}ᵏ` \
\
A hash function takes on the input of any size and produces a fixed k length output. In addition, it must satisfy the following properties: \
● It is easy to compute H regardless of input data size. \
● Given any h, it is computationally infeasible to find an input x such that H(x) = h. \
● Given any x, it is also computationally infeasible to find y such that H(y) = H(x) and x≠ y. \
● It is computationally infeasible to find any (x, y) such that H(x) = H(y) and x≠ y.&#x20;

{% hint style="info" %}
SHA-256 and Keccak-256 are widely used in several blockchains, and they produce a hash (output) of 256 bits in size.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://satoshichain.gitbook.io/satoshi-chain/background/3.1-cryptographic-hash-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
