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);
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?
let agg_multisig = bls_signatures::aggregate(&vec![multisig_A, multisig_B]).unwrap();
instruction work as is?bls_signatures::verify_messages(&agg_multisig, &messages, &pub_keys)
, do we have to add several times the public key of signatory 2 inpub_keys
? Do we also have to put several times the message of signatory 2 inmessages
? Would the following work?