RSW-0006 — Static Hosting
01. Static Publication#
A conventional HTTPS server participates without an RSW daemon, database, or central account. The experimental /.well-known/rsw.json convention is consulted by RSW-0005; no IANA registration is claimed. A domain publishes an index signed by a single identity in the MVP; hosting other identities in files by hash is possible, but does not turn them into publications of that domain. Multiple authors per index require a future extension.
02. Index Structure#
The document is strict UTF-8 JSON, without BOM, duplicates, numbers outside the integer subset, or invalid Unicode (RSW-0002); maximum 256 KiB, depth 16. Exact envelope with two fields: payload (object) and signature (128 lowercase hex, 64 bytes). The payload has exactly these fields:
protocol: "rsw/1"
domain: canonical RSW-0004 name
public_key: RSW-0003 identifier
sequence: integer 1..9007199254740991
cartridges: array of 0..256 entries
Each entry has exactly name, version, sha256, and url. name and version follow RSW-0002. sha256 is the string "sha256:" + 64 lowercase hex, H_png. url is an absolute path on the same origin, literally /rsw/<64 hex of H_png>.rsw.png. Entries MUST have distinct names, sorted by ASCII lexicographic order. An empty array is allowed. There are no unknown fields in this profile; changes require RSW-0016. The absence of a name does not mean revocation of copies or transfer of ownership.
03. Index Signature#
I = ASCII("RSW/1:hosting-index") || 0x00 || JCS(payload). Sign I directly with pure Ed25519, with the strict requirements of RSW-0003. signature is the hex encoding of the binary signature; it is not part of the payload. Do not reuse the cartridge signing domain. The payload.domain must match the requested domain and TLS must be valid. Each announced object must be signed by the same public_key of the index and correspond to the name, version, and H_png. The index signature does not replace the object's signature.
The first association is explicit TOFU (RSW-0005). Store (domain, public_key, sequence, SHA-256(JCS(payload))). Sequence starts at 1 on the first publication and grows with each change. An index received for the first time may have a sequence greater than 1. A sequence lower than the last accepted is a rollback; equal with a distinct payload is a conflict; equal with the same payload is idempotent. A higher sequence does not authorize individual cartridge regressions (RSW-0013). A key change requires explicit action; it does not restart the old identity. Do not claim that the index is the globally newest. The private key stays on the author's equipment.
04. Publisher Flow#
Generate and validate each cartridge, compute H_png, publish the immutable file before the index that references it. Never overwrite a hash path with different bytes. Verify that the download returns the original bytes. Generate and sign the new payload, write the index to a temporary file, and replace it atomically when available. On static hosting without atomicity, publish objects first and use an indivisible commit/deploy when possible. An intermediate error does not justify promoting an incomplete index.
/.well-known/rsw.json
/rsw/<hash-a>.rsw.png
/rsw/<hash-b>.rsw.png
A historical edition may remain on the server by hash, even when absent from the index. The MVP does not require a complete historical catalog. To share an old edition, use the hash URI and a known source.
05. HTTP and Operation#
Index: Content-Type application/json; recommend Cache-Control: no-cache. Object: image/png, X-Content-Type-Options: nosniff; recommend immutable caching and a correct Content-Length. Do not apply image optimization, transformation, HTTP gzip, or automatic conversion. HTTPS on port 443; GET without authentication, redirects not supported in the MVP. CORS is not mandatory because the core performs the fetching. The reader imposes limits and verifies bytes, independently of headers. A site may offer download links in conventional HTML. Do not expose .keys, the working directory, an admin API, or extracted resources on the privileged origin.
06. Errors and Tests#
INVALID_INDEX: schema, domain, key, signature, or incompatible entry; INDEX_ROLLBACK and INDEX_CONFLICT: sequence; DOMAIN_KEY_CHANGED: unexpected key; OBJECT_HASH_MISMATCH and IDENTITY_MISMATCH: divergent object. Test empty indexes, limits, duplicates, equal sequence with different content, signature from the wrong domain, removed object, tampered URL, and interrupted publication. Fixtures must use public test keys only. The adoption of /.well-known/rsw.json requires registration study per RFC 8615. References: RSW-0003/0004/0005/0013; https://www.rfc-editor.org/rfc/rfc8615.html ; https://www.rfc-editor.org/rfc/rfc8785.html .
License: CC0 1.0 (public domain dedication; see CC0-1.0.txt in the downloads area). Developed by Pablo Murad | pablo@pablomurad.com END — RSW-0006
Related specifications
RSW-0003 — Identity and Signatures · RSW-0004 — URI Scheme · RSW-0005 — Address Resolution · RSW-0013 — Versioning and Updates