public EllipticCurve_Point GenPublicKey(BigInteger d) { EllipticCurve_Point Q = new EllipticCurve_Point(); curv.Mult(d, this.curv.G, ref Q); return(Q); }
private BigInteger TestHelper(BigInteger h0, BigInteger h1, BigInteger p2, BigInteger t, EllipticCurve_Point P) { BigInteger n0 = p2 - t, n1 = p2 + t; EllipticCurve_Point Q = new EllipticCurve_Point(); if (n0 >= h0 && n0 <= h1) { if (ecs.Mult(n0, P, ref Q)) { if (Q.IsNull) { return(n0); } } } if (n1 >= h0 && n1 <= h1) { if (ecs.Mult(n1, P, ref Q)) { if (Q.IsNull) { return(n1); } } } return(-1); }