Skip to content

docs(html-protocol): align with spec §2.1, §2.2, and add resolver section#1

Merged
jt55401 merged 3 commits into
mainfrom
feat/signature-binding-spec-amendment
May 13, 2026
Merged

docs(html-protocol): align with spec §2.1, §2.2, and add resolver section#1
jt55401 merged 3 commits into
mainfrom
feat/signature-binding-spec-amendment

Conversation

@jt55401
Copy link
Copy Markdown
Contributor

@jt55401 jt55401 commented Apr 29, 2026

Summary

  • Adds a dedicated Identity and Key Resolution section mirroring spec §2.2 (DID, direct URL, trust directory; none privileged).
  • Adds a Canonical Content Extraction section mirroring spec §2.1 with the explicit two-stage pipeline (HTML extraction with excluded elements and block-boundary handling, then six-phase text normalization).
  • Tightens the <signed-section> attribute table: required attributes in spec order with cross-references to the new sections; new Optional Attributes subsection documenting that the wrapper has none in this revision and that style/class belong in user-agent CSS rather than inline (closes a P1 from TODO-Cleanup.md).
  • Documents algorithm default = ed25519 when omitted, while still encouraging producers to emit it explicitly.

Test plan

  • Read the diff against the previous commit (ebfacd3) and confirm no factual drift from htmltrust-spec/paper/htmltrust.tex §2.1, §2.2, §2.5.
  • Verify the binding format documented as {content-hash}:{claims-hash}:{domain}:{signed-at} matches the spec and the JS/Go/PHP reference implementations.
  • Render the markdown locally and confirm the new tables/sections format correctly.

🤖 Generated with Claude Code

jt55401 and others added 3 commits April 10, 2026 20:03
…hor-profiles.php

The render_page() method was missing its closing sequence (a ?>, </div>,
<?php, and }) which caused the parser to read the next method's docblock
as part of render_page's inline HTML. This made every subsequent
PHP file that depended on this class fail to parse.

Separately, a displaced stray '?> </div> <?php }' fragment appeared
after handle_create_api_author()'s proper closing brace and has been
removed.

Verified: php -l passes, and 'wp plugin activate content-signing'
succeeds. A runtime 'table doesn't exist' error fires on activation
but is a separate init-order issue out of scope for this fix.
Updates the HTML signature protocol documentation to match the
amended paper specification:

- Canonicalization section: add explicit text-only scoping, enumerate
  the semantic attacks this leaves open (element rewrapping, link swap,
  surrounding media manipulation), and document the layered response
  (domain binding alerts readers at unexpected origins; research and
  reputation path traces signed content back to canonical origin and
  flags imposter copies).
- Signature data format: replace old {contentHash}:{domain}:{authorId}
  binding with new {content-hash}:{claims-hash}:{domain}:{signed-at}.
  Drop authorId (redundant with keyid resolution), add claims-hash for
  tamper-evident metadata, add signed-at timestamp.
- Hash encoding: switch to unpadded Base64 and note the open feedback
  invitation on encoding alternatives (hex, Base32).
- Verification flow: restructure into two layers -- cryptographic
  verification (local, deterministic) and trust decision (client
  policy). Add detail on keyid resolution methods (DID, direct URL,
  trust directory reference). Add note that optional directory queries
  enrich trust decision but are never required for verification.

Tracks the 2026-04-10 design decisions committed in the paper at
bb3dc5a, 1187b2d, 6d0511c, 271a455, ca8cc3b.
…tion

Brings docs/html-protocol.md fully into line with the amended spec
(htmltrust.tex §2.1, §2.2, §2.5):

- Add an "Identity and Key Resolution" section mirroring spec §2.2:
  the three pluggable resolvers (DID, direct URL, trust directory),
  none of which is privileged by the protocol.
- Add a "Canonical Content Extraction" section mirroring spec §2.1:
  explicit two-stage pipeline (HTML extraction → text normalization),
  enumerating excluded elements, block-element boundary handling,
  and the six text-normalization phases.
- Restate text-only scoping with explicit "what is NOT covered by the
  hash" callout tying back to the existing Text-only scope discussion.
- Tighten the Required Attributes table: spec §2.1 ordering
  (keyid, signature, content-hash, algorithm) with clearer language
  pointing at the new resolver and binding sections.
- Add an explicit "Optional Attributes" subsection: there are none
  on the wrapper itself in this revision; claim metadata goes in
  inner <meta>. style/class belong in user-agent CSS, not inline
  on the wrapper (resolves a P1 from TODO-Cleanup.md).
- Document algorithm default: ed25519 when omitted, though producers
  SHOULD always emit it explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jt55401 jt55401 merged commit bebc114 into main May 13, 2026
2 checks passed
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