crypto / org.apache.tuweni.crypto.sodium / KeyExchange

KeyExchange

class KeyExchange (source)

Key exchange.

Allows two parties to securely compute a set of shared keys using their peer's public key and their own secret key.

Types

KeyPair

class KeyPair

A KeyExchange key pair.

PublicKey

class PublicKey

A KeyExchange public key.

SecretKey

class SecretKey : Destroyable

A KeyExchange secret key.

Seed

class Seed

A KeyExchange key pair seed.

SessionKey

class SessionKey : Destroyable

A KeyExchange session key.

SessionKeyPair

class SessionKeyPair

A KeyExchange session key pair.

Constructors

<init>

KeyExchange()

Key exchange.

Allows two parties to securely compute a set of shared keys using their peer's public key and their own secret key.

Functions

client

static fun client(clientKeys: KeyPair, serverKey: PublicKey): SessionKeyPair

Computer a pair of session keys for use by a client.

server

static fun server(serverKeys: KeyPair, clientKey: PublicKey): SessionKeyPair

Computer a pair of session keys for use by a client.