summary refs log tree commit diff
path: root/crypto/src/math/ec/multiplier/WNafPreCompInfo.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-23 18:21:40 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-23 18:21:40 +0700
commit0f05a8dc4b27623d96b08f7619c056a4e65baa9b (patch)
tree18169d7c4c8fbea895811eba8fbe7a9b9e6250ab /crypto/src/math/ec/multiplier/WNafPreCompInfo.cs
parentUse ImportPoint to make sure points are on same curve (diff)
downloadBouncyCastle.NET-ed25519-0f05a8dc4b27623d96b08f7619c056a4e65baa9b.tar.xz
Port of several interrelated things from Java build:
- Z coordinates for points
- More point normalization code
- Curve management of point precomp info
- Add WNafUtilities and use in multipliers/ECAlgorithms
- Make various fields/classes protected/public
Diffstat (limited to 'crypto/src/math/ec/multiplier/WNafPreCompInfo.cs')
-rw-r--r--crypto/src/math/ec/multiplier/WNafPreCompInfo.cs76
1 files changed, 38 insertions, 38 deletions
diff --git a/crypto/src/math/ec/multiplier/WNafPreCompInfo.cs b/crypto/src/math/ec/multiplier/WNafPreCompInfo.cs
index d9305dace..7e0a73154 100644
--- a/crypto/src/math/ec/multiplier/WNafPreCompInfo.cs
+++ b/crypto/src/math/ec/multiplier/WNafPreCompInfo.cs
@@ -1,46 +1,46 @@
 namespace Org.BouncyCastle.Math.EC.Multiplier
 {
-	/**
-	* Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
-	* algorithm.
-	*/
-	internal class WNafPreCompInfo
-		: PreCompInfo 
-	{
-		/**
-		* Array holding the precomputed <code>ECPoint</code>s used for the Window
-		* NAF multiplication in <code>
-		* {@link org.bouncycastle.math.ec.multiplier.WNafMultiplier.multiply()
-		* WNafMultiplier.multiply()}</code>.
-		*/
-		private ECPoint[] preComp = null;
+    /**
+    * Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
+    * algorithm.
+    */
+    public class WNafPreCompInfo
+        : PreCompInfo 
+    {
+        /**
+         * Array holding the precomputed <code>ECPoint</code>s used for a Window
+         * NAF multiplication.
+         */
+        protected ECPoint[] m_preComp = null;
 
-		/**
-		* Holds an <code>ECPoint</code> representing twice(this). Used for the
-		* Window NAF multiplication in <code>
-		* {@link org.bouncycastle.math.ec.multiplier.WNafMultiplier.multiply()
-		* WNafMultiplier.multiply()}</code>.
-		*/
-		private ECPoint twiceP = null;
+        /**
+         * Array holding the negations of the precomputed <code>ECPoint</code>s used
+         * for a Window NAF multiplication.
+         */
+        protected ECPoint[] m_preCompNeg = null;
 
-		internal ECPoint[] GetPreComp()
-		{
-			return preComp;
-		}
+        /**
+         * Holds an <code>ECPoint</code> representing Twice(this). Used for the
+         * Window NAF multiplication to create or extend the precomputed values.
+         */
+        protected ECPoint m_twice = null;
 
-		internal void SetPreComp(ECPoint[] preComp)
-		{
-			this.preComp = preComp;
-		}
+        public virtual ECPoint[] PreComp
+        {
+            get { return m_preComp; }
+            set { this.m_preComp = value; }
+        }
 
-		internal ECPoint GetTwiceP()
-		{
-			return twiceP;
-		}
+        public virtual ECPoint[] PreCompNeg
+        {
+            get { return m_preCompNeg; }
+            set { this.m_preCompNeg = value; }
+        }
 
-		internal void SetTwiceP(ECPoint twiceThis)
-		{
-			this.twiceP = twiceThis;
-		}
-	}
+        public virtual ECPoint Twice
+        {
+            get { return m_twice; }
+            set { this.m_twice = value; }
+        }
+    }
 }