Request: External Security Review of the Offline Protocol v1
Documentation · Protocol: protocol.md · Threats: threat-addendum.md · Scenarios: scenarios.md
| Requested | 2026-11-16, at the end of step 2.10 |
| Reviewer | A security engineer with a cryptography background, independent of the project (roadmap, specialist review) |
| Needed before | Step 2.11 builds device registration, and before any card is personalised |
| Status | Requested: no reviewer engaged yet |
What to review
Section titled “What to review”protocol.md (Mezgeb offline protocol v1): an escrow-backed offline payment scheme. A payer’s device, a smart card or a phone, signs receipts against a voucher the ledger issued online. The ledger later settles those receipts from escrow, exactly once, whoever uploads them.
Background: ADR-0010 (the escrow model) and ADR-0019 (the v1 decisions).
Questions for the reviewer
Section titled “Questions for the reviewer”- Encoding and signatures (§2–3). Is the tagged canonical encoding unambiguous? Is ECDSA P-256 with low-S and a digest that excludes the signature enough to rule out malleability? Should RFC 6979 be required, not only recommended?
- Keys (§4). Is the root → issuer → device hierarchy sound? Are 90-day issuer rotation and the revocation lists adequate, given that terminals are often offline?
- Attestation (§5). Is the tier assignment from Android Key Attestation and card chip certificates correct and complete? What can a rooted phone still fake?
- Phones without hardware counters (§6, §10, OT-02). Is detection after the fact, bounded by tier limits, an acceptable control? Is there a better option on Android (for example, Protected Confirmation, or StrongBox rollback resistance)?
- Replay and freshness (§8, OT-03). Does
payee_challenge, with the payee bound inside the signed body, close every replay path? - Gaps and conflicts (§9–11). Can a 72-hour skipped gap be abused to
settle a receipt that would have been a conflict? Is matching a late
missing receipt against its successor’s
prev_digestenough? - The card requirements (§15, H1–H8). Are they complete for a contactless card that signs payments offline?
- The threat addendum. What is missing, or rated too optimistically?
What we ask back
Section titled “What we ask back”- Findings, rated by severity, with the protocol section they concern.
- For each high-severity finding, a recommended change.
- An overall opinion: build as specified, build after named changes, or redesign named parts.
Findings are recorded under docs/offline/ and answered before step 2.11
proceeds past device registration. A protocol change is a new ADR and a new
protocol version.