Skip to main content

EdDSASig

Git Source

EdDSASig

Contract for verifying EdDSA signatures over Ed25519 against operator keys

Implements SigManager interface using EdDSA signature verification

Methods

_verifyKeySignature

function _verifyKeySignature(
address operator,
bytes memory key_,
bytes memory signature
) internal override returns (bool)

Verifies that a signature was created by the owner of a key

The signature must be 64 bytes containing r and s components encoded as uint256

The key must be a valid Ed25519 public key point compressed to 32 bytes

Parameters

NameTypeDescription
operatoraddressThe address of the operator that owns the key
key_bytes memoryThe public key to verify against
signaturebytes memoryThe Ed25519 signature to verify

Returns

NameTypeDescription
boolTrue if the signature was created by the key owner, false otherwise

verify

function verify(bytes memory message, bytes memory signature, bytes32 key) public returns (bool) 

Verifies an Ed25519 signature against a message and public key

Wrapper around Ed25519.verify which handles decompression and curve operations

Parameters

NameTypeDescription
messagebytes memoryThe message that was signed
signaturebytes memoryThe Ed25519 signature to verify
keybytes32The Ed25519 public key compressed to 32 bytes

Returns

NameTypeDescription
boolTrue if the signature is valid, false otherwise