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.
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.