Skip to main content

Standard curve database

Search

ed-256-mont

256-bit prime field TwistedEdwards curve.

Curve from https://eprint.iacr.org/2014/130.pdf. No generator present.


ax2+y21+dx2y2ax^2 + y^2 \equiv 1 + dx^2y^2

Parameters

NameValue
p0xffa7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
a0xffa7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe
d0x350a
n0x3fe9ffffffffffffffffffffffffffffb154bbafb86733c966d92eded8ec7bab
h0x04


SAGE

p = 0xffa7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
K = GF(p)
a = K(0xffa7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe)
d = K(0x350a)
E = EllipticCurve(K, (K(-1/48) * (a^2 + 14*a*d + d^2),K(1/864) * (a + d) * (-a^2 + 34*a*d - d^2)))
def to_weierstrass(a, d, x, y):
return ((5*a + a*y - 5*d*y - d)/(12 - 12*y), (a + a*y - d*y -d)/(4*x - 4*x*y))
def to_twistededwards(a, d, u, v):
y = (5*a - 12*u - d)/(-12*u - a + 5*d)
x = (a + a*y - d*y -d)/(4*v - 4*v*y)
return (x, y)
# No generator defined
E.set_order(0x3fe9ffffffffffffffffffffffffffffb154bbafb86733c966d92eded8ec7bab * 0x04)
# This curve is a Weierstrass curve (SAGE does not support TwistedEdwards curves) birationally equivalent to the intended curve.
# You can use the to_weierstrass and to_twistededwards functions to convert the points.


JSON

{
"name": "ed-256-mont",
"desc": "Curve from https://eprint.iacr.org/2014/130.pdf. No generator present.",
"form": "TwistedEdwards",
"field": {
"type": "Prime",
"p": "0xffa7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"bits": 256
},
"params": {
"a": {
"raw": "0xffa7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
},
"d": {
"raw": "0x350a"
}
},
"order": "0x3fe9ffffffffffffffffffffffffffffb154bbafb86733c966d92eded8ec7bab",
"cofactor": "0x04"
}

© 2020 Jan Jancar | Built with Dox theme for Gatsby