Skip to content

Initializer

init(curve:)

Generates a new EdDSAKey instance with both public and private key components.
init(curve: EdDSACurve = .ed25519) throws

Parameters

curve

The curve to be used for key generation.

Return Value

A new EdDSA.PrivateKey instance with a freshly generated key pair.

Discussion

This method generates a new key pair suitable for signing and verifying signatures. The generated keys use the specified curve, currently limited to Curve/ed25519.

Throws

An error if key generation fails.