Package 

Interface KeyExchange.Native

    • Method Summary

      Modifier and Type Method Description
      abstract boolean cryptoKxKeypair(Array<byte> publicKey, Array<byte> secretKey) Generate a public and a secret key.
      abstract boolean cryptoKxSeedKeypair(Array<byte> publicKey, Array<byte> secretKey, Array<byte> seed) Deterministically generate a public and secret key.Store the seed somewhere if you want to generate thesekeys again.
      abstract boolean cryptoKxClientSessionKeys(Array<byte> rx, Array<byte> tx, Array<byte> clientPk, Array<byte> clientSk, Array<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.
      abstract boolean cryptoKxServerSessionKeys(Array<byte> rx, Array<byte> tx, Array<byte> serverPk, Array<byte> serverSk, Array<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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • cryptoKxKeypair

         abstract boolean cryptoKxKeypair(Array<byte> publicKey, Array<byte> secretKey)

        Generate a public and a secret key.

        Parameters:
        publicKey - Public key will be populated here of size PUBLICKEYBYTES.
        secretKey - Secret key will be populated here of size SECRETKEYBYTES.
      • cryptoKxSeedKeypair

         abstract boolean cryptoKxSeedKeypair(Array<byte> publicKey, Array<byte> secretKey, Array<byte> seed)

        Deterministically generate a public and secret key.Store the seed somewhere if you want to generate thesekeys again.

        Parameters:
        publicKey - Public key will be populated here of size PUBLICKEYBYTES.
        secretKey - Secret key will be populated here of size SECRETKEYBYTES.
        seed - A random seed of size SEEDBYTES.
      • cryptoKxClientSessionKeys

         abstract boolean cryptoKxClientSessionKeys(Array<byte> rx, Array<byte> tx, Array<byte> clientPk, Array<byte> clientSk, Array<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.

        Parameters:
        rx - Shared key 1 of size SESSIONKEYBYTES.
        tx - Shared key 2 of size SESSIONKEYBYTES.
        clientPk - Client public key of size PUBLICKEYBYTES.
        clientSk - Client secret key of size SECRETKEYBYTES.
        serverPk - Server public key of size PUBLICKEYBYTES.
      • cryptoKxServerSessionKeys

         abstract boolean cryptoKxServerSessionKeys(Array<byte> rx, Array<byte> tx, Array<byte> serverPk, Array<byte> serverSk, Array<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.

        Parameters:
        rx - Shared key 1 of size SESSIONKEYBYTES.
        tx - Shared key 2 of size SESSIONKEYBYTES.
        serverPk - Server public key of size PUBLICKEYBYTES.
        serverSk - Server secret key of size SECRETKEYBYTES.
        clientPk - Client public key of size PUBLICKEYBYTES.