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

Check arguments passed to secp256k1 methods #94

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Conversation

sstone
Copy link
Member

@sstone sstone commented Dec 13, 2023

Illegal arguments will trigger an internal callback that prints to stderr and calls abort.
We already check arguments in our JNI and kotlin native code but had missed 2 checks (recid in ecdsaRecover, empty arrays in pubkeyCombine).
This is the best we can do at the moment, implement native callbacks is not a good option unless we change how our native secp256k1 context is managed.

Illegal arguments will trigger an internal callback that prints to stderr and calls abort.
We already check arguments in our JNI and kotlin native code but had missed 2 checks (recid in ecdsaRecover, empty arrays in pubkeyCombine).
@sstone sstone linked an issue Dec 13, 2023 that may be closed by this pull request
@sstone sstone requested a review from t-bast December 13, 2023 10:37
The native code was missing checks on the "tweak" size (which must be 32 bytes)
@sstone sstone merged commit f242b4f into master Dec 13, 2023
3 checks passed
@sstone sstone deleted the check-arguments branch December 13, 2023 12:42
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 this pull request may close these issues.

ecdsaRecover crashes when call with an invalid recovery id
2 participants