Initializes a new instance, deriving necessary cryptographic parameters from the provided private key. If the private key is not passed as a parameter, a random 32-byte hexadecimal key is generated.
The private key must be an instance of Buffer, Uint8Array or a string. The input will be used to generate entropy and there is no limit in size. The string is used as a set of raw bytes (in UTF-8) and is typically used to pass passwords or secret messages. If you want to pass a bigint, a number or a hexadecimal, be sure to convert them to one of the supported types first. The 'conversions' module in @zk-kit/utils provides a set of functions that may be useful in case you need to convert types.
The private key used for signing and public key derivation.
Signs a given message using the private key and returns the signature.
The message to be signed.
The signature of the message.
Verifies a signature against a message and the public key stored in this instance.
The message whose signature is to be verified.
The signature to be verified.
True if the signature is valid for the message and public key, false otherwise.
Represents a cryptographic entity capable of signing messages and verifying signatures using the EdDSA scheme with Poseidon hash and the Baby Jubjub elliptic curve.