Skip to content

feat(kos): domain-separate KOS instances by instance_id - #445

Draft
AdamDawidKrol wants to merge 1 commit into
ethereum:devfrom
AdamDawidKrol:adam/kos-domain-separation
Draft

feat(kos): domain-separate KOS instances by instance_id#445
AdamDawidKrol wants to merge 1 commit into
ethereum:devfrom
AdamDawidKrol:adam/kos-domain-separation

Conversation

@AdamDawidKrol

Copy link
Copy Markdown

Add an instance_id domain separator to kos::Sender/Receiver and mix it into the base-OT-derived PRG seeds (Prg::from_seed(seed ^ instance_id)).

This makes two KOS instances that share the same global delta and reuse the same base OT produce independent extension transcripts, preventing a malicious receiver from composing per-instance consistency-check leakages to sample or recover delta.

API-breaking: Sender::new/Receiver::new gain an instance_id: Block.

Add an `instance_id` salt to `kos::Sender`/`Receiver`, mixed into the
base-OT-derived setup PRG seeds via a tweakable correlation-robust hash
(`FIXED_KEY_AES.tccr(instance_id, seed)`). Two KOS instances that share one
global `delta` and the same base OT then produce independent extension
transcripts, so per-instance consistency-check leakage can no longer be
composed to sample or recover `delta` (demonstrated in #1).

The mix is non-invertible in `seed` on purpose: a linear XOR mix
(`seed ^ instance_id`) would let a malicious receiver, who controls the
base-OT seeds, pre-compensate them to cancel the salt and collapse two
instances onto one PRG stream.

API-breaking: `Sender::new`/`Receiver::new` gain an `instance_id: Block`.
Paired sender and receiver must use the same id; distinct instances reusing
one `delta` must use distinct ids.
@AdamDawidKrol
AdamDawidKrol force-pushed the adam/kos-domain-separation branch from 14a3d20 to c0379ef Compare July 23, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant