System architecture
How authors, CMSes, browsers, crawlers, and federated trust directories interact.
HTMLTrust is a system of small, independent pieces. Authors sign content. CMSes embed signatures. Browsers verify locally. Optional directories store endorsements and surface reputation. No piece is required for verification to work.
The whole system, one diagram¶
Author
|
| writes
v
+--------------+ asks for a signature +----------------------+
| | ------------------------> | Author's browser |
| CMS | | holds the private |
| | <------------------------ | key, which never |
+--------------+ returns the signature | leaves the browser |
| +----------------------+
| publishes
v
+------------------------------+
| Page with signed blocks |
+------------------------------+
| |
| read | crawled
v v
+----------------+ +----------------+
| Reader browser | | Crawler |
+----------------+ +----------------+
| |
| verify locally | verify at scale
v v
trust score research, flags
: :
: query reputation : file reports
v v
+--------------------------------------------+
| Federated trust directories (0 to n) |
+--------------------------------------------+
Two layers, kept separate¶
LAYER 1 cryptographic verification
local, deterministic, no network call beyond key resolution
canonicalize -- hash -- resolve keyid -- verify signature
|
+----------------------------+
| |
invalid valid
| |
v v
reject on to Layer 2
LAYER 2 trust decision
local, and different for every reader by design
personal trust list ---+
endorsements ---+---- graduated score ---- indicator
directory reputation ---+
A signature either verifies cryptographically or it does not. That part is binary, local, and identical across implementations. Trust is a matter of degree, and each user agent applies its own policy on top. The trust network documents the reference policy, including the arithmetic and what happens when directories disagree.
Author flow: signing¶
- Author → CMS. Write the content as normal.
- CMS. Canonicalize the text of the region to be signed.
- CMS. Compute the content hash and the claims hash.
- CMS → browser. Ask the author's browser to sign the canonical payload.
- Browser. Sign with the private key, which never leaves the browser.
- Browser → CMS. Return the signature only.
- CMS. Embed the signature, key identifier, content hash, and algorithm on the
<signed-section>element. - CMS → author. Publish the page.
- CMS → directory. Optionally publish the content hash and key identifier. Skipping this step changes nothing about whether the page verifies.
The private key never leaves the author's browser. The CMS asks the browser to sign a canonical payload, receives the signature, and embeds it in the published HTML.
Reader flow: verifying¶
- Reader → page origin.
GETthe page. - Page origin → reader. HTML containing one or more
<signed-section>elements. - Reader. Canonicalize the signed region and hash it.
- Reader → key resolver. Resolve the
keyid, by DID, key URL, or directory entry. - Key resolver → reader. The public key.
- Reader. Verify the signature locally. This is the yes-or-no answer.
- Reader → directory. Optionally query reputation and endorsements from each subscribed directory.
- Directory → reader. Reputation and endorsements, or nothing at all if it is unreachable.
- Reader. Apply the local trust policy and render an indicator.
Cryptographic verification is offline-capable once the public key is cached. Steps 7 and 8 feed the trust score only. Remove them and the signature check is unaffected.
Domain binding¶
UNAUTHORIZED MIRROR
author.com publishes a signed section
|
| bytes copied verbatim
v
scraper.com serves the identical bytes
|
v
signature fails: the canonical payload binds the publication
origin, and the origin in the payload no longer matches the host
DELIBERATE REPUBLICATION
author.com publishes a signed section
|
| republisher wraps the original section, unmodified,
| inside a section it signs with its own key
v
republisher.com serves inner section plus outer signature
|
v
both verify: the inner signature attributes the author,
the outer one attributes the republisher
A signature is bound to a publication origin via the canonical payload. Scrapers and mirror sites can copy the bytes, but the signature will not validate at a different origin. Legitimate republishing has its own mechanism: a republisher wraps the original <signed-section> in their own outer signature, preserving the original while adding an attribution chain. Formalizing that chain is open work.
The directory's role¶
A trust directory MAY:
- Index content hashes and signers for discovery
- Serve endorsements submitted by third parties
- Resolve keys for authors who don't self-host (
keyidcan point at a directory entry) - Surface reputation signals computed from its own curated trust graph
Federation means many directories can coexist, users choose which they trust at the higher level, and verification of a signature never requires contacting one. A directory is a convenience, never an authority.
The trust network covers what a directory actually serves, how a reader weights several of them, what happens when two disagree, and what an attacker gets for running one.
Next¶
- Spec details for the element, its attributes, and canonicalization
- Reference implementations for what is running today, per component