Provide verify variants of the recover functions - Crypto Utilities
#1807
Replies: 1 comment
-
|
Providing both verify and recover were considered when the ecdsa curves were added to soroban, and the reasoning for why only recovery was shipped is below. Text below is extracted from @kwantam's message, emphasis is mine.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What problem does your feature solve?
Using the
recoverfunction instead ofverifyvariant for verifying the signatures may breed vulnerabilities due to signature malleability. For example, secp256k1 curve allows also the negative version (svs-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
verifyvariant of therecoverfunction, which follows the canonical format to ensure accepting onlysbut not-s, it would be more secure.What alternatives are there?
I don't know...
Beta Was this translation helpful? Give feedback.
All reactions