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)
- Stamp
A→ emit one line:SSMCLOCK1|iso_utc_A|rasi_idx_A|theta_deg_A|sha256(A)|chain_A[|kv:...] - Stamp
B(shortly afterA) → emit one line:SSMCLOCK1|iso_utc_B|rasi_idx_B|theta_deg_B|sha256(B)|chain_B[|kv:...] - Verify each file against its stamp (and ledger if present).
- Recompute file hash with
algo(defaultsha256). - 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)
Formattheta_degwith exactlytheta_precdigits (default5), round-half-to-even, IEEE-754 binary64.
- Recompute file hash with
- 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) )withchain_0 = "0"*64 - Expect
chain_Afirst, thenchain_Bas the new tip.
- Build
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_utcmust beYYYY-MM-DDThh:mm:ssZ(UTC, seconds only;23:59:60forbidden).- 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)