Schnorr Aggregated signature
The aggregated signature is based on the work in Compact Multi-Signatures for Smaller Blockchains section 5.1. This protocol is used to aggregate signatures of all counter parties.
Key generation
- each party generate a random x as private key
- public key is: Q=x⋅G
Public key aggregation
- aggregated public key hash ¯hQ=hash(Q1,Q2,⋯,Qn)
- aggregated public key ¯Q=∑ni=1(¯hQ⋅Qi)
Signing
Signing is an interactive three-round protocol. singer i behaves as follows:
[Round 1] generate r and R:
- Choose random ri, and compute Ri=ri⋅G
- Calc hRi=hash(Ri)
- Send hRi to all other singers corresponding to Q1,Q2,⋯,Qn and wait to receive hRj from all other signers j≠i
[Round 2] broadcast and check R:
- Send Ri to all other signers corresponding to Q1,Q2,⋯,Qn and wait to receive Rj from all other signers j≠i. Check that hRj=hash(Rj) for all j=1,2,⋯,n.
[Round 3] :
- Calc aggregated publick key ¯Q=∑ni=1(¯hQ⋅Qi), when multiple messages are signed with the same set of signers, ¯Q,¯hQ can be stored.
- Calc aggregated point R: ¯R=∑ni=1Ri
- Hash msg with public params: h=hash(¯R,¯Q,msg)
- Calc partial signature si=ri+h⋅xi⋅¯hQ
- Send si to all other signers and wait to receive sj from all others signers j≠i.
- Calc final signature s=∑ni=1si
- Output the final signature as (¯R,s)
Verification
- Hash msg with public params: h=hash(¯R,¯Q,msg)
- Check if: s⋅G−h⋅¯Q=¯R
The correctless proof
- s⋅G=(s1+s2+⋯+sn)⋅G=[∑ni=1(ri+h⋅xi⋅¯hQ)]⋅G
- h⋅¯Q=h⋅(¯hQ⋅Q1+¯hQ⋅Q2+⋯+¯hQ⋅Qn)=h¯hQx1G+h¯hQx2G+⋯+h¯hQxnG
- ∴lhs=(r1+r2+⋯+rn)G
- ∵¯R=R1+R2+⋯+Rn
- lhs=rhs
Rotate share
Assume we just have two party, then we can update the shares with equation
x′1=x1−rmodn
x′2=x2+rmodn