Signature aggregation cost at top committees
This commit is contained in:
parent
95f2931d54
commit
72d02e3cc3
|
@ -18,3 +18,20 @@ def verify_signatures(committee_size, depth):
|
||||||
elapsed_time = end_time - start_time
|
elapsed_time = end_time - start_time
|
||||||
return elapsed_time
|
return elapsed_time
|
||||||
|
|
||||||
|
def aggregate_signatures(committee_size, root_members):
|
||||||
|
# Simulate aggregating 3 * committee_size signatures
|
||||||
|
start_time = time.time()
|
||||||
|
|
||||||
|
# Generate multiple EdDSA key pairs for signature aggregation
|
||||||
|
private_keys = [ed25519.create_keypair() for _ in range(root_members * committee_size)]
|
||||||
|
|
||||||
|
# Simulate signature aggregation
|
||||||
|
shared_message = b"Shared message to be signed"
|
||||||
|
signatures = [private_key[0].sign(shared_message) for private_key in private_keys]
|
||||||
|
|
||||||
|
# Aggregation isn't straightforward for EdDSA; we'll skip it in this example
|
||||||
|
|
||||||
|
end_time = time.time()
|
||||||
|
elapsed_time = end_time - start_time
|
||||||
|
return elapsed_time
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue