2.11 Device Registry and Voucher Issuance
Phase 2: Financial Operations, API, Security and Offline · Previous: 2.10 Offline Architecture and Protocol Design (Design Only) · Next: 2.12 Receipt Ingestion and Settlement
1. Overall Objective Register devices and issue signed offline allowances backed by real escrow.
2. The Problem We Are Solving Offline spending must be backed by money that is already reserved, or the ledger takes on unbounded risk.
3. Concepts and Research
- Ed25519. Superseded by ADR-0019: devices and the issuer use ECDSA P-256, which card chips and phone keystores support; the ledger’s own receipts stay Ed25519.
- Canonical encoding (fixed binary layout, no ambiguity).
- Key storage for the issuer key (start with an encrypted file / KMS; evaluate an HSM in step 3.12).
- Per-device escrow accounts.
4. Implementation Tasks
devicestable (id, owner account, tier, public key, attestation result, statusactive|frozen|revoked).voucherstable.issue_voucher.v1template: a hold from the wallet into the device escrow, then a signed voucher.- Tier limits enforced (configured per tier).
revoke_device.mezgeb-offlinecanonical encoders.
5. Testing Requirements
- Issuing beyond the tier limit is rejected.
- Issuing for a frozen device is rejected.
- Voucher signatures verify, and tampering with a single bit fails.
- Concurrent issuance can’t exceed the wallet balance.
- Known-answer test vectors for the encoding, committed so device firmware can test against them.
6. Deliverables Device registry, voucher issuance and test vectors.
7. Acceptance Criteria Escrow balance = SUM(unspent voucher value) at all times (an invariant).
8. Dependencies Step 2.10.
9. Estimated Difficulty High.
10. Exit Gate Test vectors are shared with the card/mobile firmware work.