feat(crypto): add support for Schnorr crypto (eCash variant) #4559
+524
−0
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.
Support Schnorr signature and verification defined in https://github.com/Bitcoin-ABC/bitcoin-abc/tree/master/doc/standards/schnorr.md.
The implementation is based on https://github.com/Bitcoin-ABC/secp256k1 as well as the test vectors.
This is a revival of #1509 that was reverted due to not being used after #1591 was rejected. The only difference is that the source files are now located in a ecash/ folder to avoid confusion with BIP340 Schnorr signatures, and a USE_ECASH flag makes it possible to disable the feature to save space.
Now that eCash is supported on Trezor, supporting this signature scheme would be very useful for eCash users.
It can be leveraged to add avalanche stake signature using the Trezor devices.