nction(){
                if(this.zinv == null) {
                    this.zinv = this.z.modInverse(this.curve.q);
                }
                return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q));
            }
        };

        function ECCurve(q,a,b) {
            this.q = q;
            this.a = this.fromBigInteger(a);
            this.b = this.fromBigInteger(b);
            this.infinity = new ECPoint(this, null, null);
        }
        ECCurve.prototype