SSM-Clock Stamp – Verification Rules (0E)

Purpose. A concise, plain-ASCII checklist for verifying an SSM-Clock Stamp end-to-end: file bytes, UTC-derived angles, chain position, and optional daily anchors.

1) Inputs & parse (single line)
SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...]

  • Split on | (ASCII only).
  • If a kv: tail exists, parse key=value pairs separated by ;. Unknown keys are ignored.

2) File digest (integrity, must)

  • Choose file-digest algorithm: algo = kv:algo else sha256.
  • Recompute h' = H_algo(file_bytes); compare to recorded sha256(file) (hex).
  • Pass iff hex strings match (case-insensitive but emit lowercase in stamps).

3) UTC string & leap-second check (must)

  • iso_utc must be YYYY-MM-DDThh:mm:ssZ (UTC only; no subseconds, no offsets).
  • Reject if hh:mm:60 (leap second 23:59:60) appears.

4) Deterministic angles (must)

  • Compute POSIX time from iso_utcunix_seconds.
  • theta_tmp = (unix_seconds / 86400) * 360
  • theta_wrapped = wrap360(theta_tmp) where wrap360(x) = x - 360*floor(x/360)
  • Precision: p = kv:theta_prec else 5; format theta_wrapped with exactly p digits using IEEE-754 binary64 round-half-to-eventheta_fmt.
  • Check: theta_fmt == theta_deg (string equality).
  • Compute rasi' = floor( float(theta_fmt) / 30 ); check rasi' == rasi_idx.

5) Chain step (tamper-evident order)

  • If you have the previous tip chain_{k-1}:
    chain_k' = H_chain( ascii(chain_{k-1} + "|" + stamp_core) )
    where stamp_core = "SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)" and H_chain = kv:chain_algo else sha256.
  • Accept if chain_k' == chain (hex).
  • If previous tip is unknown, validate shape: chain ∈ [0-9a-f]{64} (lowercase recommended); then verify when previous tip is available (e.g., in a ledger).

6) Anchors (if present/published)

  • Canonical sort the day’s stamps by (iso_utc, stamp_core, chain).
  • Join as "Stamp_1|...|Stamp_n" (literal |, no leading/trailing).
  • Compute daily anchor: rollup_D' = sha256( ascii(joined) ).
  • Accept if rollup_D' equals the published rollup_D (public “no-later-than” bound).

7) kv: acceptance checks

  • algo ∈ {sha256, sha3_256, blake2b-256} → digest length 64 hex.
  • chain_algo ∈ {sha256, sha3_256, blake2b-256} → digest length 64 hex.
  • theta_prec ∈ {3..9} (default 5).
  • float == ieee75464 (mandatory).
  • time_mode ∈ {derived_utc, observed}.
  • ssmc_hint_min = Δ allowed iff |Δ| <= 30 (minutes); advisory only.
  • chain_id matches [0-9a-fA-F]{8}; device matches [A-Za-z0-9._-]{1,32}.
  • Unknown keys: ignored (forward-compatible).
  • Any invalid value: FAIL.

Common failure reasons (quick triage)

  • theta_deg not printed with exactly theta_prec digits (string mismatch).
  • iso_utc not in ...Z form or includes subseconds/offsets.
  • Leap second (:60) present.
  • File/chain digests not 64-hex or don’t match recomputation under declared algos.
  • float not ieee75464, or time_mode outside allowed set.

Navigation
Back: SSM-Clock Stamp – Core Ideas & Day-one Benefits (0D)
Next: SSM-Clock Stamp – Normative Specification — Stamp (1)