-
Notifications
You must be signed in to change notification settings - Fork 52
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
Big Issue when recovering a signature of a hashed message #42
Comments
Quick fix is in js code and not in php end if finally got it working here is my script:
Explaination: |
I'm getting the same issue as soon as the provider is not MetaMask (e.g. WalletConnect) With
or without
In all cases the PHP code returns false if it is not a MetaMask address at I'm using a fork of this https://github.com/giekaton/php-metamask-user-login to establish a login with WalletConnect |
I managed to fix the issue which was actually on the back-end (verifySignature). Solution:Include php-ecrecover in your project This needs the following version of CryptoCurrencyPHP (I did not tested the HEAD one) Simply replace
The You might need to allow gmp extension in php.ini if not done |
I am trying to verify the signature of a hashed message, and the method used in the description doesn't return the right address :
the address returned by verifySignature (that we try to compare to the original address) is
0xad21644cb255d77dbf4b1ab716cca9797ce3e5bb
which is different than the original address.The problem here is that when not signing the hashed message but the original message it works correctly.
the original message is : "It'sMe MArio". (without the quotes) and the hashing is done by sha3 :
web3.utils.sha3(message)
The text was updated successfully, but these errors were encountered: