public ECFieldElement multiply(ECFieldElement b) { int[] z = Nat224.create(); SecP224K1Field.multiply(x, ((SecP224K1FieldElement)b).x, z); return new SecP224K1FieldElement(z); }
SecP224K1Field.multiply(S2, X2.x, U2); SecP224K1Field.multiply(S2, Z1.x, S2); SecP224K1Field.multiply(S2, Y2.x, S2); SecP224K1Field.multiply(S1, X1.x, U1); SecP224K1Field.multiply(S1, Z2.x, S1); SecP224K1Field.multiply(S1, Y1.x, S1); SecP224K1Field.multiply(HSquared, H, G); SecP224K1Field.multiply(HSquared, U1, V); if (!Z1IsOne) SecP224K1Field.multiply(Z3.x, Z1.x, Z3.x); SecP224K1Field.multiply(Z3.x, Z2.x, Z3.x);
public ECFieldElement multiply(ECFieldElement b) { int[] z = Nat224.create(); SecP224K1Field.multiply(x, ((SecP224K1FieldElement)b).x, z); return new SecP224K1FieldElement(z); }
SecP224K1Field.multiply(S2, X2.x, U2); SecP224K1Field.multiply(S2, Z1.x, S2); SecP224K1Field.multiply(S2, Y2.x, S2); SecP224K1Field.multiply(S1, X1.x, U1); SecP224K1Field.multiply(S1, Z2.x, S1); SecP224K1Field.multiply(S1, Y1.x, S1); SecP224K1Field.multiply(HSquared, H, G); SecP224K1Field.multiply(HSquared, U1, V); if (!Z1IsOne) SecP224K1Field.multiply(Z3.x, Z1.x, Z3.x); SecP224K1Field.multiply(Z3.x, Z2.x, Z3.x);
public ECFieldElement divide(ECFieldElement b) { // return multiply(b.invert()); int[] z = Nat224.create(); Mod.invert(SecP224K1Field.P, ((SecP224K1FieldElement)b).x, z); SecP224K1Field.multiply(z, x, z); return new SecP224K1FieldElement(z); }
public ECFieldElement divide(ECFieldElement b) { // return multiply(b.invert()); int[] z = Nat224.create(); Mod.invert(SecP224K1Field.P, ((SecP224K1FieldElement)b).x, z); SecP224K1Field.multiply(z, x, z); return new SecP224K1FieldElement(z); }
SecP224K1Field.multiply(x2, x1, x2); int[] x3 = x2; SecP224K1Field.square(x2, x3); SecP224K1Field.multiply(x3, x1, x3); int[] x4 = Nat224.create(); SecP224K1Field.square(x3, x4); SecP224K1Field.multiply(x4, x1, x4); int[] x8 = Nat224.create(); SecP224K1Field.squareN(x4, 4, x8); SecP224K1Field.multiply(x8, x4, x8); int[] x11 = Nat224.create(); SecP224K1Field.squareN(x8, 3, x11); SecP224K1Field.multiply(x11, x3, x11); int[] x19 = x11; SecP224K1Field.squareN(x11, 8, x19); SecP224K1Field.multiply(x19, x8, x19); int[] x23 = x8; SecP224K1Field.squareN(x19, 4, x23); SecP224K1Field.multiply(x23, x4, x23); int[] x42 = x4; SecP224K1Field.squareN(x23, 19, x42); SecP224K1Field.multiply(x42, x19, x42); int[] x84 = Nat224.create(); SecP224K1Field.squareN(x42, 42, x84); SecP224K1Field.multiply(x84, x42, x84); int[] x107 = x42; SecP224K1Field.squareN(x84, 23, x107); SecP224K1Field.multiply(x107, x23, x107); int[] x191 = x23;
SecP224K1Field.multiply(x2, x1, x2); int[] x3 = x2; SecP224K1Field.square(x2, x3); SecP224K1Field.multiply(x3, x1, x3); int[] x4 = Nat224.create(); SecP224K1Field.square(x3, x4); SecP224K1Field.multiply(x4, x1, x4); int[] x8 = Nat224.create(); SecP224K1Field.squareN(x4, 4, x8); SecP224K1Field.multiply(x8, x4, x8); int[] x11 = Nat224.create(); SecP224K1Field.squareN(x8, 3, x11); SecP224K1Field.multiply(x11, x3, x11); int[] x19 = x11; SecP224K1Field.squareN(x11, 8, x19); SecP224K1Field.multiply(x19, x8, x19); int[] x23 = x8; SecP224K1Field.squareN(x19, 4, x23); SecP224K1Field.multiply(x23, x4, x23); int[] x42 = x4; SecP224K1Field.squareN(x23, 19, x42); SecP224K1Field.multiply(x42, x19, x42); int[] x84 = Nat224.create(); SecP224K1Field.squareN(x42, 42, x84); SecP224K1Field.multiply(x84, x42, x84); int[] x107 = x42; SecP224K1Field.squareN(x84, 23, x107); SecP224K1Field.multiply(x107, x23, x107); int[] x191 = x23;