diff options
Diffstat (limited to 'libraries/spongycastle/core/src/main/java/org/spongycastle/math/ec/WTauNafPreCompInfo.java')
-rw-r--r-- | libraries/spongycastle/core/src/main/java/org/spongycastle/math/ec/WTauNafPreCompInfo.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libraries/spongycastle/core/src/main/java/org/spongycastle/math/ec/WTauNafPreCompInfo.java b/libraries/spongycastle/core/src/main/java/org/spongycastle/math/ec/WTauNafPreCompInfo.java new file mode 100644 index 000000000..2373ff7a9 --- /dev/null +++ b/libraries/spongycastle/core/src/main/java/org/spongycastle/math/ec/WTauNafPreCompInfo.java @@ -0,0 +1,39 @@ +package org.spongycastle.math.ec; + +/** + * Class holding precomputation data for the WTNAF (Window + * <code>τ</code>-adic Non-Adjacent Form) algorithm. + */ +class WTauNafPreCompInfo implements PreCompInfo +{ + /** + * Array holding the precomputed <code>ECPoint.F2m</code>s used for the + * WTNAF multiplication in <code> + * {@link org.spongycastle.math.ec.multiplier.WTauNafMultiplier.multiply() + * WTauNafMultiplier.multiply()}</code>. + */ + private ECPoint.F2m[] preComp = null; + + /** + * Constructor for <code>WTauNafPreCompInfo</code> + * @param preComp Array holding the precomputed <code>ECPoint.F2m</code>s + * used for the WTNAF multiplication in <code> + * {@link org.spongycastle.math.ec.multiplier.WTauNafMultiplier.multiply() + * WTauNafMultiplier.multiply()}</code>. + */ + WTauNafPreCompInfo(ECPoint.F2m[] preComp) + { + this.preComp = preComp; + } + + /** + * @return the array holding the precomputed <code>ECPoint.F2m</code>s + * used for the WTNAF multiplication in <code> + * {@link org.spongycastle.math.ec.multiplier.WTauNafMultiplier.multiply() + * WTauNafMultiplier.multiply()}</code>. + */ + protected ECPoint.F2m[] getPreComp() + { + return preComp; + } +} |