SSM-Clock Stamp – Canonical Formatting & Normalization (2.8)

Purpose. Enforce formatting/normalization so every SSM-Clock Stamp is reproducible and audit-ready in plain ASCII.

UTC string (must)

  • iso_utc = "YYYY-MM-DDThh:mm:ssZ"UTC only, seconds only, no subseconds, no offsets.
  • Examples: 2025-10-14T09:05:27Z ✅, 2025-10-14T09:05:27.123Z ❌, 2025-10-14T09:05:27+05:30 ❌.

Angle printing (must)

  • theta_deg is printed with exactly theta_prec fractional digits using IEEE-754 binary64 round-half-to-even.
  • Default theta_prec = 5 (override via kv:theta_prec).
  • Compare as strings after formatting.
  • Example (theta_prec=5): print 163.48750 (not 163.4875).

Binary64 math (must)

  • All intermediate math uses IEEE-754 binary64.
  • Decimal point is '.'; no thousands separators; no locale formatting.

Digest fields (must)

  • sha256(file) and chain emit lowercase 64-hex: [0-9a-f]{64}.
  • No 0x prefix, no spaces, no uppercase hex.

Line shape & separators (must)

  • Entire stamp is one ASCII line, pipe-separated, with no spaces and no leading/trailing separators:
    SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain
  • Optional tail begins with |kv: and uses ;-separated key=value pairs (ASCII):
    ...|chain|kv:algo=sha256;chain_algo=sha256;theta_prec=5;float=ieee75464

ASCII discipline (must)

  • Any hashed concatenation uses the exact 7-bit ASCII bytes of the literal strings shown.
  • Example (chain step): hash ascii(chain_{k-1} + "|" + stamp_core) — literal |, no extra spaces, no Unicode punctuation.

No byte normalization for file hashing (must)

  • Hash the exact file bytes as stored. Do not modify line endings, encodings, or metadata before computing H_algo(file_bytes).

Canonical roll-up join (when anchoring, must)

  • Sort stamps by (iso_utc, stamp_core, chain).
  • Join as the literal ASCII: "Stamp_1|...|Stamp_n" — one | between full lines, no leading/trailing |.
  • Compute: rollup_D = sha256( ascii(joined_string) ).

Leap-second handling (must)

  • 23:59:60 is forbidden. Producers must not stamp at a leap second; verifiers reject any :60.

Quick conformance checklist (copy-ready)

  • iso_utc shape = ...Z, seconds only ✅
  • theta_deg fixed digits, banker’s rounding, string-compare ✅
  • Digests = lowercase 64-hex ✅
  • Hash inputs = exact ASCII concatenations ✅
  • Single-line, |-only separators, no spaces ✅

Navigation
Back: SSM-Clock Stamp – Failure Modes & Guidance (2.7)
Next: SSM-Clock Stamp – Observed-time Evidence (2.9)