public GlvTypeBEndomorphism(ECCurve curve, GlvTypeBParameters parameters)
        {
            /*
             * NOTE: 'curve' MUST only be used to create a suitable ECFieldElement. Due to the way
             * ECCurve configuration works, 'curve' will not be the actual instance of ECCurve that the
             * endomorphism is being used with.
             */

            this.m_parameters = parameters;
            this.m_pointMap   = new ScaleXPointMap(curve.FromBigInteger(parameters.Beta));
        }
 public GlvTypeBEndomorphism(ECCurve curve, GlvTypeBParameters parameters)
 {
     this.m_curve      = curve;
     this.m_parameters = parameters;
     this.m_pointMap   = new ScaleXPointMap(curve.FromBigInteger(parameters.Beta));
 }
            protected override X9ECParameters CreateParameters()
            {
                // p = 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1
                BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F");
                BigInteger a = BigInteger.Zero;
                BigInteger b = BigInteger.ValueOf(7);
                byte[] S = null;
                BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141");
                BigInteger h = BigInteger.One;

                GlvTypeBParameters glv = new GlvTypeBParameters(
                    new BigInteger("7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", 16),
                    new BigInteger("5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", 16),
                    new BigInteger[]{
                        new BigInteger("3086d221a7d46bcde86c90e49284eb15", 16),
                        new BigInteger("-e4437ed6010e88286f547fa90abfe4c3", 16) },
                    new BigInteger[]{
                        new BigInteger("114ca50f7a8e2f3f657c1108d9d44cfd8", 16),
                        new BigInteger("3086d221a7d46bcde86c90e49284eb15", 16) },
                    new BigInteger("c21b48869f51af37a1b243924a13ac55", 16),
                    new BigInteger("3910dfb58043a20a1bd51fea42aff9311", 16),
                    258);

                ECCurve curve = ConfigureCurveGlv(new FpCurve(p, a, b, n, h), glv);
                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
                //+ "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"));
                ECPoint G = curve.DecodePoint(Hex.Decode("04"
                    + "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"
                    + "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8"));

                return new X9ECParameters(curve, G, n, h, S);
            }
            protected override X9ECParameters CreateParameters()
            {
                // p = 2^224 - 2^32 - 2^12 - 2^11 - 2^9 - 2^7 - 2^4 - 2 - 1
                BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D");
                BigInteger a = BigInteger.Zero;
                BigInteger b = BigInteger.ValueOf(5);
                byte[] S = null;
                BigInteger n = FromHex("010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7");
                BigInteger h = BigInteger.One;

                GlvTypeBParameters glv = new GlvTypeBParameters(
                    new BigInteger("fe0e87005b4e83761908c5131d552a850b3f58b749c37cf5b84d6768", 16),
                    new BigInteger("60dcd2104c4cbc0be6eeefc2bdd610739ec34e317f9b33046c9e4788", 16),
                    new BigInteger[]{
                        new BigInteger("6b8cf07d4ca75c88957d9d670591", 16),
                        new BigInteger("-b8adf1378a6eb73409fa6c9c637d", 16) },
                    new BigInteger[]{
                        new BigInteger("1243ae1b4d71613bc9f780a03690e", 16),
                        new BigInteger("6b8cf07d4ca75c88957d9d670591", 16) },
                    new BigInteger("35c6783ea653ae444abeceb382c82", 16),
                    new BigInteger("5c56f89bc5375b9a04fd364e31bdd", 16),
                    227);

                ECCurve curve = ConfigureCurveGlv(new FpCurve(p, a, b, n, h), glv);
                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
                //+ "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C"));
                ECPoint G = curve.DecodePoint(Hex.Decode("04"
                    + "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C"
                    + "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5"));

                return new X9ECParameters(curve, G, n, h, S);
            }
            protected override X9ECParameters CreateParameters()
            {
                // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
                BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
                BigInteger a = BigInteger.Zero;
                BigInteger b = BigInteger.ValueOf(3);
                byte[] S = null;
                BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
                BigInteger h = BigInteger.One;

                GlvTypeBParameters glv = new GlvTypeBParameters(
                    new BigInteger("bb85691939b869c1d087f601554b96b80cb4f55b35f433c2", 16),
                    new BigInteger("3d84f26c12238d7b4f3d516613c1759033b1a5800175d0b1", 16),
                    new BigInteger[]{
                        new BigInteger("71169be7330b3038edb025f1", 16),
                        new BigInteger("-b3fb3400dec5c4adceb8655c", 16) },
                    new BigInteger[]{
                        new BigInteger("12511cfe811d0f4e6bc688b4d", 16),
                        new BigInteger("71169be7330b3038edb025f1", 16) },
                    new BigInteger("1c45a6f9ccc2cc0e3b6c097c7", 16),
                    new BigInteger("2cfecd0037b1712b73ae19575", 16),
                    194);

                ECCurve curve = ConfigureCurveGlv(new FpCurve(p, a, b, n, h), glv);
                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
                //+ "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"));
                ECPoint G = curve.DecodePoint(Hex.Decode("04"
                    + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
                    + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"));

                return new X9ECParameters(curve, G, n, h, S);
            }
 private static ECCurve ConfigureCurveGlv(ECCurve c, GlvTypeBParameters p)
 {
     return c.Configure().SetEndomorphism(new GlvTypeBEndomorphism(c, p)).Create();
 }
            protected override X9ECParameters CreateParameters()
            {
                // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
                BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
                BigInteger a = BigInteger.Zero;
                BigInteger b = BigInteger.ValueOf(7);
                byte[] S = null;
                BigInteger n = FromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
                BigInteger h = BigInteger.One;

                GlvTypeBParameters glv = new GlvTypeBParameters(
                    new BigInteger("9ba48cba5ebcb9b6bd33b92830b2a2e0e192f10a", 16),
                    new BigInteger("c39c6c3b3a36d7701b9c71a1f5804ae5d0003f4", 16),
                    new BigInteger[]{
                        new BigInteger("9162fbe73984472a0a9e", 16),
                        new BigInteger("-96341f1138933bc2f505", 16) },
                    new BigInteger[]{
                        new BigInteger("127971af8721782ecffa3", 16),
                        new BigInteger("9162fbe73984472a0a9e", 16) },
                    new BigInteger("48b17df39cc22395054e8", 16),
                    new BigInteger("4b1a0f889c499de17a820", 16),
                    163);

                ECCurve curve = ConfigureCurveGlv(new FpCurve(p, a, b, n, h), glv);
                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
                    //+ "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"));
                ECPoint G = curve.DecodePoint(Hex.Decode("04"
                    + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
                    + "938CF935318FDCED6BC28286531733C3F03C4FEE"));

                return new X9ECParameters(curve, G, n, h, S);
            }
 public GlvTypeBEndomorphism(ECCurve curve, GlvTypeBParameters parameters)
 {
     this.m_curve = curve;
     this.m_parameters = parameters;
     this.m_pointMap = new ScaleXPointMap(curve.FromBigInteger(parameters.Beta));
 }
 protected override X9ECParameters CreateParameters()
 {
     byte[] S = null;
     GlvTypeBParameters glv = new GlvTypeBParameters(
         new BigInteger("bb85691939b869c1d087f601554b96b80cb4f55b35f433c2", 16),
         new BigInteger("3d84f26c12238d7b4f3d516613c1759033b1a5800175d0b1", 16),
         new BigInteger[]{
             new BigInteger("71169be7330b3038edb025f1", 16),
             new BigInteger("-b3fb3400dec5c4adceb8655c", 16) },
         new BigInteger[]{
             new BigInteger("12511cfe811d0f4e6bc688b4d", 16),
             new BigInteger("71169be7330b3038edb025f1", 16) },
         new BigInteger("1c45a6f9ccc2cc0e3b6c097c7", 16),
         new BigInteger("2cfecd0037b1712b73ae19575", 16),
         194);
     ECCurve curve = ConfigureCurveGlv(new SecP192K1Curve(), glv);
     ECPoint G = curve.DecodePoint(Hex.Decode("04"
         + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
         + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"));
     return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
 }
 protected override X9ECParameters CreateParameters()
 {
     byte[] S = null;
     GlvTypeBParameters glv = new GlvTypeBParameters(
         new BigInteger("7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", 16),
         new BigInteger("5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", 16),
         new BigInteger[]{
             new BigInteger("3086d221a7d46bcde86c90e49284eb15", 16),
             new BigInteger("-e4437ed6010e88286f547fa90abfe4c3", 16) },
         new BigInteger[]{
             new BigInteger("114ca50f7a8e2f3f657c1108d9d44cfd8", 16),
             new BigInteger("3086d221a7d46bcde86c90e49284eb15", 16) },
         new BigInteger("c21b48869f51af37a1b243924a13ac55", 16),
         new BigInteger("3910dfb58043a20a1bd51fea42aff9311", 16),
         258);
     ECCurve curve = ConfigureCurveGlv(new SecP256K1Curve(), glv);
     ECPoint G = curve.DecodePoint(Hex.Decode("04"
         + "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"
         + "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8"));
     return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
 }
 protected override X9ECParameters CreateParameters()
 {
     byte[] S = null;
     GlvTypeBParameters glv = new GlvTypeBParameters(
         new BigInteger("fe0e87005b4e83761908c5131d552a850b3f58b749c37cf5b84d6768", 16),
         new BigInteger("60dcd2104c4cbc0be6eeefc2bdd610739ec34e317f9b33046c9e4788", 16),
         new BigInteger[]{
             new BigInteger("6b8cf07d4ca75c88957d9d670591", 16),
             new BigInteger("-b8adf1378a6eb73409fa6c9c637d", 16) },
         new BigInteger[]{
             new BigInteger("1243ae1b4d71613bc9f780a03690e", 16),
             new BigInteger("6b8cf07d4ca75c88957d9d670591", 16) },
         new BigInteger("35c6783ea653ae444abeceb382c82", 16),
         new BigInteger("5c56f89bc5375b9a04fd364e31bdd", 16),
         227);
     ECCurve curve = ConfigureCurveGlv(new SecP224K1Curve(), glv);
     ECPoint G = curve.DecodePoint(Hex.Decode("04"
         + "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C"
         + "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5"));
     return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
 }
 protected override X9ECParameters CreateParameters()
 {
     byte[] S = null;
     GlvTypeBParameters glv = new GlvTypeBParameters(
         new BigInteger("9ba48cba5ebcb9b6bd33b92830b2a2e0e192f10a", 16),
         new BigInteger("c39c6c3b3a36d7701b9c71a1f5804ae5d0003f4", 16),
         new BigInteger[]{
             new BigInteger("9162fbe73984472a0a9e", 16),
             new BigInteger("-96341f1138933bc2f505", 16) },
         new BigInteger[]{
             new BigInteger("127971af8721782ecffa3", 16),
             new BigInteger("9162fbe73984472a0a9e", 16) },
         new BigInteger("9162fbe73984472a0a9d0590", 16),
         new BigInteger("96341f1138933bc2f503fd44", 16),
         176);
     ECCurve curve = ConfigureCurveGlv(new SecP160K1Curve(), glv);
     ECPoint G = curve.DecodePoint(Hex.Decode("04"
         + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
         + "938CF935318FDCED6BC28286531733C3F03C4FEE"));
     return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
 }