An Ed25519 signature.
Fields
r: [Curve.encoded_length]u8,
The R component of an EdDSA signature.
s: CompressedScalar,
The S component of an EdDSA signature.
Functions
fn fromBytes(bytes: [encoded_length]u8) Signature
Create a signature from a raw encoding of (r, s). EdDSA always assumes little-e…
Create a signature from a raw encoding of (r, s). EdDSA always assumes little-endian.
fn toBytes(self: Signature) [encoded_length]u8
Return the raw signature (r, s) in little-endian format.
fn verifier(self: Signature, public_key: PublicKey) NonCanonicalError || EncodingError || IdentityElementError!Verifier
Create a Verifier for incremental verification of a signature.
fn verify(self: Signature, msg: []const u8, public_key: PublicKey) IdentityElementError || NonCanonicalError || SignatureVerificationError || EncodingError || WeakPublicKeyError!void
Verify the signature against a message and public key. Return IdentityElement o…
Verify the signature against a message and public key. Return IdentityElement or NonCanonical if the public key or signature are not in the expected range, or SignatureVerificationError if the signature is invalid for the given message and key.