VERDOCK

Selective disclosure

Account identifiers are replaced by salted SHA256 commitments before signing. The bank opens one field at a time and nothing else.

On this page

A receipt must prove an action happened without publishing who it happened to. Verdock replaces identifiers with salted SHA256 commitments before signing, and opens one field at a time on request.

What is committed#

Values under these keys, at any depth, are replaced by {"sha256": ...}: customer_id, customer_ids, account_number, account_numbers, email, email_address, customer_email. Writing one of them without a bank salt fails. The same applies to the disclosed fields of an exchange.

The bank holds one root salt of at least 32 bytes. HMAC SHA256 derives a separate salt for every field from the receipt step id (or exchange id) and the JSON pointer of the field. Opening one field reveals that field's value and derived salt. It reveals neither the root salt nor any other field.

Open one field#

Terminal
verdock disclose receipt.json --field /params/customer_id --value-file bank-value.json --salt-file bank-salt.hex
Python
from verdock.disclosure import disclose, verify_disclosure

proof = disclose(receipt, "/params/customer_id", "cust-1", bank_salt)
verify_disclosure(receipt, proof)

disclose raises ValueError for a wrong value. verify_disclosure returns True, or False for a wrong value, salt or path. Allowed paths start with /params/ (log receipts) or /exchange/disclosed/ (exchange receipts). The browser equivalent is verifyDisclosure(receipt, proof). The verifier first verifies the receipt signature. The proof is checked against the committed value inside it.

Limits#