Ed25519 class

Pure Dart implementation of Ed25519 elliptic curve.

Ed25519 is defined in RFC 8032 and is used by Solana, Polkadot, and other modern blockchains for digital signatures.

This implementation follows the specification exactly and passes all RFC 8032 test vectors.

Implemented types

Constructors

Ed25519()

Properties

curveName String
Gets the curve name.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
privateKeyLength int
Gets the expected private key length in bytes.
no setteroverride
publicKeyLength int
Gets the expected public key length in bytes.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signatureLength int
Gets the expected signature length in bytes.
no setteroverride

Methods

getPublicKey(Uint8List privateKey) Uint8List
Derives the public key from a private key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(Uint8List messageHash, Uint8List privateKey) Uint8List
Signs a message hash with the given private key.
override
toString() String
A string representation of this object.
inherited
verify(Uint8List signature, Uint8List messageHash, Uint8List publicKey) bool
Verifies a signature against a message hash and public key.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

derivePublicKey(Uint8List privateKey) Uint8List
Derives the Ed25519 public key from a 32-byte private key.
generateKeyPair() Ed25519KeyPair
Generates a new Ed25519 key pair.
isOnCurve(Uint8List bytes) bool
Checks if the provided point bytes lie on the Ed25519 curve.