indutny / elliptic

Fast Elliptic Curve Cryptography in plain javascript
1.66k stars 359 forks source link

Remove all dependencies, improve security #289

Open paulmillr opened 1 year ago

paulmillr commented 1 year ago

https://github.com/indutny/elliptic/blob/43ac7f230069bd1575e1e4a58394a512303ba803/package.json#L47-L55

I suggest to switch to developed and audited projects:

  1. This solution is much faster than current elliptic impl.
  2. Elliptic is 130KB of minified code right now, which is huge. It can be tiny, a fraction of that.
thibauld commented 1 year ago

I fully second what @paulmillr just suggested.

Except that I would also suggest to remove minimalistic-assert and minimalistic-crypto-utils from the dependencies too. Those packages are respectively 10 and 58 lines of code who haven't been updated for 4 and 6 years, just copy them in code's project. No need to add a dependency to an external package for that :) This would definitely reduce the attack surface for a supply chain attack.

mbrunt commented 1 year ago

I was wondering how long it was going to take for someone to notice brorand. I might code that change up and submit a pull request.