Barreto-Lynn-Scott curves
A class of pairing-friendly curves with embedding degree .
BLS12
Given an integer the BLS curve with embedding degree can be constructed over a prime field with the number of points and a trace of Frobenius .
BLS24
Given an integer the BLS curve with embedding degree can be constructed over a prime field with the number of points and a trace of Frobenius .
The class of curves has the Short-Weierstrass form:
where given such that is prime, a curve with a prime order subgroup of points can be found either via complex multiplication or by exhaustively trying small coefficients until a curve is found. Some generate curves can be found in the BLS category.
The following SageMath code generates BLS curves with embedding degree and .
class BLS(object):@classmethoddef generate_prime_order(cls, zbits):while True:z = randint(2^(zbits - 1), 2^zbits)pz = int(cls.p(z))if not is_prime(pz):continuerz = int(cls.r(z))if not is_prime(rz):continuebreakK = GF(pz)b = 1while True:curve = EllipticCurve(K, [0, b])card = curve.cardinality()if card % rz == 0:breakb += 1return curveclass BLS12(BLS):@staticmethoddef p(z):return (z - 1)^2 * (z^4 - z^2 + 1)/3 + z@staticmethoddef r(z):return z^4 - z^2 + 1@staticmethoddef t(z):return z + 1class BLS24(BLS):@staticmethoddef p(z):return (z - 1)^2 * (z^8 - z^4 + 1)/3 + z@staticmethoddef r(z):return z^8 - z^4 + 1@staticmethoddef t(z):return z + 1
References
- Paulo S. L. M. Barreto, Ben Lynn, Michael Scott: Constructing Elliptic Curves with Prescribed Embedding Degrees
- Diego F. Aranha, Laura Fuentes-Castaneda, Edward Knapp, Alfred Menezes, Francisco Rodríguez-Henríquez: Implementing Pairings at the 192-bit Security Level