/** * Retrieve an EC based domain parameter by parameter ID. A custom curve will be returned if one is available. * * @param paramID identifier for the domain parameters. * @return the matching domain parameters if found, null otherwise. */ public static NamedECDomainParameters LookupDomainParameters(IECDomainParametersID paramID) { X9ECParameters rv = CustomNamedCurves.GetByName(paramID.CurveName); if (rv == null) { rv = ECNamedCurveTable.GetByName(paramID.CurveName); } if (rv != null) { return(new NamedECDomainParameters(ECNamedCurveTable.GetOid(paramID.CurveName), rv.Curve, rv.G, rv.N, rv.H, rv.GetSeed())); } return(null); }
internal AsymmetricECKey(Algorithm algorithm, IECDomainParametersID domainParameterID) : this(algorithm, ECDomainParametersIndex.LookupDomainParameters(domainParameterID)) { }
public AsymmetricECPrivateKey(Algorithm ecAlg, IECDomainParametersID domainParametersID, BigInteger s, ECPoint w): base(ecAlg, domainParametersID) { this.d = s; this.publicKey = extractPublicKeyBytes(w); this.hashCode = calculateHashCode(); }
public AsymmetricECPrivateKey(Algorithm ecAlg, IECDomainParametersID domainParametersID, BigInteger s): this(ecAlg, domainParametersID, s, null) { }
public AsymmetricECPublicKey(Algorithm ecAlg, IECDomainParametersID domainParameterID, ECPoint q) : base(ecAlg, domainParameterID) { this.q = KeyUtils.Validated(q); }
public AsymmetricECPublicKey(Algorithm ecAlg, IECDomainParametersID domainParameterID, byte[] encodedPoint) : base(ecAlg, domainParameterID) { this.q = KeyUtils.Validated(this.DomainParameters.Curve.DecodePoint(encodedPoint)); }