bls-signatures icon indicating copy to clipboard operation
bls-signatures copied to clipboard

How to aggregate two overlapping multi-signatures ?

Open TimotheAlbouy opened this issue 2 years ago • 1 comments

Hello,

I want to merge two multi-signatures whose sets of signatories intersect.

For instance, we have two sets of signatories $A = \{s_1, s_2\}$ and $B = \{s_2, s_3\}$, which respectively produced multi-signatures $\sigma_A$ and $\sigma_B$.

According to this Crypto Stack Exchange post, these two multi-signatures can be merged if we use the aggregated public key $pk = pk_1 + 2 pk_2 + pk_3$.

But how would this translate into code?

  • Would the let agg_multisig = bls_signatures::aggregate(&vec![multisig_A, multisig_B]).unwrap(); instruction work as is?
  • When calling bls_signatures::verify_messages(&agg_multisig, &messages, &pub_keys), do we have to add several times the public key of signatory 2 in pub_keys? Do we also have to put several times the message of signatory 2 in messages? Would the following work?
let pub_keys = vec![pub_key_1, pub_key_2, pub_key_2, pub_key_3];
let messages = vec![message_1, message_2, message_3];
let valid = bls_signatures::verify(&agg_multisig, &messages, &pub_keys);

TimotheAlbouy avatar Sep 30 '22 14:09 TimotheAlbouy

UPDATE: the final code does not yield valid = true. Does this mean that this crate does not allow to merge 2 overlapping multi-signatures?

TimotheAlbouy avatar Oct 07 '22 13:10 TimotheAlbouy