web-monetization-projects
web-monetization-projects copied to clipboard
Port privacypass to noble-curves
- [x] Extract sjcl code to new lib @coil/privacypass-sjcl
- [x] Make code not depend on browser globals (fetch/atob/btoa etc)
- [ ] Create test fixtures for @coil/privacypass-sjcl
- [ ] Solve operations on p256 curve 4x slower than secp256k1 for elliptic
Following up on this. Discovered that elliptic is only faster than sjcl for secp256k1 curve. In fact, elliptic is MUCH slower than sjcl for p256. So there's not much point to this.
We could move the server to use secp256k1
Alternatively, we could create our own ECC lib using BigInt as per: https://github.com/paulmillr/noble-secp256k1/
https://github.com/paulmillr/noble-curves
Has P256 support