public ECFieldElement multiply(ECFieldElement b) { int[] z = Nat192.create(); SecP192K1Field.multiply(x, ((SecP192K1FieldElement)b).x, z); return new SecP192K1FieldElement(z); }
SecP192K1Field.multiply(S2, X2.x, U2); SecP192K1Field.multiply(S2, Z1.x, S2); SecP192K1Field.multiply(S2, Y2.x, S2); SecP192K1Field.multiply(S1, X1.x, U1); SecP192K1Field.multiply(S1, Z2.x, S1); SecP192K1Field.multiply(S1, Y1.x, S1); SecP192K1Field.multiply(HSquared, H, G); SecP192K1Field.multiply(HSquared, U1, V); if (!Z1IsOne) SecP192K1Field.multiply(Z3.x, Z1.x, Z3.x); SecP192K1Field.multiply(Z3.x, Z2.x, Z3.x);
public ECFieldElement multiply(ECFieldElement b) { int[] z = Nat192.create(); SecP192K1Field.multiply(x, ((SecP192K1FieldElement)b).x, z); return new SecP192K1FieldElement(z); }
SecP192K1Field.multiply(S2, X2.x, U2); SecP192K1Field.multiply(S2, Z1.x, S2); SecP192K1Field.multiply(S2, Y2.x, S2); SecP192K1Field.multiply(S1, X1.x, U1); SecP192K1Field.multiply(S1, Z2.x, S1); SecP192K1Field.multiply(S1, Y1.x, S1); SecP192K1Field.multiply(HSquared, H, G); SecP192K1Field.multiply(HSquared, U1, V); if (!Z1IsOne) SecP192K1Field.multiply(Z3.x, Z1.x, Z3.x); SecP192K1Field.multiply(Z3.x, Z2.x, Z3.x);
public ECFieldElement divide(ECFieldElement b) { // return multiply(b.invert()); int[] z = Nat192.create(); Mod.invert(SecP192K1Field.P, ((SecP192K1FieldElement)b).x, z); SecP192K1Field.multiply(z, x, z); return new SecP192K1FieldElement(z); }
public ECFieldElement divide(ECFieldElement b) { // return multiply(b.invert()); int[] z = Nat192.create(); Mod.invert(SecP192K1Field.P, ((SecP192K1FieldElement)b).x, z); SecP192K1Field.multiply(z, x, z); return new SecP192K1FieldElement(z); }
SecP192K1Field.multiply(x2, x1, x2); int[] x3 = Nat192.create(); SecP192K1Field.square(x2, x3); SecP192K1Field.multiply(x3, x1, x3); int[] x6 = Nat192.create(); SecP192K1Field.squareN(x3, 3, x6); SecP192K1Field.multiply(x6, x3, x6); int[] x8 = x6; SecP192K1Field.squareN(x6, 2, x8); SecP192K1Field.multiply(x8, x2, x8); int[] x16 = x2; SecP192K1Field.squareN(x8, 8, x16); SecP192K1Field.multiply(x16, x8, x16); int[] x19 = x8; SecP192K1Field.squareN(x16, 3, x19); SecP192K1Field.multiply(x19, x3, x19); int[] x35 = Nat192.create(); SecP192K1Field.squareN(x19, 16, x35); SecP192K1Field.multiply(x35, x16, x35); int[] x70 = x16; SecP192K1Field.squareN(x35, 35, x70); SecP192K1Field.multiply(x70, x35, x70); int[] x140 = x35; SecP192K1Field.squareN(x70, 70, x140); SecP192K1Field.multiply(x140, x70, x140); int[] x159 = x70; SecP192K1Field.squareN(x140, 19, x159); SecP192K1Field.multiply(x159, x19, x159);
SecP192K1Field.multiply(x2, x1, x2); int[] x3 = Nat192.create(); SecP192K1Field.square(x2, x3); SecP192K1Field.multiply(x3, x1, x3); int[] x6 = Nat192.create(); SecP192K1Field.squareN(x3, 3, x6); SecP192K1Field.multiply(x6, x3, x6); int[] x8 = x6; SecP192K1Field.squareN(x6, 2, x8); SecP192K1Field.multiply(x8, x2, x8); int[] x16 = x2; SecP192K1Field.squareN(x8, 8, x16); SecP192K1Field.multiply(x16, x8, x16); int[] x19 = x8; SecP192K1Field.squareN(x16, 3, x19); SecP192K1Field.multiply(x19, x3, x19); int[] x35 = Nat192.create(); SecP192K1Field.squareN(x19, 16, x35); SecP192K1Field.multiply(x35, x16, x35); int[] x70 = x16; SecP192K1Field.squareN(x35, 35, x70); SecP192K1Field.multiply(x70, x35, x70); int[] x140 = x35; SecP192K1Field.squareN(x70, 70, x140); SecP192K1Field.multiply(x140, x70, x140); int[] x159 = x70; SecP192K1Field.squareN(x140, 19, x159); SecP192K1Field.multiply(x159, x19, x159);