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

Unable to recover signature from Solidity #34

Closed
mtomov opened this issue Sep 26, 2018 · 3 comments
Closed

Unable to recover signature from Solidity #34

mtomov opened this issue Sep 26, 2018 · 3 comments

Comments

@mtomov
Copy link

mtomov commented Sep 26, 2018

Hello,

Thanks for the helpful library, and especially the latest personal_sign addition to it.

I've been trying to sign a message with personal_sign and then verify the signature from Solidity with an ECVerify library. However, the signature appears to be invalid from Solidity.

If I use this tool: https://etherscan.io/verifiedSignatures to verify the signature, it appears to be correct.

Comparing to a signature generated with the JavaScript libraries, the one generated from #sign or #personal_sign appears to be different every time. How is that expected as the JS generated signature is always the same for the same message and private key?

Is there something obvious that am I missing?

Thank you!

@se3000
Copy link
Owner

se3000 commented Oct 10, 2018

I think the question about why you get a different signature is covered in #1 (comment). Short answer is this gem does not use libsecp256k1 or anything derived from it for signatures.

As for why it doesn't work with the ECVerify library, that seems to be specific to that library. The signatures generated by this gem are valid and submitted to the blockchain regularly. I would first try to get it working with regular sign and then move to the prefixed personal_sign.

@se3000 se3000 closed this as completed Jul 1, 2019
@se3000
Copy link
Owner

se3000 commented Jul 1, 2019

Feel free to reopen, but assuming by the thumbs up that you're good.

@rstormsf
Copy link

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

3 participants