當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。