Class Ed25519
java.lang.Object
com.frostwire.jlibtorrent.Ed25519
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]addScalarPublic(byte[] publicKey, byte[] scalar) static byte[]addScalarSecret(byte[] secretKey, byte[] scalar) static Pair<byte[], byte[]> createKeypair(byte[] seed) static byte[]byte[]keyExchange(byte[] publicKey, byte[] secretKey) static byte[]sign(byte[] message, byte[] publicKey, byte[] secretKey) static booleanverify(byte[] signature, byte[] message, byte[] publicKey)
-
Field Details
-
SEED_SIZE
public static final int SEED_SIZE- See Also:
-
PUBLIC_KEY_SIZE
public static final int PUBLIC_KEY_SIZE- See Also:
-
SECRET_KEY_SIZE
public static final int SECRET_KEY_SIZE- See Also:
-
SIGNATURE_SIZE
public static final int SIGNATURE_SIZE- See Also:
-
SCALAR_SIZE
public static final int SCALAR_SIZE- See Also:
-
SHARED_SECRET_SIZE
public static final int SHARED_SECRET_SIZE- See Also:
-
-
Method Details
-
createSeed
public static byte[] createSeed() -
createKeypair
-
sign
public static byte[] sign(byte[] message, byte[] publicKey, byte[] secretKey) -
verify
public static boolean verify(byte[] signature, byte[] message, byte[] publicKey) -
addScalarPublic
public static byte[] addScalarPublic(byte[] publicKey, byte[] scalar) -
addScalarSecret
public static byte[] addScalarSecret(byte[] secretKey, byte[] scalar) -
keyExchange
public byte[] keyExchange(byte[] publicKey, byte[] secretKey)
-