Handshake
data class Handshake(val role: Role, val symmetry: Symmetry, val messagePatterns: List<List<Handshake.Token>>, val localStaticKeyPair: Pair<PublicKey, PrivateKey>? = null, val localEphemeralKeyPair: Pair<PublicKey, PrivateKey>? = null, val remoteStaticKey: PublicKey? = null, val remoteEphemeralKey: PublicKey? = null, val trustedStaticKeys: Set<PublicKey> = emptySet()) : MessageType(source)
Encompasses all Noise protocol handshake state required to read and write messages.
Start with initialize, supplying one of the implemented patterns:
Proposals to add more patterns or generate correct patterns dynamically are welcomed.
Constructors
Link copied to clipboard
constructor(role: Role, symmetry: Symmetry, messagePatterns: List<List<Handshake.Token>>, localStaticKeyPair: Pair<PublicKey, PrivateKey>? = null, localEphemeralKeyPair: Pair<PublicKey, PrivateKey>? = null, remoteStaticKey: PublicKey? = null, remoteEphemeralKey: PublicKey? = null, trustedStaticKeys: Set<PublicKey> = emptySet())
Types
Link copied to clipboard
data class Pattern(val name: String, val preSharedMessagePatterns: List<List<Handshake.Token>>, val messagePatterns: List<List<Handshake.Token>>)
A handshake pattern.
Link copied to clipboard
Message pattern token, indicating which keys are sent and which key agreements are performed.