Ed25519Signer class
Unified Ed25519 signing service.
Provides Ed25519 key generation, signing, and verification. Used for IPNS record signatures and peer identity.
Security Features:
- Ed25519 (128-bit security level)
- Deterministic signatures (no random nonce)
- Memory zeroing for private keys
Example:
final signer = Ed25519Signer();
final keyPair = await signer.generateKeyPair();
final signature = await signer.sign(data, keyPair);
final isValid = await signer.verify(data, signature, keyPair.publicKey);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
extractPublicKey(
SimpleKeyPair keyPair) → Future< SimplePublicKey> - Extracts the public key from a key pair.
-
extractPublicKeyBytes(
SimpleKeyPair keyPair) → Future< Uint8List> - Extracts the public key bytes from a key pair.
-
extractSeed(
SimpleKeyPair keyPair) → Future< Uint8List> - Extracts the private key seed (32 bytes) from a key pair.
-
generateKeyPair(
{Uint8List? seed}) → Future< SimpleKeyPair> - Generates a new Ed25519 key pair.
-
keyPairFromSeed(
Uint8List seed) → Future< SimpleKeyPair> - Creates a key pair from a 32-byte seed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publicKeyFromBytes(
Uint8List bytes) → SimplePublicKey - Creates a public key from raw bytes.
-
sign(
Uint8List data, SimpleKeyPair keyPair) → Future< Uint8List> - Signs data using an Ed25519 private key.
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
Uint8List data, Uint8List signatureBytes, SimplePublicKey publicKey) → Future< bool> - Verifies an Ed25519 signature.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited