Interface Ristretto255.Lazy
- All Known Implementing Classes:
LazySodium,LazySodiumJava
- Enclosing interface:
- Ristretto255
public static interface Ristretto255.Lazy
-
Method Summary
Modifier and TypeMethodDescriptionAdds two given Ristretto255 pointspandqand returns the result.cryptoCoreRistretto255FromHash(byte[] hash) Maps aRistretto255.RISTRETTO255_HASH_BYTESbytes hash to a Ristretto255 point.Maps aRistretto255.RISTRETTO255_HASH_BYTESbytes hash to aRistretto255.RistrettoPoint.booleanReturns whether the passed encoded string represents a valid Ristretto255 point.Chooses a random Ristretto255 point and returns it.cryptoCoreRistretto255ScalarAdd(byte[] x, byte[] y) Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarAdd(byte[] x, String y) Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarAdd(byte[] x, BigInteger y) Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarAdd(String x, byte[] y) Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarAdd(BigInteger x, byte[] y) Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarComplement(byte[] scalar) Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarComplement(String scalarEnc) Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ristretto255 group.Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarInvert(byte[] scalar) Calculates the multiplicative inverse of the given scalar value.cryptoCoreRistretto255ScalarInvert(String scalarEnc) Calculates the multiplicative inverse of the given scalar value.Calculates the multiplicative inverse of the given scalar value.cryptoCoreRistretto255ScalarMul(byte[] x, byte[] y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarMul(byte[] x, String y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarMul(byte[] x, BigInteger y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarMul(String x, byte[] y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarMul(BigInteger x, byte[] y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarNegate(byte[] scalar) Calculates the additive inverse of the given scalar value.cryptoCoreRistretto255ScalarNegate(String scalarEnc) Calculates the additive inverse of the given scalar value.Calculates the additive inverse of the given scalar value.Creates a random scalar value in[0, l[withLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarReduce(byte[] scalar) Reduces a possibly larger scalar value to[0, L[withLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarReduce(String scalarEnc) Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ristretto255 group.Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarSub(byte[] x, byte[] y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarSub(byte[] x, String y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarSub(byte[] x, BigInteger y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarSub(String x, byte[] y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.cryptoCoreRistretto255ScalarSub(BigInteger x, byte[] y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.Subtracts two given Ristretto255 pointspandqand returns the result.cryptoScalarmultRistretto255(byte[] n, Ristretto255.RistrettoPoint point) Multiplies the given Ristretto255pointby the scalarnand returns the resulting point.Multiplies the given Ristretto255pointby the scalarnand returns the resulting point.Multiplies the given Ristretto255pointby the scalarnand returns the resulting point.cryptoScalarmultRistretto255Base(byte[] n) Multiplies the Ristretto255 base point by the scalarnand returns the result.Multiplies the Ristretto255 base point by the scalarnand returns the result.Multiplies the Ristretto255 base point by the scalarnand returns the result.
-
Method Details
-
cryptoCoreRistretto255IsValidPoint
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
Maps aRistretto255.RISTRETTO255_HASH_BYTESbytes hash to aRistretto255.RistrettoPoint.- Parameters:
hash- the encoded hash- Returns:
- the corresponding Ristretto255 point
- Throws:
SodiumException
-
cryptoCoreRistretto255FromHash
Maps aRistretto255.RISTRETTO255_HASH_BYTESbytes hash to a Ristretto255 point.- Parameters:
hash- the hash, must beRistretto255.RISTRETTO255_HASH_BYTES- Returns:
- the corresponding Ristretto255 point
- Throws:
SodiumException
-
cryptoScalarmultRistretto255
Ristretto255.RistrettoPoint cryptoScalarmultRistretto255(BigInteger n, Ristretto255.RistrettoPoint point) throws SodiumException Multiplies the given Ristretto255pointby the scalarnand returns the resulting point.- Parameters:
n- the scalarpoint- the Ristretto255 point- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarmultRistretto255
Ristretto255.RistrettoPoint cryptoScalarmultRistretto255(String nEnc, Ristretto255.RistrettoPoint point) throws SodiumException Multiplies the given Ristretto255pointby the scalarnand returns the resulting point.- Parameters:
nEnc- the encoded scalar bytes, in little-endian byte orderpoint- the Ristretto255 point- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarmultRistretto255
Ristretto255.RistrettoPoint cryptoScalarmultRistretto255(byte[] n, Ristretto255.RistrettoPoint point) throws SodiumException Multiplies the given Ristretto255pointby the scalarnand returns the resulting point.- Parameters:
n- the scalar, must beRistretto255.RISTRETTO255_BYTESbytes, in little-endian encodingpoint- the Ristretto255 point- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarmultRistretto255Base
Multiplies the Ristretto255 base point by the scalarnand returns the result.- Parameters:
n- the scalar- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarmultRistretto255Base
Multiplies the Ristretto255 base point by the scalarnand returns the result.- Parameters:
nEnc- the encoded scalar, in little-endian byte order- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarmultRistretto255Base
Multiplies the Ristretto255 base point by the scalarnand returns the result.- Parameters:
n- the scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes, in little-endian encoding- Returns:
- the result
- Throws:
SodiumException
-
cryptoCoreRistretto255Add
Ristretto255.RistrettoPoint cryptoCoreRistretto255Add(Ristretto255.RistrettoPoint p, Ristretto255.RistrettoPoint q) throws SodiumException Adds two given Ristretto255 pointspandqand returns the result.- Parameters:
p- the first Ristretto255 pointq- the second Ristretto255 point- Returns:
- the sum
- Throws:
SodiumException
-
cryptoCoreRistretto255Sub
Ristretto255.RistrettoPoint cryptoCoreRistretto255Sub(Ristretto255.RistrettoPoint p, Ristretto255.RistrettoPoint q) throws SodiumException Subtracts two given Ristretto255 pointspandqand returns the result.- Parameters:
p- the first Ristretto255 pointq- the second Ristretto255 point- Returns:
- the difference
- Throws:
SodiumException
-
cryptoCoreRistretto255ScalarRandom
BigInteger cryptoCoreRistretto255ScalarRandom()Creates a random scalar value in[0, l[withLbeing the order of the Ristretto255 group.- Returns:
- the random scalar value
-
cryptoCoreRistretto255ScalarReduce
Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ristretto255 group.- Parameters:
scalar- the scalar to reduce- Returns:
- the reduced scalar
-
cryptoCoreRistretto255ScalarReduce
Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ristretto255 group.- Parameters:
scalarEnc- the encoded scalar to reduce- Returns:
- the reduced scalar
-
cryptoCoreRistretto255ScalarReduce
Reduces a possibly larger scalar value to[0, L[withLbeing the order of the Ristretto255 group.- Parameters:
scalar- the scalar to reduce, must beRistretto255.RISTRETTO255_NON_REDUCED_SCALAR_BYTESbytes- Returns:
- the reduced scalar
-
cryptoCoreRistretto255ScalarInvert
Calculates the multiplicative inverse of the given scalar value.- Parameters:
scalar- the scalar to invert- Returns:
- the multiplicative inverse
- Throws:
SodiumException
-
cryptoCoreRistretto255ScalarInvert
Calculates the multiplicative inverse of the given scalar value.- Parameters:
scalarEnc- the encoded scalar to invert- Returns:
- the multiplicative inverse
- Throws:
SodiumException
-
cryptoCoreRistretto255ScalarInvert
Calculates the multiplicative inverse of the given scalar value.- Parameters:
scalar- the scalar to invert, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the multiplicative inverse
- Throws:
SodiumException
-
cryptoCoreRistretto255ScalarNegate
Calculates the additive inverse of the given scalar value.- Parameters:
scalar- the scalar to negate- Returns:
- the additive inverse
-
cryptoCoreRistretto255ScalarNegate
Calculates the additive inverse of the given scalar value.- Parameters:
scalarEnc- the encoded scalar to negate- Returns:
- the additive inverse
-
cryptoCoreRistretto255ScalarNegate
Calculates the additive inverse of the given scalar value.- Parameters:
scalar- the scalar to negate, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the additive inverse
-
cryptoCoreRistretto255ScalarComplement
Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ristretto255 group.- Parameters:
scalar- the scalar to complement- Returns:
- the complement
-
cryptoCoreRistretto255ScalarComplement
Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ristretto255 group.- Parameters:
scalarEnc- the encoded scalar to complement- Returns:
- the complement
-
cryptoCoreRistretto255ScalarComplement
Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ristretto255 group.- Parameters:
scalar- the scalar to complement, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the complement
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar (encoded)- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar (encoded)- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar (encoded)- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar- Returns:
- the sum
-
cryptoCoreRistretto255ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the sum
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar (encoded)- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar (encoded)- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar (encoded)- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar- Returns:
- the difference
-
cryptoCoreRistretto255ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the difference
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar (encoded)- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar (encoded)- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar (encoded)y- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar (encoded)- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalary- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar- Returns:
- the product
-
cryptoCoreRistretto255ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ristretto255 group.- Parameters:
x- the first scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytesy- the second scalar, must beRistretto255.RISTRETTO255_SCALAR_BYTESbytes- Returns:
- the product
-