Skip to content

Provide verify variants of the recover functions - Crypto Utilities #1806

@ozgunozerk

Description

@ozgunozerk

What problem does your feature solve?

Using the recover function instead of verify variant for verifying the signatures may breed vulnerabilities due to signature malleability. For example, secp256k1 curve allows also the negative version (s vs -s) due to the underlying elliptic curve math.

This does not pose a great security threat for our library as of yet (OpenZeppelin Stellar Contracts), but it is definitely a good to have, or maybe even, a must have.

What would you like to see?

If there is a verify variant of the recover function, which follows the canonical format to ensure accepting only s but not -s, it would be more secure.

What alternatives are there?

I don't know...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions