HomePhabricator

[ecash-secp256k1] Add `ecash-secp256k1`, use in `ecash-lib-wasm`

Description

[ecash-secp256k1] Add ecash-secp256k1, use in ecash-lib-wasm

Summary:
This is a follow-up to D16953, where we port the remaining code from rust-secp256k1.

The code again is largely kept unchanged, however we remove all the "ElligatorSwift" related code, as our secp256k1 library doesn't support this at all (and I also have no clue what that even is).

Other than that, is it mostly only reformatting everything with our formatting rules.

Also, we add support for our own Schnorr signatures (via "schnorrabc"), and add custom tests, partially inspired by the remainder of the library.

The tests are the same as for ecash-secp256k1-sys, we just introduce a lot more feature flags that are tested in a matrix. The result is that despite the library compiling in just a few seconds, the full CI now takes multiple minutes. This is fine though, because in return we get a similar level of stability as the original repository.

In the future, we can port more of the CI, e.g. building it on nightly, running the benchmarks, as well as the no_std tests.

Depends on D16953 and D16958.

Test Plan: ./modules/ecash-secp256k1/contrib/test.sh

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16956

Details

Provenance
tobias_ruckAuthored on Tue, Oct 22, 19:51
tobias_ruckPushed on Thu, Oct 24, 08:23
Reviewer
Restricted Project
Differential Revision
D16956: [ecash-secp256k1] Add `ecash-secp256k1`, use in `ecash-lib-wasm`
Parents
rABC77bc58465ccc: [ecash-agora] Catch up changelog for next published version
Branches
Unknown
Tags
Unknown