You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Create three functions createAggSig, verifyAggSig and verifyWeightedAggSig as stated in the LIP in lisk-cryptography
createAggSig(keysList, pubKeySignaturePairs):
aggregationBits = byte string of length ceil(length(keyList)/8) with all bytes set to 0
signatures = []
for pair in pubKeySignaturePairs:
signatures.append(pair.sig)
index = keysList.index(pair.pubkey)
set bit at position index to 1 in aggregationBits
signature = Aggregate(signatures)
return (aggregationBits, signature)
verifyAggSig(keysList, aggregationBits, signature, tag, networkIdentifier, message):
taggedMessage = convert2BLSSignatureInput(tag, networkIdentifier, message)
keys = []
for every i in [0, …, ceil(length(keyList)/8)]:
if i-th bit of aggregationBits is set to 1:
keys.append(keysList[i])
return FastAggregateVerify(keys, taggedMessage, signature)
verifyWeightedAggSig(keysList, aggregationBits, signature, tag, networkIdentifier, weights, threshold, message):
taggedMessage = convert2BLSSignatureInput(tag, networkIdentifier, message)
keys = []
weightSum = 0
for every i in [0, …, ceil(length(keyList)/8)]:
if i-th bit of aggregationBits is set to 1:
keys.append(keysList[i])
weightSum += weights[i]
if weightSum < threshold:
return INVALID
return FastAggregateVerify(keys, taggedMessage, signature)
Motivation
Generate aggregated compact signatures with with BLS signature scheme.
Acceptance Criteria
lisk-crytography would have two functions defined above
These functions must be covered with few test scenarios
Additional Information
We can use eth-2 test vectors or our own test vector to cover tests for above
blst-ts wrapper library already contains the implementation of aggregated signatures and verification. So we need to double check if its the same as we have then we can reuse.
The text was updated successfully, but these errors were encountered:
Description
Create three functions
createAggSig
,verifyAggSig
andverifyWeightedAggSig
as stated in the LIP inlisk-cryptography
Motivation
Generate aggregated compact signatures with with BLS signature scheme.
Acceptance Criteria
lisk-crytography
would have two functions defined aboveAdditional Information
The text was updated successfully, but these errors were encountered: