web-monetization-projects icon indicating copy to clipboard operation
web-monetization-projects copied to clipboard

Port privacypass to noble-curves

Open sublimator opened this issue 4 years ago • 3 comments

  • [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

sublimator avatar May 13 '20 09:05 sublimator

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

sublimator avatar Jul 16 '20 04:07 sublimator

Alternatively, we could create our own ECC lib using BigInt as per: https://github.com/paulmillr/noble-secp256k1/

sublimator avatar Aug 29 '20 08:08 sublimator

https://github.com/paulmillr/noble-curves

Has P256 support

sublimator avatar Apr 12 '23 07:04 sublimator