我知道如何创建ECDH公钥和私钥
像这样
X9ECParameters ecP = NistNamedCurves.GetByName("P-521");
ECDomainParameters ecSpec = new ECDomainParameters(ecP.Curve, ecP.G, ecP.N, ecP.H, ecP.GetSeed());
ECKeyPairGenerator g = new ECKeyPairGenerator();
g.Init(new ECKeyGenerationParameters(ecSpec, new SecureRandom()));
AsymmetricCipherKeyPair keypair = g.GenerateKeyPair();
..
ECPrivateKeyParameters privateKeyParam = (ECPrivateKeyParameters)keyPair.Private;
ECPublicKeyParameters publicKeyParam = (ECPublicKeyParameters)keyPair.Public;
它也生成私钥,但是我有私钥并使用存在的私钥。
如何使用现有私钥仅生成公钥?