WNafPreCompInfo.java revision 5db505e1f6a68c8d5dfdb0fed0b8607dea7bed96
1package org.bouncycastle.math.ec; 2 3/** 4 * Class holding precomputation data for the WNAF (Window Non-Adjacent Form) 5 * algorithm. 6 */ 7public class WNafPreCompInfo implements PreCompInfo 8{ 9 /** 10 * Array holding the precomputed <code>ECPoint</code>s used for a Window 11 * NAF multiplication. 12 */ 13 private ECPoint[] preComp = null; 14 15 /** 16 * Array holding the negations of the precomputed <code>ECPoint</code>s used 17 * for a Window NAF multiplication. 18 */ 19 private ECPoint[] preCompNeg = null; 20 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 private ECPoint twiceP = null; 26 27 protected ECPoint[] getPreComp() 28 { 29 return preComp; 30 } 31 32 protected ECPoint[] getPreCompNeg() 33 { 34 return preCompNeg; 35 } 36 37 protected void setPreComp(ECPoint[] preComp) 38 { 39 this.preComp = preComp; 40 } 41 42 protected void setPreCompNeg(ECPoint[] preCompNeg) 43 { 44 this.preCompNeg = preCompNeg; 45 } 46 47 protected ECPoint getTwiceP() 48 { 49 return twiceP; 50 } 51 52 protected void setTwiceP(ECPoint twiceP) 53 { 54 this.twiceP = twiceP; 55 } 56} 57