JCS (JSON Canonicalization Scheme)
RFC 8785, the deterministic JSON serialization Truestamp applies to a JSON map (item claims and metadata, block metadata, entropy values, commitment data) before SHA-256 hashing, so the same logical data always yields the same bytes and the same hash regardless of key order.
Overview
JCS (JSON Canonicalization Scheme, RFC 8785) is the deterministic JSON serialization Truestamp applies to a JSON map before hashing it. Item claims and item metadata, block metadata, entropy observation values, and commitment data are each JCS-canonicalized and then hashed with SHA-256 under their own byte prefix, so the same logical data always produces the same bytes, and therefore the same hash, regardless of key order or whitespace. A verifier reproducing a claims hash or an entropy data hash must canonicalize with JCS first, or the recomputed hash will not match the stored one. See the item’s composite fingerprint for where canonicalization sits in item hashing and entropy verification levels for its role in re-checking entropy observations.
A proof bundle carries every map a verifier has to canonicalize: the subject’s claims or captured entropy payload, the subject’s own metadata, the metadata of every block it names, and the payload of each entropy witness it carries. Checking such a bundle is therefore a matter of canonicalizing each of those with JCS and rehashing it under the matching prefix, so no digest has to be taken on trust. Canonicalization applies to the maps that get hashed, not to the bundle around them, whose key order and formatting nothing cryptographic depends on. The field layout is in the proof bundle wire format.
Citations
- RFC 8785: JSON Canonicalization Scheme (JCS). Defines the canonical JSON byte form Truestamp hashes.