EdDSASig
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
Name | Type | Description |
---|---|---|
operator | address | The address of the operator that owns the key |
key_ | bytes memory | The public key to verify against |
signature | bytes memory | The Ed25519 signature to verify |
Returns
Name | Type | Description |
---|---|---|
bool | True 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
Name | Type | Description |
---|---|---|
message | bytes memory | The message that was signed |
signature | bytes memory | The Ed25519 signature to verify |
key | bytes32 | The Ed25519 public key compressed to 32 bytes |
Returns
Name | Type | Description |
---|---|---|
bool | True if the signature is valid, false otherwise |