Skip to content

Support Cosmos SDK secp256k1 signature verification #752

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 · 2 comments
Closed

Support Cosmos SDK secp256k1 signature verification #752

ethanfrey opened this issue Jan 27, 2021 · 2 comments

Comments

@ethanfrey
Copy link
Member

ethanfrey commented Jan 27, 2021

Part of #751
Requires #780

We start only focusing on the Api trait and basic testing. That means we will do the following in cosmwasm-std crate:

  • Add needed methods to Api trait
  • Implement them in MockApi importing portable crates
  • Implement them in ExternalApi via panic!("not yet implemented")
  • Add a test contract with unit tests that call this MockApi to show full stack test (no integration tests yet)
  • Add test vectors - directly on MockApi

Add a method that verifies a public key and signature in the format used by the cosmos-sdk (uncompressed).

@webmaster128
Copy link
Member

This needs #780 plus contract side pre-hashing (sha256).

@webmaster128 webmaster128 added this to the 0.14.0 milestone Feb 9, 2021
@webmaster128 webmaster128 changed the title Implement MockApi.verify_secp256k1 for cosmos signatures Support Cosmos SDK secp256k1 signature verification Feb 9, 2021
@webmaster128
Copy link
Member

This is done and demonstrated in https://github.com/CosmWasm/cosmwasm/tree/main/contracts/crypto-verify. Encoding the Cosmos SDK transaction to sign bytes is left to the contract developer.

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

No branches or pull requests

2 participants