public static interface KeyExchange.Lazy
| Modifier and Type | Method and Description |
|---|---|
SessionPair |
cryptoKxClientSessionKeys(Key clientPk,
Key clientSk,
Key serverPk)
Generate a client's session keys.
|
SessionPair |
cryptoKxClientSessionKeys(KeyPair clientKeyPair,
KeyPair serverKeyPair)
Generate a client's session keys.
|
KeyPair |
cryptoKxKeypair()
Generate a public and secret key.
|
KeyPair |
cryptoKxKeypair(byte[] seed)
Deterministically generate a public and secret key.
|
SessionPair |
cryptoKxServerSessionKeys(Key serverPk,
Key serverSk,
Key clientPk)
Computes a pair of shared keys (server-side)
(rx and tx) using the client's public key clientPk,
the server's secret key serverSk and the server's public key serverPk.
|
SessionPair |
cryptoKxServerSessionKeys(KeyPair serverKeyPair,
KeyPair clientKeyPair)
Generate a server's session keys.
|
KeyPair cryptoKxKeypair()
KeyPair cryptoKxKeypair(byte[] seed)
seed - A random seed of size KeyExchange.SEEDBYTES.SessionPair cryptoKxClientSessionKeys(Key clientPk, Key clientSk, Key serverPk) throws SodiumException
clientPk - Client public key of size KeyExchange.PUBLICKEYBYTES.clientSk - Client secret key of size KeyExchange.SECRETKEYBYTES.serverPk - Server public key of size KeyExchange.PUBLICKEYBYTES.SodiumException - If the size of any of the keys are wrong.KeyExchange.Native.cryptoKxClientSessionKeys(byte[], byte[], byte[], byte[], byte[])SessionPair cryptoKxClientSessionKeys(KeyPair clientKeyPair, KeyPair serverKeyPair) throws SodiumException
clientKeyPair - Provide the client's public and private key.serverKeyPair - Provide the server's public key only.SodiumException - Not provided the correct keys, or generation
of session keys failed.SessionPair cryptoKxServerSessionKeys(Key serverPk, Key serverSk, Key clientPk) throws SodiumException
serverPk - Server public key of size KeyExchange.PUBLICKEYBYTES.serverSk - Server secret key of size KeyExchange.SECRETKEYBYTES.clientPk - Client public key of size KeyExchange.PUBLICKEYBYTES.SodiumExceptionSessionPair cryptoKxServerSessionKeys(KeyPair serverKeyPair, KeyPair clientKeyPair) throws SodiumException
serverKeyPair - Provide the server's public and private key.clientKeyPair - Provide the client's public key only.SodiumException - Not provided the correct keys, or generation
of session keys failed.