Skip to content

Commit

Permalink
Improve param type (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
aqk authored Jan 10, 2023
1 parent 97e7b63 commit 23498db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python-impl/op_swu_g2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ec import JacobianPoint, default_ec_twist, eval_iso
from fields import Fq, Fq2, roots_of_unity
from hash_to_field import Hp2
from typing import Optional


def sgn0(x: Fq2) -> int:
Expand Down Expand Up @@ -198,7 +199,7 @@ def iso3(P):
#
# map from Fq2 element(s) to point in G2 subgroup of Ell2
#
def opt_swu2_map(t: Fq2, t2: Fq2 = None) -> JacobianPoint:
def opt_swu2_map(t: Fq2, t2: Optional[Fq2] = None) -> JacobianPoint:
Pp = iso3(osswu2_help(t))
if t2 is not None:
Pp2 = iso3(osswu2_help(t2))
Expand Down

0 comments on commit 23498db

Please sign in to comment.