feat(kos): domain-separate KOS instances by instance_id - #445
Draft
AdamDawidKrol wants to merge 1 commit into
Draft
feat(kos): domain-separate KOS instances by instance_id#445AdamDawidKrol wants to merge 1 commit into
AdamDawidKrol wants to merge 1 commit into
Conversation
AdamDawidKrol
force-pushed
the
adam/kos-domain-separation
branch
2 times, most recently
from
July 23, 2026 09:50
e550d91 to
14a3d20
Compare
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
force-pushed
the
adam/kos-domain-separation
branch
from
July 23, 2026 10:30
14a3d20 to
c0379ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an
instance_iddomain separator tokos::Sender/Receiverand 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
deltaand reuse the same base OT produce independent extension transcripts, preventing a malicious receiver from composing per-instance consistency-check leakages to sample or recoverdelta.API-breaking:
Sender::new/Receiver::newgain aninstance_id: Block.