Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We needed to modify your repo to support the SECP256K1 curve, so we forked it and did so. The reason we needed to do this was so that we could verify a digital signature created using the Avalanche cryptocurrency platform's X Chain, in Solidity. If you are not familiar with Avalanche yet, it has three chains, called X, P, and C. The C, or "Contract" chain uses an exact clone of the EVM and thus can run any code that can be run in Ethereum. The X Chain uses cryptography more like bitcoin does, so its digital signatures are different from Ethereum's and cannot just be verified using the EVM's built-in function ecrecover. That's a quick overview. For more information, see this tutorial that we wrote here: https://github.com/red-dev-inc/sig-verify-tutorial.
Quick disclaimer, we are not cryptographers--just software devs who are end-users of cryptographic tools--so please do look this code over carefully before you include it in your project. We have included test scripts which you can run, similar to the test scripts you already have.