Skip to content

Commit

Permalink
add mul
Browse files Browse the repository at this point in the history
  • Loading branch information
asanso committed Mar 4, 2024
1 parent 17506fc commit 7851eb6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,17 @@ def case02_add_G2():
]


def case03_mul_G1():
# Doubling
result_doubling_G1 = add(G1, G1)
assert result_doubling_G1 == multiply(G1, 2)
result_doubling_P1 = add(P1, P1)
assert result_doubling_P1 == multiply(P1, 2)

yield 'mul_G1_bls', [
]


# Credit
# test vectors taken from
# /~https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/tree/master/poc/vectors
Expand Down Expand Up @@ -320,7 +331,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
'add_G2': case02_add_G2,
'mul_G1': case03_mul_G1
}


Expand Down

0 comments on commit 7851eb6

Please sign in to comment.