ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 21 Mar 2020 13:52:10 +0100I have the hyperelliptic curve y^2=x^4+81473/1024*x^2-1. How do I convert this curve to an elliptic curve in a short weierstrass form?https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/I have the hyperelliptic curve $y^2=x^4+81473/1024x^2-1$. How do I convert this curve to an elliptic curve in a short Weierstrass form?
Also, how can I convert the point $(x,y,z)=(1,i,0)$ on the $y^2=x^4+81473/1024x^2z^2- z^4$ curve to the point on the elliptic curve?
Thanks.GamzeeeSat, 21 Mar 2020 13:52:10 +0100https://ask.sagemath.org/question/50319/implement given divisor as a specific hyperelliptic curve divisorhttps://ask.sagemath.org/question/40589/implement-given-divisor-as-a-specific-hyperelliptic-curve-divisor/I get the values of a divisor for a hyperelliptic curve from a research paper to ensure the divisor is correct and i want to use this divisor on calculation.
so Idid the following:
[A Secured Cloud System using Hyper Elliptic Curve](https://www.google.com.eg/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjLjIvt_cvYAhWGvBQKHWlACL8QFggqMAE&url=https%3A%2F%2Fwww.ijser.org%2Fresearchpaper%2FA-Secured-Cloud-System-using-Hyper-Elliptic-Curve-Cryptography.pdf&usg=AOvVaw3gkCA7QngzSue-BZCV2DB8)
and in sage:
p = 4112543547855339322343814790708185367671872426434747235319998473455582535888229747778325047393413053
K = GF(p)
R.<x> = K[]
f = x^5 + 7943193*x^4 + 6521255*x^3 + 1065528*x^2 + 3279922*x + 3728927
C = HyperellipticCurve( f )
J = C.jacobian()
X = J(K)
u, v = x^2 + 22457213658579645161*x + 62960708771725664757, 65279057408798633572*x + 32004384923913711271
D = X( [u,v] )
> verbose 0 (3324:
> multi_polynomial_ideal.py,
> groebner_basis) Warning: falling back
> to very slow toy implementation.
> verbose 0 (1083:
> multi_polynomial_ideal.py, dimension)
> Warning: falling back to very slow toy
> implementation. Error in lines 9-9
> Traceback (most recent call last):
> File
> "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py",
> line 1013, in execute
> exec compile(block+'\n', '', 'single') in namespace, locals File
> "", line 1, in <module> File
> "/ext/sage/sage-8.1/local/lib/python2.7/site-packages/sage/schemes/hyperelliptic_curves/jacobian_homset.py",
> line 145, in __call__
> return JacobianMorphism_divisor_class_field(self,
> tuple(P)) File
> "/ext/sage/sage-8.1/local/lib/python2.7/site-packages/sage/schemes/hyperelliptic_curves/jacobian_morphism.py",
> line 388, in __init__
> polys, C)) ValueError: Argument polys (= (x^2 + 22457213658579645161*x
> + 62960708771725664757, 65279057408798633572*x +
> 32004384923913711271)) must be divisor
> on curve Hyperelliptic Curve over
> Finite Field of size
> 4112543547855339322343814790708185367671872426434747235319998473455582535888229747778325047393413053
> defined by y^2 = x^5 + 7943193*x^4 +
> 6521255*x^3 + 1065528*x^2 + 3279922*x
> + 3728927.
Does this mean the paper is wrong or I am at wrong.
and if so, how can I modify my work?sherifasagewadSat, 13 Jan 2018 12:03:30 +0100https://ask.sagemath.org/question/40589/Set a specific polynomial as a divisor of hyper elliptic curvehttps://ask.sagemath.org/question/40509/set-a-specific-polynomial-as-a-divisor-of-hyper-elliptic-curve/ If I have a hyperelliptic curve of genus 2 = y2+( x2+x)y = x5+ x3 +1
and reduced divisor for the curve in Mumford is (x2+18x, 17x+1).
the two was given, I can construct the curve: as k.<a> = GF(next_prime(2^160)); R.<x> = k[]
C = HyperellipticCurve(x^5 + x^3 + 1, x^2+x)
How to set (x2+18x, 17x+1) as it's divisor
sherifasagewadSat, 06 Jan 2018 21:49:39 +0100https://ask.sagemath.org/question/40509/order of hyperelliptic curve divisorhttps://ask.sagemath.org/question/40153/order-of-hyperelliptic-curve-divisor/ I create a hyperelliptic curve, over finite field
zz = random_prime(2^81-1,False,2^80);
Q = GF(zz); x = Q['x'].gen();
f = x^5+ 2*x^2 +x + 3;
C = HyperellipticCurve(f, 0)
Then, Jacobian of Hyperelliptic Curve
J = C.jacobian()(Q)
then found two points and get there divisor and substract
P1 = (514014285438369163567791 : 461217828857546813804480 : 1)
P2 = (514014285438369163567791 : 461217828857546813804480 : 1)
D1 = J(P1);
D2 = J(P2);
D = D1 - D2;
but when calculating the order of D (error)
D.order()
> otImplementedError
> Traceback (most recent call last)
> <ipython-input-69-4132ea6bd39c> in
> <module>()
> ----> 1 D.order()
>
> /home/sage/sage-8.0/src/sage/structure/element.pyx
> in
> sage.structure.element.AdditiveGroupElement.order
> (/home/sage/sage/src/build/cythonized/sage/structure/element.c:16098)()
> 2276 Return additive order of
> element 2277 """
> -> 2278 return self.additive_order() 2279 2280
> def __invert__(self):
>
> /home/sage/sage-8.0/src/sage/structure/element.pyx
> in
> sage.structure.element.ModuleElement.additive_order
> (/home/sage/sage/src/build/cythonized/sage/structure/element.c:15332)()
> 2196 Return the additive order
> of self. 2197 """
> -> 2198 raise NotImplementedError 2199 2200
> ########################################################################
>
> NotImplementedError:
How to calculate it's order(I need the order to use it as mod in further calculation)
sherifasagewadThu, 14 Dec 2017 12:04:48 +0100https://ask.sagemath.org/question/40153/I want to compare time of scalar multiplicity between ECC HECC with security level 80https://ask.sagemath.org/question/37514/i-want-to-compare-time-of-scalar-multiplicity-between-ecc-hecc-with-security-level-80/ So in ECC GF(next_prime(2^160)) then construct the curve, base point
=====================================================================
I'm not sure how in hyper elliptic curve;
I think
$ `q = next_prime(2^80)`
$ `K.<x>=GF(q,'x')[]`
$ `f = x^5 + x^3 + 1`
$ `H = HyperellipticCurve(f, 0)`
$ `J = H.jacobian()`
$ `z = Integer(randrange(2, q-2))`
$ `D = J(H.lift_x(F(z)))` # divisor
===============================================================
To compare time
ECC => `%timeit (Integer(randrange(1, 2^160))) * base point`
HECC => %timeit (Integer(randrange(1, 2^80))) * divisor`
==============================================================
is this correct?
and if this correct, how ECC time = 13.2 millisecond;
HECC time = 185 millisecondsherifasagewadThu, 04 May 2017 23:54:50 +0200https://ask.sagemath.org/question/37514/change of variable from hyperellictic curve to Weierstrass formhttps://ask.sagemath.org/question/36637/change-of-variable-from-hyperellictic-curve-to-weierstrass-form/ I have the hyperelliptic curve `v^2 = p^4-2*p^3+5*p^2+8*p+4` which I wish to change it to an elliptic curve in Weierstrass form where it returns the change of variable v=[u,r,s,t]. I got the following from Maple. Was wondering if I could get a similar thing using Sage.
-(y^2) = x^3-(121/3)*x-(1690/27)
x = -(1/3)*(5*p^2+24*p-12*v+24)/p^2
y = (-4*p^3 + 20*p^2 + (-8*v + 48)*p + (-16*v + 32))/p^3
p = (-72*x-264+36*y)/(9*x^2+30*x-119)
v = (-162*x^4+540*x^3-648*x^2*y+13176*x^2-4752*x*y+62340*x-16488*y+153994)/(81*x^4+540*x^3-1242*x^2-7140*x+14161)ShaThu, 16 Feb 2017 04:31:48 +0100https://ask.sagemath.org/question/36637/find the limithttps://ask.sagemath.org/question/9846/find-the-limit/limitxsin1/x,x=0
PortiaMon, 25 Feb 2013 07:36:34 +0100https://ask.sagemath.org/question/9846/Does sage have analog of magma function IsIsomorphic?https://ask.sagemath.org/question/9651/does-sage-have-analog-of-magma-function-isisomorphic/Does Sage have analog of magma function [IsIsomorphic for curves](http://magma.maths.usyd.edu.au/magma/handbook/text/1253#13614)
> IsIsomorphic(C, D) : Crv, Crv -> BoolElt,MapSch
> Given irreducible curves C and D this
> function returns true is C and D are
> isomorphic over their common base
> field. If so, it also returns a scheme
> map giving an isomorphism between
> them. The curves C and D must be
> reduced. Currently the function
> requires that the curves are not both
> genus 0 nor both genus 1 unless the
> base field is finite.
or [IsIsomorphic for hyperelliptic curves](http://magma.maths.usyd.edu.au/magma/handbook/text/1391#15274)?
> IsIsomorphic(C1, C2) : CrvHyp, CrvHyp
> -> BoolElt, MapIsoSch
>
> SetVerbose("CrvHypIso", n): Maximum: 3
>
> This function returns true if and only if the hyperelliptic curves C1
> and C2 are isomorphic over their
> common base field. If the curves are
> isomorphic, an isomorphism is
> returned.petRUShkaWed, 26 Dec 2012 07:56:53 +0100https://ask.sagemath.org/question/9651/Plotting hyperelliptic curves (and the group law)https://ask.sagemath.org/question/9269/plotting-hyperelliptic-curves-and-the-group-law/I am trying to create plots of hyperelliptic curves (over the rationals) using SAGE. Moreover, I want to plot the integral points on these curves (within a certain range, obviously) and illustrate the group law on the Jacobian. In other words, I want to create an image similar to the one used here: [Hyperelliptic curve plot](http://gdtr.wordpress.com/2011/09/26/hyperelliptic-curve-crypto-dcoders-keygenme-2/). Plotting the curve itself is not hard. One may use, say, the following code:
Qx.<x> = QQ[]
f = x^5 + 3
C = HyperellipticCurve(f)
image = plot(C)
image.save('image.png')
I am mainly interested in how to plot integral points on said curve and how to illustrate "addition" of these points (in the sense of addition of the corresponding elements on the Jacobian). Do you know how to do this? Any help would be greatly appreciated.Leonhard MoosbruggerMon, 27 Aug 2012 14:22:35 +0200https://ask.sagemath.org/question/9269/How to check two curves on birational equivalence?https://ask.sagemath.org/question/8443/how-to-check-two-curves-on-birational-equivalence/I have two curves, for example hyperelliptic:
y^2 = x^6 + 14*x^4 + 5*x^3 + 14*x^2 + 18
y^2 = x^6 + 14*x^4 + 5*x^3 + 14*x^2 + 5*x + 1
How to check them on birational equivalence (is able one curve be birationally transformed to another?) via Sage?petRUShkaSat, 05 Nov 2011 09:06:30 +0100https://ask.sagemath.org/question/8443/memory increasing when generating lots of hyperelliptic curves (without storing them)https://ask.sagemath.org/question/8437/memory-increasing-when-generating-lots-of-hyperelliptic-curves-without-storing-them/Executing the code given below (it generates hyperelliptic curves), the used memory increases all the time. Since nothing is stored permanently, this should not happen. How do I avoid it? (It is not really a problem with the example given, but using more loops, it becomes a problem.)
Here an example code:
F = GF(4, 'a')
R.<t> = PolynomialRing(F)
for x in F:
for y in F:
for z in F:
h = x*t^2 + y*t + z
for a in F:
for b in F:
for c in F:
for d in F:
for e in F:
f = t^5 + a*t^4 + b*t^3 + c*t^2 + d*t + e
C = HyperellipticCurve(f,h)
Daniel KrennFri, 04 Nov 2011 10:59:41 +0100https://ask.sagemath.org/question/8437/