| | | 1 | | namespace Renci.SshNet.Security.Org.BouncyCastle.Math.EC.Multiplier |
| | | 2 | | { |
| | | 3 | | /** |
| | | 4 | | * Class holding precomputation data for the WNAF (Window Non-Adjacent Form) |
| | | 5 | | * algorithm. |
| | | 6 | | */ |
| | | 7 | | internal class WNafPreCompInfo |
| | | 8 | | : PreCompInfo |
| | | 9 | | { |
| | | 10 | | /** |
| | | 11 | | * Array holding the precomputed <code>ECPoint</code>s used for a Window |
| | | 12 | | * NAF multiplication. |
| | | 13 | | */ |
| | 9 | 14 | | protected ECPoint[] m_preComp = null; |
| | | 15 | | |
| | | 16 | | /** |
| | | 17 | | * Array holding the negations of the precomputed <code>ECPoint</code>s used |
| | | 18 | | * for a Window NAF multiplication. |
| | | 19 | | */ |
| | 9 | 20 | | protected ECPoint[] m_preCompNeg = null; |
| | | 21 | | |
| | | 22 | | /** |
| | | 23 | | * Holds an <code>ECPoint</code> representing Twice(this). Used for the |
| | | 24 | | * Window NAF multiplication to create or extend the precomputed values. |
| | | 25 | | */ |
| | 9 | 26 | | protected ECPoint m_twice = null; |
| | | 27 | | |
| | | 28 | | public virtual ECPoint[] PreComp |
| | | 29 | | { |
| | 27 | 30 | | get { return m_preComp; } |
| | 27 | 31 | | set { this.m_preComp = value; } |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | public virtual ECPoint[] PreCompNeg |
| | | 35 | | { |
| | 27 | 36 | | get { return m_preCompNeg; } |
| | 27 | 37 | | set { this.m_preCompNeg = value; } |
| | | 38 | | } |
| | | 39 | | |
| | | 40 | | public virtual ECPoint Twice |
| | | 41 | | { |
| | 0 | 42 | | get { return m_twice; } |
| | 27 | 43 | | set { this.m_twice = value; } |
| | | 44 | | } |
| | | 45 | | } |
| | | 46 | | } |