protected ECCurve cloneCurve() { return new SecT283K1Curve(); }
public SecT283K1Curve() { super(283, 5, 7, 12); this.infinity = new SecT283K1Point(this, null, null); this.a = fromBigInteger(BigInteger.valueOf(0)); this.b = fromBigInteger(BigInteger.valueOf(1)); this.order = new BigInteger(1, Hex.decode("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61")); this.cofactor = BigInteger.valueOf(4); this.coord = SecT283K1_DEFAULT_COORDS; }
public ECPoint lookup(int index) { long[] x = Nat320.create64(), y = Nat320.create64(); int pos = 0; for (int i = 0; i < len; ++i) { long MASK = ((i ^ index) - 1) >> 31; for (int j = 0; j < FE_LONGS; ++j) { x[j] ^= table[pos + j] & MASK; y[j] ^= table[pos + FE_LONGS + j] & MASK; } pos += (FE_LONGS * 2); } return createRawPoint(new SecT283FieldElement(x), new SecT283FieldElement(y), false); } };
protected X9ECParameters createParameters() { byte[] S = null; ECCurve curve = configureCurve(new SecT283K1Curve()); X9ECPoint G = new X9ECPoint(curve, Hex.decode("04" + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836" + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259")); return new X9ECParameters(curve, G, curve.getOrder(), curve.getCofactor(), S); } };