Class Ed25519
java.lang.Object
net.sourceforge.plantuml.licensing.Ed25519
Minimal Ed25519 in pure Java.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Ed25519.KeyPair
Generates a pair (private seed 32 bytes, public key 32 bytes).static byte[]
publicKeyFromSeed
(byte[] seed32) Derives the public key (32 bytes) from a private seed (32 bytes).static byte[]
sign
(byte[] seed32, byte[] message) Signs a message with a private seed (32 bytes).static boolean
verify
(byte[] publicKey32, byte[] message, byte[] signature64) Verifies a 64-byte signature on a message using a 32-byte public key.
-
Method Details
-
generateKeyPair
Generates a pair (private seed 32 bytes, public key 32 bytes). -
publicKeyFromSeed
public static byte[] publicKeyFromSeed(byte[] seed32) Derives the public key (32 bytes) from a private seed (32 bytes). -
sign
public static byte[] sign(byte[] seed32, byte[] message) Signs a message with a private seed (32 bytes). Returns a 64-byte signature (R||S). The public key encoder is implicitly the one derived from the seed. -
verify
public static boolean verify(byte[] publicKey32, byte[] message, byte[] signature64) Verifies a 64-byte signature on a message using a 32-byte public key.
-