summary refs log tree commit diff
path: root/crypto/src/asn1/sec
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-10-14 17:03:48 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-10-14 17:03:48 +0700
commit75a2a192d263c56e794be561ffbd6425ccd25b46 (patch)
treeadd458ad53d1aea198b54c35a4194cb6051d17cb /crypto/src/asn1/sec
parentFixed single line file handling (diff)
downloadBouncyCastle.NET-ed25519-75a2a192d263c56e794be561ffbd6425ccd25b46.tar.xz
Port latest X9 EC stuff from Java API
Diffstat (limited to 'crypto/src/asn1/sec')
-rw-r--r--crypto/src/asn1/sec/SECNamedCurves.cs132
1 files changed, 33 insertions, 99 deletions
diff --git a/crypto/src/asn1/sec/SECNamedCurves.cs b/crypto/src/asn1/sec/SECNamedCurves.cs
index 0bd60b0b8..ca71a4e66 100644
--- a/crypto/src/asn1/sec/SECNamedCurves.cs
+++ b/crypto/src/asn1/sec/SECNamedCurves.cs
@@ -54,9 +54,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "09487239995A5EE76B55F9C2F098"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "09487239995A5EE76B55F9C2F098"
                     + "A89CE5AF8724C0A23E0E0FF77500"));
 
@@ -85,9 +83,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "4BA30AB5E892B4E1649DD0928643"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "4BA30AB5E892B4E1649DD0928643"
                     + "ADCD46F5882E3747DEF36E956E97"));
 
@@ -116,9 +112,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "161FF7528B899B2D0C28607CA52C5B86"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "161FF7528B899B2D0C28607CA52C5B86"
                     + "CF5AC8395BAFEB13C02DA292DDED7A83"));
 
@@ -147,9 +141,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "7B6AA5D85E572983E6FB32A7CDEBC140"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "7B6AA5D85E572983E6FB32A7CDEBC140"
                     + "27B6916A894D3AEE7106FE805FC34B44"));
 
@@ -191,9 +183,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                     176);
 
                 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"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
                     + "938CF935318FDCED6BC28286531733C3F03C4FEE"));
 
@@ -222,9 +212,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                    //+ "4A96B5688EF573284664698968C38BB913CBFC82"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "4A96B5688EF573284664698968C38BB913CBFC82"
                     + "23A628553168947D59DCC912042351377AC5FB32"));
 
@@ -253,9 +241,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "52DCB034293A117E1F4FF11B30F7199D3144CE6D"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "52DCB034293A117E1F4FF11B30F7199D3144CE6D"
                     + "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E"));
 
@@ -297,9 +283,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                     208);
 
                 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"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
                     + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"));
 
@@ -328,9 +312,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"
                     + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811"));
 
@@ -372,9 +354,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                     240);
 
                 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"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C"
                     + "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5"));
 
@@ -403,9 +383,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"
                     + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34"));
 
@@ -447,9 +425,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                     272);
 
                 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"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"
                     + "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8"));
 
@@ -478,9 +454,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"
                     + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"));
 
@@ -509,9 +483,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7"
                     + "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F"));
 
@@ -540,9 +512,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.One;
 
                 ECCurve curve = ConfigureCurve(new FpCurve(p, a, b, n, h));
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66"
                     + "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650"));
 
@@ -572,9 +542,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "009D73616F35F4AB1407D73562C10F"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "009D73616F35F4AB1407D73562C10F"
                     + "00A52830277958EE84D1315ED31886"));
 
@@ -604,9 +572,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "01A57A6A7B26CA5EF52FCDB8164797"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "01A57A6A7B26CA5EF52FCDB8164797"
                     + "00B3ADC94ED1FE674C06E695BABA1D"));
 
@@ -638,9 +604,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "0081BAF91FDF9833C40F9C181343638399"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "0081BAF91FDF9833C40F9C181343638399"
                     + "078C6E7EA38C001F73C8134B1B4EF9E150"));
 
@@ -672,9 +636,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "0356DCD8F2F95031AD652D23951BB366A8"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "0356DCD8F2F95031AD652D23951BB366A8"
                     + "0648F06D867940A5366D9E265DE9EB240F"));
 
@@ -706,9 +668,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8"
                     + "0289070FB05D38FF58321F2E800536D538CCDAA3D9"));
 
@@ -740,9 +700,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "0369979697AB43897789566789567F787A7876A654"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "0369979697AB43897789566789567F787A7876A654"
                     + "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883"));
 
@@ -774,9 +732,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "03F0EBA16286A2D57EA0991168D4994637E8343E36"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "03F0EBA16286A2D57EA0991168D4994637E8343E36"
                     + "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1"));
 
@@ -806,9 +762,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1"
                     + "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05"));
 
@@ -838,9 +792,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F"
                     + "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C"));
 
@@ -870,9 +822,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126"
                     + "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3"));
 
@@ -902,9 +852,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B"
                     + "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052"));
 
@@ -934,9 +882,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC"
                     + "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA"));
 
@@ -968,9 +914,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836"
                     + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259"));
 
@@ -1002,9 +946,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053"
                     + "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4"));
 
@@ -1034,9 +976,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746"
                     + "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B"));
 
@@ -1066,9 +1006,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7"
                     + "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706"));
 
@@ -1100,9 +1038,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(4);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("02"
-                //+ "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972"
                     + "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3"));
 
@@ -1134,9 +1070,7 @@ namespace Org.BouncyCastle.Asn1.Sec
                 BigInteger h = BigInteger.ValueOf(2);
 
                 ECCurve curve = new F2mCurve(m, k1, k2, k3, a, b, n, h);
-                //ECPoint G = curve.DecodePoint(Hex.Decode("03"
-                //+ "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19"));
-                ECPoint G = curve.DecodePoint(Hex.Decode("04"
+                X9ECPoint G = new X9ECPoint(curve, Hex.Decode("04"
                     + "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19"
                     + "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B"));