> For the complete documentation index, see [llms.txt](https://valargroup.gitbook.io/shielded-vote-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://valargroup.gitbook.io/shielded-vote-docs/circuit-components/vote-commitment-integrity.md).

# Vote Commitment Integrity

**Used in:** ZKP #2 (condition 12), ZKP #3 (condition 2)

## What it does

Verifies that the vote commitment is correctly constructed from its components.

## Circuit

```
vote_commitment = H(DOMAIN_VC, voting_round_id, shares_hash, proposal_id, vote_decision)
```

Where:

* `DOMAIN_VC = 1` — domain tag distinguishing vote commitments from VANs in the shared tree
* `voting_round_id` — scopes this VC to a specific voting round
* `shares_hash` — hash of the 16 encrypted shares
* `proposal_id` — which proposal this vote is for
* `vote_decision` — the voter's choice

## Usage

* **ZKP #2** — Proves the public `vote_commitment` is correctly constructed from the private vote details
* **ZKP #3** — "Opens" the vote commitment, proving the public `proposal_id` and `vote_decision` match what was committed in Phase 3

### Replay protection

A VC is not replayable across rounds, but the reasoning is nuanced.

## See also

* [Domain Tag Separation](https://github.com/z-cale/shielded-vote-book/blob/main/circuits/shielded_vote_book/circuits/domain-tag-separation.md) for why `DOMAIN_VC` is needed
* [Shares Hash Integrity](https://github.com/z-cale/shielded-vote-book/blob/main/circuits/shielded_vote_book/circuits/shares-hash-integrity.md) for how `shares_hash` is computed
