Goal. A quick, copy-ready self-audit so implementations emit/verify identical ASCII and pass all normative rules.
Stamp emission (SHALL)
- Emits exactly:
SSMCLOCK1|iso_utc|rasi_idx|theta_str|h_str|chain_str[|kv:...]](single ASCII line;|is the only delimiter). - Formats
iso_utcasYYYY-MM-DDTHH:MM:SSZ(UTCZonly; no offsets/subseconds; no:60). - Computes clock from UTC only:
wrap360(x) = x - 360*floor(x/360)theta_deg = wrap360( (unix_seconds / 86400) * 360 )rasi_idx = floor(theta_deg / 30) - Prints
theta_degwith exactlytheta_precdigits (default5), round-half-to-even under IEEE-754 binary64. - File digest:
h_file = H_algo(file_bytes)whereH_algo ∈ {sha256, sha3_256, blake2b-256}(streaming OK); emit lowercase 64-hex. - Chain from zero seed using ASCII concat and
H_chain(fromkv:chain_algoor defaultsha256):chain_0 = "0"*64chain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core) )→ lowercase 64-hex. - All serialized inputs to hashing are 7-bit ASCII:
ascii(x). No Unicode punctuation. - If present,
kv:tail values are validated; unknown keys are ignored by verifiers.
Verification (SHALL)
- Parses 6 fields (base) or 7 fields when a final
kv:tail exists; requires prefixSSMCLOCK1. - Recomputes
h' = H_algo(file_bytes)and requiresh' == h_str. - Recomputes clock from
iso_utc; requiresrasi'_idx == rasi_idxand eithertheta_str' == theta_stror numeric fallback<= 0.5*10^(-theta_prec)when strictly necessary. - If a ledger is present, strictly rewalks continuity with each row’s
H_chain:chain_k ?= H_chain( ascii(chain_{k-1} + "|" + stamp_core_k) )withchain_0 = "0"*64; fail at the first mismatch. - Reports flags and verdict as ASCII lines:
HASH_OK=<true|false> CLOCK_OK=<true|false> CHAIN_OK=<true|false|na> ANCHOR_OK=<true|false|na> EVIDENCE_OK=<true|false|absent>VERDICT=<PASS|FAIL>
Anchoring (SHALL/SHOULD)
- SHALL derive UTC day key from
iso_utcasYYYY-MM-DD. - SHALL canonical-sort by
(iso_utc, stamp_core, chain_str)(ascending, string compare). - SHALL compute daily digest:
rollup_D = sha256( ascii(Stamp_1 "|" ... "|" Stamp_n) )
(include each exact line, with anykv:; no leading/trailing|; emit lowercase 64-hex). - SHOULD publish an ASCII note with
date,count,rollup_sha256,source(and optionallywitness_chain_tip,policy_sha256). - SHOULD check parity between ledger- and sidecar-derived roll-ups when both exist.
Formatting hygiene (SHALL)
- All digests are lowercase 64-hex.
- No spaces around separators; only
|as delimiter. - Replace typographic punctuation:
— -> -,’ -> '; keep ASCII-only. - Reject
iso_utcwith:60(leap-second ban).
Negative tests (SHOULD)
- Byte tamper flips
h_file→HASH_OK=false. - Ledger deletion/reorder triggers rewalk failure at first divergence.
- Non-UTC
iso_utcor non-canonicaltheta_str→CLOCK_OK=false. - Orphan sidecar (missing original) is reported; hash check skipped.
Pass criteria
- Stable runs reproduce identical
theta_str(sametheta_prec), identicalchain_kalong the ledger, and identicalrollup_Dfor any UTC day. - Final PASS rule:
HASH_OK=trueandCLOCK_OK=trueand (CHAIN_OK ∈ {true,"na"}) and (ANCHOR_OK ∈ {true,"na"}).
Navigation
Back: SSM-Clock Stamp – Worked Example (7.2)
Next: SSM-Clock Stamp – Verify Pack & Public Handoff (8.1)