protected override ECPoint MultiplyPositive(ECPoint p, BigInteger k) { if (!this.curve.Equals(p.Curve)) { throw new InvalidOperationException(); } BigInteger order = p.Curve.Order; BigInteger[] array = this.glvEndomorphism.DecomposeScalar(k.Mod(order)); BigInteger k2 = array[0]; BigInteger l = array[1]; ECPointMap pointMap = this.glvEndomorphism.PointMap; if (this.glvEndomorphism.HasEfficientPointMap) { return(ECAlgorithms.ImplShamirsTrickWNaf(p, k2, pointMap, l)); } return(ECAlgorithms.ImplShamirsTrickWNaf(p, k2, pointMap.Map(p), l)); }
protected override ECPoint MultiplyPositive(ECPoint p, BigInteger k) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (!curve.Equals(p.Curve)) { throw new InvalidOperationException(); } BigInteger order = p.Curve.Order; BigInteger[] array = glvEndomorphism.DecomposeScalar(k.Mod(order)); BigInteger k2 = array[0]; BigInteger l = array[1]; ECPointMap pointMap = glvEndomorphism.PointMap; if (glvEndomorphism.HasEfficientPointMap) { return(ECAlgorithms.ImplShamirsTrickWNaf(p, k2, pointMap, l)); } return(ECAlgorithms.ImplShamirsTrickWNaf(p, k2, pointMap.Map(p), l)); }
protected override ECPoint MultiplyPositive(ECPoint p, BigInteger k) { if (!this.curve.Equals(p.Curve)) { throw new InvalidOperationException(); } var n = p.Curve.Order; var ab = this.glvEndomorphism.DecomposeScalar(k.Mod(n)); BigInteger a = ab[0], b = ab[1]; var pointMap = this.glvEndomorphism.PointMap; if (this.glvEndomorphism.HasEfficientPointMap) { return(ECAlgorithms.ImplShamirsTrickWNaf(p, a, pointMap, b)); } return(ECAlgorithms.ImplShamirsTrickWNaf(p, a, pointMap.Map(p), b)); }
protected override ECPoint MultiplyPositive(ECPoint p, BigInteger k) { if (!curve.Equals(p.Curve)) { throw new InvalidOperationException(); } BigInteger n = p.Curve.Order; BigInteger[] ab = glvEndomorphism.DecomposeScalar(k.Mod(n)); BigInteger a = ab[0], b = ab[1]; if (glvEndomorphism.HasEfficientPointMap) { return(ECAlgorithms.ImplShamirsTrickWNaf(glvEndomorphism, p, a, b)); } ECPoint q = EndoUtilities.MapPoint(glvEndomorphism, p); return(ECAlgorithms.ImplShamirsTrickWNaf(p, a, q, b)); }