Skip to content
Akinbola0xKENZMAN
Work/Privacy & cryptography
Stellar

Compliance without deanonymising

A second circuit that proves a withdrawer is on an approved list without saying who they are.

Role
Sole author
When
Jun 2026 – now
Team
Solo
Stack
Noir, Poseidon2, Soroban

Overview

Veilum's Association Set Provider circuit extends the transfer circuit. On unshield, it additionally proves the owner's key is a leaf in the ASP membership tree, so pool operators can gate exits while transfers inside the pool stay private and ASP-free.

The code

packages/circuits-asp/src/main.nrView on GitHub ↗
fn main(
    // … private inputs, including the ASP Merkle path and
    membership_blinding: Field,
    // … public inputs shared with the transfer circuit, plus
    asp_membership_root: pub Field,
    owner_pk_public: pub Field,
) {
    // …
    assert(owner_pk == owner_pk_public);
    let asp_leaf = poseidon2_hash3(owner_pk, membership_blinding, 2);
    assert((if verify_asp_path(asp_leaf, asp_merkle_siblings, asp_merkle_directions, asp_membership_root) { 1 } else { 0 } - 1) * mode == 0);
    // … then the same note, nullifier and conservation constraints as the transfer circuit
}

How it works

  1. The membership leaf is a Poseidon2 hash of the owner key and a private blinding
  2. The membership check is multiplied by mode, so it only binds on withdrawals
  3. The public owner key must match the one derived from the spending key, linking the two proofs

Part of

Stack

NoirPoseidon2Soroban