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