# < Summary

Information

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

Line coverage
0%

Covered lines: | 0
Uncovered lines: | 19
Coverable lines: | 19
Total lines: | 40
Line coverage: | 0%

Branch coverage
0%

Covered branches: | 0
Total branches: | 8
Branch coverage: | 0%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
.ctor(...) | 0% | 4 | 0%
MultiplyPositive(...) | 0% | 4 | 0%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | ``
|  | `3` |  | `using Renci.SshNet.Security.Org.BouncyCastle.Math.EC.Endo;`
|  | `4` |  | ``
|  | `5` |  | `namespace Renci.SshNet.Security.Org.BouncyCastle.Math.EC.Multiplier`
|  | `6` |  | `{`
|  | `7` |  | `internal class GlvMultiplier`
|  | `8` |  | `: AbstractECMultiplier`
|  | `9` |  | `{`
|  | `10` |  | `protected readonly ECCurve curve;`
|  | `11` |  | `protected readonly GlvEndomorphism glvEndomorphism;`
|  | `12` |  | ``
| 0 | `13` |  | `public GlvMultiplier(ECCurve curve, GlvEndomorphism glvEndomorphism)`
| 0 | `14` |  | `{`
| 0 | `15` |  | `if (curve == null || curve.Order == null)`
| 0 | `16` |  | `throw new ArgumentException("Need curve with known group order", "curve");`
|  | `17` |  | ``
| 0 | `18` |  | `this.curve = curve;`
| 0 | `19` |  | `this.glvEndomorphism = glvEndomorphism;`
| 0 | `20` |  | `}`
|  | `21` |  | ``
|  | `22` |  | `protected override ECPoint MultiplyPositive(ECPoint p, BigInteger k)`
| 0 | `23` |  | `{`
| 0 | `24` |  | `if (!curve.Equals(p.Curve))`
| 0 | `25` |  | `throw new InvalidOperationException();`
|  | `26` |  | ``
| 0 | `27` |  | `BigInteger n = p.Curve.Order;`
| 0 | `28` |  | `BigInteger[] ab = glvEndomorphism.DecomposeScalar(k.Mod(n));`
| 0 | `29` |  | `BigInteger a = ab[0], b = ab[1];`
|  | `30` |  | ``
| 0 | `31` |  | `ECPointMap pointMap = glvEndomorphism.PointMap;`
| 0 | `32` |  | `if (glvEndomorphism.HasEfficientPointMap)`
| 0 | `33` |  | `{`
| 0 | `34` |  | `return ECAlgorithms.ImplShamirsTrickWNaf(p, a, pointMap, b);`
|  | `35` |  | `}`
|  | `36` |  | ``
| 0 | `37` |  | `return ECAlgorithms.ImplShamirsTrickWNaf(p, a, pointMap.Map(p), b);`
| 0 | `38` |  | `}`
|  | `39` |  | `}`
|  | `40` |  | `}`

# Methods/Properties

.ctor(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECCurve,Renci.SshNet.Security.Org.BouncyCastle.Math.EC.Endo.GlvEndomorphism)
MultiplyPositive(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECPoint,Renci.SshNet.Security.Org.BouncyCastle.Math.BigInteger)