SSM-Clock Stamp – Happy Path (5.1)

Objective. Prove the baseline: a clean stamp for one file verifies PASS with deterministic, plain ASCII rules.

Setup (inputs)

  • A small test file A (any bytes).
  • No network, no PKI — fully offline.
  • Optional: a local append-only ledger file.

Steps (deterministic, copy-ready)

  1. Stamp the file to produce one line:
    SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...]
    Core math:
    wrap360(x) = x - 360*floor(x/360)
    theta_deg = wrap360( (unix_seconds/86400) * 360 )
    rasi_idx = floor(theta_deg/30)
    chain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core) ) with chain_0 = "0"*64.
  2. Verify the file against the stamp (and ledger if present).
    • Recompute hash with declared kv:algo (default sha256).
    • Re-derive clock from iso_utc (UTC only): format theta_deg with exactly theta_prec digits (default 5) using round-half-to-even under IEEE-754 binary64.
    • If a ledger exists, rewalk the chain link-by-link.

Expected output (stdout, ASCII)

HASH_OK=true CLOCK_OK=true CHAIN_OK=true   # or CHAIN_OK=na if no ledger
VERDICT=PASS

Notes (must)

  • UTC shape: iso_utc = "YYYY-MM-DDThh:mm:ssZ" (no subseconds; reject 23:59:60).
  • Angles: theta_deg printed with exactly theta_prec digits; compare as strings.
  • Digests: lowercase 64-hex.
  • ASCII hashing: use exact ascii("tip|stamp_core") when computing chain.

Navigation
Back: SSM-Clock Stamp – Validation Suite Overview (5)
Next: SSM-Clock Stamp – Two Files, Same Minute (5.2)