VERDOCK

Authorized exchange

Send a report to a bank, a partner or another team only when policy allows it or a named senior approves it. Both sides keep the same signed receipt.

On this page

Sending a report is an action with a recipient. Verdock allows it only when policy allows it, or when a named senior approves it, and only after the receiver signs for it. Both sides verify the same receipt offline with the same function. Standard library only: verdock/exchange.py.

The path#

  1. Draft and sign. The sender builds the exchange: sender, recipient party, data class, size, SHA256 of the payload, disclosed fields, the send policy hash and the expiry. The sender signs the exchange hash with its own Ed25519 key. The store never keeps the payload.
  2. Send policy. SendPolicy lists who can send which data class to which recipient party up to which limit. Names match exactly. Default is deny.
  3. Held send. An exchange outside the policy goes to the held queue and nothing leaves. exceptions() lists it.
  4. Request approval. The sender names an approver. The sender cannot be the approver. The approver answers with a signature, or with a 6 digit code from an authenticator. The code is bound to the exchange hash and a 30 second step, works once, and five wrong codes lock the exchange.
  5. Receiver acceptance. The receiver signs an acceptance of the exchange hash. A refusal is a signed refusal. It drops the held entry and releases nothing.
  6. Release. release(exchange_id, payload, send) runs only for an accepted exchange and only for the exact hashed payload. It calls send(payload) after every check and returns the exchange receipt.

Run the path from the command line#

Terminal
verdock keys create junior
verdock keys create senior
verdock keys create partner-bank
verdock exchange enroll --approver senior
verdock exchange request --sender junior --recipient partner-bank --data-class report --payload report.txt --approver senior
verdock exchange code EXCHANGE_ID --approver senior
verdock exchange approve EXCHANGE_ID --approver senior --code 123456
verdock exchange accept EXCHANGE_ID --receiver partner-bank
verdock exchange trust --out trust.json
verdock exchange verify .verdock/exchange/receipts/EXCHANGE_ID.json --trust trust.json

Leave out --code on approve to sign with the approver's key. Rules go in .verdock/exchange/send_policy.json, a list of sender, data_class, recipient and limit. With no rule, every exchange is held. The exchange scene runs the whole path: verdock demo --scene exchange. A reused code, a code for another exchange and a receiver refusal each release nothing.

The receipt#

{kind, version, exchange, exchange_hash, sender_signature, approval, acceptance}. The exchange holds the payload hash and the disclosed fields, and identifier fields are salted commitments that open one at a time. approval is null for an exchange inside policy, a signature proof, or a code attestation. The verifier takes its own trusted keys, so the sender and the receiver each verify with their own registry. A receipt with an extra or renamed member fails. Reasons are in failure reasons.

Limits, stated exactly#