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

Recover Public Key from Signature for Secp256k1 #3628

Open
mialbu opened this issue Dec 16, 2024 · 3 comments · May be fixed by #3633
Open

Recover Public Key from Signature for Secp256k1 #3628

mialbu opened this issue Dec 16, 2024 · 3 comments · May be fixed by #3633
Assignees
Labels
Discussion Initial issue state - proposed but not yet accepted
Milestone

Comments

@mialbu
Copy link

mialbu commented Dec 16, 2024

Summary
There should be a native function that allows to recover the signing address from a signature and a message (secp256k1 curve). Other chains are working with addresses instead of public keys which makes it impossible to replicate and verify such a signature based on the values available; additional information (public key) would be needed to do that.

Do you have any solution you want to propose?
The native smart contract CryptoLib should be extended with a function similar to byte[] ecrecover(byte[] message, Hasher hasher, byte[] signature) to allow recovering public keys for the secp256k1 curve.

Where in the software does this update applies to?
The native CryptoLib smart contract.

@mialbu mialbu added the Discussion Initial issue state - proposed but not yet accepted label Dec 16, 2024
@shargon
Copy link
Member

shargon commented Dec 16, 2024

Scopes has already the scriptHash, you can already know it if the transaction is signed, do you think that is required?

@Jim8y
Copy link
Contributor

Jim8y commented Dec 17, 2024

Scopes has already the scriptHash, you can already know it if the transaction is signed, do you think that is required?

Its might be contract params and verified in contract.

@Jim8y Jim8y added this to the v3.8.0 milestone Dec 17, 2024
@Jim8y
Copy link
Contributor

Jim8y commented Dec 17, 2024

Maybe you can implement it if you think it should/can be added @shargon

@shargon shargon linked a pull request Dec 18, 2024 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants