Simple web-based tool for BLS keys

There doesn’t seem to be much likelihood of threshold_crypto becoming compatible with other bls implementations such as ethereum, zcash, chia, algorand etc.

https://github.com/poanetwork/threshold_crypto/issues/110#issuecomment-808743875

I agree it would be good to make it compatible. Not sure if anyone is working on this repository right now, though.

There are several people I could see being able to implement the necessary changes to become compatible, maybe with funding it might be possible to get them to submit pull requests, I’m not sure, but I also don’t think it’s necessarily needed or desired.

But, for now, I’ve made threshold_crypto compatible to the degree I feel necessary with the repo blsttc - "poanetwork/threshold_crypto using supranational/blst for sign+verify "

Of interest is commit 27c64dc - Use BLST for sign and verify

This allows us to keep the existing api of threshold_crypto (no code changes to sn_* code) but get the performance and standardization benefits of blst.

Why use blsttc?

  • faster, around 2x to 12x faster to sign and verify than threshold_crypto (see this bls performance post)
  • based on a standardized implementation, so the inputs and outputs can be used with many other libraries, hardware devices, tooling etc where threshold_crypto would not.
  • compiles with musl

Why not use blsttc?

  • uses unsafe a lot (73 instances in lib.rs), may or may not be a problem in real life.
  • comes with caveats, eg from the blst readme
    • The library deliberately abstains from dealing with memory management and multi-threading, with the rationale that these ultimately belong in language-specific bindings.
    • Another responsibility that is left to application is random number generation.
    • The essential point to note is that it’s the caller’s responsibility to ensure that public keys are group-checked with blst_p1_affine_in_g1
  • State of audit / security is not as clear as threshold_crypto
    • blst: “Formal verification of this library is planned and will utilize Cryptol and Coq to verify field, curve, and bulk signature operations.”
    • threshold_crypto: “An official security audit has been completed on threshold_crypto by Jean-Philippe Aumasson.”

I have no expectation of blsttc being used but I personally find it useful so maybe others will too.

8 Likes