当前位置: 首页>>代码示例>>C#>>正文


C# EC.ECCurve类代码示例

本文整理汇总了C#中Org.BouncyCastle.Math.EC.ECCurve的典型用法代码示例。如果您正苦于以下问题:C# ECCurve类的具体用法?C# ECCurve怎么用?C# ECCurve使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ECCurve类属于Org.BouncyCastle.Math.EC命名空间,在下文中一共展示了ECCurve类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Config

 internal Config(ECCurve outer, int coord, ECEndomorphism endomorphism, ECMultiplier multiplier)
 {
     this.outer = outer;
     this.coord = coord;
     this.endomorphism = endomorphism;
     this.multiplier = multiplier;
 }
开发者ID:JohnMalmsteen,项目名称:mobile-apps-tower-defense,代码行数:7,代码来源:ECCurve.cs

示例2: X9ECParameters

		public X9ECParameters(
            ECCurve		curve,
            ECPoint		g,
            BigInteger	n)
            : this(curve, g, n, BigInteger.One, null)
        {
        }
开发者ID:NelsonSantos,项目名称:fyiReporting-Android,代码行数:7,代码来源:X9ECParameters.cs

示例3: GetInitialZCoords

        protected static ECFieldElement[] GetInitialZCoords(ECCurve curve)
        {
            // Cope with null curve, most commonly used by implicitlyCa
            int coord = null == curve ? ECCurve.COORD_AFFINE : curve.CoordinateSystem;

            switch (coord)
            {
                case ECCurve.COORD_AFFINE:
                case ECCurve.COORD_LAMBDA_AFFINE:
                    return EMPTY_ZS;
                default:
                    break;
            }

            ECFieldElement one = curve.FromBigInteger(BigInteger.One);

            switch (coord)
            {
                case ECCurve.COORD_HOMOGENEOUS:
                case ECCurve.COORD_JACOBIAN:
                case ECCurve.COORD_LAMBDA_PROJECTIVE:
                    return new ECFieldElement[] { one };
                case ECCurve.COORD_JACOBIAN_CHUDNOVSKY:
                    return new ECFieldElement[] { one, one, one };
                case ECCurve.COORD_JACOBIAN_MODIFIED:
                    return new ECFieldElement[] { one, curve.A };
                default:
                    throw new ArgumentException("unknown coordinate system");
            }
        }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:30,代码来源:ECPoint.cs

示例4: ECPoint

 protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
 {
     // TODO Should curve == null be allowed?
     this.curve = curve;
     this.x = x;
     this.y = y;
 }
开发者ID:hjgode,项目名称:iTextSharpCF,代码行数:7,代码来源:ECPoint.cs

示例5: ECDomainParameters

		public ECDomainParameters(
            ECCurve     curve,
            ECPoint     g,
            BigInteger  n)
			: this(curve, g, n, BigInteger.One)
        {
        }
开发者ID:VimalKumarS,项目名称:mono-tls,代码行数:7,代码来源:ECDomainParameters.cs

示例6: ECPoint

 internal ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
 {
     this.m_curve = curve;
     this.m_x = x;
     this.m_y = y;
     this.m_zs = zs;
     this.m_withCompression = withCompression;
 }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:8,代码来源:ECPoint.cs

示例7: X9ECParameters

 public X9ECParameters(
     ECCurve		curve,
     ECPoint		g,
     BigInteger	n,
     BigInteger	h,
     byte[]		seed)
     : this(curve, new X9ECPoint(g), n, h, seed)
 {
 }
开发者ID:martijn00,项目名称:BouncyCastle-PCL,代码行数:9,代码来源:X9ECParameters.cs

示例8: ECPoint

        protected internal ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, bool withCompression)
        {
            if (curve == null)
                throw new ArgumentNullException("curve");

            _curve = curve;
            _x = x;
            _y = y;
            _withCompression = withCompression;
        }
开发者ID:sanyaade-iot,项目名称:Schmoose-BouncyCastle,代码行数:10,代码来源:ECPoint.cs

示例9: X9ECParameters

		public X9ECParameters (
			ECCurve		curve,
			ECPoint		g,
			BigInteger	n,
			BigInteger	h,
			byte[]		seed)
		{
			this.curve = curve;
			this.g = g;
			this.n = n;
			this.h = h;
			this.seed = seed;
		}
开发者ID:VimalKumarS,项目名称:mono-tls,代码行数:13,代码来源:X9ECParameters.cs

示例10: ECDomainParameters

        public ECDomainParameters(ECCurve curve, ECPoint g, IBigInteger n, IBigInteger 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");

            _curve = curve;
            _g = g;
            _n = n;
            _h = h;
            _seed = Arrays.Clone(seed);
        }
开发者ID:sanyaade-iot,项目名称:Schmoose-BouncyCastle,代码行数:17,代码来源:ECDomainParameters.cs

示例11: 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");
            }
        }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:39,代码来源:X9ECParameters.cs

示例12: ConfigureCurveGlv

 private static ECCurve ConfigureCurveGlv(ECCurve c, GlvTypeBParameters p)
 {
     return c.Configure().SetEndomorphism(new GlvTypeBEndomorphism(c, p)).Create();
 }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:4,代码来源:SECNamedCurves.cs

示例13: ConfigureCurve

 private static ECCurve ConfigureCurve(ECCurve curve)
 {
     return curve;
 }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:4,代码来源:SECNamedCurves.cs

示例14: FpPoint

 internal FpPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
     : base(curve, x, y, zs, withCompression)
 {
 }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:4,代码来源:ECPoint.cs

示例15: ECPointBase

 protected internal ECPointBase(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
     : base(curve, x, y, zs, withCompression)
 {
 }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:4,代码来源:ECPoint.cs


注:本文中的Org.BouncyCastle.Math.EC.ECCurve类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。