multiLayerDealAcrossPeerInstancesRecoversPlaintextRegardlessOfStripOrder
A three-player deal in the arrangement a real one has: three separately constructed schemes, each holding only its own key, each applying and later removing only its own layer. This is the only property in the suite that drives CommutativeScheme.strip across the instance boundary — encryptionIsCommutativeAcrossPeerInstances covers encrypt alone, and the single-instance sibling above covers both with the boundary removed.
The shape mirrors that sibling exactly — three keys, one representative plaintext, a fully deranged strip order — so the only difference between the two properties is where the keys come from, which is the thing under test. Three is the sibling's number and the smallest one at which a strip order can put no layer back in its own encryption position.
Assertions, in the order they appear below, and the numbering the receipts use:
precondition — the three schemes are distinct objects (checked eagerly, before any layering, so a broken fixture reds as a fixture rather than as a failed law);
precondition — their single-layer ciphertexts are pairwise distinct, so three peers that happen to share a key cannot make the deranged strip trivially unwind;
the law — the deranged strip recovers the plaintext;
the rig fired — every peer encrypted twice (its solo layer for assertion 2, then its layer in the chain) and stripped exactly once. This is what pins assertion 2 in place: dropping the precondition call is a one-line edit that leaves the law passing, and the counts are the only thing that reds on it;
the card stayed covered — no intermediate in the chain, from the first layer on to the second-last strip, equals the plaintext. Appended as 5 rather than inserted so the numbering above (and the receipts below, measured on #2311) still reads true. Free, since the intermediates exist regardless, and it is the only assertion here that would notice three peers whose layers cancelled each other out mid-chain.
Mutation receipts, measured as for the sibling property above:
| Mutation | Reds |
|---|---|
SraScheme given a per-instance modulus — textbook SRA | 3, and nothing pre-existing |
Fixture: newPeerScheme() hands back a cached instance | 1 |
| Fixture: two distinct instances seeded identically | 2 |
| Body: delete the assertion-2 call | 4 only — 3 stays green, both subclasses |
| Fixture: one peer's scheme is the identity, the other two real (#2313) | 5 only — 1, 2, 3 and 4 all pass |
That last row is assertion 5's whole justification, and it is the realistic threat: one player who applies no layer while everyone else does. The deal still round-trips (his strip is the identity too), his single layer is still distinct from the others', and he encrypted and stripped exactly as often as the rig demands — so 1 through 4 are all satisfied by a deal in which the first player could read the card the whole time.
What this cannot reach. It drives one deranged order out of the six; a scheme that commuted for some permutations and not others would need the full sweep, and no scheme that satisfies encryptionIsCommutativeAcrossPeerInstances can be one. And three peers is the sibling's number, not a proof that four would not break something a three-cycle cannot.