> 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/domain-tag-separation.md).

# Domain Tag Separation

**Used in:** ZKP #1, ZKP #2, ZKP #3

## What it does

Prevents collision between Vote Authority Notes and Vote Commitments in the shared vote commitment tree. A constant domain tag is prepended as the first Poseidon input to each commitment type.

## Constants

```
DOMAIN_VAN = 0   (Vote Authority Notes)
DOMAIN_VC  = 1   (Vote Commitments)
```

## Affected commitments

**VAN commitment:**

```
van_comm_core       = Poseidon(DOMAIN_VAN, vpk_g_d, vpk_pk_d, num_ballots, voting_round_id, proposal_authority)
vote_authority_note = Poseidon(van_comm_core, gov_comm_rand)
```

**Vote commitment:**

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

## Why this is needed

Both VANs and VCs are leaves in the same Merkle tree. Without domain separation, it would be theoretically possible for a valid VAN preimage to hash to the same value as a valid VC preimage (or vice versa). The domain tag makes this structurally impossible — the first field element always differs, so no valid VAN can ever equal a valid VC regardless of Poseidon mode or arity.
