# < Summary

Information

Class: | Renci.SshNet.Security.Org.BouncyCastle.Math.EC.Multiplier.AbstractECMultiplier
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\math\ec\multiplier\AbstractECMultiplier.cs

Line coverage
90%

Covered lines: | 10
Uncovered lines: | 1
Coverable lines: | 11
Total lines: | 29
Line coverage: | 90.9%

Branch coverage
50%

Covered branches: | 3
Total branches: | 6
Branch coverage: | 50%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
Multiply(...) | 50% | 6 | 87.5%
CheckResult(...) | 100% | 1 | 100%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\math\ec\multiplier\AbstractECMultiplier.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `namespace Renci.SshNet.Security.Org.BouncyCastle.Math.EC.Multiplier`
|  | `2` |  | `{`
|  | `3` |  | `internal abstract class AbstractECMultiplier`
|  | `4` |  | `: ECMultiplier`
|  | `5` |  | `{`
|  | `6` |  | `public virtual ECPoint Multiply(ECPoint p, BigInteger k)`
| 18 | `7` |  | `{`
| 18 | `8` |  | `int sign = k.SignValue;`
| 18 | `9` |  | `if (sign == 0 || p.IsInfinity)`
| 0 | `10` |  | `return p.Curve.Infinity;`
|  | `11` |  | ``
| 18 | `12` |  | `ECPoint positive = MultiplyPositive(p, k.Abs());`
| 18 | `13` |  | `ECPoint result = sign > 0 ? positive : positive.Negate();`
|  | `14` |  | ``
|  | `15` |  | `/*`
|  | `16` |  | `* Although the various multipliers ought not to produce invalid output under normal`
|  | `17` |  | `* circumstances, a final check here is advised to guard against fault attacks.`
|  | `18` |  | `*/`
| 18 | `19` |  | `return CheckResult(result);`
| 18 | `20` |  | `}`
|  | `21` |  | ``
|  | `22` |  | `protected abstract ECPoint MultiplyPositive(ECPoint p, BigInteger k);`
|  | `23` |  | ``
|  | `24` |  | `protected virtual ECPoint CheckResult(ECPoint p)`
| 18 | `25` |  | `{`
| 18 | `26` |  | `return ECAlgorithms.ImplCheckResult(p);`
| 18 | `27` |  | `}`
|  | `28` |  | `}`
|  | `29` |  | `}`

# Methods/Properties

Multiply(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECPoint,Renci.SshNet.Security.Org.BouncyCastle.Math.BigInteger)
CheckResult(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECPoint)