SSM-Clock Stamp – Two Files, Same Minute (5.2)

Objective. Show that stamping two files close in time preserves append-only order and both verify PASS using deterministic, plain ASCII rules.

Setup (inputs)

  • Two files: A, B (any bytes).
  • Optional local ledger (append-only).
  • No network, no PKI — fully offline.

Steps (deterministic)

  1. Stamp A → emit one line:
    SSMCLOCK1|iso_utc_A|rasi_idx_A|theta_deg_A|sha256(A)|chain_A[|kv:...]
  2. Stamp B (shortly after A) → emit one line:
    SSMCLOCK1|iso_utc_B|rasi_idx_B|theta_deg_B|sha256(B)|chain_B[|kv:...]
  3. Verify each file against its stamp (and ledger if present).
    • Recompute file hash with algo (default sha256).
    • Derive clock from iso_utc:
      wrap360(x) = x - 360*floor(x/360)
      theta_deg = wrap360( (unix_seconds/86400) * 360 )
      rasi_idx = floor(theta_deg/30)
      Format theta_deg with exactly theta_prec digits (default 5), round-half-to-even, IEEE-754 binary64.
  4. Rewalk ledger to confirm order continuity (if using a ledger).
    • Build stamp_core_k = "SSMCLOCK1|" + iso_utc_k + "|" + rasi_idx_k + "|" + theta_deg_k + "|" + sha_file_k
    • Compute the chain step:
      chain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core_k) ) with chain_0 = "0"*64
    • Expect chain_A first, then chain_B as the new tip.

Expected outputs (stdout, ASCII)

# For A
HASH_OK=true CLOCK_OK=true CHAIN_OK=true
VERDICT=PASS

# For B
HASH_OK=true CLOCK_OK=true CHAIN_OK=true
VERDICT=PASS

# Ledger continuity (summary)
LEDGER_OK=true

Notes

  • Stamps within the same minute are fine: ordering is enforced by the ledger sequence and the chain (chain_k), not by wall-clock granularity.
  • iso_utc must be YYYY-MM-DDThh:mm:ssZ (UTC, seconds only; 23:59:60 forbidden).
  • All digests are lowercase 64-hex; all concatenations under hashing use exact ASCII.

Navigation
Back: SSM-Clock Stamp – Happy Path (5.1)
Next: SSM-Clock Stamp – Tamper Detection (file bytes) (5.3)