WNafPreCompInfo.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. */
  14. protected ECPoint[] m_preComp = null;
  15. /**
  16. * Array holding the negations of the precomputed <code>ECPoint</code>s used
  17. * for a Window NAF multiplication.
  18. */
  19. protected ECPoint[] m_preCompNeg = null;
  20. /**
  21. * Holds an <code>ECPoint</code> representing Twice(this). Used for the
  22. * Window NAF multiplication to create or extend the precomputed values.
  23. */
  24. protected ECPoint m_twice = null;
  25. public virtual ECPoint[] PreComp
  26. {
  27. get { return m_preComp; }
  28. set { this.m_preComp = value; }
  29. }
  30. public virtual ECPoint[] PreCompNeg
  31. {
  32. get { return m_preCompNeg; }
  33. set { this.m_preCompNeg = value; }
  34. }
  35. public virtual ECPoint Twice
  36. {
  37. get { return m_twice; }
  38. set { this.m_twice = value; }
  39. }
  40. }
  41. }