mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-31 21:05:24 +00:00
Aggregate G2 point at infinity
This commit is contained in:
parent
19d6c8336a
commit
bdbd2aae37
@ -161,9 +161,11 @@ def case02_verify():
|
||||
def case03_aggregate():
|
||||
for message in MESSAGES:
|
||||
sigs = [bls.Sign(privkey, message) for privkey in PRIVKEYS]
|
||||
aggregate_sig = bls.Aggregate(sigs)
|
||||
assert aggregate_sig == milagro_bls.Aggregate(sigs)
|
||||
yield f'aggregate_{encode_hex(message)}', {
|
||||
'input': [encode_hex(sig) for sig in sigs],
|
||||
'output': encode_hex(bls.Aggregate(sigs)),
|
||||
'output': encode_hex(aggregate_sig),
|
||||
}
|
||||
|
||||
# Invalid pubkeys -- len(pubkeys) == 0
|
||||
@ -175,6 +177,14 @@ def case03_aggregate():
|
||||
'output': None,
|
||||
}
|
||||
|
||||
# Valid to aggregate G2 point at infinity
|
||||
aggregate_sig = bls.Aggregate([Z2_SIGNATURE])
|
||||
assert aggregate_sig == milagro_bls.Aggregate([Z2_SIGNATURE]) == Z2_SIGNATURE
|
||||
yield f'aggregate_infinity_signature', {
|
||||
'input': [Z2_SIGNATURE],
|
||||
'output': aggregate_sig,
|
||||
}
|
||||
|
||||
|
||||
def case04_fast_aggregate_verify():
|
||||
for i, message in enumerate(MESSAGES):
|
||||
|
Loading…
x
Reference in New Issue
Block a user