You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code that wants to verify signatures is required to both do error handling and return value checking when calling Signature.verify_msg due to the function returning a boolean and potentially raising a BadSignature in the event of a corrupt signature.
How can it be fixed?
The naive thing to do is have that method convert BadSignature to a False return but I think that is wrong since it conflates a corrupt signature with a signature that doesn't validate.
This probably needs to be split into a two part check so that the two concepts remain distinct, allowing the user to check if the signature itself is valid in isolation and then to check if it is a valid signature for a message.
The text was updated successfully, but these errors were encountered:
pacrob
pushed a commit
to pacrob/eth-keys
that referenced
this issue
Dec 20, 2023
What was wrong?
https://github.com/ethereum/trinity/pull/586/files#r287599483
Code that wants to verify signatures is required to both do error handling and return value checking when calling
Signature.verify_msg
due to the function returning a boolean and potentially raising aBadSignature
in the event of a corrupt signature.How can it be fixed?
The naive thing to do is have that method convert
BadSignature
to aFalse
return but I think that is wrong since it conflates a corrupt signature with a signature that doesn't validate.This probably needs to be split into a two part check so that the two concepts remain distinct, allowing the user to check if the signature itself is valid in isolation and then to check if it is a valid signature for a message.
The text was updated successfully, but these errors were encountered: