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

Idea: Add support for Ethereum signatures in Permits #960

Open
Cashmaney opened this issue Jul 13, 2022 · 2 comments
Open

Idea: Add support for Ethereum signatures in Permits #960

Cashmaney opened this issue Jul 13, 2022 · 2 comments

Comments

@Cashmaney
Copy link
Member

Adding this here rather than the secret toolkit repo, though it would probably be more fitting there -

Would be interesting to be able to validate Ethereum EIP-712 signed messages as permits. This could allow contracts to give Ethereum/EVM users the option to view private data, which can be useful in applications such as private messaging, NFT ownership, lotteries, etc.
For example, the Killroy Was Here mint could allow users to supply an Ethereum viewer address - that way they could view the movie without actually having a Secret address (or even installing Keplr), and if at a later stage they wanted to associate the NFT with an address on Secret to be able to sell/transfer it, the Ethereum permit could be supplied to the contract for ownership proof.

Since we already have secp256k1 signature validation as an API performance should be good (though RLP encoding/sha3 might not be super great - todo maybe we'll want to add sha3/keccak to the api for futureproofing).

Working with eth signatures is a bitch and a half, but with some tinkering this could be really interesting - thoughts?

@assafmo
Copy link
Member

assafmo commented Jul 13, 2022

maybe we'll want to add sha3/keccak to the api for futureproofing

Yeah I've been wanting to add sha256 too

@assafmo
Copy link
Member

assafmo commented Jul 18, 2023

Shade are doing this in their permit verification contract. Ref: securesecrets/query-authentication#9

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

2 participants