public static interface KeyExchange.Native
| Modifier and Type | Method and Description |
|---|---|
boolean |
cryptoKxClientSessionKeys(byte[] rx,
byte[] tx,
byte[] clientPk,
byte[] clientSk,
byte[] serverPk)
This function computes a pair of shared keys
(rx and tx) using the client's public key clientPk,
the client's secret key clientSk and the server's public key serverPk.
|
boolean |
cryptoKxKeypair(byte[] publicKey,
byte[] secretKey)
Generate a public and a secret key.
|
boolean |
cryptoKxSeedKeypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
Deterministically generate a public and secret key.
|
boolean |
cryptoKxServerSessionKeys(byte[] rx,
byte[] tx,
byte[] serverPk,
byte[] serverSk,
byte[] clientPk)
This function computes a pair of shared keys
(rx and tx) using the client's public key clientPk,
the server's secret key serverSk and the server's public key serverPk.
|
boolean cryptoKxKeypair(byte[] publicKey,
byte[] secretKey)
publicKey - Public key will be populated here of size KeyExchange.PUBLICKEYBYTES.secretKey - Secret key will be populated here of size KeyExchange.SECRETKEYBYTES.boolean cryptoKxSeedKeypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
publicKey - Public key will be populated here of size KeyExchange.PUBLICKEYBYTES.secretKey - Secret key will be populated here of size KeyExchange.SECRETKEYBYTES.seed - A random seed of size KeyExchange.SEEDBYTES.boolean cryptoKxClientSessionKeys(byte[] rx,
byte[] tx,
byte[] clientPk,
byte[] clientSk,
byte[] serverPk)
rx - Shared key 1 of size KeyExchange.SESSIONKEYBYTES. This
should be used as an encryption key
to SEND data to the server.tx - Shared key 2 of size KeyExchange.SESSIONKEYBYTES. This
should be used as an encryption key to SEND
data to the client FROM the server.clientPk - Client public key of size KeyExchange.PUBLICKEYBYTES.clientSk - Client secret key of size KeyExchange.SECRETKEYBYTES.serverPk - Server public key of size KeyExchange.PUBLICKEYBYTES.boolean cryptoKxServerSessionKeys(byte[] rx,
byte[] tx,
byte[] serverPk,
byte[] serverSk,
byte[] clientPk)
rx - Shared key 1 of size KeyExchange.SESSIONKEYBYTES. This
should be used as an encryption key
to SEND data to the client.tx - Shared key 2 of size KeyExchange.SESSIONKEYBYTES. This
should be used as an encryption key to SEND
data to the client FROM the client.serverPk - Server public key of size KeyExchange.PUBLICKEYBYTES.serverSk - Server secret key of size KeyExchange.SECRETKEYBYTES.clientPk - Client public key of size KeyExchange.PUBLICKEYBYTES.