> For the complete documentation index, see [llms.txt](https://docs.voting.works/vxsuite-tdp-v4/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voting.works/vxsuite-tdp-v4/readme/signed-hash-validation.md).

# Signed Hash Validation

Signed Hash Validation provides end users with a way to verify that a VotingWorks machine is running authentic unmodified VotingWorks software.

The machine preps a payload consisting of the following, with `1//shv1//` as a prefix and `#` as a separator:

* System hash
* Software version
* Election ID
* Current timestamp

The machine signs that payload with its TPM private key and then bundles the following together, with `;` as a separator:

* Payload
* Payload signature
* Machine cert

This combination is displayed as a QR code. Putting this all together, the QR code contains:

```
message = 1//shv1//<system-hash>#<software-version>#<election-id>#<current-timestamp>
qrCode  = <message>;signature(<message>);<machine-cert>
```

This QR code can be scanned at <https://check.voting.works>. The site parses the QR code and performs the following verification:

* Verifies the machine cert using the root VotingWorks cert.
* Extracts the machine's public key from the machine cert.
* Uses that public key to verify the payload signature against the original payload. If this verification succeeds, we can be confident that the machine possesses the TPM private key that pairs with the public key in the machine cert.
* Because the TPM private key will only sign data if the system hash is correct, per [System Integrity](/vxsuite-tdp-v4/system-security-auditing-and-logging/software-security/system-integrity.md), we can further be confident that the software on the machine is authentic and unmodified.

After completing the above verification, <https://check.voting.works> displays a success indicator alongside the payload components and the machine ID as extracted from the machine cert. These attributes can be matched against what's displayed on the machine.

|                              Machine UX                             |                                Web UX                               |
| :-----------------------------------------------------------------: | :-----------------------------------------------------------------: |
| <img src="/files/JQCCi5ohDxof6tZlafa8" alt="" data-size="original"> | <img src="/files/HeTX2I573grdElC5hvul" alt="" data-size="original"> |

## QR Code Specifications

Signed Hash Validation QR codes are [Model 2 QR codes](https://www.qrcode.com/en/codes/model12.html) with [Level H error correction](https://www.qrcode.com/en/about/error_correction.html).

## Code Links

Refer to the following code links for more details:

* <https://github.com/votingworks/vxsuite/blob/v4.0.2/libs/auth/src/signed_hash_validation.ts>


---

# 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://docs.voting.works/vxsuite-tdp-v4/readme/signed-hash-validation.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.
