HomePhabricator

[ecash-lib] Add `PkcAlgo` to verify common elliptic curve and RSA signatures

Description

[ecash-lib] Add PkcAlgo to verify common elliptic curve and RSA signatures

Summary:
This allows us to verify signatures of X509 certificates, which is important for BIP70.

We use the ring crate to verify signatures in WebAssembly. On GitHub, it says that it is "an experiment", but the crate has been around for 10 years and seems to be very widely used, and it also works very well with WASM.

Keys are generated with a bash script genkeys.sh via openssl to assert we stay compatible with it. Generated keys are committed in the repo to ease debugging and reproducibility, if needed.

This increases the bundle size of CashTab by 28.73kB after gzip, which is very reasonable.

Test Plan: npm test

Reviewers: Fabien, bytesofman, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Tue, May 20, 12:43
tobias_ruckPushed on Tue, May 20, 15:56
Reviewer
Restricted Project
Differential Revision
D18117: [ecash-lib] Add `PkcAlgo` to verify common elliptic curve and RSA signatures
Parents
rABC36ba9e85ab71: [electrum] remove mention of Trezor 1's custom firmware in release note
Branches
Unknown
Tags
Unknown