supranational have a bls implementation with rust wrappers, it’s “a BLS12-381 signature library focused on performance and security. It is written in C and assembly.”
I added this to the benchmarks (commit d71b596), it’s fast.
(TC is threshold_crypto currently used by sn_node etc, BLST is supranational blst crate)
Test | TC | BLST | TC/BLST |
---|---|---|---|
Sign 32 bytes (µs) | 2379.36 | 192.81 | 12.34 |
Sign 1 MiB (µs) | 5934.10 | 2736.71 | 2.17 |
Verify 32 bytes sig (µs) | 6235.49 | 846.80 | 7.36 |
Verify 1 MiB sig (µs) | 9937.81 | 3471.24 | 2.86 |
Signing small messages blst was about 12x faster than threshold_crypto
Verifying small messages blst was about 7x faster than threshold_crypto
Signing and verifying large messages blst was about 2-3x faster than threshold_crypto
There are two modes for blst, one for minimal-pubkey-size
operations and one for minimal-signature-size
operations. This test was done with minimal-signature-size operations, although I did test with minimal-pubkey-size operations and it was a little slower but still much faster than threshold_crypto.
Be aware this is a very basic test and group multisig operations haven’t been tested, but on the first impression it seems pretty fast.