Class Curve

java.lang.Object
zmq.io.mechanism.curve.Curve

public class Curve extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) int
    afternm(byte[] ciphered, byte[] plaintext, int length, byte[] nonce, byte[] precomp)
     
    (package private) int
    afternm(ByteBuffer ciphered, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] precom)
     
    (package private) int
    beforenm(byte[] outSharedKey, byte[] publicKey, byte[] secretKey)
     
    int
    box(byte[] ciphertext, byte[] plaintext, int length, byte[] nonce, byte[] publicKey, byte[] secretKey)
     
    int
    box(ByteBuffer ciphertext, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] publicKey, byte[] secretKey)
     
    byte[][]
    Generates a pair of keys for use with this class.
    Generates a pair of Z85-encoded keys for use with this class.
    (package private) int
    open(byte[] plaintext, byte[] messagebox, int length, byte[] nonce, byte[] publicKey, byte[] secretKey)
     
    (package private) int
    open(ByteBuffer plaintext, ByteBuffer messagebox, int length, ByteBuffer nonce, byte[] precom, byte[] secretKey)
     
    (package private) int
    openAfternm(byte[] plaintext, byte[] cipher, int length, byte[] nonce, byte[] precom)
     
    (package private) int
    openAfternm(ByteBuffer plaintext, ByteBuffer messagebox, int length, ByteBuffer nonce, byte[] precom)
     
    (package private) byte[]
    random(int length)
     
    (package private) int
    secretbox(byte[] ciphertext, byte[] plaintext, int length, byte[] nonce, byte[] key)
     
    (package private) int
    secretbox(ByteBuffer ciphertext, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] key)
     
    (package private) int
    secretboxOpen(byte[] plaintext, byte[] box, int length, byte[] nonce, byte[] key)
     
    (package private) int
    secretboxOpen(ByteBuffer plaintext, ByteBuffer box, int length, ByteBuffer nonce, byte[] key)
     
    static String
    z85EncodePublic(byte[] publicKey)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Curve

      public Curve()
  • Method Details

    • z85EncodePublic

      public static String z85EncodePublic(byte[] publicKey)
    • keypairZ85

      public String[] keypairZ85()
      Generates a pair of Z85-encoded keys for use with this class.
      Returns:
      an array of 2 strings, holding Z85-encoded keys. The first element of the array is the public key, the second element is the private (or secret) key.
    • keypair

      public byte[][] keypair()
      Generates a pair of keys for use with this class.
      Returns:
      an array of 2 byte arrays, holding keys. The first element of the array is the public key, the second element is the private (or secret) key.
    • beforenm

      int beforenm(byte[] outSharedKey, byte[] publicKey, byte[] secretKey)
    • afternm

      int afternm(ByteBuffer ciphered, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] precom)
    • afternm

      int afternm(byte[] ciphered, byte[] plaintext, int length, byte[] nonce, byte[] precomp)
    • openAfternm

      int openAfternm(ByteBuffer plaintext, ByteBuffer messagebox, int length, ByteBuffer nonce, byte[] precom)
    • openAfternm

      int openAfternm(byte[] plaintext, byte[] cipher, int length, byte[] nonce, byte[] precom)
    • open

      int open(ByteBuffer plaintext, ByteBuffer messagebox, int length, ByteBuffer nonce, byte[] precom, byte[] secretKey)
    • open

      int open(byte[] plaintext, byte[] messagebox, int length, byte[] nonce, byte[] publicKey, byte[] secretKey)
    • secretbox

      int secretbox(ByteBuffer ciphertext, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] key)
    • secretbox

      int secretbox(byte[] ciphertext, byte[] plaintext, int length, byte[] nonce, byte[] key)
    • secretboxOpen

      int secretboxOpen(ByteBuffer plaintext, ByteBuffer box, int length, ByteBuffer nonce, byte[] key)
    • secretboxOpen

      int secretboxOpen(byte[] plaintext, byte[] box, int length, byte[] nonce, byte[] key)
    • random

      byte[] random(int length)
    • box

      public int box(ByteBuffer ciphertext, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] publicKey, byte[] secretKey)
    • box

      public int box(byte[] ciphertext, byte[] plaintext, int length, byte[] nonce, byte[] publicKey, byte[] secretKey)