Package com.goterl.lazysodium.interfaces
Interface Ed25519.Lazy
- All Known Implementing Classes:
LazySodium,LazySodiumAndroid,LazySodiumJava
- Enclosing interface:
Ed25519
public static interface Ed25519.Lazy
-
Method Summary
Modifier and TypeMethodDescriptionAdds two given Ed25519 pointspandqand returns the result.cryptoCoreEd25519FromUniform(byte[] hash) Maps aEd25519.ED25519_HASH_BYTESbytes hash to a Ed25519 point.Maps aEd25519.ED25519_HASH_BYTESbytes hash to aEd25519.Ed25519Point.booleanReturns whether the passed encoded string represents a valid Ed25519 point.Chooses a random Ed25519 point and returns it.cryptoCoreEd25519ScalarAdd(byte[] x, byte[] y) Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarAdd(byte[] x, String y) Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarAdd(byte[] x, BigInteger y) Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarAdd(String x, byte[] y) Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarAdd(BigInteger x, byte[] y) Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarComplement(byte[] scalar) Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarComplement(String scalarEnc) Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ed25519 group.Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarInvert(byte[] scalar) Calculates the multiplicative inverse of the given scalar value.cryptoCoreEd25519ScalarInvert(String scalarEnc) Calculates the multiplicative inverse of the given scalar value.Calculates the multiplicative inverse of the given scalar value.cryptoCoreEd25519ScalarMul(byte[] x, byte[] y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarMul(byte[] x, String y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarMul(byte[] x, BigInteger y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarMul(String x, byte[] y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarMul(BigInteger x, byte[] y) Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarNegate(byte[] scalar) Calculates the additive inverse of the given scalar value.cryptoCoreEd25519ScalarNegate(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 Ed25519 group.cryptoCoreEd25519ScalarReduce(byte[] scalar) Reduces a possibly larger scalar value to[0, L[withLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarReduce(String scalarEnc) Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ed25519 group.Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarSub(byte[] x, byte[] y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarSub(byte[] x, String y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarSub(byte[] x, BigInteger y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarSub(String x, byte[] y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.cryptoCoreEd25519ScalarSub(BigInteger x, byte[] y) Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.Subtracts two given Ed25519 pointspandqand returns the result.cryptoScalarMultEd25519BaseNoclamp(byte[] n) Multiplies the Ed25519 base point by the scalarnand returns the result.Multiplies the Ed25519 base point by the scalarnand returns the result.Multiplies the Ed25519 base point by the scalarnand returns the result.cryptoScalarMultEd25519Noclamp(byte[] n, Ed25519.Ed25519Point point) Multiplies the given Ed25519pointby the scalarnand returns the resulting point.cryptoScalarMultEd25519Noclamp(String nEnc, Ed25519.Ed25519Point point) Multiplies the given Ed25519pointby the scalarnand returns the resulting point.Multiplies the given Ed25519pointby the scalarnand returns the resulting point.
-
Method Details
-
cryptoCoreEd25519IsValidPoint
Returns whether the passed encoded string represents a valid Ed25519 point.- Parameters:
point- the point to check- Returns:
- true if valid
-
cryptoCoreEd25519Random
Ed25519.Ed25519Point cryptoCoreEd25519Random()Chooses a random Ed25519 point and returns it.- Returns:
- a random Ed25519 point
-
cryptoCoreEd25519FromUniform
Maps aEd25519.ED25519_HASH_BYTESbytes hash to aEd25519.Ed25519Point.- Parameters:
hash- the encoded hash- Returns:
- the corresponding Ed25519 point
- Throws:
SodiumException
-
cryptoCoreEd25519FromUniform
Maps aEd25519.ED25519_HASH_BYTESbytes hash to a Ed25519 point.- Parameters:
hash- the hash, must beEd25519.ED25519_HASH_BYTES- Returns:
- the corresponding Ed25519 point
- Throws:
SodiumException
-
cryptoScalarMultEd25519Noclamp
Ed25519.Ed25519Point cryptoScalarMultEd25519Noclamp(BigInteger n, Ed25519.Ed25519Point point) throws SodiumException Multiplies the given Ed25519pointby the scalarnand returns the resulting point.- Parameters:
n- the scalarpoint- the Ed25519 point- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarMultEd25519Noclamp
Ed25519.Ed25519Point cryptoScalarMultEd25519Noclamp(String nEnc, Ed25519.Ed25519Point point) throws SodiumException Multiplies the given Ed25519pointby the scalarnand returns the resulting point.- Parameters:
nEnc- the encoded scalar bytes, in little-endian byte orderpoint- the Ed25519 point- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarMultEd25519Noclamp
Ed25519.Ed25519Point cryptoScalarMultEd25519Noclamp(byte[] n, Ed25519.Ed25519Point point) throws SodiumException Multiplies the given Ed25519pointby the scalarnand returns the resulting point.- Parameters:
n- the scalar, must beEd25519.ED25519_BYTESbytes, in little-endian encodingpoint- the Ed25519 point- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarMultEd25519BaseNoclamp
Multiplies the Ed25519 base point by the scalarnand returns the result.- Parameters:
n- the scalar- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarMultEd25519BaseNoclamp
Multiplies the Ed25519 base point by the scalarnand returns the result.- Parameters:
nEnc- the encoded scalar, in little-endian byte order- Returns:
- the result
- Throws:
SodiumException
-
cryptoScalarMultEd25519BaseNoclamp
Multiplies the Ed25519 base point by the scalarnand returns the result.- Parameters:
n- the scalar, must beEd25519.ED25519_SCALAR_BYTESbytes, in little-endian encoding- Returns:
- the result
- Throws:
SodiumException
-
cryptoCoreEd25519Add
Ed25519.Ed25519Point cryptoCoreEd25519Add(Ed25519.Ed25519Point p, Ed25519.Ed25519Point q) throws SodiumException Adds two given Ed25519 pointspandqand returns the result.- Parameters:
p- the first Ed25519 pointq- the second Ed25519 point- Returns:
- the sum
- Throws:
SodiumException
-
cryptoCoreEd25519Sub
Ed25519.Ed25519Point cryptoCoreEd25519Sub(Ed25519.Ed25519Point p, Ed25519.Ed25519Point q) throws SodiumException Subtracts two given Ed25519 pointspandqand returns the result.- Parameters:
p- the first Ed25519 pointq- the second Ed25519 point- Returns:
- the difference
- Throws:
SodiumException
-
cryptoCoreEd25519ScalarRandom
BigInteger cryptoCoreEd25519ScalarRandom()Creates a random scalar value in[0, l[withLbeing the order of the Ed25519 group.- Returns:
- the random scalar value
-
cryptoCoreEd25519ScalarReduce
Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ed25519 group.- Parameters:
scalar- the scalar to reduce- Returns:
- the reduced scalar
-
cryptoCoreEd25519ScalarReduce
Reduces a possibly larger scalar value to[0, l[withLbeing the order of the Ed25519 group.- Parameters:
scalarEnc- the encoded scalar to reduce- Returns:
- the reduced scalar
-
cryptoCoreEd25519ScalarReduce
Reduces a possibly larger scalar value to[0, L[withLbeing the order of the Ed25519 group.- Parameters:
scalar- the scalar to reduce, must beEd25519.ED25519_NON_REDUCED_SCALAR_BYTESbytes- Returns:
- the reduced scalar
-
cryptoCoreEd25519ScalarInvert
Calculates the multiplicative inverse of the given scalar value.- Parameters:
scalar- the scalar to invert- Returns:
- the multiplicative inverse
- Throws:
SodiumException
-
cryptoCoreEd25519ScalarInvert
Calculates the multiplicative inverse of the given scalar value.- Parameters:
scalarEnc- the encoded scalar to invert- Returns:
- the multiplicative inverse
- Throws:
SodiumException
-
cryptoCoreEd25519ScalarInvert
Calculates the multiplicative inverse of the given scalar value.- Parameters:
scalar- the scalar to invert, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the multiplicative inverse
- Throws:
SodiumException
-
cryptoCoreEd25519ScalarNegate
Calculates the additive inverse of the given scalar value.- Parameters:
scalar- the scalar to negate- Returns:
- the additive inverse
-
cryptoCoreEd25519ScalarNegate
Calculates the additive inverse of the given scalar value.- Parameters:
scalarEnc- the encoded scalar to negate- Returns:
- the additive inverse
-
cryptoCoreEd25519ScalarNegate
Calculates the additive inverse of the given scalar value.- Parameters:
scalar- the scalar to negate, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the additive inverse
-
cryptoCoreEd25519ScalarComplement
Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ed25519 group.- Parameters:
scalar- the scalar to complement- Returns:
- the complement
-
cryptoCoreEd25519ScalarComplement
Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ed25519 group.- Parameters:
scalarEnc- the encoded scalar to complement- Returns:
- the complement
-
cryptoCoreEd25519ScalarComplement
Calculates the result R for the given scalar value such thatR + scalar = 1 (mod L)withLbeing the order of the Ed25519 group.- Parameters:
scalar- the scalar to complement, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the complement
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar (encoded)- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar (encoded)- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar (encoded)- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar- Returns:
- the sum
-
cryptoCoreEd25519ScalarAdd
Adds two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the sum
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar (encoded)- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar (encoded)- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar (encoded)- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar- Returns:
- the difference
-
cryptoCoreEd25519ScalarSub
Subtracts two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the difference
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar (encoded)- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar (encoded)- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar (encoded)y- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar (encoded)- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalary- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar- Returns:
- the product
-
cryptoCoreEd25519ScalarMul
Multiplies two scalarsxandymoduloLwithLbeing the order of the Ed25519 group.- Parameters:
x- the first scalar, must beEd25519.ED25519_SCALAR_BYTESbytesy- the second scalar, must beEd25519.ED25519_SCALAR_BYTESbytes- Returns:
- the product
-