Supports the X9ECParameters used for majority for cryptocurrencies (secp256k1 & secp256r1)

     */


    function EllipticCurve(X9ECName, privateKeyBignum) {

        function fromHex(s) {
            return new BigInteger(s, 16);
        }

        function X9ECParameters(curve, g, n, h) {
            this.curve = curve;
            this.g = g;
            this.n = n;
            this.h = h;
        }

        var X9ECTypes = {
            secp256k1: function () {
                var p = fromHex("FFFFFFFF