Proposal: This page presents the draft API and profile model. Send feedback on GitHub.
Guide profile encoding and cryptography
This section specifies the proposed http6-guide-01 encoding used by its companion schema and vectors. It does not alter W1 or WASIX.
Canonical JSON and bounds
- Encode JSON as UTF-8, without a byte-order mark. Use RFC 8785 canonical JSON restricted to printable ASCII strings and property names, booleans, null, arrays and nonnegative integers. Sort object member names in ASCII order. Preserve array order. Reject duplicate object members, unknown members, floating-point values, noncanonical wire representations and invalid UTF-8.
- Identifiers contain 1 to 64 lowercase ASCII letters, digits and hyphens, beginning with a letter or digit. Hashes and nonces are 64 lowercase hex digits. Ed25519 signatures are 128 lowercase hex digits.
keyIdis a configured identifier, not raw trust material. - Time is whole Unix seconds. Time intervals include
nbforiatand excludeexp. The schema limits timestamps to253402300799and other counts to2147483647. Timestamps, signature freshness and the uncertain clock interval all have to fit within the relevant grant, appraisal, challenge and permit bounds. - For this design, reject JSON packets larger than 65,536 bytes and chains longer than nine grants. Fields and rules have the additional limits in the schema. Hex encoding expands binary data: large inputs, streaming and chunk proofs require a different profile.
- The URI pattern is intentionally narrow: configured HTTPS URI, restricted ASCII path, no query or fragment. Compare the exact configured target to the actual route seen at enforcement. Disable redirects, state-changing early data and content transformation. Do not derive the trusted target from an untrusted
Hostfield.
A JSON Schema validator works on parsed values. It cannot by itself detect duplicate keys, noncanonical received bytes, key-role trust, replay or an unauthorized effect. Parse defensively, retain the raw received bytes, reserialize canonically and compare bytes before validating semantics.
Hashing and signing
Let C(x) be canonical JSON bytes, and let 0x00 be one zero byte:
frame(label, x) = ASCII("http6-guide-01/" + label) || 0x00 || C(x)
H(label, x) = lowercase_hex(SHA-256(frame(label, x)))
rawHash(bytes) = lowercase_hex(SHA-256(bytes))
This domain separation is specific to the guide profile. It is different from W1's canonical-object hashes and from the WASIX profile's prefix.
A signed object is:
{
"payload": {"v": "http6-guide-01", "kind": "..."},
"signature": {"alg": "Ed25519", "keyId": "...", "value": "<128-hex-digits>"}
}
The signing input is frame("signature", {"alg":"Ed25519", "keyId": keyId, "payload": payload}). Sign those bytes with ordinary Ed25519. value is the signature's raw 64 bytes encoded as lowercase hex. The algorithm and key identifier are therefore signed along with the payload. Check the configured role and the expected payload kind, key, audience, context and time before accepting it. Its reference is H("signed", signedObject), over the complete envelope including the signature.
Typed digest registry
| Name | Exact input | Who checks it |
|---|---|---|
policyRef | H("policy", policy) | Issuer, state authority and resource |
termsRef | H("terms", terms) | Approver, prospective instance and issuer |
intentRef | H("intent", intent) | Holder, state authority and resource |
attemptRef | H("attempt", attempt) | Holder, proof verifier, state and resource |
| Signed grant, challenge, request, permit, outcome, event or checkpoint reference | H("signed", completeSignedEnvelope) | The relying party for that role and kind |
proofRef | H("proof", {challenge, result}), with both complete signed envelopes | Request/response signer and relying party |
| Input/result digest | rawHash(exactInputBytes) or rawHash(exactResultBytes) | Resource or recipient before using bytes |
presentationRef | H("request-packet", completeRequestPacket) | Custodian and state authority for the same presented packet |
| Response context | H("response-context", responseContext) | Proof verifier, resource signer and recipient |
| Response packet | H("response-packet", completeResponsePacket) | Optional archival identification; it is not the response proof context |
| Checkpoint state | H("state", canonicalStateProjection) | State authority and independent keeper under an agreed projection |
Do not place a digest of the final response packet inside the context that generates its own proof. Section 11 gives a noncircular construction order. A standalone digest of low-entropy input is not confidential; public evidence needs privacy review.