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

Prefixed signature support #48

Closed
generalpiston opened this issue Dec 3, 2018 · 5 comments
Closed

Prefixed signature support #48

generalpiston opened this issue Dec 3, 2018 · 5 comments
Labels

Comments

@generalpiston
Copy link

eth_sign: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign. Signatures derived from eth_sign should take on this form: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). Seems like something wallet providers should handle.

@ligi ligi added the question label Dec 3, 2018
@ligi
Copy link
Member

ligi commented Dec 3, 2018

can you elaborate a bit more what you propose?

@ligi
Copy link
Member

ligi commented Dec 28, 2018

closing this for now - please reopen with a more clear description what you have in mind here

@ligi ligi closed this as completed Dec 28, 2018
@generalpiston
Copy link
Author

I had to add it myself in https://github.com/sigillabs/mobidex/blob/3dcd0783c5743268d795a3d8e6f069ad0c229c7e/android/app/src/main/java/io/mobidex/WalletManagerModule.java#L397.

There are two ways that would work:

  1. Add the message to https://github.com/walleth/kethereum/blob/master/crypto/src/main/kotlin/org/kethereum/crypto/Sign.kt#L30 ?
  2. Add a new method ECKeyPair called signMessageWithPrefix?

Idea 2 seems to make the most sense to maintain backwards compatibility.

@ligi ligi mentioned this issue Dec 29, 2018
@ligi
Copy link
Member

ligi commented Dec 29, 2018

I think we should go with option 3 - add a new module with functions to support EIP191 - the function you want can be expressed with this. I do not think it should go into the crypto module - I opened #51 for this

@generalpiston
Copy link
Author

Perfect! Thank you!

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

No branches or pull requests

2 participants