supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
461 stars 176 forks source link

BLS m-n threshold signature support #123

Open franjoespejo opened 2 years ago

franjoespejo commented 2 years ago

Please see below the set of available operations for BLS at the moment:

BLS12-381 signature (sign, verify, aggregate)

The BLS scheme also supports threshold signatures. This is where a secret key is divided between n parties. For a predefined value of m≤n, if m of the parties sign a message then a single joint public key of all the parties can be used to verify the signature.

It would be very useful to have a new operation "recover" or "reconstruct" that builds a collective BLS signature. Supporting BLS threshold signature completes the BLS scheme. This seems to have been requested previously in https://github.com/supranational/blst/issues/50

For reference:

BLS threshold is implemented: https://github.com/herumi/bls#api-for-k-of-n-threshold-signature

Specifically the "recover" function can be found at: https://github.com/herumi/bls/blob/cf2b578f1c414fdcef74f1a01bc43991b4f5fd76/src/bls_c_impl.hpp#L602

dot-asm commented 2 years ago

Have you seen blsttc? Just in case, I haven't looked into it myself, so it's not like I'm saying that it will actually solve your problem.

mratsim commented 2 years ago

Additionally: https://github.com/status-im/nim-blscurve/blob/master/blscurve/blst/blst_recovery.nim

but unaudited.

mcdee commented 12 months ago

Looking to implement this feature in Go as it isn't supplied in blst itself, but the functions for field element creation and maths appear to be missing from the Go bindings. Are there any plans to either implement this natively in blst, and if not to expose the full set of blst functions in the Go bindings to allow others to do so?