> 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/diversified-address-integrity.md).

# Diversified Address Integrity

**Used in:** ZKP #1 (conditions 5, 11), ZKP #2 (condition 3)

## What it does

Proves that a diversified address belongs to key material `(ak, nk)` by deriving `ivk` and checking the scalar multiplication. This links an address to its owner without revealing `ak` or `nk`.

## Circuit

```
pk_d = [ivk] * g_d
```

Where:

* `ivk = CommitIvk_{rivk}(ExtractP(ak), nk)` — derived from the spend auth key and nullifier key
* `g_d = DiversifyHash(d)` — the diversified base point for diversifier `d`
* `pk_d` — the diversified transmission key from the note

## Usage in Shielded Vote

### ZKP #1

* **Condition 5** — Establishes `ivk` from the signed note's address. This is where `ivk` is computed and constrained — it will be reused for all subsequent ownership checks.
* **Condition 11** — For each of the 5 input notes, verifies `pk_d_i = [ivk] * g_d_i` using the same `ivk`. Since `ivk` is already constrained from condition 5, each additional check is just one scalar multiplication.

This proves that all 5 input notes (real or padded) are owned by the same key as the signer.

### ZKP #2

* **Condition 3** — `vpk_pk_d_old = [ivk_v] * vpk_g_d_old` where `ivk_v = CommitIvk_{rivk_v}(ExtractP(vsk.ak), vsk.nk)`. Proves the voting address committed in the old VAN belongs to key material `(vsk.ak, vsk.nk)`. This establishes `ivk_v`. Same pattern as ZKP #1 condition 5, but using the voting key hierarchy.

Note: the new VAN's address `(g_d_new, pk_d_new)` is NOT checked in-circuit. The prover freely chooses it — if they use a bad address, the new VAN is simply unspendable. This is the same as Orchard's output note.

## Reference

Orchard spec §5.4.7.3 — Action Statement
