WNafPreCompInfo.cs 1.3 KB

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