Skip to content

Commit 1ec358a

Browse files
committed
remove workaround for #38350 since #38359 seems to be happening
1 parent 7c1d2e6 commit 1ec358a

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
@@ -4071,25 +4071,14 @@ def log(self, base):
40714071
else:
40724072
v = self.weil_pairing(P2, n)
40734073
w = P1.weil_pairing(self, n)
4074-
try:
4075-
x0, y0 = v.log(z, o), w.log(z, o)
4076-
except TypeError:
4077-
# not all implementations of finite-field elements support passing the order in .log()
4078-
# known bug -- fixing #38350 will eliminate the need for this try-except
4079-
x0, y0 = v.log(z), w.log(z)
4074+
x0, y0 = v.log(z, o), w.log(z, o)
40804075

40814076
T = self - x0*P1 - y0*P2
40824077
if not T:
40834078
return x0, y0
40844079

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

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

0 commit comments

Comments
 (0)