NBitcoin.BouncyCastle.Math.EC.ECCurve.GetEndomorphism C# (CSharp) Method

GetEndomorphism() public method

public GetEndomorphism ( ) : ECEndomorphism
return ECEndomorphism
		public virtual ECEndomorphism GetEndomorphism()
		{
			return m_endomorphism;
		}

Usage Example

コード例 #1
0
        public static ECPoint SumOfTwoMultiplies(ECPoint P, BigInteger a, ECPoint Q, BigInteger b)
        {
            ECCurve cp = P.Curve;

            Q = ImportPoint(cp, Q);

            // Point multiplication for Koblitz curves (using WTNAF) beats Shamir's trick
            {
                var f2mCurve = cp as AbstractF2mCurve;
                if (f2mCurve != null && f2mCurve.IsKoblitz)
                {
                    return(ValidatePoint(P.Multiply(a).Add(Q.Multiply(b))));
                }
            }

            var glvEndomorphism = cp.GetEndomorphism() as GlvEndomorphism;

            if (glvEndomorphism != null)
            {
                return(ValidatePoint(
                           ImplSumOfMultipliesGlv(new ECPoint[] { P, Q }, new BigInteger[] { a, b }, glvEndomorphism)));
            }

            return(ValidatePoint(ImplShamirsTrickWNaf(P, a, Q, b)));
        }
All Usage Examples Of NBitcoin.BouncyCastle.Math.EC.ECCurve::GetEndomorphism