public void JToATest() { BigInt x = new BigInt("683912747928604429365587748083767546177", 10); BigInt y = new BigInt("812110666547712189275454409466955570012", 10); BigInt z = new BigInt("3931989407626300110045528123007777908518", 10); BigInt xE = new BigInt("4e429ac21600f83ae575eda41ccbd72c5", 16); BigInt yE = new BigInt("14eb50532fc0f26c9e1328bbfe5747322", 16); JacobPoint a = new JacobPoint(x, y, z); Point e = new Point(xE, yE); Point r = curve.JToA(a); Assert.AreEqual(e, r); }
public void JDoubleMutTest() { BigInt x = new BigInt("489a03c58dcf7fcfc97e99ffef0bb4634", 16); BigInt y = new BigInt("510c6972d795ec0c2b081b81de767f808", 16); BigInt z = new BigInt("1", 16); JacobPoint a = new JacobPoint(x, y, z); curve.JDblMut(a); BigInt xE = new BigInt("417b9d98f934b571bffaed8d2968f6d67", 16); BigInt yE = new BigInt("6339a332da64ca233033eace4d6bdafdf", 16); Point e = new Point(xE, yE); Point r = curve.JToA(a); Assert.AreEqual(e, r); }
public void JAddMutTest() { BigInt x = new BigInt("489a03c58dcf7fcfc97e99ffef0bb4634", 16); BigInt y = new BigInt("510c6972d795ec0c2b081b81de767f808", 16); BigInt z = new BigInt("1", 16); BigInt xB = new BigInt("417b9d98f934b571bffaed8d2968f6d67", 16); BigInt yB = new BigInt("6339a332da64ca233033eace4d6bdafdf", 16); JacobPoint a = new JacobPoint(x, y, z); Point b = new Point(xB, yB); curve.JAddMut(a, b); BigInt xE = new BigInt("4e429ac21600f83ae575eda41ccbd72c5", 16); BigInt yE = new BigInt("14eb50532fc0f26c9e1328bbfe5747322", 16); Point e = new Point(xE, yE); Point r = curve.JToA(a); Assert.AreEqual(e, r); }