Skip to content

Commit 85ff4df

Browse files
committed
remove workaround for #38350 since #38359 seems to be happening
1 parent ecbdd70 commit 85ff4df

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/sage/schemes/elliptic_curves/ell_point.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4075,25 +4075,14 @@ def log(self, base):
40754075
else:
40764076
v = self.weil_pairing(P2, n)
40774077
w = P1.weil_pairing(self, n)
4078-
try:
4079-
x0, y0 = v.log(z, o), w.log(z, o)
4080-
except TypeError:
4081-
# not all implementations of finite-field elements support passing the order in .log()
4082-
# known bug -- fixing #38350 will eliminate the need for this try-except
4083-
x0, y0 = v.log(z), w.log(z)
4078+
x0, y0 = v.log(z, o), w.log(z, o)
40844079

40854080
T = self - x0*P1 - y0*P2
40864081
if not T:
40874082
return x0, y0
40884083

4089-
try:
4090-
x1 = (n//n1 * T).log(o*P1, n1)
4091-
y1 = (n//n2 * T).log(o*P2, n2)
4092-
except TypeError:
4093-
# not all implementations of finite-field elements support passing the order in .log()
4094-
# known bug -- fixing #38350 will eliminate the need for this try-except
4095-
x1 = (n//n1 * T).log(o*P1)
4096-
y1 = (n//n2 * T).log(o*P2)
4084+
x1 = (n//n1 * T).log(o*P1, n1)
4085+
y1 = (n//n2 * T).log(o*P2, n2)
40974086

40984087
# assert n//n1 * self == (x1*o + n//n1*x0) * P1 + n//n1*y0 * P2
40994088
# assert n//n2 * self == n//n2*x0 * P1 + (y1*o + n//n2*y0) * P2

0 commit comments

Comments
 (0)