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

Sign message & verify signed message are not working properly #78

Open
MonarthS opened this issue May 15, 2020 · 1 comment
Open

Sign message & verify signed message are not working properly #78

MonarthS opened this issue May 15, 2020 · 1 comment

Comments

@MonarthS
Copy link

Detailed Description

I was trying to sign message using api:

http://localhost:8200/v1/ethereum/accounts/myacc1/sign

got sign data:

"data": {
        "address": "0x6766f3cfd606e1e428747d3364bae65b6f914d56",
        "signature": "0x0c45d788a91cfee5b46c4bfaa00c89b32fe249380b8858807e1c02256486ac9c518c5f4feb2b0a504e37354f3912b00f5a73aa581d757fb225130165d030a0b400"
}

But when I signed same message using web3 getting different signature:

0x34b6d5a2b99234b1e5cc36e0bf0aeb0fa5d667773458c2ac293f74a213a399ed12be94bfc07a1eadc4008ce6e788ab625423c9d13ca3c5a785e7c8874b6080fc1b

also when I try to verify:

http://localhost:8200/v1/ethereum/accounts/myacc1/verify

Its giving me error:

image

Context

Generated signature should be same as web3 & verify methods should work.

Your Environment

OS=Ubuntu 18.04
PLUGIN_VERSION="0.2.11"
VAULT_VERSION="1.0.3"

@MonarthS
Copy link
Author

Solve signature problem by adding \x19Ethereum Signed Message:\n as prefix of message.

@cypherhat can you please check this?

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

1 participant