Skip to content

docs(specs): thin ceremony circuits and verified extraction - #8

Merged
Wondertan merged 5 commits into
docs/libid-ceremony-specsfrom
docs/ceremony-thin-circuits
Aug 17, 2026
Merged

Wondertan merged 5 commits into
docs/libid-ceremony-specsfrom
docs/ceremony-thin-circuits

Conversation

@xgreenx

@xgreenx xgreenx commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Draft follow-up to #3, addressing Green's review.

The governing rule is that a proof authenticates bytes, not semantic fields. Thin circuits check only the closed local patterns the selected profile needs; contracts and the canonical runtime interpret the same authenticated revealed ranges.

What changes

  • Hidden transcript ranges use blinded commitments; revealed ranges and commitments must tile the authenticated transcript.
  • JSON uses closed local matchers for strings, canonical unsigned integers, and exact boolean literals. Form requests use boundary-aware local field matches rather than an impractical complete grammar proof.
  • X/GitHub form-field uniqueness is an explicit, recurring-tested platform-parser assumption. A failed probe makes that profile ineligible.
  • Client admission is permissionless. The authenticated client identifier remains available to local policy and consuming contracts, but Registry keeps no OAuth-client allowlist.
  • metadataObservedAt orders mutable metadata. Proof validity is independent: Google uses signed exp; X and GitHub use the token-exchange attestation timestamp plus the Registry-owned 3,600-second lifetime.
  • Google proves RS256 under an exposed modulus; only the consuming contract checks current Registry membership. The circuit does not consume Registry trust state.
  • X and GitHub derive the runtime VerifiedClaim and the on-chain identity from the same authenticated revealed response bytes. No detached identity output or sidecar metadata can override them.
  • Endpoint authority, method, and path are authenticated proof inputs checked by the consuming contract, allowing one verifying key across deployments.

Validation

The protocol-spec linter passes with zero errors and zero warnings.

@xgreenx
xgreenx force-pushed the docs/ceremony-thin-circuits branch from 3f360bf to f5cf381 Compare August 17, 2026 14:42
…ty rule

Addresses PR #3 review 4952164865. The unifying principle: circuits
check the exact fields the profile needs — JSON pattern matches at
prover-supplied offsets, never whole-template equality — and open
blinded hash commitments for everything hidden; on-chain contracts
verify revealed attestation bytes and public inputs. This is the
architecture the shipped dyaka circuits (jwt_email, dyaka-noir-token)
and verifiers already implement.

- common §9 rewritten: field checks are '"field":"value"' pattern
  asserts at private-input offsets, with charset exclusion of the
  closing delimiter and bounds inside the authenticated payload
  (REQ-COMMON-19/19B); hidden ranges are blinded commitments the
  circuit opens (REQ-COMMON-18); layout tiling with revealed anchors
  (REQ-COMMON-18A); unique-match guard for extraction from revealed
  attestation bytes (REQ-COMMON-19A); no deployment value is a
  compiled circuit constant (REQ-COMMON-21A); ASM-PROV-06 covers
  duplicate-free platform responses.
- Client admission is permissionless: no on-chain client set, any
  OAuth application can produce evidence; the client id stays a public
  input a contract MAY read (REQ-COMMON-17C). The authorization is
  that the claim's target sends the transaction.
- One validity rule: proofValidUntil = metadataObservedAt +
  MAX_PROOF_AGE, with MAX_PROOF_AGE contract-configurable (default 1h
  for X/GitHub; Google's observedAt is the signed exp, default 0).
  The Claim Digest carries no expiration. metadataObservedAt doubles
  as the monotone replay watermark (REQ-COMMON-25A).
- Google: §3.1 authorization table demoted to operational guidance;
  RS256 stays in circuit with the modulus exposed for the on-chain
  JWKS root check (REQ-PLAT-16A); claims asserted at supplied offsets,
  no iat (REQ-PLAT-21).
- X: explicit §5.2 disclosure table; client id range revealed and
  public (REQ-PLAT-29A/29B); bearer revealed only as its SHA-256
  commitment in both sessions (REQ-PLAT-30A/32A).
- GitHub: token endpoint checked over the revealed request prefix
  (REQ-PLAT-45); token_type/scope asserted in circuit against
  committed ranges without disclosure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xgreenx
xgreenx force-pushed the docs/ceremony-thin-circuits branch from f5cf381 to bc2e68a Compare August 17, 2026 14:51
@xgreenx
xgreenx changed the base branch from docs/libid-ceremony-specs to docs/ceremony-parameters-endpoint-checks August 17, 2026 14:51
@Wondertan

Copy link
Copy Markdown
Member

Timestamp model after review: the two X/GitHub timestamps have separate owners. The token-exchange attestation is the one-time PKCE/Claim-Digest binding, so proofValidUntil equals tokenAttest.timestamp plus proofLifetime for the platform; the /me or /user attestation timestamp only orders mutable metadata. The second leg cannot substitute or refresh the bearer. Google is simpler: its signed exp already provides the accepted one-hour window and may serve as both the metadata ordering value and proofValidUntil, while the contract independently requires the signing modulus to remain in the active Google set. No Google-specific lifetime parameter or per-key trustedUntil is needed.

Use token-exchange time for X and GitHub proof validity, identity time for mutable metadata ordering, and Google's signed expiry for both roles.

Assisted-by: GPT-5
Signed-off-by: Wondertan <hlibwondertan@gmail.com>
@Wondertan
Wondertan changed the base branch from docs/ceremony-parameters-endpoint-checks to docs/libid-ceremony-specs August 17, 2026 16:01
Assisted-by: GPT-5
Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-5
Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-5
Signed-off-by: Wondertan <hlibwondertan@gmail.com>
@Wondertan Wondertan changed the title docs(specs): thin circuits, on-chain client set, observedAt watermark docs(specs): thin ceremony circuits and verified extraction Aug 17, 2026
@Wondertan
Wondertan marked this pull request as ready for review August 17, 2026 16:54
@Wondertan
Wondertan merged commit bb4098b into docs/libid-ceremony-specs Aug 17, 2026
2 of 4 checks passed
@Wondertan
Wondertan deleted the docs/ceremony-thin-circuits branch August 17, 2026 16:55
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.

2 participants