Interface Ristretto255.Lazy

    • Method Detail

      • cryptoCoreRistretto255IsValidPoint

        boolean cryptoCoreRistretto255IsValidPoint​(java.lang.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
      • cryptoScalarmultRistretto255Base

        Ristretto255.RistrettoPoint cryptoScalarmultRistretto255Base​(java.math.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​(java.lang.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
      • cryptoCoreRistretto255ScalarRandom

        java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarReduce​(java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarReduce​(java.lang.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

        java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarInvert​(java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarInvert​(java.lang.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

        java.math.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

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

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

        java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarComplement​(java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarComplement​(java.lang.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

        java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(java.math.BigInteger x,
                                                             java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(java.math.BigInteger x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(java.lang.String x,
                                                             java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(java.lang.String x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(byte[] x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarAdd​(byte[] x,
                                                             java.math.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
      • cryptoCoreRistretto255ScalarSub

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(java.math.BigInteger x,
                                                             java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(java.math.BigInteger x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(java.lang.String x,
                                                             java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(java.lang.String x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(byte[] x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarSub​(byte[] x,
                                                             java.math.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

        java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(java.math.BigInteger x,
                                                             java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(java.math.BigInteger x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(java.lang.String x,
                                                             java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(java.lang.String x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(byte[] x,
                                                             java.lang.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(java.math.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

        java.math.BigInteger cryptoCoreRistretto255ScalarMul​(byte[] x,
                                                             java.math.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

        java.math.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