SSM-Clock Stamp – Glossary & Notation (10)

Purpose. Shared language and exact tokens for implementers and auditors. All math and comparisons use plain ASCII; formulas appear as inline code.


Core tokens (exact shapes)

  • Stamp marker (constant): SSMCLOCK1
  • UTC timestamp (canonical): iso_utc = "YYYY-MM-DDTHH:MM:SSZ" (UTC Z only; no subseconds; :60 forbidden)
  • POSIX seconds: unix_seconds = seconds_since_1970_UTC(iso_utc)
  • Angle wrap to [0,360): wrap360(x) = x - 360*floor(x/360)
  • Deterministic clock from UTC: theta_deg = wrap360( (unix_seconds / 86400) * 360 )
  • Discrete index: rasi_idx = floor(theta_deg / 30) (so rasi_idx ∈ {0..11})
  • File digest algorithm: H_algo ∈ {sha256, sha3_256, blake2b-256}
  • File digest: digest(file) = H_algo(file_bytes) (historical field name: sha256(file); value follows H_algo)
  • Stamp core (before chain): stamp_core = "SSMCLOCK1|" + iso_utc + "|" + rasi_idx + "|" + theta_deg + "|" + digest(file)
  • Chain seed: chain_0 = "0"*64
  • Append-only chain: chain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core_k) ), with H_chain ∈ {sha256, sha3_256, blake2b-256}
  • Full stamp line (single ASCII line):
    SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...]

Canonical formatting rules (must-haves)

  • UTC only. iso_utc must be exactly YYYY-MM-DDTHH:MM:SSZ (zero offset; no subseconds; reject :60).
  • Angle print. theta_deg must print with exactly theta_prec fractional digits using round-half-to-even (default theta_prec = 5). Example: "163.48750".
  • Lowercase hex. All digests must be lowercase 64-hex ([0-9a-f]{64}).
  • ASCII discipline. All concatenations under hashing use ascii(...); the only delimiter is |; no spaces; no Unicode punctuation.

Anchoring (day-level)

  • Day key (UTC): day = "YYYY-MM-DD" derived from iso_utc.
  • Canonical order (ascending, string compare): (iso_utc, stamp_core, chain)
  • Daily roll-up digest (anchor): rollup_D = sha256( ascii(Stamp_1 "|" ... "|" Stamp_n) ) (no leading/trailing |)
  • Optional witness: witness_chain_tip = chain_last (last chain_k for that day)

Verification flags & verdict

  • Hash: HASH_OK = ( H_algo(file_bytes) == digest(file) )
  • Clock: CLOCK_OK = ( floor(theta'_deg/30) == rasi_idx ) (with recommended exact theta_deg string check)
  • Chain: CHAIN_OK = result of local chain rewalk (or na if no ledger)
  • Anchor: ANCHOR_OK = result of roll-up recomputation (or na if none)
  • Verdict: VERDICT = "PASS" if all applicable checks are true; else "FAIL"

Error classes (diagnostic language)

  • Hash mismatch: HASH_OK=false → file bytes changed.
  • Clock mismatch: CLOCK_OK=false → non-canonical iso_utc or theta_deg.
  • Chain break: first index k where chain_k recomputation fails.
  • Orphan sidecar: stamp exists but original file missing.
  • Anchor mismatch: recomputed rollup_D' or count differs from published note.
  • Leap-second violation: any iso_utc with :60 is invalid.

Optional metadata (non-breaking)

  • Policy pinning: policy_sha256 = sha256( ascii(policy_text) ), tool_sha256 = sha256(file_bytes_of_stamper), config_sha256 = sha256( ascii(config_blob) )
  • Algo tags (pack/day hints): algo_hash = "sha256", algo_chain = "sha256" (per-stamp authority remains the kv: tail)
  • Signature (authorship, optional):
    sig = Ed25519_sign(privkey, ascii(SSMCLOCK1|...|chain))
    Verify with Ed25519_verify(pubkey, ascii(SSMCLOCK1|...|chain), sig)

Minimal grammar (EBNF-style, ASCII)

stamp        := "SSMCLOCK1" "|" iso_utc "|" rasi "|" theta "|" h64 "|" h64 [ "|" kv_tail ]
iso_utc      := YYYY "-" MM "-" DD "T" hh ":" mm ":" ss "Z"      # ss != "60"
rasi         := DIGITS                                           # 0..11
theta        := DIGITS "." DIGITS{theta_prec}                    # theta_prec digits; default 5
h64          := HEXLOWER{64}                                     # [0-9a-f], length 64
kv_tail      := "kv:" kvpair { ";" kvpair }
kvpair       := key "=" value
key          := ALPHA { ALPHA | DIGIT | "_" | "-" }
value        := { ALPHA | DIGIT | "." | "_" | "-" | "+" }        # ASCII-safe values
# Notes: DIGITS=[0-9]+, HEXLOWER=[0-9a-f], ALPHA=[A-Za-z]


Invariants (quick checks)

  • 0 <= theta_deg < 360
  • rasi_idx == floor(theta_deg / 30)
  • len(digest(file)) == 64 and hex is [0-9a-f]
  • len(chain_k) == 64 and hex is [0-9a-f]
  • rollup_D recomputes identically for the same set and canonical order
  • iso_utc has Z and not :60
  • Printing uses theta_prec digits (default 5), ties-to-even

Navigation
Back: SSM-Clock Stamp – Quickstart (9)
Next: SSM-Clock Stamp – Reference Pseudocode (11)