Skip to content

Commit

Permalink
mul G2
Browse files Browse the repository at this point in the history
  • Loading branch information
asanso committed Mar 5, 2024
1 parent 190567b commit 894c0fa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,16 @@ def case03_mul_G1():
]


def case04_mul_G2():
# Doubling
result_doubling_G2 = add(G2, G2)
assert result_doubling_G2 == multiply(G2, 2)
result_doubling_P2 = add(P2, P2)
assert result_doubling_P2 == multiply(P2, 2)
yield 'mul_G2_bls', [
]


# Credit
# test vectors taken from
# /~https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/tree/master/poc/vectors
Expand Down Expand Up @@ -382,7 +392,8 @@ def case07_hash_to_G2():
test_kinds: Dict[str, Generator[Tuple[str, Any], None, None]] = {
'add_G1': case01_add_G1,
'add_G2': case02_add_G2,
'mul_G1': case03_mul_G1
'mul_G1': case03_mul_G1,
'mul_G2': case04_mul_G2
}


Expand Down

0 comments on commit 894c0fa

Please sign in to comment.