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

Support Secp256r1 signature verification #1058

Closed
pluscubed opened this issue Aug 24, 2021 · 8 comments
Closed

Support Secp256r1 signature verification #1058

pluscubed opened this issue Aug 24, 2021 · 8 comments
Milestone

Comments

@pluscubed
Copy link

Following up on a "Bonus Point" in #751, it'd be great to have Secp256r1 signature verification.

This would allow iOS/Android hardware-backed signatures, e.g. for smart contract wallets. (Similar: cosmos/cosmos-sdk#7718)

@webmaster128
Copy link
Member

This would be doable. What do you need it for? We are curious about the use case and priority.

@webmaster128
Copy link
Member

@reuvenpo do you have any opinion on this? You asked for Secp256r1 recently in a different context.

@reuvenpo
Copy link
Contributor

reuvenpo commented Sep 1, 2021

I was asking about it because I thought Cosmos were adding support for it on the client side, so I thought that I'd need to support it on the Secret Network's enclave side. But since that's not the case, I do not have any use for secp256r1 in any context.

@assafmo
Copy link
Contributor

assafmo commented Sep 1, 2021

For the record, I don't think it's a good design choice to put these functions in the final VM API. I think it should be in cw-plus and I'm sure there is a way to eliminate all the bloat that comes with it by default in order to minimize binary size.

@maurolacy
Copy link
Contributor

maurolacy commented Sep 1, 2021

For the record, I don't think it's a good design choice to put these functions in the final VM API. I think it should be in cw-plus and I'm sure there is a way to eliminate all the bloat that comes with it by default in order to minimize binary size.

@webmaster128 can probably answer this better than me, but I think it's not so much an issue of module size (though that's relevant, too), but performance (gas usage).

By putting the crypto stuff in the VM, it compiles to native code instead of wasm, with a significant performance improvement.

Given that cryptographic primitives are usually computationally intensive, this makes particular sense here.

@webmaster128
Copy link
Member

This request is resonable but out of scope for 1.0.0. A draft implementation is developed in #1083. It can be added to a running chain later on via a new feature flag in a non-breaking way.

@webmaster128
Copy link
Member

webmaster128 commented Sep 26, 2023

This seems to become more important recently for account abstraction. I put this on the agenda for after CosmWasm 2.0.

@webmaster128
Copy link
Member

See follow-up ticket #2001 for everything you need to know about secp256r1 support.

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

Successfully merging a pull request may close this issue.

5 participants