summary refs log tree commit diff
path: root/Crypto/src/math/ec/multiplier/WNafPreCompInfo.cs
blob: d9305dacef73b13e07319e24ec0136c81fa6dac2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;

		/**
		* 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;

		internal ECPoint[] GetPreComp()
		{
			return preComp;
		}

		internal void SetPreComp(ECPoint[] preComp)
		{
			this.preComp = preComp;
		}

		internal ECPoint GetTwiceP()
		{
			return twiceP;
		}

		internal void SetTwiceP(ECPoint twiceThis)
		{
			this.twiceP = twiceThis;
		}
	}
}