{"slug":"offline-verifier","title":"An offline verifier that refuses to ask this site whether this site is honest","body":"Every check on this site that ends in \"and you can verify it\" has, until now, ended in \"by asking this site\". That is not a check. Below is a 200-line script that answers PASS or FAIL over a downloaded bundle and refuses to contact miscsubjects.com at all — it raises an exception if a URL it is handed contains that hostname.\n\n## What it recomputes, and what each check would catch\n\n| check | recomputes | catches |\n|---|---|---|\n| ANCHOR_ID | `SHA256(canonical preimage)` and compares to the published anchor id | a commitment edited after publication |\n| CANONICAL_BINDING | that every field the packet displays is inside the string the hash was taken over | a preimage committing to a different drand round, block or chain head than the packet shows |\n| DRAND_SELF | `randomness == SHA256(signature)` — drand's own construction, checkable with no network and no BLS library | an invented beacon |\n| DRAND_LIVE | the beacon at `api.drand.sh` for that round, byte for byte | a real-looking round that was never published |\n| BTC_HEADER | the 80-byte header double-SHA256s to the claimed hash, and that hash meets its own difficulty target | a fabricated block hash — proof-of-work cannot be forged backwards |\n| BTC_SECOND_SOURCE | a second independent explorer's hash at that height | one compromised explorer |\n| OBJECT_HASHES | every bundled object — image bytes, record, rule set, system prompt — against the hash the findings cite | a rule set or artifact swapped after the findings were made |\n| FINDING_BINDING | that each finding cites this bundle's rule-set hash and artifact hash, and signs with the model its row targets | a finding re-pointed at a different rule set, or a signature naming a model that did not run |\n\n## Run it\n\n```bash\ncurl -sO https://miscsubjects.com/img/up/attested-finding-bundle-2026-07-30.json\ncurl -sO https://raw.githubusercontent.com/massoumicyrus/miscsubjects-pages/main/scripts/verify_bundle.py\npython3 verify_bundle.py attested-finding-bundle-2026-07-30.json\n\n# hash-only, zero network:\npython3 verify_bundle.py attested-finding-bundle-2026-07-30.json --no-network\n```\n\nThe test vector is the 1,016,031-byte bundle for the [attested radiograph finding](https://miscsubjects.com/a/attested-finding-image-record-action): the image bytes, the record, the rule-set preimage, the full system prompt, six findings with their receipts, and the anchor packet. Output on that bundle, today:\n\n```\nbundle: attested finding — synthetic chest radiograph + synthetic medication record, 5 adjudicators\nnetwork: drand + 2 bitcoin explorers (never miscsubjects.com)\n\nANCHOR_ID          PASS computed 3be5071eb3035ca29093c671\nCANONICAL_BINDING  PASS all 5 asserted fields are inside the hashed preimage\nDRAND_SELF         PASS randomness == SHA256(signature)\nDRAND_LIVE         PASS round 6331315 matches the League of Entropy beacon byte for byte\nBTC_HEADER         PASS 80-byte header double-SHA256s to the claimed hash and meets its own target\nBTC_SECOND_SOURCE  PASS an independent explorer returns the same hash at height 960173\nOBJECT_HASHES      PASS 4 objects hash to the values the findings cite\nFINDING_BINDING    PASS 6 findings cite this bundle's rule set and artifact and sign with the model that ran\n\nPASS — 8 checks, 0 failed, 0 skipped\n```\n\n## The first run failed, and it failed on the bundle rather than on the site\n\nOn its first execution FINDING_BINDING came back FAIL:\n\n```\nFINDING_BINDING    FAIL inv_k18tz2n8c1 cites ruleset c8823bafd3b3946c, bundle ruleset is 6f4102eb210d6651;\n                        inv_cysc2z38zp cites ruleset c8823bafd3b3946c, bundle ruleset is 6f4102eb210d6651; …\n```\n\nThe findings cite the rule-set hash the publisher took over its own canonical form of the rule-set object. The bundle had been built with a **different** serialisation of the same clauses, which hashes to something else. Two serialisations of one rule set is exactly the defect that makes a pinned hash worthless, and the verifier caught it immediately. The fix was to bundle the exact preimage the cited hash was taken over, not a re-serialisation of it. The verifier was not changed. This is recorded here rather than quietly corrected because a verifier that has never failed on real input has not been tested.\n\n## What the anchor proves, in the direction it actually points\n\nThe verifier prints this rather than leaving it to a reader's optimism:\n\n> the packet commits to drand round 6331315 and bitcoin height 960173. Neither value could be known before it existed, so this commitment cannot have been created earlier than those events and the bundle cannot have been edited after them without changing `anchor_id`. It is a **lower** bound on the record's age, established by data the operator does not control. It is **not** an upper bound: nothing here proves the record was not created later than it claims, only that it existed by the time it was anchored.\n\nA lower bound is the half that matters in a dispute. It removes the ability of the party holding the logs to reconstruct them favourably after the loss, which is the failure mode of every software-failure claim currently adjudicated anywhere.\n\n## What it does not do, and what would make it stronger\n\n- It does not verify the drand BLS signature against the League of Entropy group public key. It verifies drand's own randomness-from-signature construction, and it compares the packet to the live beacon. Full BLS verification needs a pairing library and is the obvious next addition.\n- It has no OpenTimestamps proof. An OTS attestation on each checkpoint head would give a Bitcoin inclusion proof independent of any explorer's API, and the chain_inclusion field on the anchor packet still reads `NOT_YET_PROVEN_INCLUDED` because that work is not done.\n- It has no qualified electronic timestamp. A qualified timestamp under eIDAS Article 41 carries a legal presumption of the accuracy of the time and the integrity of the data, which cryptography alone cannot manufacture. Not implemented.\n- It verifies that findings are bound to the bundle. It cannot verify that the models said what the bundle says they said — that requires the provider's own signature over the response, which no provider offers.\n\n## The whole script\n\nRead it before you run it. Standard library only, no dependencies, 200 lines.\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nverify_bundle.py — offline verifier for an attested-finding bundle.\n\nRun it against a bundle you downloaded and it answers PASS or FAIL without contacting\nmiscsubjects.com at all. It refuses to, on purpose: any check that had to ask the operator\nwhether the operator is honest is not a check.\n\n    python3 verify_bundle.py bundle.json              # full run (touches drand + bitcoin)\n    python3 verify_bundle.py bundle.json --no-network # hash-only run, zero network\n\nWhat it recomputes, and what each check would catch:\n\n  1 ANCHOR_ID          anchor_id == SHA256(canonical preimage).\n                       Catches: a packet whose commitment was edited after publication.\n  2 CANONICAL_BINDING  every field asserted in the packet appears in the preimage the hash\n                       was taken over. Catches: a preimage that commits to a different\n                       drand round, bitcoin block or chain head than the packet displays.\n  3 DRAND_SELF         randomness == SHA256(signature). This is drand's own construction, so\n                       it is checkable from the packet alone with no network and no BLS\n                       library. Catches: an invented beacon.\n  4 DRAND_LIVE         the beacon at api.drand.sh for that round matches byte for byte.\n                       Catches: a real-looking round that was never published.\n  5 BTC_HEADER         the 80-byte block header for the claimed height, fetched from an\n                       independent explorer, double-SHA256s to the claimed block hash, and\n                       that hash meets its own difficulty target. Catches: a fabricated\n                       block hash. Proof-of-work cannot be forged backwards.\n  6 BTC_SECOND_SOURCE  a second independent explorer returns the same hash for that height.\n                       Catches: one compromised explorer.\n  7 OBJECT_HASHES      every object in the bundle (ruleset, artifact, record, image) hashes\n                       to the value the findings cite. Catches: a rule set or artifact\n                       swapped after the findings were made.\n  8 FINDING_BINDING    every finding cites the bundle's ruleset hash and artifact hash, and\n                       signs with the model its own row targets. Catches: a finding\n                       re-pointed at a different rule set, or a signature naming a model\n                       that did not run.\n  9 ANTERIORITY        states the direction of the binding in plain words: what this proves\n                       about time, and what it does not.\n\nExit code 0 = every applicable check passed. 1 = at least one FAIL.\nNo dependencies outside the standard library.\n\"\"\"\n\nimport hashlib\nimport json\nimport sys\nimport urllib.request\n\nFORBIDDEN_HOST = \"miscsubjects.com\"\nUS = \"␟\"  # the field separator used in the canonical preimage\n\n\ndef sha256_hex(b: bytes) -> str:\n    return hashlib.sha256(b).hexdigest()\n\n\ndef get(url: str, timeout: int = 20):\n    if FORBIDDEN_HOST in url:\n        raise RuntimeError(\"refusing to contact \" + FORBIDDEN_HOST + \": this verifier does not ask the operator\")\n    req = urllib.request.Request(url, headers={\"user-agent\": \"verify_bundle.py/1.0\"})\n    with urllib.request.urlopen(req, timeout=timeout) as r:\n        return r.read()\n\n\ndef get_json(url: str, timeout: int = 20):\n    return json.loads(get(url, timeout).decode())\n\n\nclass Report:\n    def __init__(self):\n        self.rows = []\n\n    def add(self, name, ok, detail):\n        self.rows.append((name, ok, detail))\n        flag = \"PASS\" if ok is True else (\"SKIP\" if ok is None else \"FAIL\")\n        print(\"%-18s %-4s %s\" % (name, flag, detail))\n\n    def failed(self):\n        return any(ok is False for _, ok, _ in self.rows)\n\n\n# ── 1-2. the anchor packet ───────────────────────────────────────────────────────────────────\ndef check_anchor(rep, anchor):\n    canonical = anchor.get(\"canonical\") or \"\"\n    claimed = (anchor.get(\"anchor_id\") or \"\").lower()\n    computed = sha256_hex(canonical.encode())\n    rep.add(\"ANCHOR_ID\", computed == claimed and bool(claimed),\n            \"computed %s%s\" % (computed[:24], \"\" if computed == claimed else \" != claimed \" + claimed[:24]))\n\n    fields = dict(p.split(\"=\", 1) for p in canonical.split(US)[1:] if \"=\" in p)\n    s = anchor.get(\"surfaces\") or {}\n    d, b = s.get(\"drand\") or {}, s.get(\"bitcoin\") or s.get(\"btc\") or {}\n    want = {\n        \"packet\": (anchor.get(\"packet_hash\") or \"\").lower(),\n        \"drand.round\": str(d.get(\"round\") or \"\"),\n        \"drand.randomness\": (d.get(\"randomness\") or \"\").lower(),\n        \"btc.height\": str(b.get(\"height\") or \"\"),\n        \"btc.hash\": (b.get(\"hash\") or b.get(\"block_hash\") or \"\").lower(),\n    }\n    bad = [k for k, v in want.items() if v and fields.get(k, \"\").lower() != v.lower()]\n    rep.add(\"CANONICAL_BINDING\", not bad,\n            \"all %d asserted fields are inside the hashed preimage\" % len(want) if not bad\n            else \"preimage disagrees with the packet on: \" + \", \".join(bad))\n    return fields, d, b\n\n\n# ── 3-4. drand ──────────────────────────────────────────────────────────────────────────────\ndef check_drand(rep, d, network):\n    sig = (d.get(\"signature\") or \"\").lower()\n    rnd = (d.get(\"randomness\") or \"\").lower()\n    if sig and rnd:\n        derived = sha256_hex(bytes.fromhex(sig))\n        rep.add(\"DRAND_SELF\", derived == rnd,\n                \"randomness == SHA256(signature)\" if derived == rnd\n                else \"SHA256(signature)=%s != randomness=%s\" % (derived[:20], rnd[:20]))\n    else:\n        rep.add(\"DRAND_SELF\", None, \"packet carries no signature; cannot self-check\")\n    if not network:\n        rep.add(\"DRAND_LIVE\", None, \"--no-network\")\n        return\n    try:\n        live = get_json(\"https://api.drand.sh/public/%s\" % d.get(\"round\"))\n        ok = (live.get(\"randomness\", \"\").lower() == rnd) and (live.get(\"signature\", \"\").lower() == sig)\n        rep.add(\"DRAND_LIVE\", ok, \"round %s matches the League of Entropy beacon byte for byte\" % d.get(\"round\")\n                if ok else \"live beacon for round %s differs from the packet\" % d.get(\"round\"))\n    except Exception as e:\n        rep.add(\"DRAND_LIVE\", None, \"beacon unreachable: %s\" % e)\n\n\n# ── 5-6. bitcoin ────────────────────────────────────────────────────────────────────────────\ndef _pow_ok(header_hex: str, block_hash: str):\n    raw = bytes.fromhex(header_hex)\n    h = hashlib.sha256(hashlib.sha256(raw).digest()).digest()[::-1].hex()\n    bits = int.from_bytes(raw[72:76][::-1], \"big\")\n    exp, mant = bits >> 24, bits & 0xFFFFFF\n    target = mant * (1 << (8 * (exp - 3)))\n    return h == block_hash.lower(), h, int(h, 16) <= target\n\n\ndef check_bitcoin(rep, b, network):\n    height, bhash = b.get(\"height\"), (b.get(\"hash\") or b.get(\"block_hash\") or \"\").lower()\n    if not network:\n        rep.add(\"BTC_HEADER\", None, \"--no-network\")\n        rep.add(\"BTC_SECOND_SOURCE\", None, \"--no-network\")\n        return\n    try:\n        header = get(\"https://blockstream.info/api/block/%s/header\" % bhash).decode().strip()\n        matches, recomputed, pow_ok = _pow_ok(header, bhash)\n        rep.add(\"BTC_HEADER\", matches and pow_ok,\n                \"80-byte header double-SHA256s to the claimed hash and meets its own target\"\n                if matches and pow_ok else \"header recomputes to %s, pow_ok=%s\" % (recomputed[:20], pow_ok))\n    except Exception as e:\n        rep.add(\"BTC_HEADER\", None, \"header unreachable: %s\" % e)\n    try:\n        second = get(\"https://mempool.space/api/block-height/%s\" % height).decode().strip().lower()\n        rep.add(\"BTC_SECOND_SOURCE\", second == bhash,\n                \"an independent explorer returns the same hash at height %s\" % height\n                if second == bhash else \"second source returns %s\" % second[:20])\n    except Exception as e:\n        rep.add(\"BTC_SECOND_SOURCE\", None, \"second source unreachable: %s\" % e)\n\n\n# ── 7. every object hashes to what the findings cite ─────────────────────────────────────────\ndef check_objects(rep, bundle):\n    objs = bundle.get(\"objects\") or {}\n    bad, checked = [], 0\n    for name, o in objs.items():\n        claimed = (o.get(\"sha256\") or \"\").lower()\n        if o.get(\"canonical\") is not None:\n            got = sha256_hex(o[\"canonical\"].encode())\n        elif o.get(\"base64\") is not None:\n            import base64\n            got = sha256_hex(base64.b64decode(o[\"base64\"]))\n        else:\n            continue\n        checked += 1\n        if got != claimed:\n            bad.append(\"%s: computed %s != cited %s\" % (name, got[:16], claimed[:16]))\n    rep.add(\"OBJECT_HASHES\", not bad if checked else None,\n            \"%d objects hash to the values the findings cite\" % checked if not bad\n            else \"; \".join(bad))\n\n\n# ── 8. findings are bound to those objects and sign honestly ─────────────────────────────────\ndef check_findings(rep, bundle):\n    objs = bundle.get(\"objects\") or {}\n    rs = ((objs.get(\"ruleset\") or {}).get(\"sha256\") or \"\").lower()\n    art = [(objs.get(k) or {}).get(\"sha256\", \"\").lower() for k in (\"artifact\", \"image\", \"record\") if objs.get(k)]\n    problems, n = [], 0\n    for f in bundle.get(\"findings\") or []:\n        n += 1\n        who = f.get(\"id\") or f.get(\"row\") or \"finding\"\n        if rs and (f.get(\"ruleset_hash\") or \"\").lower() != rs:\n            problems.append(\"%s cites ruleset %s, bundle ruleset is %s\" % (who, str(f.get(\"ruleset_hash\"))[:16], rs[:16]))\n        cited = [str(x).lower() for x in (f.get(\"artifact_hashes\") or ([f.get(\"artifact_hash\")] if f.get(\"artifact_hash\") else []))]\n        if art and cited and not set(cited) & set(art):\n            problems.append(\"%s cites an artifact hash that is not in the bundle\" % who)\n        model, signed = str(f.get(\"model\") or \"\"), str(f.get(\"signed\") or \"\")\n        if model and signed and model.lower() not in signed.lower():\n            problems.append(\"%s ran %s but signed '%s'\" % (who, model, signed[:60]))\n    rep.add(\"FINDING_BINDING\", not problems if n else None,\n            \"%d findings cite this bundle's rule set and artifact and sign with the model that ran\" % n\n            if not problems else \"; \".join(problems))\n\n\ndef main():\n    if len(sys.argv) < 2:\n        print(__doc__)\n        return 2\n    network = \"--no-network\" not in sys.argv\n    bundle = json.load(open(sys.argv[1]))\n    rep = Report()\n    print(\"bundle: %s\" % (bundle.get(\"label\") or sys.argv[1]))\n    print(\"network: %s (never miscsubjects.com)\\n\" % (\"drand + 2 bitcoin explorers\" if network else \"off\"))\n\n    anchor = bundle.get(\"anchor\") or {}\n    if anchor:\n        _, d, b = check_anchor(rep, anchor)\n        check_drand(rep, d, network)\n        check_bitcoin(rep, b, network)\n    else:\n        rep.add(\"ANCHOR_ID\", None, \"bundle carries no anchor packet\")\n    check_objects(rep, bundle)\n    check_findings(rep, bundle)\n\n    at = anchor.get(\"anchored_at\")\n    print(\"\\nANTERIORITY      %s\" % (\n        (\"the packet commits to drand round %s and bitcoin height %s. Neither value could be known before it existed, \"\n         \"so this commitment cannot have been created earlier than those events and the bundle cannot have been edited \"\n         \"after them without changing anchor_id. It is a LOWER bound on the record's age, established by data the \"\n         \"operator does not control. It is NOT an upper bound: nothing here proves the record was not created later \"\n         \"than %s, only that it existed by the time it was anchored.\" % (\n             (anchor.get(\"surfaces\") or {}).get(\"drand\", {}).get(\"round\"),\n             (anchor.get(\"surfaces\") or {}).get(\"bitcoin\", (anchor.get(\"surfaces\") or {}).get(\"btc\", {})).get(\"height\"),\n             at))\n        if anchor else \"no anchor in this bundle: nothing here establishes when the record existed\"))\n\n    verdict = \"FAIL\" if rep.failed() else \"PASS\"\n    print(\"\\n%s — %d checks, %d failed, %d skipped\" % (\n        verdict, len(rep.rows), sum(1 for _, o, _ in rep.rows if o is False),\n        sum(1 for _, o, _ in rep.rows if o is None)))\n    return 1 if rep.failed() else 0\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n```","register":"standard","tags":["verification","anchor","drand","bitcoin","offline-verifier"],"category":"adjudication","style":{},"claims":[{"id":"c1","text":"An offline verifier recomputes the anchor id, the canonical binding, drand's randomness-from-signature construction, the Bitcoin header's proof-of-work, every bundled object hash and every finding's binding, and refuses by construction to contact miscsubjects.com.","section":"verifier","tier":"demonstrated","source_ids":["s1","s5"]},{"id":"c2","text":"On the published test-vector bundle the verifier returns PASS on 8 of 8 checks, including a byte-for-byte match against the live drand beacon for round 6331315 and a proof-of-work check on Bitcoin block 960173 from two independent explorers.","section":"verifier","tier":"demonstrated","source_ids":["s1","s3","s4"]},{"id":"c3","text":"On its first run the verifier failed FINDING_BINDING because the bundle carried a second serialisation of the rule set that hashed differently from the preimage the findings cite; the bundle was corrected and the verifier was not changed.","section":"verifier","tier":"demonstrated","source_ids":["s1"]},{"id":"c4","text":"The anchor establishes a lower bound on the record's age against surfaces the operator does not control and establishes no upper bound, and the verifier prints that distinction rather than leaving it to the reader.","section":"anchor","tier":"demonstrated","source_ids":["s2","s3"]},{"id":"c5","text":"The verifier does not perform full BLS signature verification against the drand group key, carries no OpenTimestamps inclusion proof, and carries no qualified electronic timestamp under eIDAS Article 41 — three named gaps, none of them closed.","section":"limits","tier":"argued","source_ids":["s5"]}],"sources":[{"id":"s1","type":"live_surface","url":"https://miscsubjects.com/img/up/attested-finding-bundle-2026-07-30.json","title":"The test-vector bundle, 1,016,031 bytes","summary":"Image bytes, record, rule-set preimage, full system prompt, six findings with receipts, anchor packet. Download it and verify it offline."},{"id":"s2","type":"live_surface","url":"https://miscsubjects.com/api/anchor/3be5071eb3035ca29093c6713646bbe21bdca6cce262fc7f7eb64080c04e61fe","title":"The anchor packet the verifier recomputes","summary":"anchor_id = SHA256(canonical). The canonical preimage is published with it."},{"id":"s3","type":"live_surface","url":"https://api.drand.sh/public/6331315","title":"drand round 6331315","summary":"League of Entropy beacon. BLS-signed, unpredictable before its cadence time, and nothing here can produce it early."},{"id":"s4","type":"live_surface","url":"https://mempool.space/api/block-height/960173","title":"Bitcoin block 960173, second source","summary":"The verifier fetches the 80-byte header from one explorer, recomputes the hash, checks proof-of-work, then compares the hash against a second explorer."},{"id":"s5","type":"github","url":"https://github.com/massoumicyrus/miscsubjects-pages/blob/main/scripts/verify_bundle.py","title":"scripts/verify_bundle.py","summary":"The verifier in the repository, so the copy in this article can be diffed against the committed one."}],"prov":{"model":"Fable 5 (Claude Code)","action":"write"}}