@Test void toAffineTest() { JacobianPoint a = new JacobianPoint( new FP2Immutable( "0x0a9dd1e7e9f8c3a63ced70517af4fa36162daa78223598adc3188c32e2895c4ba5bc931ffe0ace2abeab99445a37c762", "0x1070d96414de33b6544529eaa3f34d62715470ff5562cd38795e13df55994fa73a40d019260fb58f13f3bfc96290e206"), new FP2Immutable( "0x0527a7f5355ae68984f0e5b6b6f0196b5f12b2c9c654f23775f6185153431295261e2be3fcb14b9ac7eae7af384fae09", "0x0020abd890deaba3bc09c77e55aec6bb4e7ddbcf74398fe36f2163930f9fbea5fc35c514ffdce44ccb1ae1c2dd6a444c"), new FP2Immutable( "0x0f2fd428b0be2b652deb7d922412bc082171420e723c93c43d1efe6b22acb0f7fff928f441fd09d3aab9c97acec9f579", "0x117318fc47ee37c48a854cac7b5e83a5f3a10693e200aa696d99dbd3d8721e081bf662149a67b81aa71f08c4f030959d")); JacobianPoint expected = new JacobianPoint( new FP2Immutable( "0x122c60c87bacfb7fd9fb22fd7fec812983971c0bca1abf7fa05d04980a39c1b605c7b3c08050b1b89ddff12338b644ae", "0x17704a556f8634edb35e52dbf560bb3a39e35aef19172232f34e4dfa008106e5365bd8a19eb06ee4e41950e65b478cd7"), new FP2Immutable( "0x0374fe17a6875101c7172d962c383f065326c8e8c3f4971456224efe18619f404d7cfab6b3d7df460f44f55f72176eb2", "0x0d15e558d16fe21b72637e9f0d53684cd52fe9dc41dc3dba522370048239b9b687003c8d3e928c2d17ed7451f9c91676"), FP2Immutable.ONE); assertTrue(isOnCurve(a)); assertEquals(expected.toString(), a.toAffine().toString()); }
JacobianPoint toAffine() { if (isInfinity()) { return INFINITY; } FP2Immutable zInv = z.inverse(); FP2Immutable z2Inv = zInv.sqr(); FP2Immutable z3Inv = zInv.mul(z2Inv); return new JacobianPoint(x.mul(z2Inv), y.mul(z3Inv), FP2Immutable.ONE); }
JacobianPoint { JacobianPoint toAffine() { if (isInfinity()) { return INFINITY; } FP2Immutable zInv = z.inverse(); FP2Immutable z2Inv = zInv.sqr(); FP2Immutable z3Inv = zInv.mul(z2Inv); return new JacobianPoint(x.mul(z2Inv), y.mul(z3Inv), FP2Immutable.ONE); } }
JacobianPoint { JacobianPoint toAffine() { if (isInfinity()) { return INFINITY; } FP2Immutable zInv = z.inverse(); FP2Immutable z2Inv = zInv.sqr(); FP2Immutable z3Inv = zInv.mul(z2Inv); return new JacobianPoint(x.mul(z2Inv), y.mul(z3Inv), FP2Immutable.ONE); } JacobianPoint();   JacobianPoint(JacobianPoint p);   JacobianPoint(FP2Immutable x, FP2Immutable y, FP2Immutable z);   JacobianPoint(ECP2 p); }
JacobianPoint { JacobianPoint toAffine() { if (isInfinity()) { return INFINITY; } FP2Immutable zInv = z.inverse(); FP2Immutable z2Inv = zInv.sqr(); FP2Immutable z3Inv = zInv.mul(z2Inv); return new JacobianPoint(x.mul(z2Inv), y.mul(z3Inv), FP2Immutable.ONE); } JacobianPoint();   JacobianPoint(JacobianPoint p);   JacobianPoint(FP2Immutable x, FP2Immutable y, FP2Immutable z);   JacobianPoint(ECP2 p); @Override String toString(); @Override // Consider two Jacobian points to be equal iff their affine representations are equal. boolean equals(Object obj); @Override int hashCode(); }
JacobianPoint { JacobianPoint toAffine() { if (isInfinity()) { return INFINITY; } FP2Immutable zInv = z.inverse(); FP2Immutable z2Inv = zInv.sqr(); FP2Immutable z3Inv = zInv.mul(z2Inv); return new JacobianPoint(x.mul(z2Inv), y.mul(z3Inv), FP2Immutable.ONE); } JacobianPoint();   JacobianPoint(JacobianPoint p);   JacobianPoint(FP2Immutable x, FP2Immutable y, FP2Immutable z);   JacobianPoint(ECP2 p); @Override String toString(); @Override // Consider two Jacobian points to be equal iff their affine representations are equal. boolean equals(Object obj); @Override int hashCode();  }