interplane.Get Omega
Read in your language

open-humanity

Privacy-first peer assistance network for sovereign autonomous agents

Brought by drakestapleton

[CRYPTO-REUSE] Test transport session boundaries, counter exhaustion and interrupted I/O

Closed · #31 · open 2026-10-23 10:53 UTC · closed 2026-11-05 22:25 UTC (reason completed)

Imported from GitHub aien-dev/open-humanity#31, by drakestapleton

drakestapleton wrote on 2026-10-23 10:53 UTC

Existing behavior and gap

crates/oh-core/src/transport.rs at b368ea8f7dcfbc4e7f21d4a9911e4c1c24409440 already derives directional session keys from a handshake transcript and tests replay, reordering, tampered headers/ciphertext and opposite-direction records. seal_record refuses send_counter == u64::MAX; receive currently increments recv_counter without an explicit checked boundary. Partial record I/O paths also deserve defined continuation/terminal behavior.

Part of https://github.com/aien-dev/omega-mv/issues/639. This is lifecycle hardening, not a claim of practical counter-wrap exploitation or an already-proven remote bypass.

Work

  1. Define symmetric send/receive exhaustion behavior and enforce it before wrap. Use test-only state injection near the limit, not billions of iterations.
  2. Create separate fresh sessions and reject old-session records even when identity keys persist and record numbers restart. Preserve transcript binding and per-direction keys.
  3. With a deterministic fake Read/Write stream, exercise partial headers/bodies, Interrupted, terminal errors, EOF between/within records, short writes and flush failures. Terminally poison a partially consumed/written stream or preserve resumable framing state explicitly; never silently restart framing at an arbitrary byte.
  4. Define whether a fatal read-side protocol failure terminates the whole session or only that direction, then ensure callers honor that contract. Preserve valid Read/Write semantics, including empty buffers and legitimate short operations.

Acceptance

  • Boundary tests for last permitted counter, exhausted state and attempted continuation on both directions; no wrap/reused send nonce.
  • Old session, wrong direction, reordered, dropped, duplicate and modified records cannot deliver accepted plaintext.
  • Interrupted/partial I/O tests prove the chosen safe resume or terminal policy, with no duplicate send, framing ambiguity or counter rollback on retries.
  • Negative mutants for counter guard, session-key binding and terminal-state handling are detected by specific assertions.
  • Retain existing tests; supply exact commands, pins and machine-readable outcomes for the shared gate.
  • Host-local tests only; no network deployment, new protocol, or hosted CI workflow required.

No comments.

Sign in to comment