• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     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 
getPreComp()27     protected ECPoint[] getPreComp()
28     {
29         return preComp;
30     }
31 
getPreCompNeg()32     protected ECPoint[] getPreCompNeg()
33     {
34         return preCompNeg;
35     }
36 
setPreComp(ECPoint[] preComp)37     protected void setPreComp(ECPoint[] preComp)
38     {
39         this.preComp = preComp;
40     }
41 
setPreCompNeg(ECPoint[] preCompNeg)42     protected void setPreCompNeg(ECPoint[] preCompNeg)
43     {
44         this.preCompNeg = preCompNeg;
45     }
46 
getTwiceP()47     protected ECPoint getTwiceP()
48     {
49         return twiceP;
50     }
51 
setTwiceP(ECPoint twiceP)52     protected void setTwiceP(ECPoint twiceP)
53     {
54         this.twiceP = twiceP;
55     }
56 }
57