Skip to content

vcl-ut #25 P5d: Tier-2 C-ABI Ed25519 attestation fallback (RESOLVED) — closes the workstream#34

Merged
hyperpolymath merged 1 commit into
mainfrom
reinforce/vclut-25-phase5d-attest
May 19, 2026
Merged

vcl-ut #25 P5d: Tier-2 C-ABI Ed25519 attestation fallback (RESOLVED) — closes the workstream#34
hyperpolymath merged 1 commit into
mainfrom
reinforce/vclut-25-phase5d-attest

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

P5d — Tier-2 C-ABI Ed25519 attestation fallback (RESOLVED) — closes vcl-ut#25

The Tier-2 fallback of the canonical two-tier boundary model
(VERIFICATION-STANCE.adoc). For consumers that cannot run the Tier-1
recompute wasm32 module: a C ABI cannot carry a re-checkable proof,
so the honest ceiling is trusted-certifier attestation — now
reached. This was the last NAMED-OWED item under #25.

New crate src/interface/attest (vcltotal-attest)

Standalone workspace; crypto contained here, never touches the
zero-dep #![forbid(unsafe_code)] core.

  • mint: decode → run the conformance-pinned
    vcltotal_parse::certified_level → sign iff 0..=10. Token =
    Ed25519 over DOMAIN ‖ sha256(stmt_wire) ‖ sha256(schema_wire) ‖ level. Fail-closed: decode failure / Reject ⇒ no token.
  • verify: recompute the bound message, Ed25519-verify vs the
    certifier pubkey. Unforgeable + bound — tampered
    query/schema/level/sig or wrong key all reject. Does not re-run
    the decider (Tier-2 trusts the certifier; weaker than Tier-1,
    labelled so).
  • vclut_rs_verify C-ABI — the previously declared-but-unlinked
    backend. One audited, documented host/guest unsafe block; all
    logic in the forbid-unsafe parse crate + audited ed25519-dalek.
  • Crypto: ed25519-dalek (de-facto standard, audited — your
    decision) + sha2, minimal features, Cargo.lock pinned.
  • 9 tests: roundtrip; 5 tamper variants
    (query/schema/level/sig/key); fail-closed garbage; C-ABI
    roundtrip+fail-closed; C-ABI small-out/null. clippy -D warnings +
    fmt clean.

Zig linkage

build.zig cargo-builds libvcltotal_attest.a and links it (+gcc_s
for std's _Unwind_* under panic=abort) into every artefact incl.
the test runner. lib.zig: extern vclut_rs_verify + new
vclut_verify_wire export (fail-closed wrapper). New end-to-end Zig
test: garbage wire ⇒ -1 across the Zig↔Rust boundary, out
untouched. zig build test 4/4 (real backend linked, not a stub).

Authoritative flip

VERIFICATION-STANCE.adoc: Tier-2/P5d OWED→RESOLVED across the
canonical two-tier model, headline, NAMED-OWED, consumer guidance,
roadmap, provenance, closing — both tiers now RESOLVED. ADR-0002
status → both tiers RESOLVED. New
src/interface/attest/ATTESTATION-FORMAT.adoc (normative wire spec) +
README; CHANGELOG/PROOF-NEEDS currency. The only remaining items are
the precisely-scoped disclosed limits (NaN payload; find/elemBy
cross-module Refl non-reduction; L9/L10 predicate depth;
additive↔ceil sliver; Idris→wire encode — needed by neither tier) —
not gaps.

Verified locally

Corpus idris2 --build exit 0 (12 modules, escape-scan OK,
unchanged); parse 6/6, recompute-wasm 3/3, attest 9/9 (all
clippy -D warnings + fmt clean); zig build test 4/4 end-to-end.

Closes the workstream

Both the Tier-1 recompute-PCC path and the Tier-2 attestation fallback
are RESOLVED; every limitation disclosed, not faked. vcl-ut#25 is
complete.

Refs #25.

🤖 Generated with Claude Code

…— closes the workstream

The Tier-2 fallback of the two-tier boundary model
(VERIFICATION-STANCE.adoc). For consumers that cannot run the Tier-1
recompute wasm: a C ABI cannot carry a re-checkable proof, so the
honest ceiling is trusted-certifier attestation — and it is now
reached. This was the last NAMED-OWED item under #25.

New crate src/interface/attest (vcltotal-attest; standalone workspace;
deps contained, never touch the zero-dep #![forbid(unsafe_code)] core):
- mint(stmt_wire, schema_wire, sk): decode (vcltotal-parse), run the
  conformance-pinned certified_level, and sign IFF 0..=10. Token =
  Ed25519 over DOMAIN("VCLT-ATTEST-v1") ‖ sha256(stmt_wire) ‖
  sha256(schema_wire) ‖ level. Fail-closed: decode failure / Reject
  ⇒ no token, never a signed unestablished level.
- verify(...): recompute the bound message + Ed25519-verify vs the
  certifier pubkey. Unforgeable + bound: tampered query/schema/level/
  sig or wrong key all reject. Does not re-run the decider (Tier-2
  trusts the certifier — by construction of a C ABI; weaker than
  Tier-1, labelled as such).
- vclut_rs_verify C-ABI: the previously declared-but-unlinked backend.
  One audited, documented host/guest unsafe block; all logic in the
  forbid-unsafe parse crate + audited ed25519-dalek.
- Crypto: ed25519-dalek (de-facto standard, audited — maintainer
  decision 2026-05-19) + sha2, default-features minimal, contained to
  this Tier-2 crate. Cargo.lock pins them (trust surface).
- 9 tests: roundtrip; 5 tamper variants (query/schema/level/sig/key);
  fail-closed garbage; C-ABI roundtrip+fail-closed; C-ABI small-out/
  null. clippy -D warnings + fmt clean.

ffi/zig wiring (P5d-2): build.zig cargo-builds libvcltotal_attest.a
and links it (with gcc_s for std's _Unwind_* under panic=abort) into
every artefact incl. the test runner. lib.zig: extern vclut_rs_verify
+ new export vclut_verify_wire (fail-closed wrapper, last-error set).
New end-to-end Zig test: garbage wire ⇒ -1 across the Zig↔Rust
boundary, out untouched. `zig build test` 4/4 (real backend linked,
not a stub).

Docs / authoritative flip (P5d-3/4):
- src/interface/attest/ATTESTATION-FORMAT.adoc (normative wire spec) +
  README.adoc; .gitignore /target.
- VERIFICATION-STANCE.adoc: Tier-2/P5d OWED→RESOLVED across the
  canonical two-tier model, headline, NAMED-OWED, consumer guidance,
  roadmap, provenance, closing. Both tiers now RESOLVED; the only
  remaining items are the precisely-scoped DISCLOSED limits (NaN
  payload; find/elemBy cross-module Refl non-reduction; L9/L10
  predicate depth; additive↔ceil sliver; Idris→wire encode — needed
  by neither tier) — not gaps.
- ADR-0002 status → both tiers RESOLVED; CHANGELOG/PROOF-NEEDS
  currency.

Verified: corpus idris2 --build exit 0 (12 modules, escape-scan OK,
unchanged); parse 6/6, recompute-wasm 3/3, attest 9/9 (all clippy -D
warnings + fmt clean); `zig build test` 4/4 end-to-end.

This closes the vcl-ut#25 boundary-reinforcement workstream: both the
Tier-1 recompute-PCC path and the Tier-2 attestation fallback are
RESOLVED, every limitation disclosed not faked.

Refs #25.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 25 issues detected

Severity Count
🔴 Critical 6
🟠 High 9
🟡 Medium 10

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Issue in quality.yml",
    "type": "missing_workflow",
    "file": "quality.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in security-policy.yml",
    "type": "missing_workflow",
    "file": "security-policy.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Action actions/upload-artifact@v4 needs attention",
    "type": "unpinned_action",
    "file": "release.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action actions/download-artifact@v4 needs attention",
    "type": "unpinned_action",
    "file": "release.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "codeql.yml lists `language: javascript-typescript` but the repo has no source files in any CodeQL-scannable language. The analyze job will exit 'no source files' on every run. Switch the matrix to `actions` (which scans workflow files — every repo has those).",
    "type": "codeql_language_matrix_mismatch",
    "file": "codeql.yml",
    "action": "switch_codeql_matrix_to_actions",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "assert_smaller bypasses termination checker (1 occurrences, CWE-704)",
    "type": "assert_smaller",
    "file": "/home/runner/work/vcl-ut/vcl-ut/src/core/Checker.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "believe_me undermines formal verification (2 occurrences, CWE-704)",
    "type": "believe_me",
    "file": "/home/runner/work/vcl-ut/vcl-ut/src/core/Decide.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "believe_me undermines formal verification (3 occurrences, CWE-704)",
    "type": "believe_me",
    "file": "/home/runner/work/vcl-ut/vcl-ut/src/core/Composition.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "assert_total bypasses totality checker (1 occurrences, CWE-704)",
    "type": "assert_total",
    "file": "/home/runner/work/vcl-ut/vcl-ut/src/core/Composition.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath merged commit e4e3f99 into main May 19, 2026
18 of 137 checks passed
@hyperpolymath hyperpolymath deleted the reinforce/vclut-25-phase5d-attest branch May 19, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant