Skip to content

Yul based wrapper for ECDSA #244

@Vectorized

Description

@Vectorized

The OpenZeppelin library has a convenient wrapper over the ecrecover function to ensure that the signature is valid and non-malleable.

However, most of the time, users only need check whether the signature is valid, without throwing or getting error codes.

I'd suggest a Yul based wrapper that simply returns an address.
If the address doesn't match the signer, the signature is simply treated as invalid.

The implementation at #247 should save you about 700 gas over OpenZeppelin's version.

Let me know your opinions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions