# Revision history [back]

### Imaginary number in Elliptic Curve in Sage

I have the following Sage code which throws an error:

p = 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576831
Fp = GF(p)
R.<x> = PolynomialRing(Fp)
# The quadratic extension via x^2 + 1 since p = 3 mod 4
Fp2 = Fp.extension(x^2 + 1, 'i')

# E0 is the starting curve E0/Fp2: y^2=x^3+x (the A=0 Montgomery curve)
E0 = EllipticCurve(Fp2, [1,0])
assert E0.is_supersingular()

phiP = E0([params[2], params[3]])
print "phiP =", phiP
phiQ = E0([-params[2], I*params[3]])
print "phiQ =", phiQ


param is a list of some big values. The phiP part executes sucessfully, and I get the correct values that I need, but the next line phiQ, throws and error. I believe because I want to have an imaginary number and multiply by I. The error that it throws is: TypeError: positive characteristic not allowed in symbolic computations . Any ideas what the problem is and how to workaround it?

### Imaginary number in Elliptic Curve in Sage

I have the following Sage code which throws an error:

p = 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576831
Fp = GF(p)
R.<x> = PolynomialRing(Fp)
# The quadratic extension via x^2 + 1 since p = 3 mod 4
Fp2 = Fp.extension(x^2 + 1, 'i')

# E0 is the starting curve E0/Fp2: y^2=x^3+x (the A=0 Montgomery curve)
E0 = EllipticCurve(Fp2, [1,0])
assert E0.is_supersingular()

phiP = E0([params[2], params[3]])
print "phiP =", phiP
phiQ = E0([-params[2], I*params[3]])
print "phiQ =", phiQ


param is a list of some big values. The phiP part executes sucessfully, and I get the correct values that I need, but the next line phiQ, throws and error. I believe because I want to have an imaginary number and multiply by I. The error that it throws is: TypeError: positive characteristic not allowed in symbolic computations . Any ideas what the problem is and how to workaround it?

Additionally, I also have a problem with the EllipcticCurveIsogeny function. Using the above prime and fields, I have something like this:

E = EllipticCurve(Fp2, [1,0])
ker = x^3 + 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576829*x^2 + x
phi = EllipticCurveIsogeny(E, ker)


But, this throws also an error, the error is: NotImplementedError: For basic Kohel's algorithm, if the kernel degree is even then the kernel must be contained in the two torsion.. Any idea how to call the isogeny function using a kernel?

### Imaginary number in Elliptic Curve in Sage

I have the following Sage code which throws an error:

p = 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576831
Fp = GF(p)
R.<x> = PolynomialRing(Fp)
# The quadratic extension via x^2 + 1 since p = 3 mod 4
Fp2 = Fp.extension(x^2 + 1, 'i')

# E0 is the starting curve E0/Fp2: y^2=x^3+x (the A=0 Montgomery curve)
E0 = EllipticCurve(Fp2, [1,0])
assert E0.is_supersingular()

phiP = E0([params[2], params[3]])
print "phiP =", phiP
phiQ = E0([-params[2], I*params[3]])
print "phiQ =", phiQ


param is a list of some big values. The phiP part executes sucessfully, and I get the correct values that I need, but the next line phiQ, throws and error. I believe because I want to have an imaginary number and multiply by I. The error that it throws is: TypeError: positive characteristic not allowed in symbolic computations . Any ideas what the problem is and how to workaround it?

Additionally, I also have a problem with the EllipcticCurveIsogeny function. Using the above prime and fields, I have something like this:

E = EllipticCurve(Fp2, [1,0])
ker = x^3 + 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576829*x^2 + x
phi = EllipticCurveIsogeny(E, ker)


But, this throws also an error, the error is: NotImplementedError: For basic Kohel's algorithm, if the kernel degree is even then the kernel must be contained in the two torsion.. Any idea how to call the isogeny function using a kernel?

### Imaginary number in Elliptic Curve Curves and Isogenies in Sage

I have the following Sage code which throws an error:

p = 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576831
Fp = GF(p)
R.<x> = PolynomialRing(Fp)
# The quadratic extension via x^2 + 1 since p = 3 mod 4
Fp2 = Fp.extension(x^2 + 1, 'i')

# E0 is the starting curve E0/Fp2: y^2=x^3+x (the A=0 Montgomery curve)
E0 = EllipticCurve(Fp2, [1,0])
assert E0.is_supersingular()

phiP = E0([params[2], params[3]])
print "phiP =", phiP
phiQ = E0([-params[2], I*params[3]])
print "phiQ =", phiQ


param is a list of some big values. The phiP part executes sucessfully, and I get the correct values that I need, but the next line phiQ, throws and error. I believe because I want to have an imaginary number and multiply by I. The error that it throws is: TypeError: positive characteristic not allowed in symbolic computations . Any ideas what the problem is and how to workaround it?

Additionally, I also have a problem with the EllipcticCurveIsogeny function. Using the above prime and fields, I have something like this:

E = EllipticCurve(Fp2, [1,0])
ker = x^3 + 10354717741769305252977768237866805321427389645549071170116189679054678940682478846502882896561066713624553211618840202385203911976522554393044160468771151816976706840078913334358399730952774926980235086850991501872665651576829*x^2 + x
phi = EllipticCurveIsogeny(E, ker)


But, this throws also an error, the error is: NotImplementedError: For basic Kohel's algorithm, if the kernel degree is even then the kernel must be contained in the two torsion.. Any idea how to call the isogeny function using a kernel?

EDIT:

params = [
578430703315757416239167247452252298383230451121890570770496205879957246271\
94741927699803619225371873099605244752411865273005490885339418654128746\
61143122262830946833377212881592965099601886901183961091839303261748866\
970694633,
552894179318461736451145230096269508494216546007889788158066655273655541827\
34966458946743147740010723538169667646894930981225566627558420019697816\
87909521301233517912821073526079191975713749455487083964491867894271185\
073160661,
435991739684910123105333676370030089291509670001370421019478145780141273164\
39883673898708868843364532451567754543362491991856542501590519299756008\
57047173121187832546031604804277991148436536445770452624367894371450077\
315674371,
106866937607440797536385002617766720826944674650271400721039514250889186719\
92313304948796673051468229664303969453105267287375412800684443463681956\
65543642579133322371232938607676833959588179836843700655987261910882390\
28762772
]