Closed Raycoms closed 4 years ago
Short comment: It is very confusing that some methods return 0 and some methods return 1 on success. This could be more consistent.
I use the following rules:
Any idea on the random result?
So, I have to generate k keys and then generate n keys from those k keys that will be distributed to all processes and will be used for signing? And the first one of the k keys in the array is the actual master key I can use for verification?
And if blsSignatureRecover(&sig, &signatureVec[1], &idVec[1], K) and if this here works, then does that means we got K correct signatures?
BLS_DLL_API int blsSecretKeyShare(blsSecretKey sec, const blsSecretKey msk, mclSize k, const blsId *id);
Should probably then be called blsSecretKeyVec so that users know what they're dealing with
And if blsSignatureRecover(&sig, &signatureVec[1], &idVec[1], K) and if this here works, then does that means we got K correct signatures?
Or do I have to do this 1..k times?
I've updated k_of_nSample. Please see it.
Thanks, that was helpful
Short followup question: // The master signature can be recovered from any K subset of N sigs.
It says this here, but no where actually the master signature is recovered. (I need to send this master signature to the other processes as a proof)
It says this here, but no where actually the master signature is recovered. (I need to send this master signature to the other processes as a proof)
https://github.com/herumi/bls/blob/master/sample/minsample.c#L84
This shows that the recoverd signature is valid for the master public key mpk
.
You can check all the recoverd signatures are the same for any K subset.
So I wrote this little program to create a threshold signature and verify it. The problem is that on random occasions verify spits out 1 and 0.
I also extended this further to check if it works down to the threshold and the same applies.