91
91
92
92
# TODO: Implement sparse strategies? (cf. the SIKE cryptosystem)
93
93
94
+
94
95
def _eval_factored_isogeny (phis , P ):
95
96
"""
96
97
This method pushes a point `P` through a given sequence ``phis``
@@ -115,6 +116,7 @@ def _eval_factored_isogeny(phis, P):
115
116
P = phi (P )
116
117
return P
117
118
119
+
118
120
def _compute_factored_isogeny_prime_power (P , l , e ):
119
121
"""
120
122
This method takes a point `P` of order `l^e` and returns
@@ -143,6 +145,7 @@ def _compute_factored_isogeny_prime_power(P, l, e):
143
145
phis .append (phi )
144
146
return phis
145
147
148
+
146
149
def _compute_factored_isogeny_single_generator (P ):
147
150
"""
148
151
This method takes a point `P` and returns a sequence of
@@ -169,6 +172,7 @@ def _compute_factored_isogeny_single_generator(P):
169
172
phis += psis
170
173
return phis
171
174
175
+
172
176
def _compute_factored_isogeny (kernel ):
173
177
"""
174
178
This method takes a set of points on an elliptic curve
@@ -195,6 +199,7 @@ def _compute_factored_isogeny(kernel):
195
199
phis += psis
196
200
return phis
197
201
202
+
198
203
class EllipticCurveHom_composite (EllipticCurveHom ):
199
204
200
205
_degree = None
@@ -512,14 +517,14 @@ def _composition_impl(left, right):
512
517
To: Elliptic Curve defined by y^2 + (I+1)*x*y = x^3 + I*x^2 + (-4)*x + (-6*I) over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
513
518
"""
514
519
if isinstance (left , EllipticCurveHom_composite ):
515
- if isinstance (right , WeierstrassIsomorphism ) and hasattr (left .factors ()[0 ], '_set_pre_isomorphism' ): #XXX bit of a hack
520
+ if isinstance (right , WeierstrassIsomorphism ) and hasattr (left .factors ()[0 ], '_set_pre_isomorphism' ): # XXX bit of a hack
516
521
return EllipticCurveHom_composite .from_factors ((left .factors ()[0 ] * right ,) + left .factors ()[1 :], strict = False )
517
522
if isinstance (right , EllipticCurveHom_composite ):
518
523
return EllipticCurveHom_composite .from_factors (right .factors () + left .factors ())
519
524
if isinstance (right , EllipticCurveHom ):
520
525
return EllipticCurveHom_composite .from_factors ((right ,) + left .factors ())
521
526
if isinstance (right , EllipticCurveHom_composite ):
522
- if isinstance (left , WeierstrassIsomorphism ) and hasattr (right .factors ()[- 1 ], '_set_post_isomorphism' ): #XXX bit of a hack
527
+ if isinstance (left , WeierstrassIsomorphism ) and hasattr (right .factors ()[- 1 ], '_set_post_isomorphism' ): # XXX bit of a hack
523
528
return EllipticCurveHom_composite .from_factors (right .factors ()[:- 1 ] + (left * right .factors ()[- 1 ],), strict = False )
524
529
if isinstance (left , EllipticCurveHom ):
525
530
return EllipticCurveHom_composite .from_factors (right .factors () + (left ,))
@@ -787,4 +792,3 @@ def make_default():
787
792
"""
788
793
from sage .misc .superseded import deprecation
789
794
deprecation (34410 , 'calling EllipticCurveHom_composite.make_default() is no longer necessary' )
790
-
0 commit comments