lightnion
lightnion copied to clipboard
Migrate away from BigInteger.js to either BigInt or JSBI polyfill
We have #16 scheduled to be merged that introduce consensus signature verification, and thus a need to do some nice RSA ourselves. This requires to handle big integers in Javascript, a feature exposed through the BigInt
API... only available to few browsers and not even supported (yet) by Firefox. We thus need a third-party provided polyfill.
The current one in use by #16 is BigInteger.js
, seems to be well maintained and even though by its author for some cryptographic applications.
However, I think it'll be sensible at some point to migrate away from this library to either use a native BigInt
-based implementation… but as it may take some time to be widely supported, I'll recommend the GoogleChromeLabs polyfill (or jsbi
) that is purposely written to ease the migration towards BigInt
.
Note that this also can provide a more stable third-party to rely upon until we can avoid using one.