本文整理汇总了C#中Org.BouncyCastle.Math.EC.ECPoint.Normalize方法的典型用法代码示例。如果您正苦于以下问题:C# ECPoint.Normalize方法的具体用法?C# ECPoint.Normalize怎么用?C# ECPoint.Normalize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Org.BouncyCastle.Math.EC.ECPoint
的用法示例。
在下文中一共展示了ECPoint.Normalize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ECPublicKeyParameters
public ECPublicKeyParameters(
ECPoint q,
DerObjectIdentifier publicKeyParamSet)
: base("ECGOST3410", false, publicKeyParamSet)
{
if (q == null)
throw new ArgumentNullException("q");
this.q = q.Normalize();
}
示例2: ECDomainParameters
public ECDomainParameters(
ECCurve curve,
ECPoint g,
BigInteger n,
BigInteger h,
byte[] seed)
{
if (curve == null)
throw new ArgumentNullException("curve");
if (g == null)
throw new ArgumentNullException("g");
if (n == null)
throw new ArgumentNullException("n");
if (h == null)
throw new ArgumentNullException("h");
this.curve = curve;
this.g = g.Normalize();
this.n = n;
this.h = h;
this.seed = Arrays.Clone(seed);
}
示例3: X9ECPoint
public X9ECPoint(ECPoint p, bool compressed)
{
this.p = p.Normalize();
this.encoding = new DerOctetString(p.GetEncoded(compressed));
}
示例4: ImportPoint
public virtual ECPoint ImportPoint(ECPoint p)
{
if (this == p.Curve)
{
return p;
}
if (p.IsInfinity)
{
return Infinity;
}
// TODO Default behaviour could be improved if the two curves have the same coordinate system by copying any Z coordinates.
p = p.Normalize();
return ValidatePoint(p.XCoord.ToBigInteger(), p.YCoord.ToBigInteger(), p.IsCompressed);
}
示例5: X9ECParameters
public X9ECParameters(
ECCurve curve,
ECPoint g,
BigInteger n,
BigInteger h,
byte[] seed)
{
this.curve = curve;
this.g = g.Normalize();
this.n = n;
this.h = h;
this.seed = seed;
if (ECAlgorithms.IsFpCurve(curve))
{
this.fieldID = new X9FieldID(curve.Field.Characteristic);
}
else if (ECAlgorithms.IsF2mCurve(curve))
{
IPolynomialExtensionField field = (IPolynomialExtensionField)curve.Field;
int[] exponents = field.MinimalPolynomial.GetExponentsPresent();
if (exponents.Length == 3)
{
this.fieldID = new X9FieldID(exponents[2], exponents[1]);
}
else if (exponents.Length == 5)
{
this.fieldID = new X9FieldID(exponents[4], exponents[1], exponents[2], exponents[3]);
}
else
{
throw new ArgumentException("Only trinomial and pentomial curves are supported");
}
}
else
{
throw new ArgumentException("'curve' is of an unsupported type");
}
}
示例6: X9ECPoint
public X9ECPoint(
ECPoint p)
{
this.p = p.Normalize();
}