Skip to content

feat(kos): domain-separate instances with a per-instance salt - #2

Open
AdamDawidKrol wants to merge 1 commit into
adam/mpz-alpha6-basefrom
adam/kos-domain-separation
Open

feat(kos): domain-separate instances with a per-instance salt#2
AdamDawidKrol wants to merge 1 commit into
adam/mpz-alpha6-basefrom
adam/kos-domain-separation

Conversation

@AdamDawidKrol

@AdamDawidKrol AdamDawidKrol commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Adds an instance_id salt to kos::Sender/Receiver, mixed into the base-OT-derived setup PRG seeds via a tweakable correlation-robust hash: Prg::from_seed(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/recover delta (the issue raised in review of tlsnotary/tlsn#1173).

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.

Consumed by AdamDawidKrol/tlsn#2.

@AdamDawidKrol
AdamDawidKrol force-pushed the adam/kos-domain-separation branch from 56ba61d to e550d91 Compare July 23, 2026 09:44
@AdamDawidKrol AdamDawidKrol changed the title feat(kos): add per-instance salt (instance_id) to KOS domain separation feat(kos): domain-separate instances with a per-instance salt Jul 23, 2026
AdamDawidKrol added a commit to AdamDawidKrol/tlsn that referenced this pull request Jul 23, 2026
Each RCOT consumer now gets its own KOS instance (deadlock fix), but they all
reuse one global delta. Give each logical consumer a distinct `instance_id`
salt so the instances are domain-separated, closing the shared-delta leak
flagged in review of tlsnotary/tlsn#1173.

Ids are assigned explicitly per consumer so prover and verifier stay matched
(sender id N pairs with receiver id N); proxy mode uses a single fixed id.
Depends on the mpz salt (AdamDawidKrol/mpz#2), pulled via the [patch] block.
@AdamDawidKrol
AdamDawidKrol changed the base branch from dev to adam/mpz-alpha6-base July 23, 2026 09:48
@AdamDawidKrol
AdamDawidKrol force-pushed the adam/kos-domain-separation branch from e550d91 to 14a3d20 Compare July 23, 2026 09:50
AdamDawidKrol added a commit to AdamDawidKrol/tlsn that referenced this pull request Jul 23, 2026
Each RCOT consumer now gets its own KOS instance (deadlock fix), but they all
reuse one global delta. Give each logical consumer a distinct `instance_id`
salt so the instances are domain-separated, closing the shared-delta leak
flagged in review of tlsnotary/tlsn#1173.

Ids are assigned explicitly per consumer so prover and verifier stay matched
(sender id N pairs with receiver id N); proxy mode uses a single fixed id.
Depends on the mpz salt (AdamDawidKrol/mpz#2), pulled via the [patch] 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
AdamDawidKrol added a commit to AdamDawidKrol/tlsn that referenced this pull request Jul 23, 2026
Each RCOT consumer now gets its own KOS instance (deadlock fix), but they all
reuse one global delta. Give each logical consumer a distinct `instance_id`
salt so the instances are domain-separated, closing the shared-delta leak
flagged in review of tlsnotary/tlsn#1173.

Ids are assigned explicitly per consumer so prover and verifier stay matched
(sender id N pairs with receiver id N); proxy mode uses a single fixed id.
Depends on the mpz salt (AdamDawidKrol/mpz#2), pulled via the [patch] block.
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