Applied Zcash

Basic

Address per customer

One key gives many addresses. Give each customer or each order its own address. The shop knows which address got each payment. Outsiders see unrelated addresses.

Use

The address identifies the payment. Thus, the payer can send a payment with no memo, and the shop still finds the order.

Mechanism

full viewing key ──→ diversifier key dk ──→ d_j = FF1(dk, j) ──→ address j
                                      ↑                             │
incoming viewing key ── dk ───────────┴──── j = FF1⁻¹(dk, d_j) ←────┘
  1. The shop gives each customer a number j, the diversifier index.
  2. The key encrypts j into an 11-byte diversifier d_j.
  3. The diversifier and the key give a receiver. The receiver goes in a unified address.
  4. A payment arrives. The wallet decrypts the note with its incoming viewing key, one key for all addresses.
  5. The wallet decrypts the diversifier of the note to get j again.

Each index from 0 to 288 − 1 gives a valid Orchard address. The wallet scans one time for all addresses. Thus, many addresses cost the same scan work as one address.

The shop keeps a table of j and the customer. The table is the only shop data that this pattern needs.

Limits

Demo: a demo shop

The demo uses the orchard crate, compiled to WebAssembly. It makes addresses of the demo shop key from a first index. Copy an address into the second field. The shop key finds the index of the address.

CAUTION: The demo shop uses Testnet. Its seed is 32 bytes of 0x07, in the public source of this site. Do not send real funds to it.

Addresses

Find the customer

The WASM module is loading.