SageMath: plot elliptic curve on finite field


ガロア体上の楕円曲線をplotしてみむとす

GF(13) - secp256k1

GF(13)上にsecp256k1と同じパラメータの楕円曲線を構築し、plotする。

sage: E = EllipticCurve(GF(13), [0, 7])
sage: print(E)
Elliptic Curve defined by y^2 = x^3 + 7 over Finite Field of size 13
sage: E.plot()
Launched png viewer for Graphics object consisting of 1 graphics primitive
EllipticCurve(GF(13), [0, 7])
sage: E.cardinality()
7
sage: P = E.random_element()
sage: print(P)
(11 : 5 : 1)
sage: P.order()
7


この記事が気に入ったらサポートをしてみませんか?