{
// TODO: the Sun EC implementation doesn't currently handle the seed properly
// so at the moment it's set to null. Should probably look at making this configurable
if (curve instanceof ECCurve.Fp)
{
return new EllipticCurve(new ECFieldFp(((ECCurve.Fp)curve).getQ()), curve.getA().toBigInteger(), curve.getB().toBigInteger(), null);
}
else
{
ECCurve.F2m curveF2m = (ECCurve.F2m)curve;
int ks[];