Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support isValidSignature(bytes, bytes) #2

Open
schmanu opened this issue Jan 13, 2023 · 3 comments
Open

Support isValidSignature(bytes, bytes) #2

schmanu opened this issue Jan 13, 2023 · 3 comments

Comments

@schmanu
Copy link

schmanu commented Jan 13, 2023

Some smart contract wallets including Safe use isValidSignature(bytes, bytes) instead of isValidSignature(bytes32, bytes).

For those this signature validator will not work as the magic value results in 0x20c13b0b instead of 0x1626ba7e

@Ivshti
Copy link
Member

Ivshti commented Jan 13, 2023

@schmanu the EIP was updated to use bytes32, bytes and that's it's latest version AFAIK?

Also, using bytes as input presumes that the function would take input that isn't the final digest, but might not be compatible with different schemes (eg with prefix vs without prefix, in other words hash(ethereum signed message+hash(input)) vs hash(input)). Unless it is used for the final digest.

Anyway, we have nothing against implementing this, I'm just curious what the rationale is. Furthermore whether the input is the final digest affects the implementation

@schmanu
Copy link
Author

schmanu commented Jan 16, 2023

Hey @Ivshti, at the time the isValidSignaturecall was implemented in the safe-contracts the standard was still isValidSignature(bytes, bytes). That's why it is implemented in this way.

@Ivshti
Copy link
Member

Ivshti commented Feb 2, 2023

@schmanu can you give me an example of how it's used? are the first bytes the input to keccak256? Or is prefixing also done (Ethereum signed message)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants