# Verifying checksums

## Concept

As a best practice, we should always verify the checksum of all downloaded binary and zipped files. This ensures that the downloaded files are indeed the ones we intended to download - i.e. have not been corrupted or tampered with since it was originally created.

Network and device level security are powerless against this attack vector because you are basically inviting these tampered files into your system if you do not perform checksum verification before running these files.

## How to verify checksums

Each downloadable file comes with it's own checksum (see below).

<figure><img src="https://content.gitbook.com/content/oML8XLjdWBoYbtGBoQ9R/blobs/PNhxy5ehcklnFlQ2S6ir/image.png" alt=""><figcaption></figcaption></figure>

Verify its checksum after downloading the file.

```sh
echo "<checksum> <file_name>" | <checksum_method> --check
```

**Breakdown:**

* \<checksum> refers to the long hexadecimal string in the screenshot above
* \<checksum\_method> refers to the the hashing algorithm used (in lower case) - e.g. MD5, SHA256, SHA512&#x20;

**Example:**

```sh
echo "444bf523e0db9c23243b365e717b5b15 nethermind-1.20.1-9f39c0c7-linux-x64.zip" | md5sum --check
```

***Expected output:** Verify output of the checksum verification*

```
nethermind-1.20.1-9f39c0c7-linux-x64.zip: OK
```


---

# Agent Instructions: 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:

```
GET https://dvt-homestaker.stakesaurus.com/linux-os-networking-and-security/verifying-checksums.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
