Skip to content

Support Ethereum secp256k1 signature verification #753

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

Closed
ethanfrey opened this issue Jan 27, 2021 · 3 comments · Fixed by #797
Closed

Support Ethereum secp256k1 signature verification #753

ethanfrey opened this issue Jan 27, 2021 · 3 comments · Fixed by #797

Comments

@ethanfrey
Copy link
Member

ethanfrey commented Jan 27, 2021

Part of #751
Requires #780
Follow the same steps as in #752

Add a method that verifies a public key and signature in the format used by ethereum (compressed pubkey, RLP encoded signature). This can either be a separate verify_secp256k1_eth() method or provide a function to convert this into the same format used by cosmos and then verify it.

Note there is some pubkey recovery stuff going on with ethereum signatures: https://ethereum.stackexchange.com/questions/64380/understanding-ethereum-signatures

@webmaster128 webmaster128 changed the title Implement MockApi verification for ethereum signatures (secp256k1) Support Ethereum secp256k1 signature verification Feb 9, 2021
@webmaster128
Copy link
Member

webmaster128 commented Feb 9, 2021

This needs

@webmaster128 webmaster128 added this to the 0.14.0 milestone Feb 9, 2021
@webmaster128
Copy link
Member

In #765 you find a full example how a contract can verify signed text. Extening this to transactions is now an exercise for the reader. You need DER decoding and RLP encoding in the contract.

@ethanfrey
Copy link
Member Author

Very nice, that looks like a good design in #765 and the parsing of the message bytes should totally be left up to the contract

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

Successfully merging a pull request may close this issue.

2 participants