Package-level declarations

Types

Link copied to clipboard

Conformance TCK for CommutativeScheme. Validate a new scheme by subclassing this suite and overriding newScheme, newPeerScheme and proofStrength:

Link copied to clipboard
sealed interface ProofStrength

What a subclass claims its scheme's CommutativeScheme.verifyEncrypt / CommutativeScheme.verifyStrip pair does with a transition the scheme did not produce — the answer CommutativeSchemeConformanceSuite.verifyAnswersForgedTransitionsAsDeclared holds it to.

Link copied to clipboard
class XorKeystreamScheme(random: Random = Random.Default) : CommutativeScheme

A fast, dependency-free CommutativeScheme test double for driving the deal session / CRDT reveal logic WITHOUT the cost of real 2048-bit SRA modular exponentiation.

Functions

Link copied to clipboard
fun fakeDealSessionGroup(playerIds: List<PeerId>, newScheme: () -> CommutativeScheme = { SraScheme() }, scope: CoroutineScope): List<DealSession>

Build a wired group of DealSessions (one per id in playerIds, in order) over a fakeSeamGroup, each running its own instance from newScheme and holding a key that instance minted — the N-player generalisation of fakeDealSessionPair, and per-player separate for the same reason.

Link copied to clipboard
fun fakeDealSessionPair(aliceId: PeerId, bobId: PeerId, newScheme: () -> CommutativeScheme = { SraScheme() }, scope: CoroutineScope): Pair<DealSession, DealSession>

Two wired DealSessions over a fakeSeamPair, each running its own scheme instance.