Interface Ristretto255.Lazy

All Known Implementing Classes:
LazySodium, LazySodiumJava
Enclosing interface:
Ristretto255

public static interface Ristretto255.Lazy
  • Method Details

    • cryptoCoreRistretto255IsValidPoint

      boolean cryptoCoreRistretto255IsValidPoint(String point)
      Returns whether the passed encoded string represents a valid Ristretto255 point.
      Parameters:
      point - the point to check
      Returns:
      true if valid
    • cryptoCoreRistretto255Random

      Ristretto255.RistrettoPoint cryptoCoreRistretto255Random()
      Chooses a random Ristretto255 point and returns it.
      Returns:
      a random Ristretto255 point
    • cryptoCoreRistretto255FromHash

      Ristretto255.RistrettoPoint cryptoCoreRistretto255FromHash(String hash) throws SodiumException
      Parameters:
      hash - the encoded hash
      Returns:
      the corresponding Ristretto255 point
      Throws:
      SodiumException
    • cryptoCoreRistretto255FromHash

      Ristretto255.RistrettoPoint cryptoCoreRistretto255FromHash(byte[] hash) throws SodiumException
      Maps a Ristretto255.RISTRETTO255_HASH_BYTES bytes hash to a Ristretto255 point.
      Parameters:
      hash - the hash, must be Ristretto255.RISTRETTO255_HASH_BYTES
      Returns:
      the corresponding Ristretto255 point
      Throws:
      SodiumException
    • cryptoScalarmultRistretto255

      Multiplies the given Ristretto255 point by the scalar n and returns the resulting point.
      Parameters:
      n - the scalar
      point - the Ristretto255 point
      Returns:
      the result
      Throws:
      SodiumException
    • cryptoScalarmultRistretto255

      Ristretto255.RistrettoPoint cryptoScalarmultRistretto255(String nEnc, Ristretto255.RistrettoPoint point) throws SodiumException
      Multiplies the given Ristretto255 point by the scalar n and returns the resulting point.
      Parameters:
      nEnc - the encoded scalar bytes, in little-endian byte order
      point - the Ristretto255 point
      Returns:
      the result
      Throws:
      SodiumException
    • cryptoScalarmultRistretto255

      Ristretto255.RistrettoPoint cryptoScalarmultRistretto255(byte[] n, Ristretto255.RistrettoPoint point) throws SodiumException
      Multiplies the given Ristretto255 point by the scalar n and returns the resulting point.
      Parameters:
      n - the scalar, must be Ristretto255.RISTRETTO255_BYTES bytes, in little-endian encoding
      point - the Ristretto255 point
      Returns:
      the result
      Throws:
      SodiumException
    • cryptoScalarmultRistretto255Base

      Ristretto255.RistrettoPoint cryptoScalarmultRistretto255Base(BigInteger n) throws SodiumException
      Multiplies the Ristretto255 base point by the scalar n and returns the result.
      Parameters:
      n - the scalar
      Returns:
      the result
      Throws:
      SodiumException
    • cryptoScalarmultRistretto255Base

      Ristretto255.RistrettoPoint cryptoScalarmultRistretto255Base(String nEnc) throws SodiumException
      Multiplies the Ristretto255 base point by the scalar n and returns the result.
      Parameters:
      nEnc - the encoded scalar, in little-endian byte order
      Returns:
      the result
      Throws:
      SodiumException
    • cryptoScalarmultRistretto255Base

      Ristretto255.RistrettoPoint cryptoScalarmultRistretto255Base(byte[] n) throws SodiumException
      Multiplies the Ristretto255 base point by the scalar n and returns the result.
      Parameters:
      n - the scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes, in little-endian encoding
      Returns:
      the result
      Throws:
      SodiumException
    • cryptoCoreRistretto255Add

      Adds two given Ristretto255 points p and q and returns the result.
      Parameters:
      p - the first Ristretto255 point
      q - the second Ristretto255 point
      Returns:
      the sum
      Throws:
      SodiumException
    • cryptoCoreRistretto255Sub

      Subtracts two given Ristretto255 points p and q and returns the result.
      Parameters:
      p - the first Ristretto255 point
      q - the second Ristretto255 point
      Returns:
      the difference
      Throws:
      SodiumException
    • cryptoCoreRistretto255ScalarRandom

      BigInteger cryptoCoreRistretto255ScalarRandom()
      Creates a random scalar value in [0, l[ with L being the order of the Ristretto255 group.
      Returns:
      the random scalar value
    • cryptoCoreRistretto255ScalarReduce

      BigInteger cryptoCoreRistretto255ScalarReduce(BigInteger scalar)
      Reduces a possibly larger scalar value to [0, l[ with L being the order of the Ristretto255 group.
      Parameters:
      scalar - the scalar to reduce
      Returns:
      the reduced scalar
    • cryptoCoreRistretto255ScalarReduce

      BigInteger cryptoCoreRistretto255ScalarReduce(String scalarEnc)
      Reduces a possibly larger scalar value to [0, l[ with L being the order of the Ristretto255 group.
      Parameters:
      scalarEnc - the encoded scalar to reduce
      Returns:
      the reduced scalar
    • cryptoCoreRistretto255ScalarReduce

      BigInteger cryptoCoreRistretto255ScalarReduce(byte[] scalar)
      Reduces a possibly larger scalar value to [0, L[ with L being the order of the Ristretto255 group.
      Parameters:
      scalar - the scalar to reduce, must be Ristretto255.RISTRETTO255_NON_REDUCED_SCALAR_BYTES bytes
      Returns:
      the reduced scalar
    • cryptoCoreRistretto255ScalarInvert

      BigInteger cryptoCoreRistretto255ScalarInvert(BigInteger scalar) throws SodiumException
      Calculates the multiplicative inverse of the given scalar value.
      Parameters:
      scalar - the scalar to invert
      Returns:
      the multiplicative inverse
      Throws:
      SodiumException
    • cryptoCoreRistretto255ScalarInvert

      BigInteger cryptoCoreRistretto255ScalarInvert(String scalarEnc) throws SodiumException
      Calculates the multiplicative inverse of the given scalar value.
      Parameters:
      scalarEnc - the encoded scalar to invert
      Returns:
      the multiplicative inverse
      Throws:
      SodiumException
    • cryptoCoreRistretto255ScalarInvert

      BigInteger cryptoCoreRistretto255ScalarInvert(byte[] scalar) throws SodiumException
      Calculates the multiplicative inverse of the given scalar value.
      Parameters:
      scalar - the scalar to invert, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the multiplicative inverse
      Throws:
      SodiumException
    • cryptoCoreRistretto255ScalarNegate

      BigInteger cryptoCoreRistretto255ScalarNegate(BigInteger scalar)
      Calculates the additive inverse of the given scalar value.
      Parameters:
      scalar - the scalar to negate
      Returns:
      the additive inverse
    • cryptoCoreRistretto255ScalarNegate

      BigInteger cryptoCoreRistretto255ScalarNegate(String scalarEnc)
      Calculates the additive inverse of the given scalar value.
      Parameters:
      scalarEnc - the encoded scalar to negate
      Returns:
      the additive inverse
    • cryptoCoreRistretto255ScalarNegate

      BigInteger cryptoCoreRistretto255ScalarNegate(byte[] scalar)
      Calculates the additive inverse of the given scalar value.
      Parameters:
      scalar - the scalar to negate, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the additive inverse
    • cryptoCoreRistretto255ScalarComplement

      BigInteger cryptoCoreRistretto255ScalarComplement(BigInteger scalar)
      Calculates the result R for the given scalar value such that R + scalar = 1 (mod L) with L being the order of the Ristretto255 group.
      Parameters:
      scalar - the scalar to complement
      Returns:
      the complement
    • cryptoCoreRistretto255ScalarComplement

      BigInteger cryptoCoreRistretto255ScalarComplement(String scalarEnc)
      Calculates the result R for the given scalar value such that R + scalar = 1 (mod L) with L being the order of the Ristretto255 group.
      Parameters:
      scalarEnc - the encoded scalar to complement
      Returns:
      the complement
    • cryptoCoreRistretto255ScalarComplement

      BigInteger cryptoCoreRistretto255ScalarComplement(byte[] scalar)
      Calculates the result R for the given scalar value such that R + scalar = 1 (mod L) with L being the order of the Ristretto255 group.
      Parameters:
      scalar - the scalar to complement, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the complement
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(BigInteger x, BigInteger y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(BigInteger x, String y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar (encoded)
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(String x, BigInteger y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(String x, String y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar (encoded)
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(String x, byte[] y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(byte[] x, String y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar (encoded)
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(BigInteger x, byte[] y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(byte[] x, BigInteger y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarAdd

      BigInteger cryptoCoreRistretto255ScalarAdd(byte[] x, byte[] y)
      Adds two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the sum
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(BigInteger x, BigInteger y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(BigInteger x, String y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar (encoded)
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(String x, BigInteger y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(String x, String y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar (encoded)
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(String x, byte[] y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(byte[] x, String y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar (encoded)
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(BigInteger x, byte[] y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(byte[] x, BigInteger y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarSub

      BigInteger cryptoCoreRistretto255ScalarSub(byte[] x, byte[] y)
      Subtracts two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the difference
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(BigInteger x, BigInteger y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(BigInteger x, String y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar (encoded)
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(String x, BigInteger y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(String x, String y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar (encoded)
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(String x, byte[] y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar (encoded)
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(byte[] x, String y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar (encoded)
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(BigInteger x, byte[] y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(byte[] x, BigInteger y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar
      Returns:
      the product
    • cryptoCoreRistretto255ScalarMul

      BigInteger cryptoCoreRistretto255ScalarMul(byte[] x, byte[] y)
      Multiplies two scalars x and y modulo L with L being the order of the Ristretto255 group.
      Parameters:
      x - the first scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      y - the second scalar, must be Ristretto255.RISTRETTO255_SCALAR_BYTES bytes
      Returns:
      the product